summaryrefslogtreecommitdiff
path: root/stage3/bootinfo.h
diff options
context:
space:
mode:
authorLizzy Fleckenstein <lizzy@vlhl.dev>2024-04-11 20:58:38 +0200
committerLizzy Fleckenstein <lizzy@vlhl.dev>2024-04-11 21:05:47 +0200
commit8b90c1f407b4f4aa3802858e23aa90d7dfbe17ad (patch)
tree4080e975e33df6f3c57ff5f3486f97923c9bbbe3 /stage3/bootinfo.h
parenta6669e496e46ef89673103b3330226c7d0201a1a (diff)
downloadcuddles-8b90c1f407b4f4aa3802858e23aa90d7dfbe17ad.tar.xz
bootinfo struct
Diffstat (limited to 'stage3/bootinfo.h')
-rw-r--r--stage3/bootinfo.h32
1 files changed, 32 insertions, 0 deletions
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