[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] Re: Memory corruption problems with mainline kernel



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�.



My device tree specifies the boot arguments "console=ttyUL0,115200 root=/dev/xsa2". The corruption is repeatable and doesn't depend on the baud rate (115200 and 9600 baud have the same results.) If I change the "root" argument (e.g. to /dev/ram), I still get "ouvvwe0". Nothing further appears in __log_buf, and if I wait the requisite 120 seconds, something unrelated freaks out.

I think this will probably convince you we're running into separate problems. It seems like the MMU is configured incorrectly, and it's clobbering data in some repeatable way. It's interesting, for example, that there doesn't seem to be any corruption in code -- just data. If you're still curious, say so and I'll happily send some more details (my .mhs and .dts files, for instance.) Incidentally, I recently cured another problem with the xilinx git tree in which my kernel hung whenever run_init_process() was called (after "Freeing init memory"), although I'll have to jog my memory about that one. It sounds a little closer to what you're seeing.

best,
Graeme

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/