summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2025-07-30 14:32:01 -0400
committerJon Santmyer <jon@jonsantmyer.com>2025-07-30 14:32:01 -0400
commitb905869a35f062a4e5072f10bec3a2ba3db0e365 (patch)
tree0666691804878857b4bb07daca8a54f5ddb8ae0b /main.c
downloadjove-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.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/main.c b/main.c
new file mode 100644
index 0000000..4416bba
--- /dev/null
+++ b/main.c
@@ -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");
+}