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
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user