|
FreeNOS
|
Represents the ARM64 kernel implementation. More...
#include <ARM64Kernel.h>
Public Member Functions | |
| ARM64Kernel (CoreInfo *info) | |
| Constructor function. | |
Public Member Functions inherited from Kernel | |
| Kernel (CoreInfo *info) | |
| Constructor function. | |
| SplitAllocator * | getAllocator () |
| Get physical memory allocator. | |
| ProcessManager * | getProcessManager () |
| Get process manager. | |
| API * | getAPI () |
| Get API. | |
| MemoryContext * | getMemoryContext () |
| Get the current MMU context. | |
| CoreInfo * | getCoreInfo () |
| Get CoreInfo. | |
| Timer * | getTimer () |
| 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 | |
| SplitAllocator * | m_alloc |
| Physical memory allocator. | |
| ProcessManager * | m_procs |
| Process Manager. | |
| API * | m_api |
| API handlers object. | |
| CoreInfo * | m_coreInfo |
| CoreInfo object for this core. | |
| Vector< List< InterruptHook * > * > | m_interrupts |
| Interrupt handlers. | |
| IntController * | m_intControl |
| Interrupt Controller. | |
| Timer * | m_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 Kernel * | instance () |
| Retrieve the instance. | |
Represents the ARM64 kernel implementation.
Definition at line 38 of file ARM64Kernel.h.
| ARM64Kernel::ARM64Kernel | ( | CoreInfo * | info | ) |
Constructor function.
| info | Contains processor core specific information |
Definition at line 71 of file ARM64Kernel.cpp.
References SplitAllocator::allocate(), CoreInfo::coreId, FatalHandler(), ARM64Exception::FIQ_Lower_EL, ARM64Exception::FIQ_Lower_EL_AA32, ARM64Exception::FIQ_SP_EL0, ARM64Exception::FIQ_SP_ELx, ARM64Exception::install(), ARM64Exception::IRQ_Lower_EL, ARM64Exception::IRQ_Lower_EL_AA32, ARM64Exception::IRQ_SP_EL0, ARM64Exception::IRQ_SP_ELx, CoreInfo::kernel, Kernel::m_alloc, Kernel::m_coreInfo, m_exception, NOTICE, PAGESIZE, Memory::Range::phys, ARM64Exception::SError_Lower_EL, ARM64Exception::SError_Lower_EL_AA32, ARM64Exception::SError_SP_EL0, ARM64Exception::SError_SP_ELx, ARM64Exception::Sync_Lower_EL, ARM64Exception::Sync_Lower_EL_AA32, ARM64Exception::Sync_SP_EL0, ARM64Exception::Sync_SP_ELx, SyncExceptionEL0(), and SyncExceptionEL1().
|
staticprivate |
Fatal errors.
| state | Saved CPU register state |
Definition at line 31 of file ARM64Kernel.cpp.
References FATAL.
Referenced by ARM64Kernel().
|
staticprivate |
Synchronous exceptions from EL0.
| state | Saved CPU register state |
Definition at line 36 of file ARM64Kernel.cpp.
References ERROR, CPUState::esr, exception_code, CPUState::far, and trap().
Referenced by ARM64Kernel().
|
staticprivate |
Synchronous exceptions from EL1.
| state | Saved CPU register state |
Definition at line 52 of file ARM64Kernel.cpp.
References ERROR, CPUState::esr, exception_code, CPUState::far, and NOTICE.
Referenced by ARM64Kernel().
|
staticprivate |
Software trap routine.
| state | Saved CPU register state |
Definition at line 106 of file ARM64Kernel.cpp.
References MemoryBlock::copy(), CoreInfo::coreId, coreInfo, ProcessManager::current(), DEBUG, ProcessManager::get(), Kernel::getAPI(), Process::getID(), Kernel::getProcessManager(), WeakSingleton< Kernel >::instance(), API::invoke(), NULL, ARM64Process::setCpuState(), CPUState::x0, CPUState::x1, CPUState::x2, CPUState::x3, CPUState::x4, and CPUState::x8.
Referenced by SyncExceptionEL0().
|
protected |
ARM64 exception handling subsystem.
Definition at line 80 of file ARM64Kernel.h.
Referenced by ARM64Kernel().