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

#include <SyscallManager.h>

+ Inheritance diagram for X64SyscallManager:
+ Collaboration diagram for X64SyscallManager:

Public Member Functions

virtual bool registerSyscallHandler (Service_t Service, SyscallHandler *pHandler)
 
uintptr_t syscall (Service_t service, uintptr_t function, uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4, uintptr_t p5)
 

Static Public Member Functions

static X64SyscallManagerinstance ()
 
static void initialiseProcessor () INITIALISATION_ONLY
 
- Static Public Member Functions inherited from SyscallManager
static EXPORTED_PUBLIC SyscallManagerinstance ()
 

Private Member Functions

 X64SyscallManager () INITIALISATION_ONLY
 
 X64SyscallManager (const X64SyscallManager &)
 
X64SyscallManageroperator= (const X64SyscallManager &)
 
virtual ~X64SyscallManager ()
 

Static Private Member Functions

static void syscall (SyscallState &syscallState) USED
 

Private Attributes

Spinlock m_Lock
 
SyscallHandlerm_pHandler [serviceEnd]
 

Static Private Attributes

static X64SyscallManager m_Instance
 

Friends

class Processor
 

Additional Inherited Members

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

Detailed Description

The syscall manager on x64 processors

Definition at line 36 of file kernel/core/processor/x64/SyscallManager.h.

Constructor & Destructor Documentation

X64SyscallManager::X64SyscallManager ( )
private

The constructor

Definition at line 181 of file x64/SyscallManager.cc.

References m_pHandler.

Referenced by instance().

+ Here is the caller graph for this function:

X64SyscallManager::X64SyscallManager ( const X64SyscallManager )
private

Copy constructor

Note
NOT implemented
X64SyscallManager::~X64SyscallManager ( )
privatevirtual

The destructor

Definition at line 187 of file x64/SyscallManager.cc.

Referenced by instance().

+ Here is the caller graph for this function:

Member Function Documentation

void X64SyscallManager::initialiseProcessor ( )
static

Initialises this processors syscall handling

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

Definition at line 162 of file x64/SyscallManager.cc.

References Processor::readMachineSpecificRegister(), and Processor::writeMachineSpecificRegister().

Referenced by instance().

+ Here is the caller graph for this function:

static X64SyscallManager& X64SyscallManager::instance ( )
inlinestatic
X64SyscallManager& X64SyscallManager::operator= ( const X64SyscallManager )
private

Assignment operator

Note
NOT implemented

Referenced by instance().

+ Here is the caller graph for this function:

bool X64SyscallManager::registerSyscallHandler ( Service_t  Service,
SyscallHandler pHandler 
)
virtual

Register a syscall handler

Parameters
[in]Servicethe service number you want to register
[in]pHandlerthe interrupt handler
Returns
true, if successfully registered, false otherwise

Implements SyscallManager.

Definition at line 42 of file x64/SyscallManager.cc.

References UNLIKELY.

Referenced by instance().

+ Here is the caller graph for this function:

uintptr_t X64SyscallManager::syscall ( Service_t  service,
uintptr_t  function,
uintptr_t  p1,
uintptr_t  p2,
uintptr_t  p3,
uintptr_t  p4,
uintptr_t  p5 
)
virtual

Called to execute a syscall.

Implements SyscallManager.

Definition at line 143 of file x64/SyscallManager.cc.

Referenced by instance().

+ Here is the caller graph for this function:

void X64SyscallManager::syscall ( SyscallState &  syscallState)
staticprivate

Called when a syscall was called

Parameters
[in]syscallStatereference to the usermode state before the syscall
Todo:
this is an extraordinary hack, this should be done in a way more abstract way than this!!

Definition at line 59 of file x64/SyscallManager.cc.

References Dec, Thread::Exit, Process::getId(), Hex, Processor::information(), LIKELY, NOTICE, Processor::setInterrupts(), Time::Stopwatch::stop(), SyscallHandler::syscall(), UNLIKELY, and Time::Stopwatch::value().

Member Data Documentation

X64SyscallManager X64SyscallManager::m_Instance
staticprivate

The instance of the syscall manager

Definition at line 85 of file kernel/core/processor/x64/SyscallManager.h.

Referenced by instance().

Spinlock X64SyscallManager::m_Lock
private

Spinlock protecting the member variables

Definition at line 79 of file kernel/core/processor/x64/SyscallManager.h.

SyscallHandler* X64SyscallManager::m_pHandler[serviceEnd]
private

The syscall handlers

Definition at line 82 of file kernel/core/processor/x64/SyscallManager.h.

Referenced by X64SyscallManager().


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