Don't do a call as the first instruction in libpayload.

Doing a call before the payload has set up its stack is risky. The stack may
not be in a favorable location. Normally this is not an issue with coreboot
or other well behaved callers.

Change-Id: Ie6f6748a471324b29ebad045c807dfc9f4b92034
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: http://review.coreboot.org/240
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Marc Jones 2011-10-06 16:38:35 -06:00
parent 07bf911931
commit 5f145faff8
1 changed files with 4 additions and 4 deletions

View File

@ -38,10 +38,7 @@
* change anything. * change anything.
*/ */
_entry: _entry:
call _init jmp _init
/* We're back - go back to the bootloader. */
ret
.align 4 .align 4
@ -66,6 +63,9 @@ _init:
/* No interrupts, please. */ /* No interrupts, please. */
cli cli
/* There is a bunch of stuff missing here to take arguments on the stack
* See http://www.coreboot.org/Payload_API and exec.S.
*/
/* Store current stack pointer. */ /* Store current stack pointer. */
movl %esp, %esi movl %esp, %esi