FreeNOS
|
Represents the Raspberry Pi kernel implementation. More...
#include <RaspberryKernel.h>
Public Member Functions | |
RaspberryKernel (CoreInfo *info) | |
Constructor function. More... | |
Public Member Functions inherited from ARMKernel | |
ARMKernel (CoreInfo *info) | |
Constructor function. More... | |
Public Member Functions inherited from Kernel | |
Kernel (CoreInfo *info) | |
Constructor function. More... | |
SplitAllocator * | getAllocator () |
Get physical memory allocator. More... | |
ProcessManager * | getProcessManager () |
Get process manager. More... | |
API * | getAPI () |
Get API. More... | |
MemoryContext * | getMemoryContext () |
Get the current MMU context. More... | |
CoreInfo * | getCoreInfo () |
Get CoreInfo. More... | |
Timer * | getTimer () |
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... | |
Static Private Member Functions | |
static void | interrupt (CPUState state) |
Interrupt handler routine. More... | |
Private Attributes | |
BroadcomInterrupt | m_bcmIntr |
Broadcom specific interrupt controller. More... | |
BroadcomTimer | m_bcmTimer |
Broadcom specific timer module. More... | |
u8 | m_timerIrq |
Interrupt number for the timer. 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 Kernel * | instance () |
Retrieve the instance. More... | |
Protected Attributes inherited from ARMKernel | |
ARMException | m_exception |
ARM exception handling subsystem. More... | |
Protected Attributes inherited from Kernel | |
SplitAllocator * | m_alloc |
Physical memory allocator. More... | |
ProcessManager * | m_procs |
Process Manager. More... | |
API * | m_api |
API handlers object. More... | |
CoreInfo * | m_coreInfo |
CoreInfo object for this core. More... | |
Vector< List< InterruptHook * > * > | m_interrupts |
Interrupt handlers. More... | |
IntController * | m_intControl |
Interrupt Controller. More... | |
Timer * | m_timer |
Timer device. More... | |
Represents the Raspberry Pi kernel implementation.
Definition at line 40 of file RaspberryKernel.h.
RaspberryKernel::RaspberryKernel | ( | CoreInfo * | info | ) |
Constructor function.
info | Contains processor core specific information |
Definition at line 28 of file RaspberryKernel.cpp.
References BCM_IRQ_SYSTIMERM1, IntController::enable(), ARMException::FIQ, ARMException::install(), interrupt(), ARMException::IRQ, m_bcmIntr, m_bcmTimer, ARMKernel::m_exception, Kernel::m_intControl, Kernel::m_timer, m_timerIrq, NOTICE, NULL, Broadcom2836::PhysicalTimer1, ARMControl::read(), BroadcomTimer::setFrequency(), and ARMControl::SystemFrequency.
|
staticprivate |
Interrupt handler routine.
state | Saved CPU register state |
Definition at line 71 of file RaspberryKernel.cpp.
References BCM_IRQ_SYSTIMERM1, MemoryBlock::copy(), ProcessManager::current(), DEBUG, Kernel::executeIntVector(), Process::getID(), Kernel::getProcessManager(), WeakSingleton< Kernel >::instance(), IntController::isTriggered(), Kernel::m_intControl, Kernel::m_timer, m_timerIrq, Broadcom2836::PhysicalTimer1, ProcessManager::schedule(), ARMProcess::setCpuState(), and Timer::tick().
Referenced by RaspberryKernel().
|
private |
Broadcom specific interrupt controller.
Definition at line 63 of file RaspberryKernel.h.
Referenced by RaspberryKernel().
|
private |
Broadcom specific timer module.
Definition at line 74 of file RaspberryKernel.h.
Referenced by RaspberryKernel().
|
private |
Interrupt number for the timer.
Definition at line 77 of file RaspberryKernel.h.
Referenced by interrupt(), and RaspberryKernel().