From 6f73a5bf7000ffa1c11e9f195760ebce948159b3 Mon Sep 17 00:00:00 2001 From: Sven Schnelle Date: Wed, 11 Jul 2012 21:41:06 +0200 Subject: [PATCH] Fix stack assignment during CPU initialization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are two errors in the code. The first one is a missing $ sign in mov _stack, %esp. Thanks to Ronald G Minnich for catching that bug. The second bug is the 'incl %eax', which shouldn't be there, as there's no secondary CPU with index 0. CPU0 uses always the stack below _estack. Change-Id: Id267a654ba95b0e898eeaaafb2403b438250a563 Signed-off-by: Sven Schnelle Reviewed-on: http://review.coreboot.org/1212 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich Reviewed-by: Kyösti Mälkki --- src/cpu/x86/lapic/secondary.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cpu/x86/lapic/secondary.S b/src/cpu/x86/lapic/secondary.S index 15bae5e5db..e6650ecf5a 100644 --- a/src/cpu/x86/lapic/secondary.S +++ b/src/cpu/x86/lapic/secondary.S @@ -53,10 +53,9 @@ __ap_protected_start: movl $1, %eax lock xadd %eax, cpucount movl %eax, %ecx - incl %eax /* assign stack for this specific cpu */ - mov _stack, %esp + mov $_stack, %esp mov $CONFIG_STACK_SIZE, %ebx mul %ebx add %eax, %esp