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

#include <InterruptManager.h>

+ Inheritance diagram for HostedInterruptManager:
+ Collaboration diagram for HostedInterruptManager:

Public Member Functions

virtual bool registerInterruptHandler (size_t nInterruptNumber, InterruptHandler *pHandler)
 
virtual bool registerInterruptHandlerDebugger (size_t nInterruptNumber, InterruptHandler *pHandler)
 
virtual size_t getBreakpointInterruptNumber () PURE
 
virtual size_t getDebugInterruptNumber () PURE
 
void signalShim (int which, void *siginfo, void *meta)
 

Static Public Member Functions

static HostedInterruptManagerinstance ()
 
static void initialiseProcessor () INITIALISATION_ONLY
 
- Static Public Member Functions inherited from InterruptManager
static InterruptManagerinstance ()
 

Private Member Functions

void setInterruptGate (size_t nInterruptNumber, uintptr_t interruptHandler) INITIALISATION_ONLY
 
void setIst (size_t nInterruptNumber, size_t ist)
 
 HostedInterruptManager () INITIALISATION_ONLY
 
 HostedInterruptManager (const HostedInterruptManager &)
 
HostedInterruptManageroperator= (const HostedInterruptManager &)
 
virtual ~HostedInterruptManager ()
 

Static Private Member Functions

static void interrupt (InterruptState &interruptState)
 

Private Attributes

Spinlock m_Lock
 
InterruptHandlerm_pHandler [MAX_SIGNAL]
 
InterruptHandlerm_pDbgHandler [MAX_SIGNAL]
 

Static Private Attributes

static HostedInterruptManager m_Instance
 

Additional Inherited Members

- Protected Member Functions inherited from InterruptManager
 InterruptManager ()
 
virtual ~InterruptManager ()
 

Detailed Description

The interrupt manager on hosted systems

Definition at line 34 of file kernel/core/processor/hosted/InterruptManager.h.

Constructor & Destructor Documentation

HostedInterruptManager::HostedInterruptManager ( )
private

The constructor

Definition at line 240 of file hosted/InterruptManager.cc.

References m_pDbgHandler, and m_pHandler.

Referenced by instance().

+ Here is the caller graph for this function:

HostedInterruptManager::HostedInterruptManager ( const HostedInterruptManager )
private

Copy constructor

Note
NOT implemented
HostedInterruptManager::~HostedInterruptManager ( )
privatevirtual

The destructor

Definition at line 252 of file hosted/InterruptManager.cc.

Referenced by instance().

+ Here is the caller graph for this function:

Member Function Documentation

size_t HostedInterruptManager::getBreakpointInterruptNumber ( )
virtual

Get the interrupt number of the breakpoint exception

Returns
the interrupt number of the breakpoint exception

Implements InterruptManager.

Definition at line 95 of file hosted/InterruptManager.cc.

Referenced by instance().

+ Here is the caller graph for this function:

size_t HostedInterruptManager::getDebugInterruptNumber ( )
virtual

Get the interrupt number of the debug exception

Returns
the interrupt number of the debug exception

Implements InterruptManager.

Definition at line 99 of file hosted/InterruptManager.cc.

Referenced by instance().

+ Here is the caller graph for this function:

void HostedInterruptManager::initialiseProcessor ( )
static

Initialises this processors IDTR

Note
This should only be called from Processor::initialise1() and Multiprocessor::applicationProcessorStartup()

Definition at line 225 of file hosted/InterruptManager.cc.

Referenced by Processor::initialisationDone(), and instance().

+ Here is the caller graph for this function:

static HostedInterruptManager& HostedInterruptManager::instance ( )
inlinestatic
void HostedInterruptManager::interrupt ( InterruptState &  interruptState)
staticprivate

Called when an interrupt was triggered

Parameters
[in]interruptStatereference to the usermode/kernel state before the interrupt
Todo:
Provide a better entry point for system shutdown.

Definition at line 106 of file hosted/InterruptManager.cc.

References Thread::getParent(), Processor::information(), instance(), Debugger::instance(), InterruptHandler::interrupt(), LIKELY, panic(), Processor::reset(), signalShim(), Debugger::start(), Subsystem::threadException(), and UNLIKELY.

Referenced by instance().

+ Here is the caller graph for this function:

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

Assignment operator

Note
NOT implemented

Referenced by instance().

+ Here is the caller graph for this function:

bool HostedInterruptManager::registerInterruptHandler ( size_t  nInterruptNumber,
InterruptHandler pHandler 
)
virtual

Register an interrupt handler

Parameters
[in]nInterruptNumberthe interrupt's number
[in]pHandlerthe interrupt handler
Returns
true, if successfully registered, false otherwise

Implements InterruptManager.

Definition at line 54 of file hosted/InterruptManager.cc.

References UNLIKELY.

Referenced by instance().

+ Here is the caller graph for this function:

bool HostedInterruptManager::registerInterruptHandlerDebugger ( size_t  nInterruptNumber,
InterruptHandler pHandler 
)
virtual

Register an interrupt handler (for the kernel debugger)

Parameters
[in]nInterruptNumberthe interrupt's number
[in]pHandlerthe interrupt handler
Returns
true, if successfully registered, false otherwise

Implements InterruptManager.

Definition at line 76 of file hosted/InterruptManager.cc.

References UNLIKELY.

Referenced by instance().

+ Here is the caller graph for this function:

void HostedInterruptManager::setInterruptGate ( size_t  nInterruptNumber,
uintptr_t  interruptHandler 
)
private

Sets up an interrupt gate

Parameters
[in]interruptNumberthe interrupt number
[in]interruptHandleraddress of the assembler interrupt handler stub
Note
This function is defined in kernel/processor/ARCH/interrupt.cc

Referenced by instance().

+ Here is the caller graph for this function:

void HostedInterruptManager::setIst ( size_t  nInterruptNumber,
size_t  ist 
)
private

Sets the IST field for a given interrupt gate

Parameters
[in]interruptNumberthe interrupt number
[in]istIST index to use

Referenced by instance().

+ Here is the caller graph for this function:

void HostedInterruptManager::signalShim ( int  which,
void *  siginfo,
void *  meta 
)

Signal handling shim for InterruptState protected access.

Definition at line 201 of file hosted/InterruptManager.cc.

References Processor::getInterrupts().

Referenced by instance(), and interrupt().

+ Here is the caller graph for this function:

Member Data Documentation

HostedInterruptManager HostedInterruptManager::m_Instance
staticprivate

The instance of the interrupt manager

Definition at line 101 of file kernel/core/processor/hosted/InterruptManager.h.

Referenced by instance().

Spinlock HostedInterruptManager::m_Lock
private

Spinlock protecting the member variables

Definition at line 91 of file kernel/core/processor/hosted/InterruptManager.h.

InterruptHandler* HostedInterruptManager::m_pDbgHandler[MAX_SIGNAL]
private

The debugger interrupt handlers

Definition at line 97 of file kernel/core/processor/hosted/InterruptManager.h.

Referenced by HostedInterruptManager().

InterruptHandler* HostedInterruptManager::m_pHandler[MAX_SIGNAL]
private

The normal interrupt handlers

Definition at line 94 of file kernel/core/processor/hosted/InterruptManager.h.

Referenced by HostedInterruptManager().


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