diff options
author | Jon Santmyer <jon@jonsantmyer.com> | 2025-07-30 14:32:01 -0400 |
---|---|---|
committer | Jon Santmyer <jon@jonsantmyer.com> | 2025-07-30 14:32:01 -0400 |
commit | b905869a35f062a4e5072f10bec3a2ba3db0e365 (patch) | |
tree | 0666691804878857b4bb07daca8a54f5ddb8ae0b /main.c | |
download | jove-kernel-b905869a35f062a4e5072f10bec3a2ba3db0e365.tar.gz jove-kernel-b905869a35f062a4e5072f10bec3a2ba3db0e365.tar.bz2 jove-kernel-b905869a35f062a4e5072f10bec3a2ba3db0e365.zip |
working userland with some invoke syscalls
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 44 |
1 files changed, 44 insertions, 0 deletions
@@ -0,0 +1,44 @@ +#include "jove.h" +#include "object.h" +#include "memory.h" +#include "print.h" +#include "init.h" +#include "device/portio_uart.h" +#include "device/processor.h" +#include "device/initrd.h" + +struct jove_ObjectDirectory _initDirectory = { + + .entries = { + [0] = { + .type = KO_OBJECT_DIRECTORY, + .data = 1 + }, + } +}; +init_data_t _initData; + +void +_jove_main(void) +{ + bsp_setup(); +#ifdef ENABLE_PORTIO_UART + portio_uart_setup(); +#endif + + pmem_setup(); + vmem_setup(); +#ifdef ENABLE_INITRD + initrd_setup(); +#endif + + init_load(); + kprintf("Reached end of kernel main!\n"); + hcf(); +} + +NORETURN void +hcf(void) +{ + for(;;) __asm__ volatile("hlt"); +} |