diff options
author | Ian Moffett <ian@osmora.org> | 2024-02-29 16:43:46 -0500 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-02-29 16:43:46 -0500 |
commit | 4e5226d3f399db93627538f224f42b3637edf223 (patch) | |
tree | 1f9d497f3f91715b02797caa65a87d4e9cda4b36 | |
parent | 404c9f669aee8cbe4fab395d04b99dc71b599e12 (diff) |
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 <ian@osmora.org>
-rw-r--r-- | sys/arch/amd64/amd64/pmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |