The Pedigree Project
0.1
|
#include <InterruptManager.h>
Public Member Functions | |
virtual bool | registerInterruptHandler (size_t nInterruptNumber, InterruptHandler *pHandler) |
virtual bool | registerInterruptHandlerDebugger (size_t nInterruptNumber, InterruptHandler *pHandler) |
virtual size_t | getBreakpointInterruptNumber () PURE |
virtual size_t | getDebugInterruptNumber () PURE |
void | signalShim (int which, void *siginfo, void *meta) |
Static Public Member Functions | |
static HostedInterruptManager & | instance () |
static void | initialiseProcessor () INITIALISATION_ONLY |
Static Public Member Functions inherited from InterruptManager | |
static InterruptManager & | instance () |
Private Member Functions | |
void | setInterruptGate (size_t nInterruptNumber, uintptr_t interruptHandler) INITIALISATION_ONLY |
void | setIst (size_t nInterruptNumber, size_t ist) |
HostedInterruptManager () INITIALISATION_ONLY | |
HostedInterruptManager (const HostedInterruptManager &) | |
HostedInterruptManager & | operator= (const HostedInterruptManager &) |
virtual | ~HostedInterruptManager () |
Static Private Member Functions | |
static void | interrupt (InterruptState &interruptState) |
Private Attributes | |
Spinlock | m_Lock |
InterruptHandler * | m_pHandler [MAX_SIGNAL] |
InterruptHandler * | m_pDbgHandler [MAX_SIGNAL] |
Static Private Attributes | |
static HostedInterruptManager | m_Instance |
Additional Inherited Members | |
Protected Member Functions inherited from InterruptManager | |
InterruptManager () | |
virtual | ~InterruptManager () |
The interrupt manager on hosted systems
Definition at line 34 of file kernel/core/processor/hosted/InterruptManager.h.
|
private |
The constructor
Definition at line 240 of file hosted/InterruptManager.cc.
References m_pDbgHandler, and m_pHandler.
Referenced by instance().
|
private |
Copy constructor
|
privatevirtual |
The destructor
Definition at line 252 of file hosted/InterruptManager.cc.
Referenced by instance().
|
virtual |
Get the interrupt number of the breakpoint exception
Implements InterruptManager.
Definition at line 95 of file hosted/InterruptManager.cc.
Referenced by instance().
|
virtual |
Get the interrupt number of the debug exception
Implements InterruptManager.
Definition at line 99 of file hosted/InterruptManager.cc.
Referenced by instance().
|
static |
Initialises this processors IDTR
Definition at line 225 of file hosted/InterruptManager.cc.
Referenced by Processor::initialisationDone(), and instance().
|
inlinestatic |
Get the HostedInterruptManager class instance
Definition at line 39 of file kernel/core/processor/hosted/InterruptManager.h.
References getBreakpointInterruptNumber(), getDebugInterruptNumber(), HostedInterruptManager(), INITIALISATION_ONLY, initialiseProcessor(), interrupt(), m_Instance, operator=(), PURE, registerInterruptHandler(), registerInterruptHandlerDebugger(), setInterruptGate(), setIst(), signalShim(), and ~HostedInterruptManager().
Referenced by interrupt().
|
staticprivate |
Called when an interrupt was triggered
[in] | interruptState | reference to the usermode/kernel state before the interrupt |
Definition at line 106 of file hosted/InterruptManager.cc.
References Thread::getParent(), Processor::information(), instance(), Debugger::instance(), InterruptHandler::interrupt(), LIKELY, panic(), Processor::reset(), signalShim(), Debugger::start(), Subsystem::threadException(), and UNLIKELY.
Referenced by instance().
|
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 54 of file hosted/InterruptManager.cc.
References UNLIKELY.
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 76 of file hosted/InterruptManager.cc.
References UNLIKELY.
Referenced by instance().
|
private |
Sets up an interrupt gate
[in] | interruptNumber | the interrupt number |
[in] | interruptHandler | address of the assembler interrupt handler stub |
Referenced by instance().
|
private |
Sets the IST field for a given interrupt gate
[in] | interruptNumber | the interrupt number |
[in] | ist | IST index to use |
Referenced by instance().
void HostedInterruptManager::signalShim | ( | int | which, |
void * | siginfo, | ||
void * | meta | ||
) |
Signal handling shim for InterruptState protected access.
Definition at line 201 of file hosted/InterruptManager.cc.
References Processor::getInterrupts().
Referenced by instance(), and interrupt().
|
staticprivate |
The instance of the interrupt manager
Definition at line 101 of file kernel/core/processor/hosted/InterruptManager.h.
Referenced by instance().
|
private |
Spinlock protecting the member variables
Definition at line 91 of file kernel/core/processor/hosted/InterruptManager.h.
|
private |
The debugger interrupt handlers
Definition at line 97 of file kernel/core/processor/hosted/InterruptManager.h.
Referenced by HostedInterruptManager().
|
private |
The normal interrupt handlers
Definition at line 94 of file kernel/core/processor/hosted/InterruptManager.h.
Referenced by HostedInterruptManager().