summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-06-28 21:58:49 -0400
committerIan Moffett <ian@osmora.org>2024-06-28 21:58:49 -0400
commit31fbb06dc36583823bb07b9a46519e8e65968063 (patch)
tree7ef794c65546dd3fe865c0f04d32d0c6122cf29f /sys/arch/amd64
parente1b26186029d2ebbe5b0a6bd09c5b5eb3937020f (diff)
kernel/amd64: Convert kernel stack base to vaddr
This fixes an issue where the TSS kernel stack base is a physical address instead of being a virtual address like it's supposed to. Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/tss.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/amd64/amd64/tss.c b/sys/arch/amd64/amd64/tss.c
index 5aab74a..f2c9be4 100644
--- a/sys/arch/amd64/amd64/tss.c
+++ b/sys/arch/amd64/amd64/tss.c
@@ -33,6 +33,7 @@
#include <sys/panic.h>
#include <vm/dynalloc.h>
#include <vm/physmem.h>
+#include <vm/vm.h>
#include <machine/tss.h>
#include <machine/cpu.h>
#include <assert.h>
@@ -60,7 +61,7 @@ alloc_resources(struct cpu_info *ci)
}
memset(tss, 0, sizeof(*tss));
- rsp0_base = vm_alloc_frame(1);
+ rsp0_base = vm_alloc_frame(1) + VM_HIGHER_HALF;
if (rsp0_base == 0) {
panic("Could not allocate RSP0 base\n");