diff options
Diffstat (limited to 'api')
| -rw-r--r-- | api/error.h | 2 | ||||
| -rw-r--r-- | api/init.h | 7 | ||||
| -rw-r--r-- | api/obj.h | 2 | ||||
| -rw-r--r-- | api/syscall.h | 31 |
4 files changed, 40 insertions, 2 deletions
diff --git a/api/error.h b/api/error.h index 229c6c8..5e0e936 100644 --- a/api/error.h +++ b/api/error.h @@ -13,5 +13,7 @@ #define EALIGN 10 #define EEXIST 11 #define EBUSY 12 +#define EEMPTY 13 +#define EFULL 14 #endif @@ -6,14 +6,19 @@ enum { ROOTDIR_PROCESSORS_I, ROOTDIR_PAGEDIR_I, ROOTDIR_UNTYPED_I, + ROOTDIR_HWMEMORY_I, ROOTDIR_PCB_I, ROOTDIR_IOPB_I, - ROOTDIR_ACPI_I, ROOTDIR_INTERRUPTS_I, ROOTDIR_INITRD_I, ROOTDIR_MESSAGE_I, }; +struct init_payload +{ + void *rsdp; +}; + #define ROOTDIR_SERIAL_COM_I 0x80 #define ROOTDIR_FRAMEBUFFER_I 0x81 #define ROOTDIR_VIRTTERM_I 0x82 @@ -10,7 +10,7 @@ enum JOVE_OBJ_OBJDIR, JOVE_OBJ_PAGEDIR, JOVE_OBJ_PROCESSOR, - JOVE_OBJ_ACPI_TABLE, + JOVE_OBJ_HWMEMORY, JOVE_OBJ_INT_HANDLE, JOVE_OBJ_PROCESS, JOVE_OBJ_INITRD_FILE, diff --git a/api/syscall.h b/api/syscall.h index 8c35270..4bb2eb2 100644 --- a/api/syscall.h +++ b/api/syscall.h @@ -115,6 +115,37 @@ struct syscall_pagedir_map objpath_part_t untyped_path[]; }; +/**If a page frame is present at the virtual address, the kernel will: + * mark the page frame as not present. + * untype the page frame and move it to the none path. + * return 0. + * If a page frame is not present at the virtual address, the kernel will return EEMPTY. + * Follows the rules defined by struct syscall_pagedir_unmap + * */ +#define SYSCALL_PAGEDIR_UNMAP_FRAME 2 + +/**If a page table is present at the virtual address, one of two things will happen: + * If the page table has present entries, the kernel will return EBUSY. + * Otherwise, the kernel will: + * mark the page table as not present. + * untype the page frame and move it to the none path. + * return 0. + * If a page table is not present at the virtual address, the kernel will return EEMPTY. + * Follows the rules defined by the struct syscall_pagedir_unmap + * */ +#define SYSCALL_PAGEDIR_UNMAP_TABLE 3 + +/**If the virtual address is above JOVE_USER_MEMORY_LIMIT, the kernel will return EBADARG. + * If none_pathlen exceeds the length of the message, the kernel will return ETOOBIG. + * If none_path does not point to a JOVE_OBJ_NONE object, the kernel will return EBADOBJ. + * */ +struct syscall_pagedir_unmap +{ + uintptr_t virtual_address; + uint16_t none_pathlen; + objpath_part_t none_path[]; +}; + #define SYSCALL_VTT_WRITE 0 #endif |
