sp1/amd64: mmu: Use PAGESIZE instead of hardcoding

Signed-off-by: Ian Moffett <ian@mirocom.org>
This commit is contained in:
2026-04-22 23:08:44 -04:00
parent 8c650daf69
commit 353a8465a3
+2 -1
View File
@@ -16,6 +16,7 @@
#include <mm/vm.h> #include <mm/vm.h>
#include <mm/physmem.h> #include <mm/physmem.h>
#include <machine/tlb.h> #include <machine/tlb.h>
#include <machine/param.h>
#include <stdbool.h> #include <stdbool.h>
#include <string.h> #include <string.h>
@@ -174,7 +175,7 @@ mmu_extract_level(struct mmu_vfr *vfr, uintptr_t vma, pagelvl_t lvl, bool alloc)
} }
tmp_p = pma_to_vma(pma); tmp_p = pma_to_vma(pma);
memset(tmp_p, 0, 4096); memset(tmp_p, 0, PAGESIZE);
pmap[index] = pma | (PTE_P | PTE_RW | PTE_US); pmap[index] = pma | (PTE_P | PTE_RW | PTE_US);
pmap = tmp_p; pmap = tmp_p;