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

Represents the ARM64 kernel implementation. More...

#include <ARM64Kernel.h>

Inheritance diagram for ARM64Kernel:
Kernel WeakSingleton< Kernel > RaspberryKernel

Public Member Functions

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

Protected Attributes

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

Static Private Member Functions

static void trap (volatile CPUState &state)
 Software trap routine.
 
static void SyncExceptionEL1 (volatile CPUState state)
 Synchronous exceptions from EL1.
 
static void SyncExceptionEL0 (volatile CPUState state)
 Synchronous exceptions from EL0.
 
static void FatalHandler (volatile CPUState state)
 Fatal errors.
 

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.
 
- Static Public Member Functions inherited from WeakSingleton< Kernel >
static Kernelinstance ()
 Retrieve the instance.
 

Detailed Description

Represents the ARM64 kernel implementation.

Definition at line 38 of file ARM64Kernel.h.

Constructor & Destructor Documentation

◆ ARM64Kernel()

ARM64Kernel::ARM64Kernel ( CoreInfo info)

Member Function Documentation

◆ FatalHandler()

void ARM64Kernel::FatalHandler ( volatile CPUState  state)
staticprivate

Fatal errors.

Parameters
stateSaved CPU register state

Definition at line 31 of file ARM64Kernel.cpp.

References FATAL.

Referenced by ARM64Kernel().

◆ SyncExceptionEL0()

void ARM64Kernel::SyncExceptionEL0 ( volatile CPUState  state)
staticprivate

Synchronous exceptions from EL0.

Parameters
stateSaved CPU register state

Definition at line 36 of file ARM64Kernel.cpp.

References ERROR, CPUState::esr, exception_code, CPUState::far, and trap().

Referenced by ARM64Kernel().

◆ SyncExceptionEL1()

void ARM64Kernel::SyncExceptionEL1 ( volatile CPUState  state)
staticprivate

Synchronous exceptions from EL1.

Parameters
stateSaved CPU register state

Definition at line 52 of file ARM64Kernel.cpp.

References ERROR, CPUState::esr, exception_code, CPUState::far, and NOTICE.

Referenced by ARM64Kernel().

◆ trap()

void ARM64Kernel::trap ( volatile CPUState state)
staticprivate

Field Documentation

◆ m_exception

ARM64Exception ARM64Kernel::m_exception
protected

ARM64 exception handling subsystem.

Definition at line 80 of file ARM64Kernel.h.

Referenced by ARM64Kernel().


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