From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7636 invoked by alias); 2 Mar 2009 16:33:23 -0000 Received: (qmail 7628 invoked by uid 22791); 2 Mar 2009 16:33:22 -0000 X-SWARE-Spam-Status: No, hits=0.5 required=5.0 tests=AWL,BAYES_40,RDNS_DYNAMIC,TVD_RCVD_IP X-Spam-Check-By: sourceware.org Received: from 137-67-76-76.skybeam.com (HELO mail.chez-thomas.org) (76.76.67.137) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 02 Mar 2009 16:33:13 +0000 Received: by mail.chez-thomas.org (Postfix, from userid 999) id 7841E3B52B71; Mon, 2 Mar 2009 09:32:48 -0700 (MST) Received: from hermes.chez-thomas.org (hermes_local [192.168.1.101]) by mail.chez-thomas.org (Postfix) with ESMTP id 9A4FB3B52B6F; Mon, 2 Mar 2009 09:32:47 -0700 (MST) Message-ID: <49AC0A2F.5070003@mlbassoc.com> Date: Mon, 02 Mar 2009 16:34:00 -0000 From: Gary Thomas User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: joseph biswal CC: ecos-discuss@ecos.sourceware.org References: <6aca9e460903020827l24554448j2021d45ce8c4d534@mail.gmail.com> In-Reply-To: <6aca9e460903020827l24554448j2021d45ce8c4d534@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Redboot run issues when HAL_MMU_OFF is issued X-SW-Source: 2009-03/txt/msg00004.txt.bz2 joseph biswal wrote: > Hi All: > > The issue looks like when i do a "RUN" of this same working piece of > image out of RAM, > it seems to get stuck. > > I debugged using BDI breakpoints as well as "diag_printfs" and looks > like it does not go beyond HAL_MMU_OFF in > packages/hal/arm/mx31/ads/current/src/redboot_cmds.c. I don't > understand the flow in LaunchrunImage() since it falls on the thin > line of swtching the MMU on and off. Any hints? > > I had previously been successful in loading another version of redboot > but the only difference i notice on the serial console is in the > following line: > RAM: 0x00000000-0x0ff00000, [0x00014020-0x0fed1000] available > > The start address 0x00014020 which refers to "heap1" in the redboot > code seems to be different. Any one has an idea on as to how do i > trace this start address of RAM? > > > > void launchRunImg(unsigned long addr) > { > asm volatile ("mov r12, r0;"); > HAL_CLEAN_INVALIDATE_L2(); > HAL_DISABLE_L2(); > HAL_MMU_OFF(); > > > > Here's a snapshot of my redboot prompt: > > Reading Flash ID... > > NAND part info: 0xaa2c, 0x1580, 0x0050, 0x0000 > Searching for BBT table in the flash ... > . > Found version 5 Bbt0 at block 2047 (0xffe0000) > Total bad blocks: 0 > ... Read from 0x0fee0000-0x0ff00000 at 0x00080000: .. > ... Read from 0x0fed3000-0x0fed4000 at 0x0009f000: . > PMIC ID: 0x0000009d [Rev: 3.5] > > LAN92xx Driver version 1.1 > SMSC LAN9217: ID = 0x117a REV = 0x0 > LAN92XX: Waiting to get all clear. > LAN92XX: Starting status := 0x40004 > LAN92XX: Starting status := 0x40004 > ... waiting for BOOTP information > Ethernet eth0: MAC address 00:22:33:44:55:66 > IP: 206.44.17.132/255.255.255.0, Gateway: 206.44.17.254 > Default server: 0.0.0.0 > > Clock input is 26 MHz > RedBoot(tm) bootstrap and debug environment [ROMRAM] > Non-certified release, version FSL 200814 - built 00:22:10, Mar 2 2009 > > Platform: Freescale (i.MX) MX31 3-Stack (Freescale i.MX31 based) PASS 2.0 [x32 D > DR] > Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. > > RAM: 0x00000000-0x0ff00000, [0x00014020-0x0fed1000] available > FLASH: 0x00000000 - 0x10000000, 2048 blocks of 0x00020000 bytes each. > RedBoot> > RedBoot> > RedBoot> 14020^C > RedBoot> load -r -b 0x100000 ^C > RedBoot> ip -l 206.44.17.239/24 -h 206.44.17.89 > IP: 206.44.17.239/255.255.255.0, Gateway: 206.44.17.254 > Default server: 206.44.17.89 > RedBoot> load -r -b 0x100000 redboot.bin_paragon > Using default protocol (TFTP) > Raw file loaded 0x00100000-0x0012b35b, assumed entry at 0x00100000 > RedBoot> run 0x100000 > load entry_address=0x100000 > virt_addr=0x100000 > phys_addr=0x80100000 > Launchrunimg called > > > > Thanks in Advance! > -Munro. > Since this port isn't in the public tree, it's pretty hard to say much. However, _most_ ARM devices don't have RAM mapped 1-1 (i.e. the physical address of RAM is not the same as the logical address). When you turn off the MMU, everything changes and depending on the code, it will probably just die... Why are you using 'run' and not 'go'? I think that 'run' (which is specific to ARM ports) is not the correct choice for running an eCos application from RedBoot (which another RedBoot qualifies as) -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss