From 4ae38294b0db1870f82cc402dc4a8bb38cea4a67 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 18 Jul 2025 11:16:43 +0000 Subject: x86_64: don't lose multi boot information pointer Since the transition to a PIE, more registers are required to perform the relative lookups of data references. As part of that change, a subtle mistake was introduced in _start, overwriting the multiboot information pointer that gets handed to kernel by the boot loader in %ebx. --- arch/x86_64/src/boot/boot.s | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86_64/src/boot/boot.s b/arch/x86_64/src/boot/boot.s index e0cff7c..ba5c6f0 100644 --- a/arch/x86_64/src/boot/boot.s +++ b/arch/x86_64/src/boot/boot.s @@ -195,9 +195,9 @@ _start: call .Lstart_get_ip .Lstart_get_ip: pop %esi - lea (stack_top - .Lstart_get_ip)(%esi), %ebx + lea (stack_top - .Lstart_get_ip)(%esi), %ecx - mov %ebx, %esp + mov %ecx, %esp mov %esp, %ebp call assert_loaded_by_multiboot2_loader -- cgit v1.2.3