summaryrefslogtreecommitdiff
path: root/src/arch/amd64/mboot.h
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-01-30 16:46:38 -0500
committerFreya Murphy <freya@freyacat.org>2024-01-30 16:46:38 -0500
commit9cc8dfcf0eed77b536b1f81f0660c84777b2a0a8 (patch)
tree01cc5fad4c42b0fcad206e694c69567de835447b /src/arch/amd64/mboot.h
parentbetter qemu options (diff)
downloadcorn-9cc8dfcf0eed77b536b1f81f0660c84777b2a0a8.tar.gz
corn-9cc8dfcf0eed77b536b1f81f0660c84777b2a0a8.tar.bz2
corn-9cc8dfcf0eed77b536b1f81f0660c84777b2a0a8.zip
better mboot
Diffstat (limited to 'src/arch/amd64/mboot.h')
-rw-r--r--src/arch/amd64/mboot.h41
1 files changed, 4 insertions, 37 deletions
diff --git a/src/arch/amd64/mboot.h b/src/arch/amd64/mboot.h
index 3be3054..90ed75c 100644
--- a/src/arch/amd64/mboot.h
+++ b/src/arch/amd64/mboot.h
@@ -1,44 +1,11 @@
#pragma once
-#include "memory.h"
-#include <stdint.h>
-
-#define CMDLINE_MAX 32
-
-struct mboot_tag {
- uint8_t valid; // if the tag at this location is set
- uint32_t type;
- uint32_t size;
- union {
- char cmdline[CMDLINE_MAX + 1];
- struct memory_map *memory_map;
- void *rootsdp;
- } data;
-};
-
-enum mboot_tag_type {
- MBOOT_CMDLINE = 0,
- MBOOT_MEMORYMAP = 6,
- MBOOT_SYMBOLS = 9,
- MBOOT_XSDP = 14
-};
-
-struct mboot_info {
- uint32_t total_size;
- uint32_t reserved;
- struct mboot_tag tags[22];
-};
+#include <shim.h>
+#include <memory.h>
/**
* Loads the multi boot information
* @param mboot_info - the pointer passed from multiboot2
+ * @param shim_info - the info to be collected by shim
*/
-struct mboot_info mboot_load_info(const void *mboot_info);
-
-/**
- * Gets a tag from multiboot
- * @param type - the tag type
- * @returns NULL - tag not loaded
- * @returns tag - tag was loaded
- */
-struct mboot_tag *mboot_get_tag(struct mboot_info *info, enum mboot_tag_type type);
+void mboot_load_info(const void *mboot_info, struct boot_info *shim_info);