From fe0b7e043f804e633e9a471c55b8f1e320d04257 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Mon, 6 Feb 2023 20:45:31 +0000 Subject: [PATCH] x86_64: move stack pointer to higher-half in start_64 --- arch/x86_64/start_64.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86_64/start_64.S b/arch/x86_64/start_64.S index 57d0720..e0d00dd 100644 --- a/arch/x86_64/start_64.S +++ b/arch/x86_64/start_64.S @@ -7,6 +7,9 @@ .global start_64 .type start_64, @function start_64: + /* convert %rsp to a higher-half pointer */ + add $0xFFFFFFFF80000000, %rsp + pop %rdi call kernel_init