From bec594581ac1790eebb208a5b4bd1ad083bfc2ca Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Wed, 4 Sep 2019 00:51:19 +0900 Subject: [PATCH] Modify arch_init() to preserve the contents of the ebx register --- kernel/arch/init.S | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/kernel/arch/init.S b/kernel/arch/init.S index ada755c..e35ddcf 100644 --- a/kernel/arch/init.S +++ b/kernel/arch/init.S @@ -161,7 +161,7 @@ _print_regs: ret arch_init: - call _print_regs + pushl %ebx subl $24, %esp @@ -342,7 +342,7 @@ arch_init: lidt (%esp) addl $24, %esp - movl 4(%esp), %eax + movl 8(%esp), %eax pushl %eax call pg_init addl $4, %esp @@ -419,10 +419,9 @@ arch_init: addl $16, %esp */ - sti - - call _print_regs + popl %ebx + sti ret /* -- 2.47.3