From 31fbb06dc36583823bb07b9a46519e8e65968063 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Fri, 28 Jun 2024 21:58:49 -0400 Subject: 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 --- sys/arch/amd64/amd64/tss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys') 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 #include #include +#include #include #include #include @@ -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"); -- cgit v1.2.3