FreeNOS
Public Member Functions
IntelCore Class Reference

Intel CPU Core. More...

#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...
 

Detailed Description

Intel CPU Core.

Definition at line 257 of file IntelCore.h.

Member Function Documentation

◆ logException()

void IntelCore::logException ( CPUState state) const

◆ logRegister()

void IntelCore::logRegister ( const char *  name,
u32  reg 
) const

Log a register.

Parameters
nameName of the register.
regValue of the register.

Definition at line 134 of file IntelCore.cpp.

References Number::Dec, ERROR, and Number::Hex.

Referenced by logState().

◆ logState()

void IntelCore::logState ( CPUState state) const

Log the CPU state.

Parameters
stateThe 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().

◆ readCR2()

volatile u32 IntelCore::readCR2 ( ) const

Read the CR2 register.

Definition at line 142 of file IntelCore.cpp.

Referenced by logException().

◆ readCR3()

volatile u32 IntelCore::readCR3 ( ) const

Read the CR3 register.

Definition at line 150 of file IntelCore.cpp.

Referenced by IntelPaging::initialize(), and IntelKernel::IntelKernel().

◆ writeCR3()

void IntelCore::writeCR3 ( u32  cr3) const

Write the CR3 register.

Definition at line 158 of file IntelCore.cpp.

Referenced by IntelPaging::activate().


The documentation for this class was generated from the following files: