This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Bus Error and Alignment Trap on RamDisk Test



Hi,

 

I wanna make a ramdisk on DM6467. I followed instructions at http://processors.wiki.ti.com/index.php/How_to_Create_a_Ramdisk_with_Auto-run_Demo.

 

But the ramdisk is 10M in the example, which is too small for mine. I made a 30M ramdisk. Then I met errors of "Bus Error" and "Alignment Trap".

 

What is the reason? How can I handle it?

 

thanks.

 

================================================================================
I2C:   ready
DRAM:  256 MB
unknown vendor=0 Flash:  0 kB
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
ARM Clock :- 297MHz
DDR Clock :- 297MHz
Hit any key to stop autoboot:  0
TFTP from server 192.168.2.200; our IP address is 192.168.2.221
Filename 'ramdisk.gz'.
Load address: 0x82000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ################################################
done
Bytes transferred = 6564678 (642b46 hex)
TFTP from server 192.168.2.200; our IP address is 192.168.2.221
Filename 'uImage'.
Load address: 0x80700000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ################################################################
done
Bytes transferred = 1988136 (1e5628 hex)
## Booting image at 80700000 ...
   Image Name:   Linux-2.6.18_pro500-davinci_evm-
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1988072 Bytes =  1.9 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux.............................................................
...................................................................... done, boo
ting the kernel.
Linux version 2.6.18_pro500-davinci_evm-arm_v5t_le (xiaojun@xiaojun-laptop) (gcc
 version 4.2.0 (MontaVista 4.2.0-16.0.32.0801914 2008-08-30)) #1 PREEMPT Fri Jun
 18 22:44:46 CST 2010
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: DaVinci DM6467 EVM
Memory policy: ECC disabled, Data cache writeback
DaVinci DM6467 variant 0x0
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
Built 1 zonelists.  Total pages: 30720
Kernel command line: console=ttyS0,115200n8 root=/dev/ram0 rw initrd=0x82000000,
32M ramdisk_size=32768 ip=off mem=120M davincihd_capture.channel0_numbuffers=4
PID hash table entries: 512 (order: 9, 2048 bytes)
Clock event device timer0_0 configured with caps set: 03
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 120MB = 120MB total
Memory: 84736KB available (3401K code, 684K data, 172K init)
Security Framework v1.0.0 initialized
Capability LSM initialized
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 32768K
NET: Registered protocol family 16
DaVinci: 48 gpio irqs
ch0 default output "COMPOSITE", mode "NTSC"
ch1 default output "", mode ""
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 4096 bind 2048)
TCP reno registered
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
squashfs: version 3.1 (2006/08/19) Phillip Lougher
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
yaffs Jun 18 2010 22:54:12 Installing.
SGI XFS with no debug enabled
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered (default)
LTT : ltt-facilities init
LTT : ltt-facility-core init in kernel
DAVINCI-WDT: DaVinci Watchdog Timer: heartbeat 60 sec
CIR device registered successfully (Major = 252, Minor = 0)
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO map 0x1c20000 mem 0xfec20000 (irq = 40) is a ST16654

serial8250.0: ttyS1 at MMIO map 0x1c20400 mem 0xfec20400 (irq = 41) is a ST16650
V2
serial8250 serial8250.0: unable to register port at index 2 (IO0 MEM1c20800 IRQ4
2): -28
RAMDISK driver initialized: 1 RAM disks of 32768K size 1024 blocksize
netconsole: not configured, aborting
TI DaVinci EMAC: MAC address is 00:0e:99:02:b4:eb
TI DaVinci EMAC Linux version updated 4.0
TI DaVinci EMAC: Installed 1 instances.
Linux video capture interface: v2.00
i2c /dev entries driver
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
MUX: initialized ATAEN
    ide0: MMIO-DMA , BIOS settings: hda:pio, hdb:pio
hda: TOSHIBA MK4032GAX, ATA DISK drive
ide0 at 0xfec661f0-0xfec661f7,0xfec663f6 on irq 22
hda: max request size: 512KiB
hda: 78140160 sectors (40007 MB), CHS=16383/255/63, UDMA(66)
hda: cache flushes supported
 hda: hda1 hda2
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
musb_hdrc: version 6.0, cppi-dma, host, debug=0
musb_hdrc: USB Host mode controller at c805c000 using DMA, IRQ 13
musb_hdrc musb_hdrc: MUSB HDRC host driver
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
mice: PS/2 mouse device common for all mice
Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50
2006 UTC).
ASoC version 0.13.1
AIC3X Audio Codec 0.1
asoc: aic3x <-> davinci-i2s mapping ok
asoc: DIT <-> davinci-dit mapping ok
ALSA device list:
  #0: DaVinci DM6467 EVM (aic3x)
IPv4 over IPv4 tunneling driver
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
RAMDISK: Compressed image found at block 0
Time: timer0_1 clocksource has been installed.
Clock event device timer0_0 configured with caps set: 08
Switched to high resolution mode on CPU 0
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 172K
INIT: version 2.85 booting
Alignment trap: S03mountvirtfs (244) PC=0x0001e164 Instr=0xe5943000 Address=0x00
000803 FSR 0x001
Bus error
Alignment trap: S04udev (245) PC=0x0001e164 Instr=0xe5943000 Address=0x00001077
FSR 0x001
Bus error
Alignment trap: S07mountvirtfs (246) PC=0x0001e164 Instr=0xe5943000 Address=0x00
000803 FSR 0x001
Bus error
Segmentation fault
Segmentation fault
Alignment trap: S40networking (252) PC=0x0001e164 Instr=0xe5943000 Address=0x000
01052 FSR 0x001
Bus error
Alignment trap: S41hotplug (253) PC=0x0001e164 Instr=0xe5943000 Address=0x000010
4d FSR 0x001
Bus error
Alignment trap: S41portmap (254) PC=0x0001e164 Instr=0xe5943000 Address=0x000010
65 FSR 0x001
Bus error
INIT: Entering runlevel: 3
Alignment trap: rc (256) PC=0x0001e164 Instr=0xe5943000 Address=0x00000833 FSR 0
x001


