ke+mm: add TLB shootdown and memory reclamation.

This commit is contained in:
Loïc Grégoire
2026-06-25 21:33:14 -04:00
parent 20a38f3a49
commit 4ba57ad42a
19 changed files with 422 additions and 63 deletions
+7 -1
View File
@@ -16,8 +16,14 @@ pub fn alloc(size: usize) mm.Error!*anyopaque {
mi.kernel_space.pmap.map_range_allocating(addr, size, .{
.read = true,
.write = true,
.global = true,
.global = false,
});
return @ptrFromInt(addr);
}
pub fn free(va: r.VAddr, size: usize) void {
const ipl = mi.kernel_space.lock.acquire();
mi.tlb.reclaim_range(&mi.kernel_space, va, size);
mi.kernel_space.lock.release(ipl);
}