From: Bin Meng Date: Thu, 8 Oct 2015 03:19:19 +0000 (-0700) Subject: cmd: bootvx: Add asmlinkage to the VxWorks x86 entry X-Git-Tag: v2016.01-rc1~298^2~39 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9aa1280a5644a1d05859b862ebc7b60a862e0ef3;p=oweals%2Fu-boot.git cmd: bootvx: Add asmlinkage to the VxWorks x86 entry VxWorks on x86 uses stack to pass parameters. Reported-by: Jian Luo Signed-off-by: Bin Meng Acked-by: Simon Glass --- diff --git a/common/cmd_elf.c b/common/cmd_elf.c index d6a2036a99..86e694ac69 100644 --- a/common/cmd_elf.c +++ b/common/cmd_elf.c @@ -20,6 +20,7 @@ #include #ifdef CONFIG_X86 #include +#include #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");