From patchwork Mon Sep 28 09:12:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 523275 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 563761401CD for ; Mon, 28 Sep 2015 19:11:58 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=J+wQGOOY; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 054274B905; Mon, 28 Sep 2015 11:11:36 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A7FQSsz0fW2N; Mon, 28 Sep 2015 11:11:35 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 92FF64B928; Mon, 28 Sep 2015 11:11:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 47E924B8D3 for ; Mon, 28 Sep 2015 11:10:21 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J6DZCSbKBJEE for ; Mon, 28 Sep 2015 11:10:21 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by theia.denx.de (Postfix) with ESMTPS id 81C994B8DD for ; Mon, 28 Sep 2015 11:10:15 +0200 (CEST) Received: by pacex6 with SMTP id ex6so169253964pac.0 for ; Mon, 28 Sep 2015 02:10:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=H5dSP1SEI+W2WYYqrgHDoverUtbt/nDXK0WWVGAbCmE=; b=J+wQGOOYkWIQM+NQLiMg622JxQ7CrmEkaRwT/aRdrW8r5b+OFHclNSkUcsZS3FpTZo 9eHnm/6pUnm1spT+XUaqG1PzeDWJs0w5XQMOxfM6keZnHjZ/TjkZC91Z16Pd4T9fdd0W sx/d7fMGzG5YIHrngwQnInntBntMcignHt3hnPYSScESfgCQKROMv+kM1Q5fUIql1HXE wvulo6GDz0DBlYOXIy7fDWwPpwK0TBgv4cPRVtDOr8nBE8yaibzB6wEgoPmAbK6FYYW3 eFzy1OQxrGh5LrALItYlosAE3d1/DHX5CuN3UxDOWKPgAUtNdK2vz4je42W6dSPdDZMb 8FLQ== X-Received: by 10.68.96.67 with SMTP id dq3mr25279654pbb.161.1443431413896; Mon, 28 Sep 2015 02:10:13 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-157-139.windriver.com. [147.11.157.139]) by smtp.gmail.com with ESMTPSA id jv5sm18028246pbc.47.2015.09.28.02.10.13 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Sep 2015 02:10:13 -0700 (PDT) From: Bin Meng To: Tom Rini , Simon Glass , U-Boot Mailing List Date: Mon, 28 Sep 2015 02:12:09 -0700 Message-Id: <1443431530-472-13-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1443431530-472-1-git-send-email-bmeng.cn@gmail.com> References: <1443431530-472-1-git-send-email-bmeng.cn@gmail.com> Cc: Miao Yan Subject: [U-Boot] [PATCH v2 12/13] cmd: bootvx: Add asmlinkage to the VxWorks x86 entry X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" VxWorks on x86 uses stack to pass parameters. Reported-by: Jian Luo Signed-off-by: Bin Meng --- 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 #ifdef CONFIG_X86 #include +#include #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");