From 5e376ab1287be429c021907fa719ce42173b1df2 Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Mon, 24 Jun 2024 01:28:04 -0500 Subject: arch: i386: boot: zero ESP before calling i386_entry Set the ESP register to NULL before calling any C code. This allows a stack trace to occur without overrunning the initial bootstrap stack. Signed-off-by: Danny Holman --- arch/i386/boot/boot.s | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/i386/boot') diff --git a/arch/i386/boot/boot.s b/arch/i386/boot/boot.s index f861699..5357910 100644 --- a/arch/i386/boot/boot.s +++ b/arch/i386/boot/boot.s @@ -80,6 +80,7 @@ _start: call setup_stack_guard + xorl %ebp, %ebp pushl %ebx pushl %eax call i386_entry -- cgit v1.2.3