aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/include/mm/pmm.h
diff options
context:
space:
mode:
authorEmulatedSeasons <89668582+EmulatedSeasons@users.noreply.github.com>2024-05-31 21:08:22 -0400
committerEmulatedSeasons <89668582+EmulatedSeasons@users.noreply.github.com>2024-05-31 21:08:22 -0400
commit1bd17dce9a8297f86f3bb34b3f440490b601eca6 (patch)
tree9741c7c99e9f5675dc08b26b005eb1f6047623f2 /kernel/include/mm/pmm.h
parent4956918086a85031bb47b28e868c0ff8e6cc8f95 (diff)
started working on pmm and fixed printf doing weird things to the
numbers
Diffstat (limited to 'kernel/include/mm/pmm.h')
-rw-r--r--kernel/include/mm/pmm.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/kernel/include/mm/pmm.h b/kernel/include/mm/pmm.h
new file mode 100644
index 0000000..bfe21c5
--- /dev/null
+++ b/kernel/include/mm/pmm.h
@@ -0,0 +1,27 @@
+#ifndef PMM_H
+#define PMM_H
+
+#include <stdint.h>
+#include <stddef.h>
+#include <limine.h>
+
+enum mm_type {
+ MEM_USABLE,
+ MEM_RESERVED
+};
+
+struct MMEntry {
+ uint64_t base;
+ uint64_t length;
+ mm_type type;
+};
+
+struct PBitmap {
+ uint64_t* addr;
+ size_t size;
+ MMEntry entry;
+};
+
+void pmm_init(limine_memmap_response* memmap, uint64_t hhdm_offset);
+
+#endif \ No newline at end of file