diff options
| author | Jon Santmyer <jon@jonsantmyer.com> | 2026-10-04 10:49:41 -0400 |
|---|---|---|
| committer | Jon Santmyer <jon@jonsantmyer.com> | 2026-10-04 10:49:41 -0400 |
| commit | 8d48bbd9746228b63bafa5f92b621998d7d8f3d3 (patch) | |
| tree | fbaba69059c2e28d5098da4c9be357c38e406626 /doc | |
| parent | 465cba0c00bfc5d89bf10ce353b0adf40bdc098d (diff) | |
| download | jove-kernel-8d48bbd9746228b63bafa5f92b621998d7d8f3d3.tar.gz jove-kernel-8d48bbd9746228b63bafa5f92b621998d7d8f3d3.tar.bz2 jove-kernel-8d48bbd9746228b63bafa5f92b621998d7d8f3d3.zip | |
move init fully to proc. remove init pages prealloc. prepare for scheduling
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/syscall.md | 90 |
1 files changed, 87 insertions, 3 deletions
diff --git a/doc/syscall.md b/doc/syscall.md index 4fd55ad..1e03425 100644 --- a/doc/syscall.md +++ b/doc/syscall.md @@ -95,9 +95,11 @@ If the untyped path does not point to a `JOVE_OBJ_NONE` object, the kernel will ### JOVE_OBJ_OBJDIR -| Syscall | Permissions Required | -|------------------------|----------------------| -| SYSCALL_OBJDIR_OBJTYPE | JOVE_PERM_READ | +| Syscall | Target Permissions | +|------------------------|--------------------------------------| +| SYSCALL_OBJDIR_OBJTYPE | JOVE_PERM_READ | +| SYSCALL_OBJDIR_UNTYPE | JOVE_PERM_WRITE <br>JOVE_PERM_MUTATE | +| SYSCALL_OBJDIR_SEND | JOVE_PERM_MUTATE | #### SYSCALL_OBJDIR_OBJTYPE @@ -111,6 +113,18 @@ If the message is too small to hold the payload, the kernel will return `-ETOOSM If the entry index exceeds `JOVE_OBJDIR_ENTRIES`, the kernel returns `-EOOB`. +#### SYSCALL_OBJDIR_UNTYPE + +Converts the target object to an untyped object if possible. + +| Data | Entry Index | +|--------------|-------------| +| Size (bytes) | 2 | + +If the target object does not have underlying memory, the kernel will replace the object with `JOVE_OBJ_NONE`. + +If the target object has underlying memory, the kernel will replace the object with `JOVE_OBJ_UNTYPED`. + ### JOVE_OBJ_PAGEDIR @@ -263,6 +277,76 @@ If the page frame pointed to by virtual address does not correspond to a shared Successful unmapping returns `0`. +### JOVE_OBJ_PCB + +| Syscall | Target Permissions | Subject Permissions | +|-------------------|--------------------|---------------------| +| SYSCALL_PCB_YIELD | JOVE_PERM_WRITE | | +| SYSCALL_PCB_SEND | JOVE_PERM_MUTATE | JOVE_PERM_MUTATE | +| SYSCALL_PCB_RECV | JOVE_PERM_MUTATE | JOVE_PERM_MUTATE | + +#### SYSCALL_PCB_YIELD + +Yields control to the specified process. + +| Data | Yield target | +|--------------|---------------| +| Size (bytes) | sizeof(pid_t) | + +If the yield target = `0`, the scheduler will determine the next process. + +If the yield target does not exist, the kernel will return `-ENOPROC`. + +#### SYSCALL_PCB_SEND + +Attempts to send the target object to a process specified by destination process. + +If blocking timeout is zero, then the process will wait for the destination process to recieve the object forever. + +If the blocking timeout is non-zero, then the process will wait for the destination process to recieve the object for the specified number of scheduler ticks. + +| Data | Destination Process | Blocking Timeout | Send Path Length | Send Path | +|--------------|---------------------|-------------------|------------------|----------------------| +| Size (bytes) | sizeof(pid_t) | sizeof(uintmax_t) | 2 | 2 * send_path_length | + +While the object is being sent, the kernel will lock the object and copy a pointer to it into the send mailbox. + +If the target path does not represent a valid object, the kernel will return `-EBADPATH`. + +If the target path represents a `JOVE_OBJ_NONE` object, the kernel will return `-EBADOBJ`. + +If the target object does not have the `JOVE_PERM_MUTATE` permission, the kernel will return `-EPERM`. + +If the destination process does not represent a valid process, the kernel will return `-EBADPROC`. + +If the blocking timeout expires and the message was not sent, the kernel will return `-ETIMEOUT`. + +If the send is successful, the sent object is replaced by a `JOVE_OBJ_NONE` object and the kernel will return 0. + +#### SYSCALL_PCB_RECV + +Recieves kernel objects from the PCB mailbox. + +If a sender is specified, then the mailbox will only accept mail from that specific sender. + +Blocks on recieve until blocking timeout expires or forever if blocking timeout was zero. + +Destination object is locked until the timeout expires or an object is placed in the destination path. + +| Data | Sending Process | Blocking Timeout | Dest Path Length | Dest path | +|--------------|-----------------|-------------------|------------------|-------------------| +| Size (bytes) | sizeof(pid_t) | sizeof(uintmax_t) | 2 | 2 * dest_path_len | + +If the specified pid does not correspond to a process, the kernel will return `-ENOPROC`. + +If the destination path does not correspond to a `JOVE_OBJ_NONE` object, the kernel will return `-EFULL`. + +If the destination path does not have the `JOVE_PERM_MUTATE` permission, the kernel will return `-EPERM`. + +Recieved messages will be sent to the specified destination path. + +Successful retrieval returns `0`. + ### JOVE_OBJ_INITRD_FILE | Syscall | Target Permissions | |
