[coreboot] New patch to review for coreboot: f58d203 Don't do a call as the first instruction in libpayload.
Marc Jones (email@example.com)
gerrit at coreboot.org
Fri Oct 7 00:52:19 CEST 2011
Marc Jones (marcj303 at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/240
Author: Marc Jones <marcj303 at gmail.com>
Date: Thu Oct 6 16:38:35 2011 -0600
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.
Signed-off-by: Marc Jones <marcj303 at gmail.com>
payloads/libpayload/arch/i386/head.S | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/payloads/libpayload/arch/i386/head.S b/payloads/libpayload/arch/i386/head.S
index 88db412..3dd6133 100644
@@ -38,10 +38,7 @@
* change anything.
- call _init
- /* We're back - go back to the bootloader. */
+ jmp _init
@@ -66,6 +63,9 @@ _init:
/* No interrupts, please. */
+ /* 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. */
movl %esp, %esi
More information about the coreboot