FreeNOS
Public Member Functions | Protected Attributes | Static Private Member Functions
ARMKernel Class Reference

Represents the ARM kernel implementation. More...

#include <ARMKernel.h>

Inheritance diagram for ARMKernel:
Kernel WeakSingleton< Kernel > RaspberryKernel SunxiKernel

Public Member Functions

 ARMKernel (CoreInfo *info)
 Constructor function. More...
 
- Public Member Functions inherited from Kernel
 Kernel (CoreInfo *info)
 Constructor function. More...
 
SplitAllocatorgetAllocator ()
 Get physical memory allocator. More...
 
ProcessManagergetProcessManager ()
 Get process manager. More...
 
APIgetAPI ()
 Get API. More...
 
MemoryContextgetMemoryContext ()
 Get the current MMU context. More...
 
CoreInfogetCoreInfo ()
 Get CoreInfo. More...
 
TimergetTimer ()
 Get Timer. More...
 
int run ()
 Execute the kernel. More...
 
virtual void enableIRQ (u32 irq, bool enabled)
 Enable or disable an hardware interrupt (IRQ). More...
 
virtual Result sendIRQ (const uint coreId, const uint irq)
 Send a inter-processor-interrupt (IPI) to another core. More...
 
virtual void hookIntVector (u32 vec, InterruptHandler h, ulong p)
 Hooks a function to an hardware interrupt. More...
 
virtual void executeIntVector (u32 vec, CPUState *state)
 Execute an interrupt handler. More...
 
virtual Result loadBootImage ()
 Loads the boot image. More...
 
- Public Member Functions inherited from WeakSingleton< Kernel >
 WeakSingleton (Kernel *obj)
 Constructor. More...
 

Protected Attributes

ARMException m_exception
 ARM exception handling subsystem. More...
 
- Protected Attributes inherited from Kernel
SplitAllocatorm_alloc
 Physical memory allocator. More...
 
ProcessManagerm_procs
 Process Manager. More...
 
APIm_api
 API handlers object. More...
 
CoreInfom_coreInfo
 CoreInfo object for this core. More...
 
Vector< List< InterruptHook * > * > m_interrupts
 Interrupt handlers. More...
 
IntControllerm_intControl
 Interrupt Controller. More...
 
Timerm_timer
 Timer device. More...
 

Static Private Member Functions

static void interrupt (CPUState state)
 Interrupt handler routine. More...
 
static void trap (CPUState state)
 Software trap routine. More...
 
static void undefinedInstruction (CPUState state)
 Undefined instruction routine. More...
 
static void prefetchAbort (CPUState state)
 Prefetch abort routine. More...
 
static void dataAbort (CPUState state)
 Data abort routine. More...
 
static void reserved (CPUState state)
 Reserved routine. More...
 

Additional Inherited Members

- Public Types inherited from Kernel
enum  Result { Success, InvalidBootImage, ProcessError, IOError }
 Result codes. More...
 
- Static Public Member Functions inherited from Kernel
static Error initializeHeap ()
 Initialize heap. More...
 
- Static Public Member Functions inherited from WeakSingleton< Kernel >
static Kernelinstance ()
 Retrieve the instance. More...
 

Detailed Description

Represents the ARM kernel implementation.

Definition at line 40 of file ARMKernel.h.

Constructor & Destructor Documentation

◆ ARMKernel()

ARMKernel::ARMKernel ( CoreInfo info)

Member Function Documentation

◆ dataAbort()

void ARMKernel::dataAbort ( CPUState  state)
staticprivate

Data abort routine.

Parameters
stateSaved CPU register state

Definition at line 101 of file ARMKernel.cpp.

References CoreInfo::coreId, coreInfo, ProcessManager::current(), FATAL, Process::getID(), Kernel::getProcessManager(), WeakSingleton< Kernel >::instance(), and ARMCore::logException().

Referenced by ARMKernel().

◆ interrupt()

void ARMKernel::interrupt ( CPUState  state)
staticprivate

Interrupt handler routine.

Parameters
stateSaved CPU register state

Definition at line 74 of file ARMKernel.cpp.

References CoreInfo::coreId, coreInfo, ProcessManager::current(), FATAL, Process::getID(), Kernel::getProcessManager(), WeakSingleton< Kernel >::instance(), and ARMCore::logException().

Referenced by ARMKernel().

◆ prefetchAbort()

void ARMKernel::prefetchAbort ( CPUState  state)
staticprivate

Prefetch abort routine.

Parameters
stateSaved CPU register state

Definition at line 92 of file ARMKernel.cpp.

References CoreInfo::coreId, coreInfo, ProcessManager::current(), FATAL, Process::getID(), Kernel::getProcessManager(), WeakSingleton< Kernel >::instance(), and ARMCore::logException().

Referenced by ARMKernel().

◆ reserved()

void ARMKernel::reserved ( CPUState  state)
staticprivate

Reserved routine.

Parameters
stateSaved CPU register state

Definition at line 111 of file ARMKernel.cpp.

References CoreInfo::coreId, coreInfo, ProcessManager::current(), FATAL, Process::getID(), Kernel::getProcessManager(), WeakSingleton< Kernel >::instance(), and ARMCore::logException().

Referenced by ARMKernel().

◆ trap()

void ARMKernel::trap ( CPUState  state)
staticprivate

◆ undefinedInstruction()

void ARMKernel::undefinedInstruction ( CPUState  state)
staticprivate

Undefined instruction routine.

Parameters
stateSaved CPU register state

Definition at line 83 of file ARMKernel.cpp.

References CoreInfo::coreId, coreInfo, ProcessManager::current(), FATAL, Process::getID(), Kernel::getProcessManager(), WeakSingleton< Kernel >::instance(), and ARMCore::logException().

Referenced by ARMKernel().

Field Documentation

◆ m_exception

ARMException ARMKernel::m_exception
protected

ARM exception handling subsystem.

Definition at line 98 of file ARMKernel.h.

Referenced by ARMKernel(), RaspberryKernel::RaspberryKernel(), and SunxiKernel::SunxiKernel().


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