18#include <FreeNOS/System.h>
19#include <FreeNOS/ProcessManager.h>
30 , m_gic(GIC_DIST_BASE, GIC_CPU_BASE)
40 FATAL(
"failed to initialize the GIC: " << (
uint) r);
71 if (irq == ARMTIMER_IRQ)
ARM System Control Coprocessor (CP15).
Result install(ExceptionType vector, Handler handler)
Install an exception handler.
Result initialize(bool performReset=true)
Initialize the controller.
Represents the ARM kernel implementation.
ARMException m_exception
ARM exception handling subsystem.
ARM specific process implementation.
void setCpuState(const CPUState *cpuState)
Overwrite the saved CPU registers for this task.
virtual Result setFrequency(const Size hertz)
Set timer frequency.
virtual Result clear(uint irq)=0
Clear hardware interrupt (IRQ).
virtual Result nextPending(uint &irq)
Retrieve the next pending interrupt (IRQ).
virtual Result enable(uint irq)=0
Enable hardware interrupt (IRQ).
CoreInfo * m_coreInfo
CoreInfo object for this core.
SplitAllocator * m_alloc
Physical memory allocator.
virtual void executeIntVector(u32 vec, CPUState *state)
Execute an interrupt handler.
IntController * m_intControl
Interrupt Controller.
Timer * m_timer
Timer device.
ProcessManager * getProcessManager()
Get process manager.
static Size copy(void *dest, const void *src, Size count)
Copy memory from one place to another.
Result schedule()
Schedule next process to run.
Process * current()
Current process running.
ProcessID getID() const
Retrieve our ID number.
virtual Result allocate(Range &args)
Allocate physical memory.
static const Address SecondaryCoreInfoAddress
Physical memory address for CoreInfo passed to secondary cores during bootup.
Represents the Sunxi kernel implementation.
ARMGenericInterrupt m_gic
ARM Generic Interrupt Controller.
ARMTimer m_armTimer
ARM generic timer.
SunxiKernel(CoreInfo *info)
Constructor function.
static void interrupt(CPUState state)
Interrupt handler routine.
virtual Result tick()
Process timer tick.
static Kernel * instance()
Retrieve the instance.
#define NOTICE(msg)
Output a notice message.
#define FATAL(msg)
Output a critical message and terminate program immediatly.
unsigned int uint
Unsigned integer number.
#define DEBUG(msg)
Output a debug message to standard output.
Contains all the CPU registers.
Per-Core information structure.
uint coreId
Core identifier.