diff options
author | Mathias Krause <minipli@googlemail.com> | 2017-02-11 22:34:46 +0100 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-02-17 17:24:08 +0100 |
commit | 9fa78c136d6a6538576fb15ccd05d8483ea05ab5 (patch) | |
tree | 26017ea09fd4cf7a4ce895587bbb7ce16fec3d09 | |
parent | c57c48bd36c69bfb5e783281c7c5aba8ba5b4bee (diff) | |
download | coreboot-9fa78c136d6a6538576fb15ccd05d8483ea05ab5.tar.xz |
libpayload: x86/exec - fix argc/argv value passing
According to coreboot’s payload API [1] the argc value should be passed
at stack offset 0x10, so we need to push a dummy value to comply to the
API.
[1] https://www.coreboot.org/Payload_API
Change-Id: Id20424185a5bf7e4d94de1886a2cece3f3968371
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Reviewed-on: https://review.coreboot.org/18333
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r-- | payloads/libpayload/arch/x86/exec.S | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/payloads/libpayload/arch/x86/exec.S b/payloads/libpayload/arch/x86/exec.S index 7d89cc00a5..54c83f653e 100644 --- a/payloads/libpayload/arch/x86/exec.S +++ b/payloads/libpayload/arch/x86/exec.S @@ -53,12 +53,17 @@ i386_do_exec: pushl %ecx pushl %ebp - /* Push the argc and argv pointers on to the stack */ + /* Push argc and argv on to the stack. + * + * We need to put a dummy value inbetween, as argc should be at offset + * 0x10, according to the payload API. + */ movl 12(%ebp), %esi movl 16(%ebp), %ecx pushl %esi + pushl $0 pushl %ecx /* Move a "magic" number on the stack - the other |