summaryrefslogtreecommitdiff
path: root/kernel/mboot/mboot.c
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-04-08 11:49:51 -0400
committerFreya Murphy <freya@freyacat.org>2025-04-08 11:49:51 -0400
commit76ea83e70c5c852de9efdf857f6ee95be7d6e6c8 (patch)
tree0f00ac8591bc2978b0f4e82cf23033f4a677f306 /kernel/mboot/mboot.c
parentfix old checkout (diff)
downloadcomus-76ea83e70c5c852de9efdf857f6ee95be7d6e6c8.tar.gz
comus-76ea83e70c5c852de9efdf857f6ee95be7d6e6c8.tar.bz2
comus-76ea83e70c5c852de9efdf857f6ee95be7d6e6c8.zip
acpi
Diffstat (limited to 'kernel/mboot/mboot.c')
-rw-r--r--kernel/mboot/mboot.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/kernel/mboot/mboot.c b/kernel/mboot/mboot.c
index 9156c3c..ce74cc1 100644
--- a/kernel/mboot/mboot.c
+++ b/kernel/mboot/mboot.c
@@ -1,7 +1,18 @@
+#include <lib.h>
+#include <comus/mboot.h>
#include "mboot.h"
-void *locate_mboot_table(volatile void *mboot, uint32_t type)
+static volatile void *mboot;
+
+void mboot_init(long magic, volatile void *ptr)
+{
+ if (magic != MBOOT_HEADER_MAGIC)
+ panic("invalid multiboot magic");
+ mboot = ptr;
+}
+
+void *locate_mboot_table(uint32_t type)
{
struct mboot_info *info = (struct mboot_info *)mboot;
const char *mboot_end = ((char *)info) + info->total_size;