summaryrefslogtreecommitdiffstats
path: root/doc/syscall.md
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2026-10-19 11:06:32 -0400
committerJon Santmyer <jon@jonsantmyer.com>2026-10-19 11:06:32 -0400
commit44f9642bfc9ce9f740d508670befb569e06621a2 (patch)
treeff64ec6fd0562b4b9e6ba665fceeec52f2371840 /doc/syscall.md
parentb2920331b103d43793ac8be927a80a593ce0be5a (diff)
downloadjove-kernel-44f9642bfc9ce9f740d508670befb569e06621a2.tar.gz
jove-kernel-44f9642bfc9ce9f740d508670befb569e06621a2.tar.bz2
jove-kernel-44f9642bfc9ce9f740d508670befb569e06621a2.zip
add debug console. start work on userland pagedir manipulation toolsHEADmain
Diffstat (limited to 'doc/syscall.md')
-rw-r--r--doc/syscall.md45
1 files changed, 45 insertions, 0 deletions
diff --git a/doc/syscall.md b/doc/syscall.md
index 6d7583f..aa2fd1f 100644
--- a/doc/syscall.md
+++ b/doc/syscall.md
@@ -220,6 +220,9 @@ Successful links return 0.
| Syscall | Target Permissions | Subject Permissions | Subject Conditional Permissions |
|-----------------------------|:-------------------------------:|:-------------------------------------------------:|:-------------------------------:|
+| SYSCALL_PAGEDIR_GET_MAPPING | JOVE_PERM_READ, JOVE_PERM_WRITE | |
+ |
+| SYSCALL_PAGEDIR_TRANSFER | JOVE_PERM_READ, JOVE_PERM_WRITE | JOVE_PERM_READ, JOVE_PERM_WRITE | |
| SYSCALL_PAGEDIR_MAP_FRAME | JOVE_PERM_READ, JOVE_PERM_WRITE | JOVE_PERM_MUTATE | JOVE_PERM_READ, JOVE_PERM_WRITE |
| SYSCALL_PAGEDIR_MAP_TABLE | JOVE_PERM_READ, JOVE_PERM_WRITE | JOVE_PERM_READ, JOVE_PERM_WRITE, JOVE_PERM_MUTATE | |
| SYSCALL_PAGEDIR_MAP_SHMEM | JOVE_PERM_READ, JOVE_PERM_WRITE | JOVE_PERM_READ | JOVE_PERM_WRITE |
@@ -228,6 +231,48 @@ Successful links return 0.
| SYSCALL_PAGEDIR_UNMAP_SHMEM | JOVE_PERM_READ, JOVE_PERM_WRITE | | |
+#### SYSCALL_PAGEDIR_GET_MAPPING
+
+Returns the mapping information for the given virtual address in a machine-agnostic format.
+
+| Data | Virtual address |
+|--------------|-----------------|
+| Size (bytes) | sizeof(void*) |
+
+If the virtual address exceeds `JOVE_USERMEMORY_LIMIT`, the kernel will return `-EOOB`.
+
+If the page directory does not contain a page table for the given address, the kernel will return `-ENOMAP`.
+
+Successful calls populate the message buffer with the mapping information and returns `0`.
+
+| Data | Mapping information |
+|--------------|----------------------------------------|
+| Size (bytes) | sizeof(struct syscall_pagedir_mapping) |
+
+
+#### SYSCALL_PAGEDIR_TRANSFER
+
+Moves a page mapping from one page directory to another.
+
+In the target pagedir: the entry data is cleared.
+
+In the subject pagedir: the entry data is replaced by the target entry data.
+
+| Data | Target Address | Subject Address | Subject Path Length | Subject Path |
+|--------------|----------------|-----------------|------------------------|----------------------------------------------|
+| Size (bytes) | sizeof(void*) | sizeof(void*) | sizeof(objpath_part_t) | sizeof(objpath_part_t) * subject_path_length |
+
+If the subject path does not point to a `JOVE_OBJ_PAGEDIR` object, the kernel will return `-EBADOBJ`.
+
+If the target/subject address exceeds `JOVE_USERMEMORY_LIMIT`, the kernel will return `-EOOB`.
+
+If the target directory does not have a page table for the target address, the kernel will return `-ENOMAP`.
+
+If the subject directory does not have a page table for the subject address, the kernel will return `-ENOMAP`.
+
+If the subject mapping is marked as present, the kernel will return `-EHASMAP`.
+
+
#### SYSCALL_PAGEDIR_MAP_FRAME
Attempts to map a given untyped memory span to the given virtual address with passed permissions.