[#5649] xip test fail as app fail to execute in NOR flash
Submitted By: Vivi Li
Open Date
2009-10-27 00:41:32 Close Date
2009-11-19 03:52:11
Priority:
Medium Assignee:
Vivi Li
Status:
Closed Fixed In Release:
N/A
Found In Release:
2010R1 Release:
Category:
Tests Board:
N/A
Processor:
ALL Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
gcc4.1-09r1-rc9
App binary format:
N/A
Summary: xip test fail as app fail to execute in NOR flash
Details:
xip app in FDPIC and shared-flat formats fail to execute in NOR flash on all platforms.
Bellow is the log on bf537-stamp. Config file is attached.
--
generate romfs:
/home/test/work/cruise/checkouts/uclinux-dist/user/genromfs/genromfs -f ../../images/img.romfs -d /home/test/work/cruise/checkouts/uclinux-dist/user/blkfin-test/xip_test
copy img.romfs to /tftpboot
cp /home/test/work/cruise/checkouts/uclinux-dist/images/img.romfs /tftpboot
U-Boot 2008.10-svn1956 (ADI-2009R1-rc2) (Jul 2 2009 - 20:05:22)^M
CPU: ADSP bf537-0.2 (Detected Rev: 0.2) (bypass boot)^M
Board: ADI BF537 stamp board^M
Support: http://blackfin.uclinux.org/^M
Clock: VCO: 500 MHz, Core: 500 MHz, System: 125 MHz^M
RAM: 64 MB^M
Flash: 4 MB^M
In: serial^M
Out: serial^M
Err: serial^M
Net: Blackfin EMAC^M
MAC: 00:E0:22:FE:47:E0^M
Hit any key to stop autoboot: 5 ^H^H^H 0 ^M
bfin>
bfin> tftpboot 0x1000000 img.romfs
Using Blackfin EMAC device
TFTP from server 10.100.4.174; our IP address is 10.100.4.50
Filename 'img.romfs'.
Load address: 0x1000000
Loading: *^H#
done
Bytes transferred = 10240 (2800 hex)
bfin>
bfin> protect off 0x201c0000 0x2020ffff
..... done
Un-Protected 5 sectors
bfin>
bfin> erase 0x201c0000 0x2020ffff
..... done
Erased 5 sectors
bfin>
bfin> cp.b 0x1000000 201c0000 0x2800
Copy to Flash... done
bfin>
bfin> reset
U-Boot 2008.10-svn1956 (ADI-2009R1-rc2) (Jul 2 2009 - 20:05:22)^M
^M
CPU: ADSP bf537-0.2 (Detected Rev: 0.2) (bypass boot)^M
Board: ADI BF537 stamp board^M
Support: http://blackfin.uclinux.org/^M
Clock: VCO: 500 MHz, Core: 500 MHz, System: 125 MHz^M
RAM: 64 MB^M
RAM size is 64 MB.
Flash: 4 MB^M
In: serial^M
Out: serial^M
Err: serial^M
Net: Blackfin EMAC^M
MAC: 00:E0:22:FE:47:E0^M
Hit any key to stop autoboot: 5 ^H^H^H 0 ^M
bfin> set bootargs root=/dev/mtdblock0 rw ip=10.100.4.50 earlyprintk=serial,uart0,57600 console=ttyBF0,57600^M
bfin> set serverip 10.100.4.174^M
bfin> set ipaddr 10.100.4.50^M
bfin> save^M
Saving Environment to Flash...^M
. done^M
Un-Protected 1 sectors^M
Erasing Flash...^M
. done^M
Erased 1 sectors^M
Writing to Flash... done^M
. done^M
Protected 1 sectors^M
bfin> ^M
bfin> tftpboot 0x2000000 uImage^M
Using Blackfin EMAC device^M
TFTP from server 10.100.4.174; our IP address is 10.100.4.50^M
Filename 'uImage'.^M
Load address: 0x2000000^M
Loading: *^H#################################################################^M
#################################################################^M
#################################################################^M
#################################################################^M
#############^M
done^M
Bytes transferred = 3998751 (3d041f hex)Image size is 3d041f
^M
bfin> run addip^M
bfin> bootm^M
## Booting kernel from Legacy Image at 02000000 ...^M
Image Name: bf537-2.6.31.4-ADI-2010R1-pre-sv^M
Created: 2009-10-26 3:55:42 UTC^M
Image Type: Blackfin Linux Kernel Image (gzip compressed)^M
Data Size: 3998687 Bytes = 3.8 MB^M
Load Address: 00001000^M
Entry Point: 0019b85c^M
Verifying Checksum ... OK^M
Uncompressing Kernel Image ... OK^M
Starting Kernel at = 0019b85c^M
Linux version 2.6.31.4-ADI-2010R1-pre-svn7704 (test@uclinux71-digiumPBX) (gcc version 4.1.2 (ADI svn)) #6 Mon Oct 26 11:55:30 CST 2009^M
register early platform devices^M
bootconsole [early_shadow0] enabled^M
bootconsole [early_BFuart0] enabled^M
early printk enabled on early_BFuart0^M
Limiting kernel memory to 56MB due to anomaly 05000263^M
Board Memory: 64MB^M
Kernel Managed Memory: 64MB^M
Memory map:^M
fixedcode = 0x00000400-0x00000490^M
text = 0x00001000-0x001118a0^M
rodata = 0x001118a0-0x0016c384^M
bss = 0x0016d000-0x0017db2c^M
data = 0x0017db2c-0x00190000^M
stack = 0x0018e000-0x00190000^M
init = 0x00190000-0x007dd000^M
available = 0x007dd000-0x037ff000^M
DMA Zone = 0x03f00000-0x04000000^M
Hardware Trace Active and Enabled^M
Boot Mode: 0^M
Reset caused by Software reset^M
Blackfin support (C) 2004-2009 Analog Devices, Inc.^M
Compiled for ADSP-BF537 Rev 0.2^M
Blackfin Linux support by http://blackfin.uclinux.org/^M
Processor Speed: 500 MHz core clock and 125 MHz System Clock^M
NOMPU: setting up cplb tables^M
Instruction Cache Enabled for CPU0^M
External memory: cacheable in instruction cache^M
Data Cache Enabled for CPU0^M
External memory: cacheable (write-back) in data cache^M
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 14223^M
Kernel command line: root=/dev/mtdblock0 rw ip=10.100.4.50 earlyprintk=serial,uart0,57600 console=ttyBF0,57600 ip=10.100.4.50:10.100.4.174:10.100.4.174:255.255.255.0:bf537-stamp:eth0:off^M
PID hash table entries: 256 (order: 8, 1024 bytes)^M
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)^M
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)^M
Memory available: 48720k/65536k RAM, (6452k init code, 1090k kernel code, 506k data, 1024k dma, 7744k reserved)^M
NR_IRQS:98^M
Configuring Blackfin Priority Driven Interrupts^M
console [ttyBF0] enabled, bootconsole disabled^M
console [ttyBF0] enabled, bootconsole disabled^M
Calibrating delay loop... 997.37 BogoMIPS (lpj=1994752)^M
Security Framework initialized^M
Mount-cache hash table entries: 512^M
Blackfin Scratchpad data SRAM: 4 KB^M
Blackfin L1 Data A SRAM: 16 KB (16 KB free)^M
Blackfin L1 Data B SRAM: 16 KB (16 KB free)^M
Blackfin L1 Instruction SRAM: 48 KB (36 KB free)^M
NET: Registered protocol family 16^M
Blackfin DMA Controller^M
stamp_init(): registering device resources^M
bio: create slab <bio-0> at 0^M
NET: Registered protocol family 2^M
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)^M
TCP established hash table entries: 2048 (order: 2, 16384 bytes)^M
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)^M
TCP: Hash tables configured (established 2048 bind 2048)^M
TCP reno registered^M
NET: Registered protocol family 1^M
ROMFS MTD (C) 2007 Red Hat, Inc.^M
msgmni has been set to 95^M
io scheduler noop registered^M
io scheduler anticipatory registered (default)^M
io scheduler cfq registered^M
bfin-uart: Blackfin serial driver^M
bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART^M
brd: module loaded^M
bfin_mii_bus: probed^M
bfin_mac: attached PHY driver [SMSC LAN83C185] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=24)@sclk=125MHz)^M
bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1^M
physmap platform flash device: 00400000 at 20000000^M
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank^M
Amd/Fujitsu Extended Query Table at 0x0040^M
number of CFI chips: 1^M
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.^M
RedBoot partition parsing not available^M
Using physmap partition information^M
Creating 4 MTD partitions on "physmap-flash.0":^M
0x000000000000-0x000000040000 : "bootloader(nor)"^M
0x000000040000-0x0000001c0000 : "linux kernel(nor)"^M
0x0000001c0000-0x0000003f0000 : "file system(nor)"^M
0x0000003f0000-0x000000400000 : "MAC Address(nor)"^M
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7^M
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0^M
bfin-wdt: initialized: timeout=20 sec (nowayout=0)^M
TCP cubic registered^M
NET: Registered protocol family 17^M
rtc-bfin rtc-bfin: setting system clock to 1971-11-26 18:22:20 UTC (60027740)^M
IP-Config: Complete:^M
device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,^M
host=bf537-stamp, domain=, nis-domain=(none),^M
bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=^M
Freeing unused kernel memory: 6452k freed^M
dma_alloc_init: dma_page @ 0x02868000 - 256 pages at 0x03f00000^M
_____________________________________^M
a8888b. / Welcome to the uClinux distribution \^M
d888888b. / _ _ \^M
8P"YP"Y88 / | | |_| __ __ (TM) |^M
8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |^M
8' .88 \ | | | | _ \| | | | \ / |^M
8`._.' Y8. \ | |__ | | | | | |_| | / \ |^M
d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |^M
dP . Y8b. \ For embedded processors including |^M
d8:' " `::88b \ the Analog Devices Blackfin /^M
d8" 'Y88b \___________________________________/^M
:8P ' :888^M
8a. : _a88P For further information, check out:^M
._/"Yaa_: .| 88P| - http://blackfin.uclinux.org/^M
\ YP" `| 8P `. - http://docs.blackfin.uclinux.org/^M
/ \.___.d| .' - http://www.uclinux.org/^M
`--..__)8888P`._.' jgs/a:f - http://www.analog.com/blackfin^M
^M
Have a lot of fun...^M
^M
^M
BusyBox v1.15.2 (2009-10-26 11:51:37 CST) hush - the humble shell^M
^M
root:/> version
kernel: Linux release 2.6.31.4-ADI-2010R1-pre-svn7704, build #6 Mon Oct 26 11:55:30 CST 2009^M
toolchain: bfin-linux-uclibc-gcc release gcc version 4.1.2 (ADI svn)^M
user-dist: release svn-9049, build #149 Mon Oct 26 11:54:41 CST 2009^M
root:/>
root:/> mount -t romfs /dev/mtdblock2 /mnt
root:/>
root:/> /mnt/xip_test
pf is 0x020305e4!
Function address 0x020305e4 is not in romfs region: 0x201c0000 - 0x2020ffff
--
Last passed version:
--
kernel: Linux release 2.6.31-ADI-2010R1-pre-svn7464, build #4 Sun Sep 27 09:12:56 CST 2009
toolchain: bfin-uclinux-gcc release gcc version 4.1.2 (ADI svn)
user-dist: release svn-8888, build #54 Sun Sep 27 09:06:16 CST 2009
--
First failed version:
--
kernel: Linux release 2.6.31-ADI-2010R1-pre-svn7429, build #19 Thu Sep 24 13:32:38 CST 2009
toolchain: bfin-uclinux-gcc release gcc version 4.1.2 (ADI svn)
user-dist: release svn-8881, build #266 Thu Sep 24 13:29:03 CST 2009
--
Follow-ups
--- Vivi Li 2009-11-08 21:58:38
It still fails.
--- Vivi Li 2009-11-10 01:43:30
SHARED-FLAT format now works.
FDPIC format still fails.
--- Bernd Schmidt 2009-11-13 06:36:39
That's because the xip_test program doesn't test the right thing on FD-PIC.
Function pointers in FD-PIC are pointers to function descriptors, which are
data, not code, and therefore not shared by XIP.
--- Vivi Li 2009-11-17 02:49:51
Fix xip_test program to test right address on FD-PIC.
--- Vivi Li 2009-11-19 03:52:11
OK now. Close this bug.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
config.xip.fdpic application/octet-stream 35635 Vivi Li