summaryrefslogtreecommitdiff
path: root/arch/i386
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2024-06-24 01:28:04 -0500
committerDanny Holman <dholman@gymli.org>2024-06-24 01:28:04 -0500
commit5e376ab1287be429c021907fa719ce42173b1df2 (patch)
tree016cf8fd70e7344b560ea1f44e4d239f518da56f /arch/i386
parentcea371e824adb1650b0797e9943f6dcf3bd179eb (diff)
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 <dholman@gymli.org>
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/boot/boot.s1
1 files changed, 1 insertions, 0 deletions
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