18#include <FreeNOS/System.h>
19#include <FreeNOS/ProcessManager.h>
48 NOTICE(
"sysfreq = " << system_frequency);
49 if (system_frequency == 62500000)
virtual Result setFrequency(const Size hertz)
Set timer frequency.
ARM System Control Coprocessor (CP15).
u32 read(Register reg) const
Read a register from the CP15.
Result install(ExceptionType vector, Handler handler)
Install an exception handler.
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.
Result setCoreTimerIrq(Timer timer, bool enable)
Set Core Timer interrupt.
bool getCoreTimerIrqStatus(Timer timer) const
Get core timer interrupt status.
virtual Result setFrequency(Size hertz)
Set timer frequency.
virtual bool isTriggered(uint irq)
Check if an IRQ vector is set.
virtual Result enable(uint irq)=0
Enable hardware interrupt (IRQ).
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.
Represents the Raspberry Pi kernel implementation.
BroadcomTimer m_bcmTimer
Broadcom specific timer module.
Broadcom2836 m_bcm
Broadcom specific registers.
u8 m_timerIrq
Interrupt number for the timer.
BroadcomInterrupt m_bcmIntr
Broadcom specific interrupt controller.
ARM64Timer m_armTimer
ARM generic timer.
static void interrupt(CPUState state)
Interrupt handler routine.
RaspberryKernel(CoreInfo *info)
Constructor function.
virtual Result tick()
Process timer tick.
static Kernel * instance()
Retrieve the instance.
#define BCM_IRQ_SYSTIMERM1
Triggered when the system timer matches the C1 register.
#define NULL
NULL means zero.
unsigned int u32
Unsigned 32-bit number.
#define NOTICE(msg)
Output a notice message.
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.