summaryrefslogtreecommitdiffhomepage
path: root/src/loader/inc/mem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/loader/inc/mem.h')
-rw-r--r--src/loader/inc/mem.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/loader/inc/mem.h b/src/loader/inc/mem.h
new file mode 100644
index 0000000..7153465
--- /dev/null
+++ b/src/loader/inc/mem.h
@@ -0,0 +1,32 @@
+// MIT License, Copyright (c) 2021 Marvin Borner
+
+#ifndef MEM_H
+#define MEM_H
+
+#include <def.h>
+
+enum mem_entry_type {
+ MEM_NONE,
+ MEM_USABLE,
+ MEM_RESERVED,
+ MEM_RECLAIMABLE,
+ MEM_ACPI_NVS,
+ MEM_UNUSABLE,
+};
+
+// Generalised memory map entry struct
+struct mem_entry {
+ u32 base;
+ u32 length;
+ u32 type;
+};
+
+struct mem_map {
+ struct mem_entry *entry;
+ u32 count;
+};
+
+void mem_map(void);
+struct mem_map *mem_map_get(void);
+
+#endif