From patchwork Wed Oct 12 02:34:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Pan X-Patchwork-Id: 119101 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 7B1C7B6F69 for ; Wed, 12 Oct 2011 13:34:39 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EC96E28553; Wed, 12 Oct 2011 04:34:36 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 QgOO7uzdCrv5; Wed, 12 Oct 2011 04:34:36 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4440028569; Wed, 12 Oct 2011 04:34:35 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 076DB28569 for ; Wed, 12 Oct 2011 04:34:33 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 TOnqrq3hIWXR for ; Wed, 12 Oct 2011 04:34:30 +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-vx0-f172.google.com (mail-vx0-f172.google.com [209.85.220.172]) by theia.denx.de (Postfix) with ESMTPS id 7F3C228553 for ; Wed, 12 Oct 2011 04:34:28 +0200 (CEST) Received: by vcbfo11 with SMTP id fo11so202597vcb.3 for ; Tue, 11 Oct 2011 19:34:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.36.41 with SMTP id n9mr21435586vdj.41.1318386867500; Tue, 11 Oct 2011 19:34:27 -0700 (PDT) Received: by 10.52.185.233 with HTTP; Tue, 11 Oct 2011 19:34:27 -0700 (PDT) Date: Wed, 12 Oct 2011 10:34:27 +0800 Message-ID: From: Peter Pan To: Wolfgang Denk Cc: u-boot@lists.denx.de Subject: [U-Boot] Interrupt issue about bootvx command X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Hi Wolfgang, vxWorks needs all interrupt to be disabled before it's boot up, while u-boot sometimes enables them. Recently, I'm facing this kind of problem about booting up vxWorks through bootvx command. So, I added a patch to the common/cmd_elf.c to disable all interrupts before run into vxWorks image. This patch is now working fine on my board. So I think maybe it will be helpful for others. The following is my patch : commit 66768801bb10477ca8431b284d1738dcf3a834b8 Author: Ke Pan Date: Wed Oct 12 09:50:44 2011 +0800 common/cmd_elf : Disable interrupts before boot vxWorks The vxWorks needs all interrupts to be disabled before its boot. diff --git a/common/cmd_elf.c b/common/cmd_elf.c index bf32612..7fc5ef5 100644 --- a/common/cmd_elf.c +++ b/common/cmd_elf.c @@ -229,6 +229,9 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) printf ("## Using bootline (@ 0x%lx): %s\n", bootaddr, (char *) bootaddr); printf ("## Starting vxWorks at 0x%08lx ...\n", addr); + printf ("## Disableing interrupts ...\n"); + + disable_interrupts(); ((void (*)(void)) addr) ();