From: Bin Meng Date: Wed, 7 Oct 2015 20:19:19 -0700 Subject: [U-Boot] [PATCH v3 11/12] cmd: bootvx: Add asmlinkage to the VxWorks x86 entry In-Reply-To: <1444274360-30189-1-git-send-email-bmeng.cn@gmail.com> References: <1444274360-30189-1-git-send-email-bmeng.cn@gmail.com> Message-ID: <1444274360-30189-12-git-send-email-bmeng.cn@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de VxWorks on x86 uses stack to pass parameters. Reported-by: Jian Luo Signed-off-by: Bin Meng Acked-by: Simon Glass --- Changes in v3: None 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 d6a2036..86e694a 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"); -- 1.8.2.1