StuBS
core.h File Reference

Access to internals of a CPU Core. More...

#include "types.h"
#include "machine/core_cr.h"
#include "machine/core_interrupt.h"
#include "machine/core_msr.h"
Include dependency graph for core.h:
This graph shows which files directly or indirectly include this file:

Namespaces

 Core
 Implements an abstraction for CPU internals.
 

Functions

unsigned Core::getID ()
 Get the ID of the current CPU core using LAPIC::getID() with an internal lookup table. More...
 
void Core::init ()
 Initialize this CPU core. More...
 
void Core::exit ()
 Deinitialize this CPU core. More...
 
unsigned Core::count ()
 Get number of available CPU cores. More...
 
unsigned Core::countOnline ()
 Get number of successfully started (and currently active) CPU cores. More...
 
bool Core::isOnline (uint8_t core_id)
 Check if CPU core is currently active. More...
 
void Core::pause ()
 Gives the core a hint that it is executing a spinloop and should sleep "shortly". More...
 
void Core::idle ()
 Halt the CPU core until the next interrupt. More...
 
void Core::die ()
 Permanently halts the core. More...
 

Variables

const unsigned Core::MAX = 1
 Maximum number of supported CPUs.
 

Detailed Description

Access to internals of a CPU Core.