MontaVista(R) Linux(R) Professional Edition 4.0.1 (0502020)

========================================================================

 

The bootargs is listed below

===================================================================

DM6467 EVM # printenv
bootdelay=3
baudrate=115200
rootpath=/home/xiaojun/workdir/filesys
nfshost=192.168.2.200
nfsroot=192.168.2.200
bootfile=uImage
ipaddr=192.168.2.221
serverip=192.168.2.200
bootcmd=tftp 0x82000000 ramdisk.gz; tftp 0x80700000 uImage; bootm 0x80700000
stdin=serial
stdout=serial
stderr=serial
ethaddr=00:0e:99:02:b4:eb
bootargs=console=ttyS0,115200n8 root=/dev/ram0 rw initrd=0x82000000,32M ramdisk_
size=32768 ip=off mem=120M davincihd_capture.channel0_numbuffers=4

===========================================================================

 

 

  • Vincent:

    The following page addresses a similar problem on a web site that has much documentation

    on the U-Boot parameters.

    http://www.denx.de/wiki/view/DULG/RamdiskGreaterThan4MBCausesProblems

    It states that the ramdisk_size parameter must appear before the 'root' parameter in the bootargs.

    Regards,

    Michael T

    PS: Please mark this post as answered via the Verify Answer button below if you think it answers your question.  Thanks!

  • Hi Michael,

     

    Unfortunately, I got the same error after revising bootargs.

    Now my boorarg is (ramdisk_size before root)

    DM6467 EVM # printenv
    bootdelay=3
    baudrate=115200
    rootpath=/home/xiaojun/workdir/filesys
    nfshost=192.168.2.200
    nfsroot=192.168.2.200
    serverip=192.168.2.200
    bootfile=uImage
    bootcmd=tftp 0x82000000 ramdisk.gz; tftp 0x80700000 uImage; bootm 0x80700000
    ipaddr=192.168.2.221
    rd_size=10240
    stdin=serial
    stdout=serial
    stderr=serial
    ethaddr=00:0e:99:02:b4:eb
    bootargs=console=ttyS0,115200n8 ramdisk_size=20480 root=/dev/ram0 rw initrd=0x82
    000000,20M ip=off mem=120M davincihd_capture.channel0_numbuffers=4

     

     

    The error is listed below:

    NET: Registered protocol family 1
    NET: Registered protocol family 17
    drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
    RAMDISK: Compressed image found at block 0
    Time: timer0_1 clocksource has been installed.
    Clock event device timer0_0 configured with caps set: 08
    Switched to high resolution mode on CPU 0
    VFS: Mounted root (ext2 filesystem).
    Freeing init memory: 172K
    Alignment trap: hotplug (238) PC=0x0001e164 Instr=0xe5943000 Address=0x0000005f
    FSR 0x001
    Alignment trap: hotplug (239) PC=0x0001e164 Instr=0xe5943000 Address=0x0000005f
    FSR 0x001
    Alignment trap: hotplug (240) PC=0x0001e164 Instr=0xe5943000 Address=0x0000005f
    FSR 0x001
    Alignment trap: hotplug (241) PC=0x0001e164 Instr=0xe5943000 Address=0x0000005f
    FSR 0x001
    INIT: version 2.85 booting
    Alignment trap: S03mountvirtfs (244) PC=0x0001e164 Instr=0xe5943000 Address=0x00
    00000e FSR 0x001
    Bus error
    Alignment trap: S04udev (245) PC=0x0001e164 Instr=0xe5943000 Address=0x0000075a
    FSR 0x001
    Bus error
    Alignment trap: S07mountvirtfs (246) PC=0x0001e164 Instr=0xe5943000 Address=0x00
    00000e FSR 0x001
    Bus error
    Alignment trap: rcS (247) PC=0x0001e164 Instr=0xe5943000 Address=0x0000000f FSR
    0x001
    Bus error
    Segmentation fault
    Alignment trap: S40networking (252) PC=0x0001e164 Instr=0xe5943000 Address=0x000
    00735 FSR 0x001
    Bus error
    Segmentation fault
    Segmentation fault
    INIT: Entering runlevel: 3
    Alignment trap: rc (256) PC=0x0001e164 Instr=0xe5943000 Address=0x0000003e FSR 0
    x001

    MontaVista(R) Linux(R) Professional Edition 4.0.1 (0502020)

    (none) login: root
    login[257]: unable to determine TTY name, got /dev/UNKNOWN

     

     

     

    any idea?

     

    thanks.

     

  • The following article includes ramdisk creation.  It was written for the DM365 but shows the

    Linux commands to start with a base ramdisk and add files to it.

    http://processors.wiki.ti.com/index.php/How_to_Create_a_Ramdisk_with_Auto-run_Demo

    Regards,

    Michael T

  • Hi Michael,

     

    My ramdisk was made according to the instructions via the link.

     

    In this link, it just changed count to change size. I change count=32, but i got the same error on BUS ERROR and Alignment TRAP.

     

    Any other idea?

     

    thanks.