Fix stack assignment during CPU initialization
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 <svens@stackframe.org> Reviewed-on: http://review.coreboot.org/1212 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
This commit is contained in:
parent
bc8c996608
commit
6f73a5bf70
|
@ -53,10 +53,9 @@ __ap_protected_start:
|
||||||
movl $1, %eax
|
movl $1, %eax
|
||||||
lock xadd %eax, cpucount
|
lock xadd %eax, cpucount
|
||||||
movl %eax, %ecx
|
movl %eax, %ecx
|
||||||
incl %eax
|
|
||||||
|
|
||||||
/* assign stack for this specific cpu */
|
/* assign stack for this specific cpu */
|
||||||
mov _stack, %esp
|
mov $_stack, %esp
|
||||||
mov $CONFIG_STACK_SIZE, %ebx
|
mov $CONFIG_STACK_SIZE, %ebx
|
||||||
mul %ebx
|
mul %ebx
|
||||||
add %eax, %esp
|
add %eax, %esp
|
||||||
|
|
Loading…
Reference in New Issue