summaryrefslogtreecommitdiff
path: root/payloads/libpayload/i386/head.S
diff options
context:
space:
mode:
authorJordan Crouse <jordan.crouse@amd.com>2008-05-20 20:10:49 +0000
committerJordan Crouse <jordan.crouse@amd.com>2008-05-20 20:10:49 +0000
commit9dac1b4cca496e5293ca888d4f08411d8580ca08 (patch)
tree72bb2bcbae3f6c61cad69fe338cba2efb37cf776 /payloads/libpayload/i386/head.S
parent506980808d2f525e294cdd364b2b4e08276ab8d9 (diff)
libpayload: Add an exec() and i386_do_exec() function
Add functions for libpayload to execute other payloads in memory, and have those functions return cleanly. Signed-off-by: Jordan Crouse <jordan.crouse@amd.com> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3338 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload/i386/head.S')
-rw-r--r--payloads/libpayload/i386/head.S7
1 files changed, 4 insertions, 3 deletions
diff --git a/payloads/libpayload/i386/head.S b/payloads/libpayload/i386/head.S
index 8dc31aa54d..54f60e1469 100644
--- a/payloads/libpayload/i386/head.S
+++ b/payloads/libpayload/i386/head.S
@@ -63,13 +63,14 @@ _init:
/* Let's rock. */
call start_main
-
+
+ /* %eax has the return value - pass it on unmolested */
_leave:
/* Get old stack pointer. */
popl %ebx
/* Restore old stack. */
- movl %esp, %ebx
+ movl %ebx, %esp
/* Return to the original context. */
- lret
+ ret