summaryrefslogtreecommitdiff
path: root/src/sys/arch
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-09-16 20:34:21 -0400
committerIan Moffett <ian@osmora.org>2025-09-16 20:34:21 -0400
commitdf405924bd3d28dbe0e8e4a52c340610f0c7c4dc (patch)
treec76d70366c622e2e2b436d4c8f78417e640a21d2 /src/sys/arch
parentd62920dcd07e947e9dc4228d10fa471bd6a6cb9c (diff)
kern/amd64: mmu: Condence update into one line + fix
Condence the page table write into a single line and point the next table as a virtual address Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/arch')
-rw-r--r--src/sys/arch/amd64/cpu/mmu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sys/arch/amd64/cpu/mmu.c b/src/sys/arch/amd64/cpu/mmu.c
index 66f8584..face548 100644
--- a/src/sys/arch/amd64/cpu/mmu.c
+++ b/src/sys/arch/amd64/cpu/mmu.c
@@ -272,8 +272,8 @@ mmu_read_level(struct vm_vas *vas, vaddr_t va, pglvl_t lvl, vaddr_t **res, bool
}
/* Write the new entry */
- addr |= (PTE_P | PTE_RW | PTE_US);
- cur[index] = addr;
+ cur[index] = (addr | PTE_P | PTE_RW | PTE_US);
+ cur = PHYS_TO_VIRT(addr);
/*
* To be certain that we will see every change