summaryrefslogtreecommitdiff
path: root/kernel/arch/i386/mmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/arch/i386/mmu.c')
-rw-r--r--kernel/arch/i386/mmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/arch/i386/mmu.c b/kernel/arch/i386/mmu.c
index 06d00cc..c38d834 100644
--- a/kernel/arch/i386/mmu.c
+++ b/kernel/arch/i386/mmu.c
@@ -550,7 +550,7 @@ void *physical_to_virtual(void *address) {
if (phys_to_virt_map[i].physical > (u32)address) {
continue;
}
- return (void *)phys_to_virt_map[i].virtual;
+ return (void *)phys_to_virt_map[i].virtual + ((uintptr_t)address & 0xFFF);
}
assert(0);
return NULL;