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

#include <InterruptManager.h>

+ Inheritance diagram for X64InterruptManager:
+ Collaboration diagram for X64InterruptManager:

Classes

struct  GateDescriptor
 

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
 

Static Public Member Functions

static X64InterruptManagerinstance ()
 
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)
 
 X64InterruptManager () INITIALISATION_ONLY
 
 X64InterruptManager (const X64InterruptManager &)
 
X64InterruptManageroperator= (const X64InterruptManager &)
 
virtual ~X64InterruptManager ()
 

Static Private Member Functions

static void interrupt (InterruptState &interruptState) USED
 

Private Attributes

struct X64InterruptManager::GateDescriptor PACKED
 
Spinlock m_Lock
 
GateDescriptor m_IDT [256]
 
InterruptHandlerm_pHandler [256]
 
InterruptHandlerm_pDbgHandler [256]
 

Static Private Attributes

static X64InterruptManager m_Instance
 

Friends

class Processor
 

Additional Inherited Members

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

Detailed Description

The interrupt manager on x64 processors

Definition at line 35 of file kernel/core/processor/x64/InterruptManager.h.

Constructor & Destructor Documentation

X64InterruptManager::X64InterruptManager ( )
private

The constructor

Definition at line 328 of file x64/InterruptManager.cc.

References m_pDbgHandler, m_pHandler, setInterruptGate(), and setIst().

Referenced by instance().

+ Here is the caller graph for this function:

X64InterruptManager::X64InterruptManager ( const X64InterruptManager )
private

Copy constructor

Note
NOT implemented
X64InterruptManager::~X64InterruptManager ( )
privatevirtual

The destructor

Definition at line 347 of file x64/InterruptManager.cc.

Referenced by instance().

+ Here is the caller graph for this function:

Member Function Documentation

size_t X64InterruptManager::getBreakpointInterruptNumber ( )
virtual

Get the interrupt number of the breakpoint exception

Returns
the interrupt number of the breakpoint exception

Implements InterruptManager.

Definition at line 123 of file x64/InterruptManager.cc.

Referenced by instance().

+ Here is the caller graph for this function:

size_t X64InterruptManager::getDebugInterruptNumber ( )
virtual

Get the interrupt number of the debug exception

Returns
the interrupt number of the debug exception

Implements InterruptManager.

Definition at line 127 of file x64/InterruptManager.cc.

Referenced by instance().

+ Here is the caller graph for this function:

void X64InterruptManager::initialiseProcessor ( )
static

Initialises this processors IDTR

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

Definition at line 297 of file x64/InterruptManager.cc.

References PACKED.

Referenced by instance().

+ Here is the caller graph for this function:

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

Called when an interrupt was triggered

Parameters
[in]interruptStatereference to the usermode/kernel state before the interrupt

Definition at line 134 of file x64/InterruptManager.cc.

References ERROR, Process::getId(), Thread::getId(), Thread::getParent(), Hex, Processor::id(), Processor::information(), Debugger::instance(), InterruptHandler::interrupt(), LIKELY, panic(), Debugger::start(), Subsystem::threadException(), and UNLIKELY.

Referenced by instance().

+ Here is the caller graph for this function:

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

Assignment operator

Note
NOT implemented

Referenced by instance().

+ Here is the caller graph for this function:

bool X64InterruptManager::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 82 of file x64/InterruptManager.cc.

References UNLIKELY.

Referenced by instance().

+ Here is the caller graph for this function:

bool X64InterruptManager::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 104 of file x64/InterruptManager.cc.

References UNLIKELY.

Referenced by instance().

+ Here is the caller graph for this function:

void X64InterruptManager::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

Definition at line 309 of file x64/InterruptManager.cc.

Referenced by instance(), and X64InterruptManager().

+ Here is the caller graph for this function:

void X64InterruptManager::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

Definition at line 321 of file x64/InterruptManager.cc.

Referenced by instance(), and X64InterruptManager().

+ Here is the caller graph for this function:

Member Data Documentation

GateDescriptor X64InterruptManager::m_IDT[256]
private

The interrupt descriptor table (IDT)

Definition at line 113 of file kernel/core/processor/x64/InterruptManager.h.

X64InterruptManager X64InterruptManager::m_Instance
staticprivate

The instance of the interrupt manager

Definition at line 122 of file kernel/core/processor/x64/InterruptManager.h.

Referenced by instance().

Spinlock X64InterruptManager::m_Lock
private

Spinlock protecting the member variables

Definition at line 110 of file kernel/core/processor/x64/InterruptManager.h.

InterruptHandler* X64InterruptManager::m_pDbgHandler[256]
private

The debugger interrupt handlers

Definition at line 118 of file kernel/core/processor/x64/InterruptManager.h.

Referenced by X64InterruptManager().

InterruptHandler* X64InterruptManager::m_pHandler[256]
private

The normal interrupt handlers

Definition at line 115 of file kernel/core/processor/x64/InterruptManager.h.

Referenced by X64InterruptManager().


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