FreeNOS
|
#include <IntelCore.h>
Public Member Functions | |
void | logException (CPUState *state) const |
Log a CPU exception. More... | |
void | logState (CPUState *state) const |
Log the CPU state. More... | |
void | logRegister (const char *name, u32 reg) const |
Log a register. More... | |
volatile u32 | readCR2 () const |
Read the CR2 register. More... | |
volatile u32 | readCR3 () const |
Read the CR3 register. More... | |
void | writeCR3 (u32 cr3) const |
Write the CR3 register. More... | |
Intel CPU Core.
Definition at line 257 of file IntelCore.h.
void IntelCore::logException | ( | CPUState * | state | ) | const |
Log a CPU exception.
state | The current CPU state. |
Definition at line 26 of file IntelCore.cpp.
References ERROR, CPUState::error, Number::Hex, INTEL_ALIGNERR, INTEL_BOUNDS, INTEL_BREAKP, INTEL_COSEG, INTEL_DEBUGEX, INTEL_DEVERR, INTEL_DIVZERO, INTEL_DOUBLEF, INTEL_FLOATERR, INTEL_GENERR, INTEL_MACHCHK, INTEL_NMI, INTEL_OPCODE, INTEL_OVERFLOW, INTEL_PAGEFAULT, INTEL_SEGERR, INTEL_SIMD, INTEL_STACKERR, INTEL_TSSERR, INTEL_VIRTERR, logState(), readCR2(), and CPUState::vector.
Referenced by IntelKernel::exception().
void IntelCore::logRegister | ( | const char * | name, |
u32 | reg | ||
) | const |
Log a register.
name | Name of the register. |
reg | Value of the register. |
Definition at line 134 of file IntelCore.cpp.
References Number::Dec, ERROR, and Number::Hex.
Referenced by logState().
void IntelCore::logState | ( | CPUState * | state | ) | const |
Log the CPU state.
state | The current CPU state. |
Definition at line 121 of file IntelCore.cpp.
References CPURegs::eax, CPURegs::ebp, CPURegs::ebx, CPURegs::ecx, CPURegs::edi, CPURegs::edx, IRQRegs3::eip, CPURegs::esi, CPURegs::esp0, CPUState::irq, logRegister(), and CPUState::regs.
Referenced by logException().
volatile u32 IntelCore::readCR2 | ( | ) | const |
volatile u32 IntelCore::readCR3 | ( | ) | const |
Read the CR3 register.
Definition at line 150 of file IntelCore.cpp.
Referenced by IntelPaging::initialize(), and IntelKernel::IntelKernel().
void IntelCore::writeCR3 | ( | u32 | cr3 | ) | const |
Write the CR3 register.
Definition at line 158 of file IntelCore.cpp.
Referenced by IntelPaging::activate().