summaryrefslogtreecommitdiffstats
path: root/include/arch
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2025-08-19 15:03:42 -0400
committerJon Santmyer <jon@jonsantmyer.com>2025-08-19 15:03:42 -0400
commit772717dc22e04b4d168d0f77bee6b6357118768c (patch)
tree9da95703c3376091904e295930104b51c280008d /include/arch
parent7ee9347560768641096df68c545ac085a20233e4 (diff)
downloadjove-kernel-772717dc22e04b4d168d0f77bee6b6357118768c.tar.gz
jove-kernel-772717dc22e04b4d168d0f77bee6b6357118768c.tar.bz2
jove-kernel-772717dc22e04b4d168d0f77bee6b6357118768c.zip
refactor KO_MEMORY_MAPPING invokemain
Diffstat (limited to 'include/arch')
-rw-r--r--include/arch/x86_64/idt.h2
-rw-r--r--include/arch/x86_64/object.h3
-rw-r--r--include/arch/x86_64/page-mapping.h8
-rw-r--r--include/arch/x86_64/syscall.h10
4 files changed, 16 insertions, 7 deletions
diff --git a/include/arch/x86_64/idt.h b/include/arch/x86_64/idt.h
index ca1c484..4ca820f 100644
--- a/include/arch/x86_64/idt.h
+++ b/include/arch/x86_64/idt.h
@@ -7,8 +7,8 @@ typedef struct jove_IVTState
{
uint64_t r15, r14, r13, r12, r11, r10, r9, r8;
uint64_t rbp, rdi, rsi, rdx, rcx, rbx, rax;
- uint64_t rip, cs, rflags, rsp, ss;
uint64_t num, err;
+ uint64_t rip, cs, rflags, rsp, ss;
} ivt_state_t;
void kpanic_state(ivt_state_t *state, const char *fmt, ...);
diff --git a/include/arch/x86_64/object.h b/include/arch/x86_64/object.h
index e13a987..77b07ea 100644
--- a/include/arch/x86_64/object.h
+++ b/include/arch/x86_64/object.h
@@ -13,6 +13,9 @@ typedef struct jove_ThreadControlBlock
uintptr_t sp, ksp;
void *pml4;
void *mailbox;
+
+ /* PML caching for faster calls?*/
+
uint8_t kstack[KERNEL_STACKBYTES];
} tcb_t;
diff --git a/include/arch/x86_64/page-mapping.h b/include/arch/x86_64/page-mapping.h
new file mode 100644
index 0000000..bc495dd
--- /dev/null
+++ b/include/arch/x86_64/page-mapping.h
@@ -0,0 +1,8 @@
+#ifndef _JOVE_ARCH_x86_64_PAGE_MAPPING_H
+#define _JOVE_ARCH_x86_64_PAGE_MAPPING_H 1
+
+#include "arch/x86_64/page.h"
+
+pmle_t *page_mapping_traverse(pmle_t *pml4, uint8_t depth, uint16_t *path);
+
+#endif
diff --git a/include/arch/x86_64/syscall.h b/include/arch/x86_64/syscall.h
index 2d5060e..e470537 100644
--- a/include/arch/x86_64/syscall.h
+++ b/include/arch/x86_64/syscall.h
@@ -4,13 +4,11 @@
/**@ENUM mapping invokes*/
enum
{
- /*[target path][u8 funcid]*/
- INVOKE_MAPPING_RELEASE = 0,
- /*[target path][u8 funcid][u16 pmli][dest path]*/
- INVOKE_MAPPING_GET,
- /*[target path][u8 funcid][u16 pmli][untyped path][u64 flags]*/
+ /*[target path][u8 funcid][u8 depth][u16*depth pmli]*/
+ INVOKE_MAPPING_EXISTS = 0,
+ /*[target path][u8 funcid][u8 depth][u16*depth pmli][untyped path][u64 flags]*/
INVOKE_MAPPING_MAP,
- /*[target path][u8 funcid][u16 pmli][mapped path]*/
+ /*[target path][u8 funcid][u8 depth][u16*depth pmli][dest path]*/
INVOKE_MAPPING_UNMAP
};