Subject: Re: PATA disk drive not being configured in 2.0.2
To: None <netbsd-help@netbsd.org>
From: Dieter <netbsd@sopwith.solgatos.com>
List: netbsd-help
Date: 06/07/2005 17:06:08
Alpha 164LX running 2.0.2
1 CD/DVD drive connected to the onboard CMD PATA controller.

> Can you try a kernel compiled with ddb (to get a stack trace), and with
> makeoptions     DEBUG="-g"
> Then get a stack trace, and also use gdb to find the line where it faults:
> gdb netbsd.gdb
> list *(0xfffffc00004f4b74)

cmdide0 at pci0 dev 11 function 0
cmdide0: CMD Technology PCI0646 (rev. 0x01)
cmdide0: bus-master DMA support present
cmdide0: primary channel wired to compatibility mode
cmdide0: primary channel interrupting at isa irq 14
atabus2 at cmdide0 channel 0
cmdide0: secondary channel wired to compatibility mode
cmdide0: secondary channel interrupting at isa irq 15
atabus3 at cmdide0 channel 1
isa0 at sio0

[ ... ]

satalink0: port 1: device present, speed: 1.5Gb/s
wd0 at atabus1 drive 0scsibus0: waiting 2 seconds for devices to settle...
: <ST3250823AS>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 232 GB, 484521 cyl, 16 head, 63 sec, 512 bytes/sect x 488397168 sectors

unexpected machine check:

    mces    = 0x1
    vector  = 0x670
    param   = 0xfffffc0000006068
    pc      = 0xfffffc00004fddb4
    ra      = 0xfffffc00004e98b8
    code    = 0x98
    curlwp = 0xfffffc0000ade780
        pid = 9.1, comm = atabus2

panic: machine check
syncing disks... done
rebooting...

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

(gdb) list *(0xfffffc00004fddb4)
0xfffffc00004fddb4 is in cia_swiz_io_read_1 (pci_swiz_bus_io_chipdep.c:673).
668             tmpioh = ioh + off;
669             offset = tmpioh & 3;
670             port = (u_int32_t *)((tmpioh << CHIP_ADDR_SHIFT) |
671                 (0 << CHIP_SIZE_SHIFT));
672             val = *port;
673             rval = ((val) >> (8 * offset)) & 0xff;
674
675             return rval;
676     }
677
(gdb) 

======================================================
unexpected machine check:

    mces    = 0x1
    vector  = 0x670
    param   = 0xfffffc0000006068
    pc      = 0xfffffc00004fddb4
    ra      = 0xfffffc00004e98b8
    code    = 0x98
    curlwp = 0xfffffc0000ade780
        pid = 9.1, comm = atabus2

panic: machine check
Stopped in pid 9.1 (atabus2) at netbsd:cpu_Debugger+0x4:        ret     zero,(ra
)
db> bt
cpu_Debugger() at netbsd:cpu_Debugger+0x4
panic() at netbsd:panic+0x1e8
machine_check() at netbsd:machine_check+0x234
interrupt() at netbsd:interrupt+0x1e8
XentInt() at netbsd:XentInt+0x1c
--- interrupt (from ipl 4) ---
cia_swiz_io_read_1() at netbsd:cia_swiz_io_read_1+0x14
pciide_irqack() at netbsd:pciide_irqack+0x38
cmd646_9_irqack() at netbsd:cmd646_9_irqack+0xb8
wdcprobe1() at netbsd:wdcprobe1+0xc5c
wdc_drvprobe() at netbsd:wdc_drvprobe+0x44
atabusconfig() at netbsd:atabusconfig+0x78
atabus_thread() at netbsd:atabus_thread+0x7c
exception_return() at netbsd:exception_return
--- root of call graph ---
db>