diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/syscall.md | 77 |
1 files changed, 70 insertions, 7 deletions
diff --git a/doc/syscall.md b/doc/syscall.md index 53626c8..70f0570 100644 --- a/doc/syscall.md +++ b/doc/syscall.md @@ -46,13 +46,16 @@ If the syscall does not have the correct permissions for the syscall, the kernel ### JOVE_OBJ_UNTYPED -| Syscall | Permissions Required | -|-------------------------|-----------------------------------| -| SYSCALL_UNTYPED_ADDRESS | JOVE_PERM_READ | -| SYSCALL_UNTYPED_SIZE | JOVE_PERM_READ | -| SYSCALL_UNTYPED_SPLIT | JOVE_PERM_WRITE, JOVE_PERM_MUTATE | -| SYSCALL_UNTYPED_MERGE | JOVE_PERM_WRITE, JOVE_PERM_MUTATE | -| SYSCALL_UNTYPED_RETYPE | JOVE_PERM_WRITE, JOVE_PERM_MUTATE | +| Syscall | Permissions Required | +|---------------------------------|-----------------------------------| +| SYSCALL_UNTYPED_ADDRESS | JOVE_PERM_READ | +| SYSCALL_UNTYPED_SIZE | JOVE_PERM_READ | +| SYSCALL_UNTYPED_SPLIT | JOVE_PERM_WRITE, JOVE_PERM_MUTATE | +| SYSCALL_UNTYPED_MERGE | JOVE_PERM_WRITE, JOVE_PERM_MUTATE | +| SYSCALL_UNTYPED_RETYPE_OBJDIR | JOVE_PERM_WRITE, JOVE_PERM_MUTATE | +| SYSCALL_UNTYPED_RETYPE_PAGEDIR | JOVE_PERM_WRITE, JOVE_PERM_MUTATE | +| SYSCALL_UNTYPED_RETYPE_SHMEMORY | JOVE_PERM_WRITE, JOVE_PERM_MUTATE | +| SYSCALL_UNTYPED_RETYPE_PCB | JOVE_PERM_WRITE, JOVE_PERM_MUTATE | #### SYSCALL_UNTYPED_ADDRESS @@ -92,6 +95,65 @@ If the untyped path length exceeds the size of the message, the kernel will retu If the untyped path does not point to a `JOVE_OBJ_NONE` object, the kernel will return `-EBADOBJ`. +Successful merges return 0 + + +#### SYSCALL_UNTYPED_RETYPE_OBJDIR + +Creates an empty `JOVE_OBJ_OBJDIR` object from a page sized untyped memory object. + +Each entry is populated with `JOVE_OBJ_NONE` objects. + +If the untyped object's size is not `0x1000`, the kernel will return `-EBADSIZE`. + +If the untyped object's alignment is not `0x1000`, the kernel will return `-EALIGN`. + +Successful retypes return 0. + + +#### SYSCALL_UNTYPED_RETYPE_PAGEDIR + +Creates and prepares a `JOVE_OBJ_PAGEDIR` object from a page sized untyped memory object. + +Kernel pages are automatically populated and restricted. + +If the untyped object's size is not `0x1000`, the kernel will return `-EBADSIZE`. + +If the untyped object's alignment is not `0x1000`, the kernel will return `-EALIGN`. + +Successful retypes return 0. + + +#### SYSCALL_UNTYPED_RETYPE_SHMEMORY + +Creates and prepares a `JOVE_OBJ_SHMEMORY` object from a page aligned untyped memory object. + +New shared memory pages are filled with zero. + +If the untyped object's size is not a multiple of `0x1000`, the kernel will return `-EBADSIZE`. + +If the untyped object's size is greater than `SHMEMORY_LIMIT`, the kernel will return `-ETOOBIG`. + +If the untyped object's alignment is not `0x1000`, the kernel will return `-EALIGN`. + +Successful retypes return 0. + + +#### SYSCALL_UNTYPED_RETYPE_PCB + +Creates and prepares a `JOVE_OBJ_PCB` object from a large enough untyped memory object. + +New PCB's are automatically added to the PCB tree with state `PCB_STATE_EMBRYO`. + +User programs are expected to create and populate a `JOVE_OBJ_PAGEDIR` object in `PCB_ROOTDIR_PAGEDIR_I`. + +If the untyped object's size is less than `PCB_MINSIZE`, the kernel will return `-ETOOSMALL`. + +If the untyped object's parent objdir does not have `JOVE_PERM_ALL`, the kernel will return `-EPERM`. + +If the untyped object is not in entry `PCB_ROOTDIR_SELF_I`, the kernel will return `-EBADPATH`. + +Successful retypes return 0. ### JOVE_OBJ_OBJDIR @@ -281,6 +343,7 @@ Successful unmapping returns `0`. | Syscall | Target Permissions | Subject Permissions | |-------------------|--------------------|---------------------| +| SYSCALL_PCB_PID | JOVE_PERM_READ | | | SYSCALL_PCB_YIELD | JOVE_PERM_WRITE | | | SYSCALL_PCB_SEND | JOVE_PERM_MUTATE | JOVE_PERM_MUTATE | | SYSCALL_PCB_RECV | JOVE_PERM_MUTATE | JOVE_PERM_MUTATE | |
