feat(mm/phys): implement alloc and free

This commit is contained in:
Loïc Grégoire
2026-04-03 21:16:53 -04:00
parent 5b60f08db5
commit d2bc8f2bf8
6 changed files with 185 additions and 15 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ pub fn init_kernel() void {
const higher_half_start = phys_to_virt(0);
const higher_half_size: usize = 256 * (1 << 39);
mi.kernel_pmap.impl.root_pa = mi.phys.alloc_page();
mi.kernel_pmap.impl.root_pa = mi.phys.alloc();
const table_ptr: [*]u64 = @ptrFromInt(mm.p2v(mi.kernel_pmap.impl.root_pa));
@memset(table_ptr[0..512], 0);