From 4e5226d3f399db93627538f224f42b3637edf223 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 29 Feb 2024 16:43:46 -0500 Subject: kernel/amd64: pmap: Fix calculation of indices This commit fixes a very stupid mistake in the pmap module for AMD64 Signed-off-by: Ian Moffett --- sys/arch/amd64/amd64/pmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/arch/amd64/amd64/pmap.c b/sys/arch/amd64/amd64/pmap.c index a7a4eaa..5fe1e3b 100644 --- a/sys/arch/amd64/amd64/pmap.c +++ b/sys/arch/amd64/amd64/pmap.c @@ -86,9 +86,9 @@ pmap_get_level_index(uint8_t level, vaddr_t va) case 3: return (va >> 30) & 0x1FF; case 2: - return (va >> 29) & 0x1FF; + return (va >> 21) & 0x1FF; case 1: - return (va >> 20) & 0x1FF; + return (va >> 12) & 0x1FF; default: /* Should not be reachable */ return 0; } -- cgit v1.2.3