The Pedigree Project
0.1
|
#include <InterruptManager.h>
Public Member Functions | |
virtual bool | registerInterruptHandler (size_t interruptNumber, InterruptHandler *handler) |
virtual bool | registerInterruptHandlerDebugger (size_t interruptNumber, InterruptHandler *handler) |
virtual size_t | getBreakpointInterruptNumber () PURE |
virtual size_t | getDebugInterruptNumber () PURE |
virtual bool | registerSyscallHandler (Service_t Service, SyscallHandler *handler) |
virtual uintptr_t | syscall (Service_t service, uintptr_t function, uintptr_t p1=0, uintptr_t p2=0, uintptr_t p3=0, uintptr_t p4=0, uintptr_t p5=0) |
Static Public Member Functions | |
static ARMV7InterruptManager & | instance () |
static void | initialiseProcessor () |
static void | interrupt (InterruptState &interruptState) |
Static Public Member Functions inherited from InterruptManager | |
static InterruptManager & | instance () |
Static Public Member Functions inherited from SyscallManager | |
static EXPORTED_PUBLIC SyscallManager & | instance () |
Private Types | |
enum | Registers { INTCPS_REVISION = 0x00, INTCPS_SYSCONFIG = 0x10 / 4, INTCPS_SYSSTATUS = 0x14 / 4, INTCPS_SIR_IRQ = 0x40 / 4, INTCPS_SIR_FIQ = 0x44 / 4, INTCPS_CONTROL = 0x48 / 4, INTCPS_PROTECTION = 0x4C / 4, INTCPS_IDLE = 0x50 / 4, INTCPS_IRQ_PRIORITY = 0x60 / 4, INTCPS_FIQ_PRIORITY = 0x64 / 4, INTCPS_THRESHOLD = 0x68 / 4, INTCPS_ITR = 0x80 / 4, INTCPS_MIR = 0x84 / 4, INTCPS_MIR_CLEAR = 0x88 / 4, INTCPS_MIR_SET = 0x8C / 4, INTCPS_ISR_SET = 0x90 / 4, INTCPS_ISR_CLEAR = 0x94 / 4, INTCPS_PENDING_IRQ = 0x98 / 4, INTCPS_PENDING_FIQ = 0x9C / 4, INTCPS_ILR = 0x100 / 4 } |
Private Member Functions | |
ARMV7InterruptManager () | |
ARMV7InterruptManager (const ARMV7InterruptManager &) | |
ARMV7InterruptManager & | operator= (const ARMV7InterruptManager &) |
virtual | ~ARMV7InterruptManager () |
Private Attributes | |
InterruptHandler * | m_Handler [256] |
InterruptHandler * | m_DbgHandler [256] |
SyscallHandler * | m_SyscallHandler [serviceEnd] |
Static Private Attributes | |
static MemoryRegion | m_MPUINTCRegion |
static ARMV7InterruptManager | m_Instance |
Additional Inherited Members | |
Protected Member Functions inherited from InterruptManager | |
InterruptManager () | |
virtual | ~InterruptManager () |
Protected Member Functions inherited from SyscallManager | |
SyscallManager () | |
virtual | ~SyscallManager () |
The interrupt handler on mips32 processors
Definition at line 33 of file kernel/core/processor/armv7/InterruptManager.h.
|
private |
Interrupt controller registers
Definition at line 99 of file kernel/core/processor/armv7/InterruptManager.h.
|
private |
The constructor
Definition at line 448 of file armv7/InterruptManager.cc.
Referenced by instance().
|
private |
Copy constructor
|
privatevirtual |
The destructor
Definition at line 463 of file armv7/InterruptManager.cc.
Referenced by instance().
|
virtual |
Get the interrupt number of the breakpoint exception
Implements InterruptManager.
Definition at line 132 of file armv7/InterruptManager.cc.
Referenced by instance().
|
virtual |
Get the interrupt number of the debug exception
Implements InterruptManager.
Definition at line 136 of file armv7/InterruptManager.cc.
Referenced by instance().
|
static |
Initialises this processors IDTR
Definition at line 353 of file armv7/InterruptManager.cc.
References PhysicalMemoryManager::continuous, Dec, VirtualAddressSpace::getKernelAddressSpace(), Hex, PhysicalMemoryManager::instance(), VirtualAddressSpace::KernelMode, m_MPUINTCRegion, NOTICE, MemoryRegion::virtualAddress(), and VirtualAddressSpace::Write.
Referenced by instance().
|
inlinestatic |
Get the ARMV7InterruptManager class instance
Definition at line 38 of file kernel/core/processor/armv7/InterruptManager.h.
References ARMV7InterruptManager(), getBreakpointInterruptNumber(), getDebugInterruptNumber(), initialiseProcessor(), interrupt(), m_Instance, operator=(), PURE, registerInterruptHandler(), registerInterruptHandlerDebugger(), registerSyscallHandler(), syscall(), and ~ARMV7InterruptManager().
|
static |
Called when an interrupt was triggered
[in] | interruptState | reference to the usermode/kernel state before the interrupt |
Definition at line 422 of file armv7/InterruptManager.cc.
References m_MPUINTCRegion, and MemoryRegion::virtualAddress().
Referenced by instance(), and syscall().
|
private |
Assignment operator
Referenced by instance().
|
virtual |
Register an interrupt handler
[in] | nInterruptNumber | the interrupt's number |
[in] | pHandler | the interrupt handler |
Implements InterruptManager.
Definition at line 82 of file armv7/InterruptManager.cc.
References m_MPUINTCRegion, UNLIKELY, and MemoryRegion::virtualAddress().
Referenced by instance().
|
virtual |
Register an interrupt handler (for the kernel debugger)
[in] | nInterruptNumber | the interrupt's number |
[in] | pHandler | the interrupt handler |
Implements InterruptManager.
Definition at line 109 of file armv7/InterruptManager.cc.
References m_MPUINTCRegion, UNLIKELY, and MemoryRegion::virtualAddress().
Referenced by instance().
|
virtual |
Register a syscall handler
[in] | Service | the service number you want to register |
[in] | pHandler | the interrupt handler |
Implements SyscallManager.
Definition at line 143 of file armv7/InterruptManager.cc.
References UNLIKELY.
Referenced by instance().
|
virtual |
Calls a syscall.
Implements SyscallManager.
Definition at line 159 of file armv7/InterruptManager.cc.
References Hex, Debugger::instance(), interrupt(), NORETURN, NOTICE, panic(), and Debugger::start().
Referenced by instance().
|
private |
The debugger interrupt handlers
Definition at line 87 of file kernel/core/processor/armv7/InterruptManager.h.
|
staticprivate |
The instance of the interrupt manager
Definition at line 96 of file kernel/core/processor/armv7/InterruptManager.h.
Referenced by instance().
|
staticprivate |
MemoryRegion for the MPU MMIO base
Definition at line 93 of file kernel/core/processor/armv7/InterruptManager.h.
Referenced by initialiseProcessor(), interrupt(), registerInterruptHandler(), and registerInterruptHandlerDebugger().
|
private |
The syscall handlers
Definition at line 90 of file kernel/core/processor/armv7/InterruptManager.h.