The Pedigree Project  0.1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Heathrow Class Reference

#include <Heathrow.h>

+ Inheritance diagram for Heathrow:
+ Collaboration diagram for Heathrow:

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 Heathrowinstance ()
 

Private Member Functions

 Heathrow () INITIALISATION_ONLY
 
virtual ~Heathrow ()
 
 Heathrow (const Heathrow &)
 
Heathrowoperator= (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

IoBasem_pPort
 
IrqHandlerm_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 ()
 

Detailed Description

The PPC's programmable interrupt controller as IrqManager

Definition at line 31 of file Heathrow.h.

Constructor & Destructor Documentation

Heathrow::Heathrow ( )
private

The default constructor

Definition at line 137 of file Heathrow.cc.

References m_Handler.

Referenced by instance(), and ~Heathrow().

+ Here is the caller graph for this function:

virtual Heathrow::~Heathrow ( )
inlineprivatevirtual

The destructor

Definition at line 58 of file Heathrow.h.

References Heathrow(), interrupt(), and operator=().

Heathrow::Heathrow ( const Heathrow )
private

The copy-constructor

Note
NOT implemented

Member Function Documentation

void Heathrow::acknowledgeIrq ( irq_id_t  Id)
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.

Parameters
[in]Idthe irq's identifier

Implements IrqManager.

Definition at line 47 of file Heathrow.cc.

Referenced by instance().

+ Here is the caller graph for this function:

bool Heathrow::initialise ( )

Initialises the PIC hardware and registers the interrupts with the InterruptManager.

Returns
true, if successfull, false otherwise

Definition at line 110 of file Heathrow.cc.

References ERROR, InterruptManager::instance(), m_nIrqs, m_pPort, InterruptManager::registerInterruptHandler(), and Device::root().

Referenced by instance().

+ Here is the caller graph for this function:

static Heathrow& Heathrow::instance ( )
inlinestatic

Get the Pic class instance

Returns
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().

+ Here is the caller graph for this function:

void Heathrow::interrupt ( size_t  nInterruptNumber,
InterruptState &  state 
)
privatevirtual

Called when the handler is registered with the interrupt manager and the interrupt occurred

Parameters
[in]nInterruptNumberthe interrupt number
[in]statereference 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().

+ Here is the caller graph for this function:

Heathrow& Heathrow::operator= ( const Heathrow )
private

The assignment operator

Note
NOT implemented

Referenced by ~Heathrow().

+ Here is the caller graph for this function:

void Heathrow::unregisterHandler ( irq_id_t  Id,
IrqHandler handler 
)
virtual

Unregister a previously registered IrqHandler

Parameters
[in]Idthe 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().

+ Here is the caller graph for this function:

Member Data Documentation

IrqHandler* Heathrow::m_Handler[64]
private

The IRQ handler

Definition at line 83 of file Heathrow.h.

Referenced by Heathrow(), interrupt(), and unregisterHandler().

Heathrow Heathrow::m_Instance
staticprivate

The Pic instance

Definition at line 89 of file Heathrow.h.

Referenced by instance().

size_t Heathrow::m_nIrqs
private

The number of IRQs available

Definition at line 86 of file Heathrow.h.

Referenced by initialise().

IoBase* Heathrow::m_pPort
private

The PIC I/O Port range

Definition at line 80 of file Heathrow.h.

Referenced by initialise(), interrupt(), and unregisterHandler().


The documentation for this class was generated from the following files: