diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2025-12-09 00:57:38 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2025-12-09 00:57:38 +0800 |
| commit | c36e1b5e5e069ce1735dcc2a94aa45ba72ea2441 (patch) | |
| tree | 34be19b553615cfe36a556452e3b7ebad5276216 /include/kernel/pmm.h | |
| parent | 8cf8be522133548ee25fdcb0258ddf3950a68bcf (diff) | |
| download | lume-c36e1b5e5e069ce1735dcc2a94aa45ba72ea2441.tar.gz lume-c36e1b5e5e069ce1735dcc2a94aa45ba72ea2441.tar.xz | |
feat: Initial PMM implementation
Introduce the foundational Physical Memory Manager (PMM) and restructure the project for modularity.
Implemented basic PMM and related memory management headers (mm/pmm.h, mm/vm.h).
Updated Makefile and build process to support new modular structure.
Diffstat (limited to 'include/kernel/pmm.h')
| -rw-r--r-- | include/kernel/pmm.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/kernel/pmm.h b/include/kernel/pmm.h new file mode 100644 index 0000000..3328450 --- /dev/null +++ b/include/kernel/pmm.h @@ -0,0 +1,13 @@ +#pragma once +#include "common/types.h" + +#define PHYSTOP (0x80000000 + 128 * 1024 * 1024) +#define PGSIZE 4096 + +namespace PMM{ + void init(); + + void* alloc_page(); + + void free_page(void* pa); +}
\ No newline at end of file |
