From a08847ded5fba25859e7a3ad06ae3fed342d4d6a Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Wed, 3 Dec 2025 14:02:07 +0100 Subject: x86_64/boot: move stack to higher half --- arch/x86_64/src/boot/entry64.s | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arch/x86_64/src/boot/entry64.s') diff --git a/arch/x86_64/src/boot/entry64.s b/arch/x86_64/src/boot/entry64.s index 636e4cd..2932354 100644 --- a/arch/x86_64/src/boot/entry64.s +++ b/arch/x86_64/src/boot/entry64.s @@ -11,6 +11,12 @@ .global bootstrap_information bootstrap_information: .skip 16 +.align 16 +.global stack_top +stack_bottom: .skip 1 << 20 +stack_top: +stack_size = stack_top - stack_bottom + .section .boot_text, "ax", @progbits .code64 @@ -23,6 +29,9 @@ _entry64: mov %rax, %fs mov %rax, %gs + mov $stack_top, %rsp + mov %rsp, %rbp + mov multiboot_information_pointer, %rax mov vga_buffer_pointer, %rdx sub $0xb8000, %rdx -- cgit v1.2.3