[U-Boot] [PATCH v2 12/13] cmd: bootvx: Add asmlinkage to the VxWorks x86 entry
Bin Meng
bmeng.cn at gmail.com
Mon Sep 28 11:12:09 CEST 2015
VxWorks on x86 uses stack to pass parameters.
Reported-by: Jian Luo <jian.luo4 at boschrexroth.de>
Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
---
Changes in v2:
- New patch to add asmlinkage to the VxWorks x86 entry
common/cmd_elf.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/common/cmd_elf.c b/common/cmd_elf.c
index 1c5bf0d..fdf0b4a 100644
--- a/common/cmd_elf.c
+++ b/common/cmd_elf.c
@@ -20,6 +20,7 @@
#include <vxworks.h>
#ifdef CONFIG_X86
#include <asm/e820.h>
+#include <linux/linkage.h>
#endif
/*
@@ -384,7 +385,12 @@ int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
printf("## Starting vxWorks at 0x%08lx ...\n", addr);
dcache_disable();
+#ifdef CONFIG_X86
+ /* VxWorks on x86 uses stack to pass parameters */
+ ((asmlinkage void (*)(int))addr)(0);
+#else
((void (*)(int))addr)(0);
+#endif
puts("## vxWorks terminated\n");
--
1.8.2.1
More information about the U-Boot
mailing list