summaryrefslogtreecommitdiff
path: root/src/kernel/mem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/mem.h')
-rw-r--r--src/kernel/mem.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/kernel/mem.h b/src/kernel/mem.h
index 2bfb3bf..1eb27bd 100644
--- a/src/kernel/mem.h
+++ b/src/kernel/mem.h
@@ -22,8 +22,21 @@ OF THIS SOFTWARE.
#ifndef MEM_H
#define MEM_H
-#define MMAP ((uint16_t *)0x00002000)
-void *allocate_pages(uint16_t n_pages, uint16_t proc_n);
-void deallocate_pages(void *from, uint16_t n_pages);
+enum special_mmap_codes {
+ FREE = 0,
+ HARDWARE = 1,
+ KERNEL = 2
+};
+
+struct mmap_entry {
+ uint64_t base;
+ uint64_t length;
+ uint32_t whose;
+ struct mmap_entry *next;
+} __attribute__ ((__packed__));
+
+struct mmap_entry *mmap_start;
+void *allocate_block(uint32_t size, uint16_t proc_n);
+void deallocate_block(void *start);
#endif \ No newline at end of file