Subject: Xscale panic on prefetch abort handler
To: None <port-arm@netbsd.org>
From: Jaw-Shiang Joshua Huang <joshuah@synology.com>
List: port-arm
Date: 06/25/2003 19:30:07
Hi, 

I got an Xscale evaluation board and install a PCI IDE card on the PCI slot.
Therefore, I add pci & ide option in IQ80321 for having the IDE driver.
But I got messages as below.

================= Dmesg for wrong pci intr map =====================
cpu0: 32KB/32B 32-way write-back-locking Data cache
obio0 at mainbus0
com0 at obio0 addr 0xfe800000: ns16550a, working fifo
com0: console
iopxs0 at mainbus0: i80321 I/O Processor, acting as PCI host
iopxs0: configuring PCI bus
iopwdog0 at iopxs0: 7 second period
pci0 at iopxs0 bus 0
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pciide0 at pci0 dev 2 function 0: Promise Ultra133/ATA Bus Master IDE Accelerato
r (rev. 0x02)
pciide0: bus-master DMA support present
pciide0: primary channel configured to native-PCI mode
iq80321_pci_intr_map: no mapping for 0/2/0
pciide0: couldn't map native-PCI interrupt
pciide0: secondary channel configured to native-PCI mode
iq80321_pci_intr_map: no mapping for 0/2/0
pciide0: couldn't map native-PCI interrupt
wm0 at pci0 dev 8 function 0: Intel i82544EI 1000BASE-T Ethernet, rev. 2
iq80321_pci_intr_map: no mapping for 0/8/0
wm0: unable to map interrupt
clock: hz=100 stathz=0 profhz=0
boot device: <unknown>
root device:
====================================================

The pci intr map seems wrong.
Therefore, I do modification as below.

