|
The Pedigree Project 0.1
|
#include <IrqManager.h>
Inheritance diagram for IrqManager:
Collaboration diagram for IrqManager:Public Types | |
| enum | ControlCode { MitigationThreshold } |
Public Member Functions | |
| virtual irq_id_t | registerIsaIrqHandler (uint8_t irq, IrqHandler *handler, const IrqPolicy &policy)=0 |
| virtual irq_id_t | registerPciIrqHandler (IrqHandler *handler, Device *pDevice, const IrqPolicy &policy)=0 |
| 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 | registerHardIsaIrqHandler (uint8_t irq, HardIrqHandler *handler, const IrqPolicy &policy)=0 |
| virtual irq_id_t | registerHardPciIrqHandler (HardIrqHandler *handler, Device *pDevice, const IrqPolicy &policy)=0 |
| virtual irq_id_t | registerHardPciMessageIrqHandler (HardIrqHandler *handler, Device *pDevice, const IrqPolicy &intxFallbackPolicy) |
| virtual irq_id_t | registerSchedulerIrqHandler (uint8_t irq, SchedulerIrqHandler *handler, const IrqPolicy &policy) |
| virtual bool | unregisterSchedulerIrqHandler (irq_id_t Id, SchedulerIrqHandler *handler) |
| virtual bool | unregisterHandler (irq_id_t Id, IrqHandlerBase *handler)=0 |
| virtual void | enable (uint8_t irq, bool enable)=0 |
| virtual size_t | snapshotIrqLines (IrqLineDiagnosticSnapshot *out, size_t capacity) const |
| virtual void | tick () |
| virtual bool | control (uint8_t irq, ControlCode code, size_t argument) |
Protected Member Functions | |
| IrqManager () | |
| virtual | ~IrqManager () |
Private Member Functions | |
| IrqManager (const IrqManager &) | |
| IrqManager & | operator= (const IrqManager &) |
This class handles IRQ (un)registration
Definition at line 282 of file include/pedigree/kernel/machine/IrqManager.h.
Control codes for the control function
Definition at line 285 of file include/pedigree/kernel/machine/IrqManager.h.
|
protecteddefault |
The default constructor
|
protectedvirtualdefault |
The destructor
|
private |
The copy-constructor
|
virtual |
Controls specific elements of a given IRQ
Reimplemented in Pic, and HostedIrqManager.
Definition at line 55 of file IrqManager.cc.
|
private |
The assignment operator
|
pure virtual |
Register an ISA handler which must run in hard IRQ context.
Implemented in Pic, HostedIrqManager, and VirtIrqManager.
Referenced by SplitIrqHandler::registerIsaSplitIrq().
Here is the caller graph for this function:
|
pure virtual |
Register a PCI handler which must run in hard IRQ context.
Implemented in HostedIrqManager, VirtIrqManager, and Pic.
Referenced by registerHardPciMessageIrqHandler().
Here is the caller graph for this function:
|
virtual |
Prefer a PCI message interrupt for a hard handler, with an INTx fallback.
Reimplemented in Pic, and VirtIrqManager.
Definition at line 36 of file IrqManager.cc.
References registerHardPciIrqHandler().
|
pure virtual |
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 |
Implemented in Pic, HostedIrqManager, and VirtIrqManager.
Referenced by Ps2Controller::initialise3(), Rtc::initialise3(), and PciAtaController::PciAtaController().
Here is the caller graph for this function:
|
pure virtual |
Register a PCI irq
Implemented in HostedIrqManager, VirtIrqManager, and Pic.
Referenced by Ne2k::Ne2k(), Nic3C90x::Nic3C90x(), PciAtaController::PciAtaController(), and registerPciMessageIrqHandler().
Here is the caller graph for this function:
|
virtual |
Prefer a PCI message interrupt, falling back to INTx with the given policy.
Reimplemented in Pic, and VirtIrqManager.
Definition at line 25 of file IrqManager.cc.
References registerPciIrqHandler().
|
virtual |
Register distinct MSI-X entries as one group. Failure permits a fallback only when fallbackSafe is true. Optional dense processor indices are placement hints; platforms without affinity support may retain their default destination.
Reimplemented in Pic, and VirtIrqManager.
Definition at line 30 of file IrqManager.cc.
|
virtual |
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 in Pic, HostedIrqManager, and VirtIrqManager.
Definition at line 41 of file IrqManager.cc.
Referenced by HostedSchedulerTimer::initialise(), and Pit::initialise().
Here is the caller graph for this function:
|
virtual |
Copies up to capacity detached line diagnostics without taking an IRQ manager or handler-registry lock. Unsupported managers return zero.
Reimplemented in Pic.
Definition at line 49 of file IrqManager.cc.
Referenced by IrqsCommand::execute().
Here is the caller graph for this function:
|
virtual |
Called every millisecond, typically handles IRQ mitigation.
Reimplemented in Pic.
Definition at line 53 of file IrqManager.cc.
Referenced by Rtc::processElapsedTime(), and HostedTimer::processTimerBatch().
Here is the caller graph for this function:
|
pure virtual |
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 |
Implemented in Pic, HostedIrqManager, and VirtIrqManager.
Referenced by PciAtaController::shutdown(), SplitIrqHandler::shutdownSplitIrq(), and Ps2Controller::uninitialise().
Here is the caller graph for this function:
|
virtual |
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 in Pic, HostedIrqManager, and VirtIrqManager.
Definition at line 45 of file IrqManager.cc.
Referenced by HostedSchedulerTimer::initialise(), HostedSchedulerTimer::uninitialise(), and Pit::uninitialise().
Here is the caller graph for this function: