From d1ff7bcc91886626dc9060ec5fb67ee102ab7c1d Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Mon, 11 Mar 2024 21:30:31 -0400 Subject: usermode capable kernel with logging syscall --- boot/boot.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 boot/boot.h (limited to 'boot/boot.h') diff --git a/boot/boot.h b/boot/boot.h new file mode 100644 index 0000000..d7571d8 --- /dev/null +++ b/boot/boot.h @@ -0,0 +1,40 @@ +#ifndef JOVE_BOOT_H +#define JOVE_BOOT_H 1 + +#include +#include +#include + +struct MemoryMapEntry { + uintptr_t base; + size_t length; + bool usable; +}; + +#define MEMORY_MAP_MAX_ENTRIES 64 +struct MemoryMap { + size_t count; + struct MemoryMapEntry entries[MEMORY_MAP_MAX_ENTRIES]; +}; + +#define BOOT_MODULE_MAX_ENTRIES 4 +struct BootModule { + char *path; + char *cmdline; + size_t size; + uintptr_t addr; +}; + +#define KERNEL_INITIAL_STACK_WIDTH (0x1000 * 4) +extern void *boot_kernel_initial_stack_base; +extern uintptr_t boot_kernel_physical_address; +extern const char *boot_kernel_cmdline; + +extern struct MemoryMap boot_memorymap; + +extern struct BootModule boot_modules[BOOT_MODULE_MAX_ENTRIES]; +extern size_t boot_module_count; + +#define boot_kernel_virtual_base 0xFFFFFFFF80000000ULL + +#endif -- cgit v1.2.1