From f8529d09bf1555c2dda61f5841b7ad4f42ce9715 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Thu, 17 Apr 2025 13:44:55 -0400 Subject: elf sym loading --- kernel/mboot/mboot.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'kernel/mboot/mboot.c') diff --git a/kernel/mboot/mboot.c b/kernel/mboot/mboot.c index e10f33c..949337d 100644 --- a/kernel/mboot/mboot.c +++ b/kernel/mboot/mboot.c @@ -3,7 +3,7 @@ #include "mboot.h" -static volatile void *mboot; +static volatile void *mboot = NULL; void mboot_init(long magic, volatile void *ptr) { @@ -14,9 +14,12 @@ void mboot_init(long magic, volatile void *ptr) void *locate_mboot_table(uint32_t type) { + if (mboot == NULL) + return NULL; + struct multiboot *info = (struct multiboot *)mboot; - const char *mboot_end = ((char *)info) + info->total_size; + const char *mboot_end = ((char *)info) + info->total_size; char *tag_ptr = info->tags; while (tag_ptr < mboot_end) { -- cgit v1.2.3-freya