|
The Pedigree Project 0.1
|
#include <InterruptManager.h>
Inheritance diagram for HostedInterruptManager:
Collaboration diagram for HostedInterruptManager: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, bool fromUserspace) |
| struct sigaction | getOriginalSigaction (int which) const |
Static Public Member Functions | |
| static HostedInterruptManager & | instance () |
| static void | initialiseProcessor () INITIALISATION_ONLY |
| static void | quiesceProcessor () |
Static Public Member Functions inherited from InterruptManager | |
| static EXPORTED_PUBLIC 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 struct sigaction | m_OriginalActions [MAX_SIGNAL] |
| static bool | m_ActionInstalled [MAX_SIGNAL] = {} |
| static bool | m_bQuiesced = false |
| 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 37 of file kernel/core/processor/hosted/InterruptManager.h.
|
private |
The constructor
Definition at line 534 of file hosted/InterruptManager.cc.
References m_pDbgHandler, and m_pHandler.
|
private |
Copy constructor
|
privatevirtual |
The destructor
Definition at line 544 of file hosted/InterruptManager.cc.
|
virtual |
Get the interrupt number of the breakpoint exception
Implements InterruptManager.
Definition at line 200 of file hosted/InterruptManager.cc.
|
virtual |
Get the interrupt number of the debug exception
Implements InterruptManager.
Definition at line 203 of file hosted/InterruptManager.cc.
| struct sigaction HostedInterruptManager::getOriginalSigaction | ( | int | which | ) | const |
Get the original sigaction for an interrupt handler.
Definition at line 441 of file hosted/InterruptManager.cc.
Referenced by interrupt().
Here is the caller graph for this function:
|
static |
Initialises this processors IDTR
Definition at line 445 of file hosted/InterruptManager.cc.
References m_OriginalActions.
|
inlinestatic |
Get the HostedInterruptManager class instance
Definition at line 41 of file kernel/core/processor/hosted/InterruptManager.h.
References m_Instance.
|
staticprivate |
Called when an interrupt was triggered
| [in] | interruptState | reference to the usermode/kernel state before the interrupt |
Definition at line 209 of file hosted/InterruptManager.cc.
References Thread::deferSubsystemException(), getOriginalSigaction(), Thread::getParent(), ProcessorBase::information(), Debugger::instance(), InterruptManager::instance(), InterruptHandler::interrupt(), LIKELY, m_Instance, m_pDbgHandler, m_pHandler, panic(), ProcessorBase::reset(), Debugger::start(), and UNLIKELY.
Referenced by signalShim().
Here is the caller graph for this function:
|
private |
Assignment operator
|
static |
Stops hosted IRQ signal delivery before global teardown.
Definition at line 475 of file hosted/InterruptManager.cc.
References m_OriginalActions.
Referenced by HostedMachine::deinitialise().
Here is the caller graph for this function:
|
virtual |
Register an interrupt handler
| [in] | nInterruptNumber | the interrupt's number |
| [in] | pHandler | the interrupt handler |
Implements InterruptManager.
Definition at line 161 of file hosted/InterruptManager.cc.
References m_Lock, m_pHandler, and UNLIKELY.
|
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 183 of file hosted/InterruptManager.cc.
References m_Lock, m_pDbgHandler, and UNLIKELY.
|
private |
Sets up an interrupt gate
| [in] | interruptNumber | the interrupt number |
| [in] | interruptHandler | address of the assembler interrupt handler stub |
|
private |
Sets the IST field for a given interrupt gate
| [in] | interruptNumber | the interrupt number |
| [in] | ist | IST index to use |
| void HostedInterruptManager::signalShim | ( | int | which, |
| void * | siginfo, | ||
| void * | meta, | ||
| bool | fromUserspace | ||
| ) |
Signal handling shim for InterruptState protected access.
Definition at line 326 of file hosted/InterruptManager.cc.
References InterruptTimeAccounting::finishUserReturn(), ProcessorBase::getInterrupts(), ProcessorBase::information(), interrupt(), and ProcessorBase::setInterrupts().
|
staticprivate |
Definition at line 85 of file kernel/core/processor/hosted/InterruptManager.h.
|
staticprivate |
Definition at line 116 of file kernel/core/processor/hosted/InterruptManager.h.
|
staticprivate |
The instance of the interrupt manager
Definition at line 119 of file kernel/core/processor/hosted/InterruptManager.h.
Referenced by instance(), and interrupt().
|
private |
Serialises handler pointer mutations. Dispatch never takes this lock.
Definition at line 103 of file kernel/core/processor/hosted/InterruptManager.h.
Referenced by registerInterruptHandler(), and registerInterruptHandlerDebugger().
|
staticprivate |
Original sigaction structs after we install our custom handlers.
Definition at line 113 of file kernel/core/processor/hosted/InterruptManager.h.
Referenced by initialiseProcessor(), and quiesceProcessor().
|
private |
The debugger interrupt handlers
Definition at line 109 of file kernel/core/processor/hosted/InterruptManager.h.
Referenced by HostedInterruptManager(), interrupt(), and registerInterruptHandlerDebugger().
|
private |
The normal interrupt handlers
Definition at line 106 of file kernel/core/processor/hosted/InterruptManager.h.
Referenced by HostedInterruptManager(), interrupt(), and registerInterruptHandler().