|
The Pedigree Project 0.1
|
#include <SyscallManager.h>
Inheritance diagram for X64SyscallManager:
Collaboration diagram for X64SyscallManager:Public Member Functions | |
| virtual bool | registerSyscallHandler (Service_t Service, SyscallHandler *pHandler, Registration ®istration, 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 X64SyscallManager & | instance () |
| static void | initialiseProcessor () INITIALISATION_ONLY |
Static Public Member Functions inherited from SyscallManager | |
| static EXPORTED_PUBLIC SyscallManager & | instance () |
Private Member Functions | |
| X64SyscallManager () INITIALISATION_ONLY | |
| X64SyscallManager (const X64SyscallManager &) | |
| X64SyscallManager & | operator= (const X64SyscallManager &) |
| virtual | ~X64SyscallManager () |
Static Private Member Functions | |
| static void | syscall (SyscallState &syscallState) USED |
Static Private Attributes | |
| static X64SyscallManager | m_Instance |
Friends | |
| class | ProcessorBase |
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 ®istration, FastEntry entry=nullptr) |
| ALWAYS_INLINE uintptr_t | dispatchHandler (const HandlerLease &lease, SyscallState &state) const |
| bool | closeHandler (Registration ®istration) |
| bool | unregisterHandler (Registration ®istration) |
| bool | acquireHandler (Service_t service, HandlerLease &lease, PostSyscallAction &action) |
| SyscallManager () | |
| virtual | ~SyscallManager () |
The syscall manager on x64 processors
Definition at line 36 of file kernel/core/processor/x64/SyscallManager.h.
|
private |
The constructor
Definition at line 455 of file x64/SyscallManager.cc.
|
private |
Copy constructor
|
privatevirtual |
The destructor
Definition at line 456 of file x64/SyscallManager.cc.
|
static |
Initialises this processors syscall handling
Definition at line 439 of file x64/SyscallManager.cc.
References X86CommonProcessor::readMachineSpecificRegister(), and X86CommonProcessor::writeMachineSpecificRegister().
|
inlinestatic |
Get the X64SyscallManager class instance
Definition at line 42 of file kernel/core/processor/x64/SyscallManager.h.
References m_Instance.
|
private |
Assignment operator
|
virtual |
Register a syscall handler
| [in] | Service | the service number you want to register |
| [in] | pHandler | the interrupt handler |
| [in] | entry | optional nonvirtual implementation of the same syscall contract |
Implements SyscallManager.
Definition at line 138 of file x64/SyscallManager.cc.
|
virtual |
Called to execute a syscall.
Implements SyscallManager.
Definition at line 421 of file x64/SyscallManager.cc.
|
staticprivate |
Called when a syscall was called
| [in] | syscallState | reference to the usermode state before the syscall |
Definition at line 143 of file x64/SyscallManager.cc.
References Thread::abandonAllStates(), Thread::abandonCurrentState(), TimeTracker::attributeSyscall(), Thread::completeAffinityAtSafePoint(), ProcessorBase::contextSwitch(), Thread::Continue, Thread::Exit, Subsystem::exit(), TimeTracker::finishForUserReturn(), TimeTracker::finishInKernel(), Thread::getErrno(), Thread::getParent(), Thread::getScheduler(), Thread::getUnwindState(), ProcessorBase::information(), LIKELY, m_Instance, ProcessorBase::restoreState(), PerProcessorScheduler::serviceUserReturnWork(), Thread::setErrno(), ProcessorBase::setInterrupts(), Thread::takeDeferredProcessExit(), Thread::TerminateThread, Thread::transitionTime(), and Thread::transitionTimeAtInterruptReturn().
|
friend |
Definition at line 37 of file kernel/core/processor/x64/SyscallManager.h.
|
staticprivate |
The instance of the syscall manager
Definition at line 76 of file kernel/core/processor/x64/SyscallManager.h.
Referenced by instance(), and syscall().