]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cmd: bootvx: Add asmlinkage to the VxWorks x86 entry
authorBin Meng <bmeng.cn@gmail.com>
Thu, 8 Oct 2015 03:19:19 +0000 (20:19 -0700)
committerSimon Glass <sjg@chromium.org>
Wed, 21 Oct 2015 13:46:26 +0000 (07:46 -0600)
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>
Acked-by: Simon Glass <sjg@chromium.org>
common/cmd_elf.c

index d6a2036a992c4dd23072265cc15dbd503302d942..86e694ac69c42c314a28d5214dae9972469858a0 100644 (file)
@@ -20,6 +20,7 @@
 #include <vxworks.h>
 #ifdef CONFIG_X86
 #include <asm/e820.h>
+#include <linux/linkage.h>
 #endif
 
 /*
@@ -379,7 +380,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");