diff mbox

[U-Boot,v2,12/13] cmd: bootvx: Add asmlinkage to the VxWorks x86 entry

Message ID 1443431530-472-13-git-send-email-bmeng.cn@gmail.com
State Superseded
Delegated to: Simon Glass
Headers show

Commit Message

Bin Meng Sept. 28, 2015, 9:12 a.m. UTC
VxWorks on x86 uses stack to pass parameters.

Reported-by: Jian Luo <jian.luo4@boschrexroth.de>
Signed-off-by: Bin Meng <bmeng.cn@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(+)

Comments

Simon Glass Oct. 2, 2015, 7:06 a.m. UTC | #1
On Monday, 28 September 2015, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> VxWorks on x86 uses stack to pass parameters.
>
> Reported-by: Jian Luo <jian.luo4@boschrexroth.de>
> Signed-off-by: Bin Meng <bmeng.cn@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(+)
>
>

 Acked-by: Simon Glass <sjg@chromium.org>
diff mbox

Patch

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");