diff options
author | Tyler Murphy <=> | 2023-07-16 02:54:32 -0400 |
---|---|---|
committer | Tyler Murphy <=> | 2023-07-16 02:54:32 -0400 |
commit | fbf131b5c043b27e0b1543374bb144e3e426f723 (patch) | |
tree | 07f0ab2fc107b36621d5ae95480e6a91e332548b /kernel/src/boot/tag.h | |
download | finix-fbf131b5c043b27e0b1543374bb144e3e426f723.tar.gz finix-fbf131b5c043b27e0b1543374bb144e3e426f723.tar.bz2 finix-fbf131b5c043b27e0b1543374bb144e3e426f723.zip |
initial
Diffstat (limited to 'kernel/src/boot/tag.h')
-rw-r--r-- | kernel/src/boot/tag.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/kernel/src/boot/tag.h b/kernel/src/boot/tag.h new file mode 100644 index 0000000..f9853e5 --- /dev/null +++ b/kernel/src/boot/tag.h @@ -0,0 +1,38 @@ +#pragma once + +#include <stdbool.h> +#include <stdint.h> + +#include "acpi/acpi.h" +#include "graphics/framebuffer.h" +#include "memory/memory.h" + +#define CMDLINE_MAX 32 + +struct BootTag { + uint8_t valid; + uint32_t type; + uint32_t size; + union { + char cmdline[CMDLINE_MAX]; + struct Framebuffer *framebuffer; + 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_FRAMEBUFFER = 8, + ID_RSDP = 14 +}; + +void load_boot_info(void* boot_info); +bool get_boot_tag(enum BootTagID id, struct BootTag **tag); |