summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2025-08-29 09:43:09 -0400
committerJon Santmyer <jon@jonsantmyer.com>2025-08-29 09:43:09 -0400
commit8f0ba2fd31408d04175513b8826bf9418ad8b087 (patch)
tree22dc7902bf32f77bfd4ded444c35fa9f219ac9e5
parent772717dc22e04b4d168d0f77bee6b6357118768c (diff)
downloadjove-kernel-8f0ba2fd31408d04175513b8826bf9418ad8b087.tar.gz
jove-kernel-8f0ba2fd31408d04175513b8826bf9418ad8b087.tar.bz2
jove-kernel-8f0ba2fd31408d04175513b8826bf9418ad8b087.zip
move memory functions to memory folder
-rw-r--r--Makefile2
-rw-r--r--arch/x86_64/memory/koentry-ptr.c (renamed from arch/x86_64/memory.c)0
-rw-r--r--arch/x86_64/memory/page-mapping.c (renamed from arch/x86_64/page-mapping.c)0
-rw-r--r--arch/x86_64/memory/page_directory.c (renamed from arch/x86_64/page_directory.c)0
-rw-r--r--arch/x86_64/memory/untyped_memory.c (renamed from arch/x86_64/untyped_memory.c)0
-rw-r--r--arch/x86_64/memory/untyped_retype_page.c (renamed from arch/x86_64/untyped_retype_page.c)0
-rw-r--r--include/arch/x86_64/object.h12
-rw-r--r--include/arch/x86_64/processor.h1
-rw-r--r--include/arch/x86_64/tcb.h18
-rw-r--r--include/tcb.h9
10 files changed, 20 insertions, 22 deletions
diff --git a/Makefile b/Makefile
index a2ec118..752928d 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ include config.mk
CDIRS := boot
CDIRS += boot/$(TARGET_BOOTLOADER)
-CDIRS += device lib syscall
+CDIRS += device lib memory syscall tasking
CFILES := $(wildcard *.c)
CFILES += $(wildcard arch/$(TARGET_MACHINE)/*.c)
diff --git a/arch/x86_64/memory.c b/arch/x86_64/memory/koentry-ptr.c
index b32d4e7..b32d4e7 100644
--- a/arch/x86_64/memory.c
+++ b/arch/x86_64/memory/koentry-ptr.c
diff --git a/arch/x86_64/page-mapping.c b/arch/x86_64/memory/page-mapping.c
index 0de5bfa..0de5bfa 100644
--- a/arch/x86_64/page-mapping.c
+++ b/arch/x86_64/memory/page-mapping.c
diff --git a/arch/x86_64/page_directory.c b/arch/x86_64/memory/page_directory.c
index 7030b05..7030b05 100644
--- a/arch/x86_64/page_directory.c
+++ b/arch/x86_64/memory/page_directory.c
diff --git a/arch/x86_64/untyped_memory.c b/arch/x86_64/memory/untyped_memory.c
index bd3bc6d..bd3bc6d 100644
--- a/arch/x86_64/untyped_memory.c
+++ b/arch/x86_64/memory/untyped_memory.c
diff --git a/arch/x86_64/untyped_retype_page.c b/arch/x86_64/memory/untyped_retype_page.c
index 32afe2c..32afe2c 100644
--- a/arch/x86_64/untyped_retype_page.c
+++ b/arch/x86_64/memory/untyped_retype_page.c
diff --git a/include/arch/x86_64/object.h b/include/arch/x86_64/object.h
index 77b07ea..4efaf71 100644
--- a/include/arch/x86_64/object.h
+++ b/include/arch/x86_64/object.h
@@ -7,16 +7,4 @@
#define KERNEL_STACKBYTES 4096
#endif
-typedef struct jove_ThreadControlBlock
-{
- void *stack;
- uintptr_t sp, ksp;
- void *pml4;
- void *mailbox;
-
- /* PML caching for faster calls?*/
-
- uint8_t kstack[KERNEL_STACKBYTES];
-} tcb_t;
-
#endif
diff --git a/include/arch/x86_64/processor.h b/include/arch/x86_64/processor.h
index 1afa6cc..7363c41 100644
--- a/include/arch/x86_64/processor.h
+++ b/include/arch/x86_64/processor.h
@@ -4,6 +4,7 @@
#include "memory.h"
#include "tables.h"
#include "object.h"
+#include "arch/x86_64/tcb.h"
#include <stdint.h>
#define MSR_FS_BASE 0xC0000100
diff --git a/include/arch/x86_64/tcb.h b/include/arch/x86_64/tcb.h
new file mode 100644
index 0000000..33da4fa
--- /dev/null
+++ b/include/arch/x86_64/tcb.h
@@ -0,0 +1,18 @@
+#ifndef _JOVE_x86_64_TCB_H
+#define _JOVE_x86_64_TCB_H 1
+
+#include <stdint.h>
+
+typedef struct jove_ThreadControlBlock
+{
+ void *stack;
+ uintptr_t sp, ksp;
+ void *pml4;
+ void *mailbox;
+
+ /* PML caching for faster calls?*/
+
+ uint8_t kstack[KERNEL_STACKBYTES];
+} tcb_t;
+
+#endif
diff --git a/include/tcb.h b/include/tcb.h
index 6545083..c28a860 100644
--- a/include/tcb.h
+++ b/include/tcb.h
@@ -4,15 +4,6 @@
#include <stddef.h>
#include <stdint.h>
-typedef struct jove_ThreadControlBlock
-{
- uintmax_t id;
- struct jove_ThreadControlBlock *children;
- struct jove_ThreadControlBlock *next;
- void *stack;
- uintptr_t sp, ksp;
- void *pml4;
-} tcb_t;
#endif