From 8b90c1f407b4f4aa3802858e23aa90d7dfbe17ad Mon Sep 17 00:00:00 2001 From: Lizzy Fleckenstein Date: Thu, 11 Apr 2024 20:58:38 +0200 Subject: bootinfo struct --- stage3/bootinfo.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 stage3/bootinfo.h (limited to 'stage3/bootinfo.h') diff --git a/stage3/bootinfo.h b/stage3/bootinfo.h new file mode 100644 index 0000000..825f513 --- /dev/null +++ b/stage3/bootinfo.h @@ -0,0 +1,32 @@ +#ifndef BOOTINFO_H +#define BOOTINFO_H + +#include "def.h" + +typedef enum { + MEM_USABLE = 1, + MEM_RESERVED = 2, + MEM_ACPI_RECLAIMABLE = 3, + MEM_ACPI_NVS = 4, + MEM_BAD = 5, +} mem_region_type; + +typedef struct __attribute__((packed)) { + void *start; + usize size; + u32 type; + u32 acpi_attrs; +} mem_region; + +MKVEC(mem_region) + +extern struct __attribute__((packed)) bootinfo { + u64 ksize; + u16 gfx_pitch; + u16 gfx_width; + u16 gfx_height; + void *gfx_framebuffer; + slice_mem_region mmap; +} *bootinfo; + +#endif -- cgit v1.2.3