diff options
| author | Jon Santmyer <jon@jonsantmyer.com> | 2026-09-04 11:31:40 -0400 |
|---|---|---|
| committer | Jon Santmyer <jon@jonsantmyer.com> | 2026-09-04 11:31:40 -0400 |
| commit | 8251da342161767fe203627223ccd4a7026701c6 (patch) | |
| tree | af2db0f11b0ea8ad35f88663a855bab39a80f679 /arch/x86_64/main.c | |
| download | jove-kernel-8251da342161767fe203627223ccd4a7026701c6.tar.gz jove-kernel-8251da342161767fe203627223ccd4a7026701c6.tar.bz2 jove-kernel-8251da342161767fe203627223ccd4a7026701c6.zip | |
initial commit. working on tasking
Diffstat (limited to 'arch/x86_64/main.c')
| -rw-r--r-- | arch/x86_64/main.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/arch/x86_64/main.c b/arch/x86_64/main.c new file mode 100644 index 0000000..44591a5 --- /dev/null +++ b/arch/x86_64/main.c @@ -0,0 +1,48 @@ +#include "jove.h" +#include "lib/printf.h" +#include "lib/virtterm.h" +#include "lib/panic.h" +#include "../../hal/obj.h" +#include "hal/serial_com.h" +#include "hal/smp.h" +#include "hal/memory.h" +#include "hal/framebuffer.h" +#include "hal/process.h" +#include "boot/initrd.h" +#include "boot/cmdline.h" + +int errno = 0; + +PAGEALIGN jove_objdir_t _rootdir = { 0 }; + +void *_rootdir_obj = &_rootdir; + +static void kernel_process_entry(void); + +void +kernel_entry(void) +{ + obj_settype(_rootdir_obj, JOVE_OBJ_OBJDIR); + serial_com_init(); + + smp_init_bsp(); + + initrd_setup(); + + fb_init(); + vt_init(); + + cmdline_print(); + + mem_setup_untyped(); + + extern void processing_setup(void*); + processing_setup(kernel_process_entry); + hcf(); +} + +static void +kernel_process_entry(void) +{ + kpanic("Reached the end of kernel main!\n"); +} |
