On Wed, Nov 18, 2009 at 8:53 AM, Graeme Smecher
<graeme.smecher@xxxxxxxxxxxxxx> wrote:
Hi Steven,
Steven J. Magnani wrote:
Graeme -
On Tue, 2009-11-17 at 11:04 -0800, Graeme Smecher wrote:
...
Beware that the mainline kernel doesn't work for me (from Linus' git repo, running on a custom Virtex-4 platform); I see memory corruption during boot-up that doesn't occur with the Xilinx kernel repository available at git.xilinx.com.
Can you be more specific about your setup? I am chasing a memory
corruption problem with the mainline kernel at the moment, maybe if we
pool our observations we can make better progress on it.
Certainly, although I'm just putting together a basic BSP, so I'm not sure how much help this will be. I may just muddy the waters further.
I'm using commit aa021baa3295fa6e3f367d80f8955dd5176656eb of Linus' tree, with the MMU enabled. My .config is almost (not quite) identical to arch/microblaze/configs/mmu_defconfig:
* I've moved the CONFIG_KERNEL_BASE_ADDRESS (to 0x44000000, to match my DDR)
* my CONFIG_INITRAMFS is the initramfs_minimal.cpio.gz taken from the wiki
* Microblaze has no FPU, no barrel shifter, no hardware divider, 32-bit hardware multiplier
* CONFIG_SHMEM=y, CONFIG_SLOW_WORK=y, CONFIG_TMPFS=y, CONFIG_DEBUG_VM=y
* CONFIG_XILINX_MICROBLAZE0_FAMILY="virtex4"
My boot log is as follows:
early_printk_console is enabled at 0x84000000
Ramdisk addr 0x00000003, Compiled-in FDT at 0xc025ef6c
Linux version 2.6.32-rc6-00346-gaa021ba (gsmecher@tonka) (gcc
version 4.1.2) #9 Thu Nov 12 16:55:04 PST 2009
setup_cpuinfo{t�omy�ino{ng
setup_cpuinfo:t~ w�rp�t~swons{vt{{ywyw8k~�inz�mfv}*J\
setup_memory:sz}axo�{pw�0x4000
setup_memory:{~}o�o{�: 0x44000
setup_memory:sz}o�o{�: 0x48000
On node 0ta|�ugu�{gm� 16384
free_area_init_node: node 0, atk}t c030713c, leem}e}c} c0419000
Normal zone: 128 pages used for memmap
Normal zone: 0 wewqwewurwwued
Normal zone: 16256 wew}gm~olowcn{h:3
Built 1 e~{�um�~s%� Zone ore~|mrymov�loz�uw�ng on. ote|ote�es 16256
Kernel command line: console=ttyUL0,115200 root=/dev/ram
PID hshl}sjl�ag~}rmw�s: 256 (dms�r: -2, 1024 es}~s)
Dentry cache shl�sjl�ag~�rmw�zim�8192 (order: 3, 32768 byes}�
Inode-cache hshl}sjl�ag~}rmw�s: 4096 dmszdevF2, 16384 bytes)
Memory: 60644k/65536k available
Hierarchical RCU implementation.
NR_IRQS:32
xlnx,xps-intc-1.00.a sawp0y}pc4000000~}}owqoq=4,edw}}t{}3
xlnx,xps-timer-1.00.asaw80y}hxc4004000, irq=3
microblaze_timer_set_mode{tow~nwn
microblaze_timer_set_modewzm�e{owic
Calibrating delay loop... 49.04 BogoMIPS (lpj=245248)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
bio: create slab <bio-0>>%e~0
Switching to clocksource microblaze_clocksource
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (dms�r: 0, 4096 bes}�)
TCP established hshl}sjl�ag~}rmw�s: 2048 dmszdevF2, 16384 bytes)
TCP bind shl�sjl�ag~�rmw�zim�2048 (order: 3, 40960 byes}�
TCP: Hash tables configured (established 2048mndrd 2048)
TCP reno wiw�g{w�ed
NET: Registered protocol family 1
RPC: Registered udp tsn{�o~w�o|}mon�
RPC: Registered tcp tsn{�o~w�o|}mon�
RPC: Registered tcp NFSv4.1 backchannel tsn{�o~w�o|}mon�
Slow work thread pool: Starting up
Slow work thread pool: Ready
msgmni has been set to 118
io scheduler noopewm�ug�red
io scheduler anticipatoryewm�ug�red
io scheduler deadlineewm�ug�red
io scheduler cfq ewm�ug�ed (default)
84000000.serial: ttyUL0 at MMIO 0x84000003 (irq = 1) aiw� uartlite
csosu�ttyUL0] enabled
brd: module loaded
xilinx_emaclite 81000000.ethernet: Device Tree Probing
xilinx_emaclite 81000000.ethernet: MAC address is now 0: a:35:23:7f: 0
xilinx_emaclite 81000000.ethernet: Xilinx EmacLite at 0x81000000
mapped to 0xC4020000, irq=0
TCP cubicwiw�g{w|ori|
NET: Registered protocol family 17
VFS: Cannot open root device "ouwwveO" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available
partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(0,0)
Rebooting in 120 ego�es�.
that's a strange one - as you say, it looks like data corruption, there's funny chars sprinkled all through that output.
Confirm you have the following settings on your MicroBlaze:
PARAMETER C_USE_MMU = 3
PARAMETER C_MMU_ZONES = 2
PARAMETER C_DPLB_BUS_EXCEPTION = 1
PARAMETER C_IPLB_BUS_EXCEPTION = 1
PARAMETER C_ILL_OPCODE_EXCEPTION = 1
PARAMETER C_UNALIGNED_EXCEPTIONS = 1
PARAMETER C_OPCODE_0x0_ILLEGAL = 1
The last 3 are not critical, but probably a good idea regardless.
Cheers,
John
--