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

#include <SyscallManager.h>

+ Inheritance diagram for HostedSyscallManager:
+ Collaboration diagram for HostedSyscallManager:

Public Member Functions

virtual bool registerSyscallHandler (Service_t Service, SyscallHandler *pHandler, Registration &registration, FastEntry entry=nullptr)
 
uintptr_t syscall (Service_t service, uintptr_t function, uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4, uintptr_t p5)
 
- Public Member Functions inherited from SyscallManager
EXPORTED_PUBLIC bool requestThreadExit ()
 
EXPORTED_PUBLIC bool requestProcessExit (int status)
 
EXPORTED_PUBLIC bool requestEventReturn ()
 
EXPORTED_PUBLIC bool requestEventStatePop ()
 
EXPORTED_PUBLIC bool requestStateRestore (const ProcessorState &state)
 
EXPORTED_PUBLIC bool requestUserJump (uintptr_t instructionPointer, uintptr_t stackPointer)
 
EXPORTED_PUBLIC bool requestReboot (Machine::ShutdownType type=Machine::ShutdownType::Restart)
 

Static Public Member Functions

static HostedSyscallManager & instance ()
 
static void initialiseProcessor () INITIALISATION_ONLY
 
- Static Public Member Functions inherited from SyscallManager
static EXPORTED_PUBLIC SyscallManager & instance ()
 

Private Member Functions

 HostedSyscallManager () INITIALISATION_ONLY
 
 HostedSyscallManager (const HostedSyscallManager &)
 
HostedSyscallManager & operator= (const HostedSyscallManager &)
 
virtual ~HostedSyscallManager ()
 

Static Private Member Functions

static void syscall (SyscallState &syscallState)
 

Static Private Attributes

static HostedSyscallManager m_Instance
 

Additional Inherited Members

- Public Types inherited from SyscallManager
enum  PostSyscallActionKind {
  NoPostSyscallAction , TerminateCurrentThread , ExitCurrentProcess , ReturnFromEvent ,
  PopEventState , RestoreProcessorState , JumpToUserspace , RebootSystem
}
 
using FastEntry = uintptr_t(*)(SyscallHandler *, SyscallState &)
 
- Protected Member Functions inherited from SyscallManager
bool registerHandler (Service_t service, SyscallHandler *pHandler, Registration &registration, FastEntry entry=nullptr)
 
ALWAYS_INLINE uintptr_t dispatchHandler (const HandlerLease &lease, SyscallState &state) const
 
bool closeHandler (Registration &registration)
 
bool unregisterHandler (Registration &registration)
 
bool acquireHandler (Service_t service, HandlerLease &lease, PostSyscallAction &action)
 
 SyscallManager ()
 
virtual ~SyscallManager ()
 

Detailed Description

The syscall manager on x64 processors

Definition at line 32 of file kernel/core/processor/hosted/SyscallManager.h.

Constructor & Destructor Documentation

◆ HostedSyscallManager() [1/2]

HostedSyscallManager::HostedSyscallManager ( )
private

The constructor

Definition at line 211 of file hosted/SyscallManager.cc.

◆ HostedSyscallManager() [2/2]

HostedSyscallManager::HostedSyscallManager ( const HostedSyscallManager &  )
private

Copy constructor

Note
NOT implemented

◆ ~HostedSyscallManager()

HostedSyscallManager::~HostedSyscallManager ( )
privatevirtual

The destructor

Definition at line 213 of file hosted/SyscallManager.cc.

Member Function Documentation

◆ initialiseProcessor()

void HostedSyscallManager::initialiseProcessor ( )
static

Initialises this processors syscall handling

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

Definition at line 209 of file hosted/SyscallManager.cc.

◆ instance()

static HostedSyscallManager & HostedSyscallManager::instance ( )
inlinestatic

Get the HostedSyscallManager class instance

Returns
instance of the HostedSyscallManager class

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

References m_Instance.

◆ operator=()

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

Assignment operator

Note
NOT implemented

◆ registerSyscallHandler()

bool HostedSyscallManager::registerSyscallHandler ( Service_t  Service,
SyscallHandler *  pHandler,
Registration &  registration,
FastEntry  entry = nullptr 
)
virtual

Register a syscall handler

Parameters
[in]Servicethe service number you want to register
[in]pHandlerthe interrupt handler
[in]entryoptional nonvirtual implementation of the same syscall contract
Returns
true, if successfully registered, false otherwise

Implements SyscallManager.

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

◆ syscall() [1/2]

uintptr_t HostedSyscallManager::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 191 of file hosted/SyscallManager.cc.

References syscall().

Referenced by syscall().

+ Here is the caller graph for this function:

◆ syscall() [2/2]

void HostedSyscallManager::syscall ( SyscallState &  syscallState)
staticprivate

Member Data Documentation

◆ m_Instance

HostedSyscallManager HostedSyscallManager::m_Instance
staticprivate

The instance of the syscall manager

Definition at line 76 of file kernel/core/processor/hosted/SyscallManager.h.

Referenced by instance(), and syscall().


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