|
FreeNOS
|
Application Programming Interface (API) provided by the Kernel for user programs. More...
Data Structures | |
| struct | ProcessInfo |
| Process information structure, used for Info. More... | |
| struct | SystemInformation |
| System information structure. More... | |
Typedefs | |
| typedef enum PrivOperation | PrivOperation |
| Available operations to perform using PrivExec(). More... | |
| typedef enum ProcessOperation | ProcessOperation |
| Available operation to perform using ProcessCtl. More... | |
| typedef struct ProcessInfo | ProcessInfo |
| Process information structure, used for Info. More... | |
| typedef struct SystemInformation | SystemInformation |
| System information structure. More... | |
| typedef enum MemoryOperation | MemoryOperation |
| Memory operations which may be used as an argument to VMCtl(). More... | |
Enumerations | |
| enum | PrivOperation { Idle = 0, RebootSystem = 1, ShutdownSystem = 2, WriteConsole = 3, Panic = 4 } |
| Available operations to perform using PrivExec(). More... | |
| enum | ProcessOperation { Spawn = 0, KillPID, GetPID, GetParent, WatchIRQ, EnableIRQ, DisableIRQ, SendIRQ, InfoPID, WaitPID, InfoTimer, WaitTimer, EnterSleep, Schedule, Wakeup, Stop, Resume, Reset } |
| Available operation to perform using ProcessCtl. More... | |
| enum | MemoryOperation { MapContiguous = 0, MapSparse, UnMap, Release, ReleaseSections, LookupVirtual, Access, ReserveMem, AddMem, CacheClean, CacheInvalidate, CacheCleanInvalidate } |
| Memory operations which may be used as an argument to VMCtl(). More... | |
Functions | |
| API::Result | PrivExec (const PrivOperation op, const Address param=0) |
| Prototype for user applications. More... | |
| Log & | operator<< (Log &log, ProcessOperation op) |
| Operator to print a ProcessOperation to a Log. More... | |
| API::Result | ProcessCtl (const ProcessID proc, const ProcessOperation op, const Address addr=0, const Address output=0) |
| Prototype for user applications. More... | |
| API::Result | SystemInfo (SystemInformation *info) |
| Prototype for user applications. More... | |
| API::Result | VMCopy (const ProcessID proc, const API::Operation how, const Address ours, const Address theirs, const Size sz) |
| Prototype for user applications. More... | |
| API::Result | VMCtl (const ProcessID procID, const MemoryOperation op, Memory::Range *range=ZERO) |
| Prototype for user applications. More... | |
| API::Result | VMShare (const ProcessID pid, const API::Operation op, ProcessShares::MemoryShare *share) |
| Prototype for user applications. More... | |
Static Process IDs | |
| #define | ANY 65535 |
| #define | SELF 65534 |
| #define | KERNEL_PID 65533 |
| #define | CORESRV_PID 0 |
| #define | DATASTORE_PID 1 |
| #define | RECOVERY_PID 2 |
| #define | ROOTFS_PID 3 |
Application Programming Interface (API) provided by the Kernel for user programs.
| #define ANY 65535 |
Definition at line 34 of file ProcessID.h.
| #define CORESRV_PID 0 |
Definition at line 38 of file ProcessID.h.
| #define DATASTORE_PID 1 |
Definition at line 39 of file ProcessID.h.
| #define KERNEL_PID 65533 |
Definition at line 36 of file ProcessID.h.
| #define RECOVERY_PID 2 |
Definition at line 40 of file ProcessID.h.
| #define ROOTFS_PID 3 |
Definition at line 41 of file ProcessID.h.
| #define SELF 65534 |
Definition at line 35 of file ProcessID.h.
| typedef enum MemoryOperation MemoryOperation |
| typedef enum PrivOperation PrivOperation |
Available operations to perform using PrivExec().
| typedef struct ProcessInfo ProcessInfo |
Process information structure, used for Info.
| typedef enum ProcessOperation ProcessOperation |
Available operation to perform using ProcessCtl.
| typedef struct SystemInformation SystemInformation |
System information structure.
| enum MemoryOperation |
| enum PrivOperation |
Available operations to perform using PrivExec().
| Enumerator | |
|---|---|
| Idle | |
| RebootSystem | |
| ShutdownSystem | |
| WriteConsole | |
| Panic | |
Definition at line 34 of file PrivExec.h.
| enum ProcessOperation |
Available operation to perform using ProcessCtl.
| Enumerator | |
|---|---|
| Spawn | |
| KillPID | |
| GetPID | |
| GetParent | |
| WatchIRQ | |
| EnableIRQ | |
| DisableIRQ | |
| SendIRQ | |
| InfoPID | |
| WaitPID | |
| InfoTimer | |
| WaitTimer | |
| EnterSleep | |
| Schedule | |
| Wakeup | |
| Stop | |
| Resume | |
| Reset | |
Definition at line 37 of file ProcessCtl.h.
| Log& operator<< | ( | Log & | log, |
| ProcessOperation | op | ||
| ) |
Operator to print a ProcessOperation to a Log.
Definition at line 185 of file ProcessCtl.cpp.
References Log::append(), DisableIRQ, EnableIRQ, EnterSleep, GetParent, GetPID, InfoPID, InfoTimer, KillPID, Schedule, Spawn, WaitPID, Wakeup, and WatchIRQ.
|
inline |
Prototype for user applications.
Performs various privileged operations.
| op | The operation to perform. |
| param | Optional parameter value for the given operation |
Definition at line 52 of file PrivExec.h.
References param(), API::PrivExecNumber, and trapKernel2().
Referenced by Shutdown::exec(), main(), setupHeap(), KernelLog::terminate(), StdioLog::terminate(), and KernelLog::write().
|
inline |
Prototype for user applications.
Process management related operations.
| proc | Target Process' ID. |
| op | The operation to perform. |
| addr | Input argument address, used for program entry point for Spawn, ProcessInfo pointer for Info. |
| output | Output argument address (optional). |
Definition at line 93 of file ProcessCtl.h.
References API::ProcessCtlNumber, and trapKernel4().
Referenced by ChannelServer< DatastoreServer, DatastoreMessage >::ChannelServer(), ChannelClient::connect(), BenchMark::exec(), SysInfo::exec(), exit(), gettimeofday(), IntelCoreServer::initialize(), SunxiCoreServer::initialize(), i8250::initialize(), PL011::initialize(), NS16550::initialize(), Sun8iEmac::initialize(), i8250::interrupt(), PL011::interrupt(), Sun8iEmac::interrupt(), kill(), main(), ProcessClient::processInfo(), MpiProxy::processRecv(), Keyboard::read(), NS16550::read(), ChannelServer< DatastoreServer, DatastoreMessage >::readChannels(), MpiTarget::receive(), DeviceServer::registerInterrupt(), RecoveryServer::restartProcess(), SysControl::resumeProcess(), RecoveryServer::rewriteProgram(), SECTION(), MpiTarget::send(), SunxiCoreServer::sendIPI(), ChannelClient::sendRequest(), FileSystemServer::sendResponse(), ChannelServer< DatastoreServer, DatastoreMessage >::setTimeout(), setupHeap(), setupMappings(), setupRandomizer(), sleep(), ChannelServer< DatastoreServer, DatastoreMessage >::sleepUntilWakeup(), spawn(), SysControl::stopProcess(), ChannelClient::syncReceiveFrom(), ChannelClient::syncSendTo(), KernelLog::terminate(), KernelTimer::tick(), IntelAPIC::wait(), IntelCoreServer::waitIPI(), SunxiCoreServer::waitIPI(), and waitpid().
|
inline |
Prototype for user applications.
Retrieves system information.
| info | Pointer to SystemInformation output buffer. |
Definition at line 40 of file SystemInfo.h.
References API::SystemInfoNumber, and trapKernel1().
Referenced by SystemInformation::SystemInformation().
|
inline |
Prototype for user applications.
Copies virtual memory between two processes.
| proc | Remote process. |
| how | Read or Write. |
| ours | Virtual address of the buffer of this process. |
| theirs | Virtual address of the remote process' buffer. |
| sz | Amount of memory to copy. |
Definition at line 42 of file VMCopy.h.
References trapKernel5(), and API::VMCopyNumber.
Referenced by IntelMP::boot(), SunxiCoreServer::bootCore(), CoreServer::createProcess(), FileSystemServer::getFileSystemsHandler(), SunxiCoreServer::initialize(), Mount::listMounts(), FileSystemServer::mountHandler(), CoreServer::prepareCore(), ProcessClient::processInfo(), FileSystemServer::processRequest(), IOBuffer::read(), RecoveryServer::restartProcess(), spawn(), and IOBuffer::write().
|
inline |
Prototype for user applications.
Examines and modifies virtual memory pages.
| procID | Remote process. |
| op | Determines which operation to perform. |
| range | Describes the memory pages to operate on. |
Definition at line 61 of file VMCtl.h.
References trapKernel3(), and API::VMCtlNumber.
Referenced by PageAllocator::allocate(), RecoveryServer::cleanupProgram(), CoreServer::clearPages(), MpiProxy::createChannels(), CoreServer::createProcess(), BenchMark::exec(), MemoryChannel::flushPage(), forkexec(), VGA::initialize(), Sun8iEmac::initialize(), MpiTarget::initializeMaster(), BootImageStorage::load(), CoreServer::loadKernel(), IO::map(), NetworkQueue::NetworkQueue(), CoreServer::prepareCore(), MpiProxy::processTerminate(), Sun8iEmac::receive(), DatastoreServer::registerBuffer(), RecoveryServer::reloadProgram(), Sun8iEmac::resetReceive(), RecoveryServer::rewriteProgram(), IOBuffer::setMessage(), setupHeap(), spawn(), Sun8iEmac::startDMA(), MpiProxy::startRemoteProcess(), CoreServer::unloadKernel(), IO::unmap(), IOBuffer::~IOBuffer(), and NetworkQueue::~NetworkQueue().
|
inline |
Prototype for user applications.
Creates and removes shared virtual memory mappings.
| pid | Remote process. |
| op | Determines which operation to perform. |
| share | Pointer to the MemoryShare to use in the operation |
Definition at line 41 of file VMShare.h.
References trapKernel3(), and API::VMShareNumber.
Referenced by ChannelServer< DatastoreServer, DatastoreMessage >::ChannelServer(), ChannelClient::connect(), ChannelServer< DatastoreServer, DatastoreMessage >::readKernelEvents(), and ChannelServer< DatastoreServer, DatastoreMessage >::recoverChannels().
1.8.17