diff options
| author | Jon Santmyer <jon@jonsantmyer.com> | 2026-10-16 16:42:22 -0400 |
|---|---|---|
| committer | Jon Santmyer <jon@jonsantmyer.com> | 2026-10-16 16:42:22 -0400 |
| commit | d8aca3ff2501f9a77e22e5afb7a30380aed205af (patch) | |
| tree | a27db1749a35aea07317406f170a2d9b2a799ce7 /arch/x86_64/proc/init.c | |
| parent | 548506392b789f58b1556a6ffca917441e1d89fd (diff) | |
| download | jove-kernel-d8aca3ff2501f9a77e22e5afb7a30380aed205af.tar.gz jove-kernel-d8aca3ff2501f9a77e22e5afb7a30380aed205af.tar.bz2 jove-kernel-d8aca3ff2501f9a77e22e5afb7a30380aed205af.zip | |
remove explicit framebuffer in kernel. reduce locking in syscalls
Diffstat (limited to 'arch/x86_64/proc/init.c')
| -rw-r--r-- | arch/x86_64/proc/init.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/arch/x86_64/proc/init.c b/arch/x86_64/proc/init.c index 8003a6d..6c5c36e 100644 --- a/arch/x86_64/proc/init.c +++ b/arch/x86_64/proc/init.c @@ -11,8 +11,7 @@ #include "lib/printf.h" #include "arch/x86_64/lib/elf.h" #include "arch/x86_64/hal/paging.h" -#include "boot/cmdline.h" -#include "boot/initrd.h" +#include "boot/boot.h" static int elf_is_valid(struct elf_header *ehdr) @@ -52,15 +51,13 @@ init_setup(void) kpanic("Kernel commandline is missing 'init' arg.\n"); } - jove_owned_obj_t *initrd_obj = objdir_getlocal(_rootdir_obj, INIT_ROOTDIR_INITRD_I); - jove_owned_obj_t *init_obj = initrd_seek(initrd_obj, init_path); - if(init_obj == NULL) { - kpanic("init: Cannot find file '%s' in initrd.\n", init_path); + jove_owned_obj_t *init_obj = boot_getmodule(init_path); + if(init_obj == 0) { + kpanic("Unable to get module %s : %s\n", init_path, errstr(errno)); } - obj_release(initrd_obj); - void *init_data = initrd_file_data(init_obj); - obj_release(init_obj); + void *init_data = shmem_deref(init_obj); + kprintf("Found init at %p\n", init_data); struct elf_header *init_ehdr = init_data; if(init_ehdr == NULL) { |
