|
The Pedigree Project 0.1
|
#include <IrqManager.h>
Inheritance diagram for HostedIrqManager:
Collaboration diagram for HostedIrqManager:Public Member Functions | |
| irq_id_t | registerIsaIrqHandler (uint8_t irq, IrqHandler *handler, const IrqPolicy &policy) override |
| irq_id_t | registerPciIrqHandler (IrqHandler *handler, class Device *device, const IrqPolicy &policy) override |
| irq_id_t | registerHardIsaIrqHandler (uint8_t irq, HardIrqHandler *handler, const IrqPolicy &policy) override |
| irq_id_t | registerHardPciIrqHandler (HardIrqHandler *handler, class Device *device, const IrqPolicy &policy) override |
| irq_id_t | registerSchedulerIrqHandler (uint8_t irq, SchedulerIrqHandler *handler, const IrqPolicy &policy) override |
| bool | unregisterSchedulerIrqHandler (irq_id_t id, SchedulerIrqHandler *handler) override |
| bool | unregisterHandler (irq_id_t id, IrqHandlerBase *handler) override |
| bool | initialise () INITIALISATION_ONLY |
| bool | control (uint8_t irq, ControlCode code, size_t argument) override |
| void | enable (uint8_t irq, bool enable) override |
Public Member Functions inherited from IrqManager | |
| virtual irq_id_t | registerPciMessageIrqHandler (IrqHandler *handler, Device *pDevice, const IrqPolicy &intxFallbackPolicy) |
| virtual bool | registerPciMsixIrqHandlers (Device *device, IrqHandler *const *handlers, size_t count, irq_id_t *ids, bool &fallbackSafe, const size_t *processors=nullptr) |
| virtual irq_id_t | registerHardPciMessageIrqHandler (HardIrqHandler *handler, Device *pDevice, const IrqPolicy &intxFallbackPolicy) |
| virtual size_t | snapshotIrqLines (IrqLineDiagnosticSnapshot *out, size_t capacity) const |
| virtual void | tick () |
Static Public Member Functions | |
| static HostedIrqManager & | instance () |
Private Member Functions | |
| HostedIrqManager (const HostedIrqManager &)=delete | |
| HostedIrqManager & | operator= (const HostedIrqManager &)=delete |
| void | interrupt (size_t interruptNumber, InterruptState &state) override |
| virtual | ~InterruptHandler () |
Private Attributes | |
| HardIrqHandler * | m_TimerHandler |
| SchedulerIrqHandler * | m_SchedulerHandler |
Static Private Attributes | |
| static HostedIrqManager | m_Instance |
Additional Inherited Members | |
Public Types inherited from IrqManager | |
| enum | ControlCode { MitigationThreshold } |
Protected Member Functions inherited from IrqManager | |
| IrqManager () | |
| virtual | ~IrqManager () |
Routes the two synthetic signals used by the hosted machine.
Hosted is a single-processor kernel validation shim, not an interrupt controller model. Line 0 belongs exclusively to the hosted wall-clock timer and line 1 belongs exclusively to the scheduler timer. Device, PCI, shared, and threaded controller registrations are deliberately unsupported.
Definition at line 36 of file kernel/machine/hosted/IrqManager.h.
|
private |
Definition at line 123 of file hosted/IrqManager.cc.
|
inlineoverrideprivate |
Definition at line 70 of file kernel/machine/hosted/IrqManager.h.
|
overridevirtual |
Controls specific elements of a given IRQ
Reimplemented from IrqManager.
Definition at line 119 of file hosted/IrqManager.cc.
|
inlineoverridevirtual |
Implements IrqManager.
Definition at line 59 of file kernel/machine/hosted/IrqManager.h.
| bool HostedIrqManager::initialise | ( | ) |
Definition at line 113 of file hosted/IrqManager.cc.
|
inlinestatic |
Definition at line 38 of file kernel/machine/hosted/IrqManager.h.
|
overrideprivatevirtual |
Called when the handler is registered with the interrupt manager and the interrupt occurred
| [in] | nInterruptNumber | the interrupt number |
| [in] | state | reference to the state before the interrupt |
Implements InterruptHandler.
Definition at line 125 of file hosted/IrqManager.cc.
References HardIrqHandler::irq().
|
overridevirtual |
Register an ISA handler which must run in hard IRQ context.
Implements IrqManager.
Definition at line 56 of file hosted/IrqManager.cc.
|
overridevirtual |
Register a PCI handler which must run in hard IRQ context.
Implements IrqManager.
Definition at line 70 of file hosted/IrqManager.cc.
|
overridevirtual |
Register an ISA irq
| [in] | irq | the ISA irq number (from 0 to 15) |
| [in] | handler | pointer to the IrqHandler class |
| [in] | policy | electrical, acknowledgement, and completion policy |
Implements IrqManager.
Definition at line 48 of file hosted/IrqManager.cc.
|
overridevirtual |
|
overridevirtual |
Install the platform's dedicated scheduler-timer interrupt source.
Unlike a generic hard handler, this callback is the terminal action for an occurrence and is allowed to abandon its interrupt frame. Platforms which do not provide a direct scheduler route reject the request.
Reimplemented from IrqManager.
Definition at line 74 of file hosted/IrqManager.cc.
|
overridevirtual |
Unregister a previously registered IrqHandler.
A successful return is an ownership barrier: no callback can begin or remain active for the handler. A callback cannot synchronously remove itself, and an atomic context cannot wait for an active callback; those requests return false.
| [in] | Id | the irq's identifier |
Implements IrqManager.
Definition at line 99 of file hosted/IrqManager.cc.
|
overridevirtual |
Stop admitting future callbacks for the exact scheduler source. The source must be quiesced first unless removal synchronously masks its controller line. Its handler has static machine lifetime because an already-admitted callback may not return.
Reimplemented from IrqManager.
Definition at line 88 of file hosted/IrqManager.cc.
|
staticprivate |
Definition at line 80 of file kernel/machine/hosted/IrqManager.h.
|
private |
Definition at line 78 of file kernel/machine/hosted/IrqManager.h.
|
private |
Definition at line 77 of file kernel/machine/hosted/IrqManager.h.