diff options
Diffstat (limited to 'kernel/include/arch/i686/mboot.h')
-rw-r--r-- | kernel/include/arch/i686/mboot.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/kernel/include/arch/i686/mboot.h b/kernel/include/arch/i686/mboot.h new file mode 100644 index 0000000..394071f --- /dev/null +++ b/kernel/include/arch/i686/mboot.h @@ -0,0 +1,34 @@ +#pragma once + +#include <stdbool.h> +#include <stdint.h> +#include <arch/i686/mboot.h> +#include <arch/i686/memory.h> + +#define CMDLINE_MAX 32 + +struct BootTag { + uint8_t valid; + uint32_t type; + uint32_t size; + union { + char cmdline[CMDLINE_MAX]; + struct MemoryMap *memory_map; + struct RootSystemDescriptionPointer *rsdp; + } data; +}; + +struct BootInfo { + uint32_t total_size; + uint32_t reserved; + struct BootTag tags[21]; +}; + +enum BootTagID { + ID_CMDLINE = 0, + iD_MEMORYMAP = 6, + ID_RSDP = 14 +}; + +void load_boot_info(void* boot_info); +bool get_boot_tag(enum BootTagID id, struct BootTag **tag); |