The Pedigree Project
0.1
|
#include <Heathrow.h>
Public Member Functions | |
virtual irq_id_t | registerIsaIrqHandler (uint8_t irq, IrqHandler *handler) |
virtual irq_id_t | registerPciIrqHandler (IrqHandler *handler) |
virtual void | acknowledgeIrq (irq_id_t Id) |
virtual void | unregisterHandler (irq_id_t Id, IrqHandler *handler) |
bool | initialise () INITIALISATION_ONLY |
Public Member Functions inherited from IrqManager | |
virtual irq_id_t | registerIsaIrqHandler (uint8_t irq, IrqHandler *handler, bool bEdge=false)=0 |
virtual irq_id_t | registerPciIrqHandler (IrqHandler *handler, Device *pDevice)=0 |
virtual void | tick () |
virtual bool | control (uint8_t irq, ControlCode code, size_t argument) |
Static Public Member Functions | |
static Heathrow & | instance () |
Private Member Functions | |
Heathrow () INITIALISATION_ONLY | |
virtual | ~Heathrow () |
Heathrow (const Heathrow &) | |
Heathrow & | operator= (const Heathrow &) |
void | searchNode (class Device *pDev) |
virtual void | interrupt (size_t interruptNumber, InterruptState &state) |
void | eoi (uint8_t irq) |
void | enable (uint8_t irq, bool enable) |
void | enableAll (bool enable) |
virtual | ~InterruptHandler () |
Private Attributes | |
IoBase * | m_pPort |
IrqHandler * | m_Handler [64] |
size_t | m_nIrqs |
uint32_t | m_LowMask |
uint32_t | m_HighMask |
Static Private Attributes | |
static Heathrow | m_Instance |
Additional Inherited Members | |
Public Types inherited from IrqManager | |
enum | ControlCode { MitigationThreshold } |
Protected Member Functions inherited from IrqManager | |
IrqManager () | |
virtual | ~IrqManager () |
The PPC's programmable interrupt controller as IrqManager
Definition at line 31 of file Heathrow.h.
|
private |
The default constructor
Definition at line 137 of file Heathrow.cc.
References m_Handler.
Referenced by instance(), and ~Heathrow().
|
inlineprivatevirtual |
The destructor
Definition at line 58 of file Heathrow.h.
References Heathrow(), interrupt(), and operator=().
|
private |
The copy-constructor
|
virtual |
Acknoledge the IRQ reception, in case you returned false in the IrqHandler::irq() function. If this is not called there won't be any following irqs.
[in] | Id | the irq's identifier |
Implements IrqManager.
Definition at line 47 of file Heathrow.cc.
Referenced by instance().
bool Heathrow::initialise | ( | ) |
Initialises the PIC hardware and registers the interrupts with the InterruptManager.
Definition at line 110 of file Heathrow.cc.
References ERROR, InterruptManager::instance(), m_nIrqs, m_pPort, InterruptManager::registerInterruptHandler(), and Device::root().
Referenced by instance().
|
inlinestatic |
Get the Pic class instance
Definition at line 36 of file Heathrow.h.
References acknowledgeIrq(), Heathrow(), INITIALISATION_ONLY, initialise(), m_Instance, and unregisterHandler().
Referenced by Mac::initialiseDeviceTree().
|
privatevirtual |
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 143 of file Heathrow.cc.
References LIKELY, m_Handler, m_pPort, NOTICE, IoBase::read32(), and IoBase::write32().
Referenced by ~Heathrow().
The assignment operator
Referenced by ~Heathrow().
|
virtual |
Unregister a previously registered IrqHandler
[in] | Id | the irq's identifier |
Implements IrqManager.
Definition at line 55 of file Heathrow.cc.
References Device::addresses(), Device::getChild(), Device::getNumChildren(), m_Handler, and m_pPort.
Referenced by instance().
|
private |
The IRQ handler
Definition at line 83 of file Heathrow.h.
Referenced by Heathrow(), interrupt(), and unregisterHandler().
|
staticprivate |
|
private |
|
private |
The PIC I/O Port range
Definition at line 80 of file Heathrow.h.
Referenced by initialise(), interrupt(), and unregisterHandler().