[coreboot-gerrit] New patch to review for coreboot: libpayload: x86/exec - fix argc/argv value passing
Mathias Krause (minipli@googlemail.com)
gerrit at coreboot.org
Sat Feb 11 22:58:18 CET 2017
Mathias Krause (minipli at googlemail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18333
-gerrit
commit 3c549d0534a0d9b23ca8e91c2f2804073b2ee7f6
Author: Mathias Krause <minipli at googlemail.com>
Date: Sat Feb 11 22:34:46 2017 +0100
libpayload: x86/exec - fix argc/argv value passing
According to [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 at googlemail.com>
---
payloads/libpayload/arch/x86/exec.S | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/payloads/libpayload/arch/x86/exec.S b/payloads/libpayload/arch/x86/exec.S
index 7d89cc0..54c83f6 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
More information about the coreboot-gerrit
mailing list