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

namespace  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.
 
void Core::init ()
 Initialize this CPU core.
 
void Core::exit ()
 Deinitialize this CPU core.
 
unsigned Core::count ()
 Get number of available CPU cores.
 
unsigned Core::countOnline ()
 Get number of successfully started (and currently active) CPU cores.
 
bool Core::isOnline (uint8_t core_id)
 Check if CPU core is currently active.
 
void Core::pause ()
 Gives the core a hint that it is executing a spinloop and should sleep "shortly".
 
void Core::idle ()
 Halt the CPU core until the next interrupt.
 
void Core::die ()
 Permanently halts the core.
 

Variables

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

Detailed Description

Access to internals of a CPU Core.