The Pedigree Project  0.1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
HostedIrqManager Class Reference
+ Inheritance diagram for HostedIrqManager:
+ Collaboration diagram for HostedIrqManager:

Public Member Functions

virtual irq_id_t registerIsaIrqHandler (uint8_t irq, IrqHandler *handler, bool bEdge=false)
 
virtual irq_id_t registerPciIrqHandler (IrqHandler *handler, Device *pDevice)
 
virtual void acknowledgeIrq (irq_id_t Id)
 
virtual void unregisterHandler (irq_id_t Id, IrqHandler *handler)
 
bool initialise () INITIALISATION_ONLY
 
virtual void tick ()
 
virtual bool control (uint8_t irq, ControlCode code, size_t argument)
 
virtual void enable (uint8_t irq, bool enable)
 

Static Public Member Functions

static HostedIrqManagerinstance ()
 

Private Member Functions

 HostedIrqManager () INITIALISATION_ONLY
 
virtual ~HostedIrqManager ()
 
 HostedIrqManager (const HostedIrqManager &)
 
HostedIrqManageroperator= (const HostedIrqManager &)
 
virtual void interrupt (size_t interruptNumber, InterruptState &state)
 
virtual ~InterruptHandler ()
 

Private Attributes

List< IrqHandler * > m_Handler [2]
 
Spinlock m_Lock
 

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

Detailed Description

Definition at line 31 of file kernel/machine/hosted/IrqManager.h.

Constructor & Destructor Documentation

HostedIrqManager::HostedIrqManager ( )
private

The default constructor

Definition at line 114 of file hosted/IrqManager.cc.

References List< T, nodePoolSize >::clear(), and m_Handler.

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

+ Here is the caller graph for this function:

virtual HostedIrqManager::~HostedIrqManager ( )
inlineprivatevirtual

The destructor

Definition at line 70 of file kernel/machine/hosted/IrqManager.h.

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

HostedIrqManager::HostedIrqManager ( const HostedIrqManager )
private

The copy-constructor

Note
NOT implemented

Member Function Documentation

void HostedIrqManager::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 76 of file hosted/IrqManager.cc.

Referenced by instance().

+ Here is the caller graph for this function:

bool HostedIrqManager::control ( uint8_t  irq,
ControlCode  code,
size_t  argument 
)
virtual

Controls specific elements of a given IRQ

Reimplemented from IrqManager.

Definition at line 44 of file hosted/IrqManager.cc.

Referenced by instance().

+ Here is the caller graph for this function:

bool HostedIrqManager::initialise ( )

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

Returns
true, if successfull, false otherwise

Definition at line 96 of file hosted/IrqManager.cc.

References InterruptManager::instance(), and InterruptManager::registerInterruptHandler().

Referenced by HostedMachine::initialise(), and instance().

+ Here is the caller graph for this function:

static HostedIrqManager& HostedIrqManager::instance ( )
inlinestatic
void HostedIrqManager::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 122 of file hosted/IrqManager.cc.

References List< T, nodePoolSize >::end(), LIKELY, m_Handler, and NOTICE.

Referenced by ~HostedIrqManager().

+ Here is the caller graph for this function:

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

The assignment operator

Note
NOT implemented

Referenced by ~HostedIrqManager().

+ Here is the caller graph for this function:

irq_id_t HostedIrqManager::registerIsaIrqHandler ( uint8_t  irq,
IrqHandler handler,
bool  bEdge = false 
)
virtual

Register an ISA irq

Parameters
[in]irqthe ISA irq number (from 0 to 15)
[in]handlerpointer to the IrqHandler class
[in]bEdgewhether this IRQ is edge triggered or not
Returns
the irq's identifier

Implements IrqManager.

Definition at line 49 of file hosted/IrqManager.cc.

References UNLIKELY.

Referenced by instance().

+ Here is the caller graph for this function:

irq_id_t HostedIrqManager::registerPciIrqHandler ( IrqHandler handler,
Device pDevice 
)
virtual

Register a PCI irq

Implements IrqManager.

Definition at line 62 of file hosted/IrqManager.cc.

References Device::getInterruptNumber(), and UNLIKELY.

Referenced by instance().

+ Here is the caller graph for this function:

void HostedIrqManager::tick ( )
virtual

Called every millisecond, typically handles IRQ mitigation.

Reimplemented from IrqManager.

Definition at line 40 of file hosted/IrqManager.cc.

Referenced by instance().

+ Here is the caller graph for this function:

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

Unregister a previously registered IrqHandler

Parameters
[in]Idthe irq's identifier

Implements IrqManager.

Definition at line 80 of file hosted/IrqManager.cc.

References List< T, nodePoolSize >::end().

Referenced by instance().

+ Here is the caller graph for this function:

Member Data Documentation

List<IrqHandler *> HostedIrqManager::m_Handler[2]
private

The IRQ handler

Definition at line 86 of file kernel/machine/hosted/IrqManager.h.

Referenced by HostedIrqManager(), and interrupt().

HostedIrqManager HostedIrqManager::m_Instance
staticprivate

The HostedIrqManager instance

Definition at line 92 of file kernel/machine/hosted/IrqManager.h.

Referenced by instance().

Spinlock HostedIrqManager::m_Lock
private

Main lock for all modifications

Definition at line 89 of file kernel/machine/hosted/IrqManager.h.


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