====================================================
--- iq80321_pci.c.old   Mon Nov 11 23:34:51 2002
+++ iq80321_pci.c.new   Wed Jun 25 11:25:25 2003
@@ -102,14 +102,16 @@
                goto no_mapping;

        switch (pa->pa_device) {
-       case 4:                 /* i82544 Gig-E */
+       /* case 4: */                   /* i82544 Gig-E */
+       case 8:
                if (pa->pa_intrpin == 1) {
                        *ihp = ICU_INT_XINT(0);
                        return (0);
                }
                goto no_mapping;

-       case 6:                 /* S-PCI-X slot */
+       /* case 6: */                   /* S-PCI-X slot */
+       case 2:
                if (pa->pa_intrpin == 1) {
                        *ihp = ICU_INT_XINT(2);
                        return (0);
====================================================

I want to boot NetBSD on Xscale and try to mount root on the disk because the Xscale MB seems with a bad network controller.  In Redboot prompt command, it cannot ping successfully, even ping itself.

Below is its dmesg.  If I turn on the power, it always hit this panic.
But if I press reset button, it will hit another panic as the 2nd one.

However, I did boot it successfully at my first time.  But after the only one successful boot, now it always hits panic like below.  Should I look for some patch in NetBSD CVS server?  Or what else I can do for the board? Or I have done something stupid to make it panic always(my modification? ide driver setting? or what else?)?

Thanks for anyone's suggestion.

Joshua, Taiwan.

========= Start of 1st dmesg =========
>> NetBSD/IQ80321 Gzip Boot, Revision 1.1
>> (sysadmin@justind-xscale.synology.com, Wed Jun 25 14:43:29 CST 2003)
>> RAM 0xa0000000 - 0xa7ffffff, heap at 0xa7f00000
>> Load address: 0xa0200000
>> Image size: 696468
Uncompressing image...|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/done.
Jumping to image @ 0xa0200000...

NetBSD/evbarm (IQ80321) booting ...
initarm: Configuring system ...
physmemory: 32768 pages at 0xa0000000 -> 0xa7ffffff
init subsystems: stacks vectors undefined pmap irq done.
[ using 153304 bytes of netbsd ELF symbol table ]
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.6.1 (SYNO80321) #0: Wed Jun 25 14:42:45 CST 2003
    sysadmin@justind-xscale.synology.com:/usr/src/sys/arch/evbarm/compile/SYNO80321
total memory = 128 MB
avail memory = 113 MB
using 1228 buffers containing 6656 KB of memory
mainbus0 (root)
cpu0 at mainbus0: i80321 600MHz rev 2 (XScale core)
cpu0: DC enabled IC enabled WB enabled LABT branch prediction enabled
cpu0: 32KB/32B 32-way Instruction cache
cpu0: 32KB/32B 32-way write-back-locking Data cache
obio0 at mainbus0
com0 at obio0 addr 0xfe800000: ns16550a, working fifo
com0: console
iopxs0 at mainbus0: i80321 I/O Processor, acting as PCI host
iopxs0: configuring PCI bus
iopwdog0 at iopxs0: 7 second period
pci0 at iopxs0 bus 0
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pciide0 at pci0 dev 2 function 0: Promise Ultra133/ATA Bus Master IDE Accelerator (rev. 0x02)
pciide0: bus-master DMA support present
pciide0: primary channel configured to native-PCI mode
pciide0: using irq 29 for native-PCI interrupt
wd0 at pciide0 channel 0 drive 0: <ST315323A>
wd0: drive supports 32-sector PIO transfers, LBA addressing
wd0: 14652 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 30008475 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4 (Ultra/66) (using DMA data transfers)
pciide0: secondary channel configured to native-PCI mode
wm0 at pci0 dev 8 function 0: Intel i82544EI 1000BASE-T Ethernet, rev. 2
wm0: interrupting at irq 27
wm0: Ethernet address 00:07:e9:03:39:80
makphy0 at wm0 phy 1: Marvell 88E1000 Gigabit PHY, rev. 0
makphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
clock: hz=100 stathz=0 profhz=0
boot device: <unknown>
root device: ?
use one of: wd0[a-h] wm0 ddb halt reboot
root device: wd0a
dump device (default wd0b): 
file system (default generic): ffs
root on wd0a dumps on wd0b
warning: no /dev/console
panic: Prefetch abort in non-USR mode (frame=0xc7b0bd38 PC=0x00000008)

Stopped in pid 8 (sh) at        cpu_Debugger+0x10:      ldmdb   r11, {r11, r13, r
15}
db> t
cpu_Debugger+0xc
        scp=0xc02f33a4 rlv=0xc028e324 (panic+0xdc)
        rsp=0xc7b0bce8 rfp=0xc7b0bcfc
panic+0x10
        scp=0xc028e258 rlv=0xc02fa18c (prefetch_abort_handler+0xac)
        rsp=0xc7b0bd10 rfp=0xc7b0bd34
prefetch_abort_handler+0xc
        scp=0xc02fa0ec rlv=0xc02f9758 (exception_exit)
        rsp=0xc7b0bd38 rfp=0x00000000
        r8=0x00000000 r7=0x00000000
        r6=0x00000000 r5=0x00000000 r4=0x00000000
db> c
boot: howto=00000100 curproc=0xc7af28d4
Warning IRQ's disabled during boot()
syncing disks... done
========= End of 1st dmesg ===========
========= Start of 2nd dmesg =========
>> NetBSD/IQ80321 Gzip Boot, Revision 1.1
>> (sysadmin@justind-xscale.synology.com, Wed Jun 25 14:43:29 CST 2003)
>> RAM 0xa0000000 - 0xa7ffffff, heap at 0xa7f00000
>> Load address: 0xa0200000
>> Image size: 696468
Uncompressing image...|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/done.
Jumping to image @ 0xa0200000...

NetBSD/evbarm (IQ80321) booting ...
initarm: Configuring system ...
physmemory: 32768 pages at 0xa0000000 -> 0xa7ffffff
init subsystems: stacks vectors undefined pmap irq done.
[ using 153304 bytes of netbsd ELF symbol table ]
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.6.1 (SYNO80321) #0: Wed Jun 25 14:42:45 CST 2003
    sysadmin@justind-xscale.synology.com:/usr/src/sys/arch/evbarm/compile/SYNO80321
total memory = 128 MB
avail memory = 113 MB
using 1228 buffers containing 6656 KB of memory
mainbus0 (root)
cpu0 at mainbus0: i80321 600MHz rev 2 (XScale core)
cpu0: DC enabled IC enabled WB enabled LABT branch prediction enabled
cpu0: 32KB/32B 32-way Instruction cache
cpu0: 32KB/32B 32-way write-back-locking Data cache
obio0 at mainbus0
com0 at obio0 addr 0xfe800000: ns16550a, working fifo
com0: console
iopxs0 at mainbus0: i80321 I/O Processor, acting as PCI host
iopxs0: configuring PCI bus
iopwdog0 at iopxs0: 7 second period
pci0 at iopxs0 bus 0
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pciide0 at pci0 dev 2 function 0: Promise Ultra133/ATA Bus Master IDE Accelerator (rev. 0x02)
pciide0: bus-master DMA support present
pciide0: primary channel configured to native-PCI mode
panic: Reset vector called, LR = 0xc020a3c4
Stopped in pid 0 (swapper) at   cpu_Debugger+0x10:      ldmdb   r11, {r11, r13, r
15}
db> trace
cpu_Debugger+0xc
        scp=0xc02f33a4 rlv=0xc028e324 (panic+0xdc)
        rsp=0xc01ee894 rfp=0xc01ee8a8
panic+0x10
        scp=0xc028e258 rlv=0xc02f97e0 (Lreset_panicmsg)
        rsp=0xc01ee8bc rfp=0xc01ee8d0
wdcintr+0xc
        scp=0xc020a358 rlv=0xc030f598 (pdc20265_pci_intr+0x64)
        rsp=0xc01ee8d4 rfp=0xc01ee8f8
        r5=0xc1227cc8 r4=0xc1227c00
pdc20265_pci_intr+0xc
        scp=0xc030f540 rlv=0xc0317118 (i80321_intr_dispatch+0x120)
        rsp=0xc01ee8fc rfp=0xc01ee928
        r8=0x00000000 r7=0x20000000
        r6=0x000000d3 r5=0xc11f5740 r4=0x00000000
i80321_intr_dispatch+0xc
        scp=0xc0317004 rlv=0xc03172d8 (Lirq_return)
        rsp=0xc01ee92c rfp=0xc01ee99c
        r10=0xc01eea30 r9=0xc01eea2c
        r8=0x00000004 r7=0xc1227c00 r6=0xc11f5740 r5=0xa0000053
        r4=0xc03a67d4
i80321_intr_establish+0xc
--db_more--                   scp=0xc0316ec4 rlv=0xc0316548 (iq80321_pci_intr_establish+0x20)
        rsp=0xc01ee9a0 rfp=0xc01ee9ac
        r8=0xc01eec1c r7=0xc1227c00
        r6=0xc034d920 r5=0xc1227cc8 r4=0xc122223c
iq80321_pci_intr_establish+0xc
        scp=0xc0316534 rlv=0xc03091cc (pciide_mapregs_native+0xa0)
        rsp=0xc01ee9b0 rfp=0xc01ee9ec
pciide_mapregs_native+0xc
        scp=0xc0309138 rlv=0xc0309f10 (pciide_mapchan+0x44)
        rsp=0xc01ee9f0 rfp=0xc01eea0c
        r10=0xc034b1bc r9=0x00000000
        r8=0x00000000 r7=0x00006268 r6=0xc1227cc8 r5=0xc1227c00
        r4=0xc1227cc8
pciide_mapchan+0xc
        scp=0xc0309ed8 rlv=0xc030ed38 (pdc202xx_chip_map+0x82c)
        rsp=0xc01eea10 rfp=0xc01eea5c
        r4=0xc030f534
pdc202xx_chip_map+0xc
        scp=0xc030e518 rlv=0xc0308f30 (pciide_attach+0xb0)
        rsp=0xc01eea60 rfp=0xc01eeb84
        r10=0x00000006 r9=0x00000000
        r8=0x00001000 r7=0xc122223c r6=0xc1227c00 r5=0xc01eec1c
        r4=0xc03865ec
--db_more--           pciide_attach+0xc
        scp=0xc0308e8c rlv=0xc0289758 (config_attach+0x294)
        rsp=0xc01eeb88 rfp=0xc01eebd4
        r8=0xc0350094 r7=0xc1227c14
        r6=0x00000000 r5=0xc03504f4 r4=0xc1227c00
config_attach+0xc
        scp=0xc02894d0 rlv=0xc02892f8 (config_found_sm+0x44)
        rsp=0xc01eebd8 rfp=0xc01eebf4
        r10=0x01808502 r9=0x04300007
        r8=0x4d69105a r7=0xc035044c r6=0xc0304290 r5=0xc11fad00
        r4=0xc01eec1c
config_found_sm+0xc
        scp=0xc02892c0 rlv=0xc03046c4 (pci_probe_device+0x244)
        rsp=0xc01eebf8 rfp=0xc01eec7c
        r7=0x0000001f r6=0xc11fad00
        r5=0x00001000 r4=0xc122223c
pci_probe_device+0xc
        scp=0xc030448c rlv=0xc0304968 (pci_enumerate_bus_generic+0x108)
        rsp=0xc01eec80 rfp=0xc01eecac
        r10=0x00000002 r9=0x00000000
        r8=0x00000001 r7=0xc11fad00 r6=0xc122223c r5=0x00000000
        r4=0x00001000
pci_enumerate_bus_generic+0xc
--db_more--                   scp=0xc030486c rlv=0xc0304258 (pciattach+0x1c8)
        rsp=0xc01eecb0 rfp=0xc01eece4
        r10=0x00000002 r9=0x00000004
        r8=0x00000001 r7=0xc11fad00 r6=0xc01eed8c r5=0xc033877c
        r4=0xc0338744
pciattach+0xc
        scp=0xc030409c rlv=0xc0289758 (config_attach+0x294)
        rsp=0xc01eece8 rfp=0xc01eed34
        r10=0x00000003 r9=0x00000000
        r8=0xc0350084 r7=0xc11fad14 r6=0x00000000 r5=0xc03504f4
        r4=0xc11fad00
config_attach+0xc
        scp=0xc02894d0 rlv=0xc02892f8 (config_found_sm+0x44)
        rsp=0xc01eed38 rfp=0xc01eed54
        r10=0xc1222000 r9=0xc034db68
        r8=0xc01eed8c r7=0xc0350414 r6=0xc0317ca4 r5=0xc1222000
        r4=0xc01eed8c
config_found_sm+0xc
        scp=0xc02892c0 rlv=0xc0317c78 (i80321_attach+0x490)
        rsp=0xc01eed58 rfp=0xc01eeddc
        r7=0xc1222274 r6=0x00000000
        r5=0x00000000 r4=0x00000000
i80321_attach+0xc
--db_more--                   scp=0xc03177f4 rlv=0xc03192bc (i80321_mainbus_attach+0x130)
        rsp=0xc01eede0 rfp=0xc01eee0c
        r10=0x00000005 r9=0x00000000
        r8=0xc03500d4 r7=0xc1222014 r6=0x00000001 r5=0xc1222000
        r4=0x00000000
i80321_mainbus_attach+0xc
        scp=0xc0319198 rlv=0xc0289758 (config_attach+0x294)
        rsp=0xc01eee10 rfp=0xc01eee5c
        r6=0x00000000 r5=0xc03504f4
        r4=0xc1222000
config_attach+0xc
        scp=0xc02894d0 rlv=0xc02f3de0 (mainbussearch+0xa0)
        rsp=0xc01eee60 rfp=0xc01eee94
        r10=0x00000007 r9=0x00000000
        r8=0xc0350334 r7=0x00000000 r6=0xc1220fc0 r5=0xc03504bc
        r4=0xc01eee60
mainbussearch+0xc
        scp=0xc02f3d4c rlv=0xc028911c (mapply+0x2c)
        rsp=0xc01eee98 rfp=0xc01eeeac
        r7=0xc1220fc0 r6=0xc03504d8
        r5=0xc03504bc r4=0xc01eeeb0
mapply+0xc
        scp=0xc02890fc rlv=0xc0289200 (config_search+0x98)
--db_more--                   rsp=0xc01eeeb0 rfp=0xc01eeee4
        r5=0xc03504bc r4=0xc0350324
config_search+0xc
        scp=0xc0289174 rlv=0xc02f3e1c (mainbusattach+0x2c)
        rsp=0xc01eeee8 rfp=0xc01eeefc
        r8=0xc0350054 r7=0xc1220fd4
        r6=0x00000000 r5=0xc03504f4 r4=0xc1220fc0
mainbusattach+0xc
        scp=0xc02f3dfc rlv=0xc0289758 (config_attach+0x294)
        rsp=0xc01eef00 rfp=0xc01eef4c
        r4=0xc1220fc0
config_attach+0xc
        scp=0xc02894d0 rlv=0xc028938c (config_rootfound+0x58)
        rsp=0xc01eef50 rfp=0xc01eef6c
        r10=0xc03a1688 r9=0xc03a2da4
        r8=0xc039fc40 r7=0xc039fa50 r6=0xc0338514 r5=0xc01eef74
        r4=0xc03503c0
config_rootfound+0xc
        scp=0xc0289340 rlv=0xc0302f70 (cpu_configure+0x28)
        rsp=0xc01eef70 rfp=0xc01eef84
        r6=0x00000001 r5=0x00000000
        r4=0xc03a2100
cpu_configure+0xc
--db_more--                   scp=0xc0302f54 rlv=0xc02890c4 (configure+0x38)
        rsp=0xc01eef88 rfp=0xc01eef9c
configure+0xc
        scp=0xc0289098 rlv=0xc02753bc (main+0x358)
        rsp=0xc01eefa0 rfp=0xc01eefec
        r5=0x00000000 r4=0x00000001
main+0xc
        scp=0xc0275070 rlv=0xc0200104 (L1+0x2c)
        rsp=0xc01eeff0 rfp=0xc01eeffc
        r10=0xee112f10 r9=0x0000b300
        r8=0xa0200028 r7=0x000199a0 r6=0x00000000 r5=0xa0200000
        r4=0x000aa094
L1+0x28
        scp=0xc0200100 rlv=0xc03a5ab0 (kernelstack)
        rsp=0xc01ef000 rfp=0x00000000
db> c
boot: howto=00000100 curproc=0xc039fa50
The operating system has halted.
Please press any key to reboot.

rebooting...
========= End of 2nd dmesg =========



--
Regards, 

Joshua Huang  --  joshuah@synology.com
Tel: 886-2-25521814 ext. 823
Synology Inc.