Port-macppc archive

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

Re: Hunting the ahc boot-time panic



OK, I added the following lines to my configuration:

  no options    FONT_GALLANT12x22
  options       FONT_VT220ISO8x8

as found in ".../src/sys/dev/wsfont/files.wsfont".

On Tue, 18 Oct 2011, John D. Baker wrote:

There's a printf() that's "#if 0"'d out that prints some bus information.
I've enabled it and added a line to print the CSR value.  I won't be able
to check it until late tonight or maybe tomorrow morning.

My changes to "ahc_pci.c" were as follows:

Index: sys/dev/pci/ahc_pci.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/ahc_pci.c,v
retrieving revision 1.68
diff -u -p -r1.68 ahc_pci.c
--- sys/dev/pci/ahc_pci.c       26 Nov 2009 15:17:08 -0000      1.68
+++ sys/dev/pci/ahc_pci.c       19 Oct 2011 03:35:51 -0000
@@ -833,10 +833,11 @@ ahc_pci_attach(device_t parent, device_t
        ioh_valid = (pci_mapreg_map(pa, AHC_PCI_IOADDR,
                                    PCI_MAPREG_TYPE_IO, 0, &iot,
                                    &ioh, NULL, NULL) == 0);
-#if 0
+#if 1
        printf("%s: bus info: memt 0x%lx, memh 0x%lx, iot 0x%lx, ioh 0x%lx\n",
            ahc_name(ahc), (u_long)memt, (u_long)memh, (u_long)iot,
            (u_long)ioh);
+       printf("%s: bus info: csr 0x%lx\n", ahc_name(ahc), (u_long)command);
 #endif

        if (ioh_valid) {

Recovering the pre-panic message buffer following a userconf boot to
disable ahc, reveals a different reason:

[...]
uni_n0 at mainbus0 address 0xf8000000
ki2c0 at uni_n0 address 0xf8001000
iic1 at ki2c0: I2C bus
uninorth0 at mainbus0
pci0 at uninorth0 bus 0
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 11 function 0
pchb0: Apple Computer UniNorth AGP Interface (rev. 0x00)
r128fb0 at pci0 dev 16 function 0: ATI Technologies Rage Fury MAXX AGP 4x (TMDS)
r128fb0: 64 MB aperture at 0x94000000
wsdisplay0 at r128fb0 kbdmux 1: console (default, vt100 emulation)
wsmux1: connecting to wsdisplay0
uninorth1 at mainbus0
pci1 at uninorth1 bus 0
pci1: i/o space, memory space enabled
pchb1 at pci1 dev 11 function 0
pchb1: Apple Computer UniNorth Host-PCI Bridge (rev. 0x00)
ppb0 at pci1 dev 13 function 0: Digital Equipment DC21154 PCI-PCI Bridge (rev. 
0x05)
pci2 at ppb0 bus 1
pci2: i/o space, memory space enabled
ahc0 at pci2 dev 2 function 0: Adaptec 2902/04/10/15/20/30C SCSI adapter
ahc0: bus info: memt 0xd4722c80, memh 0x80083000, iot 0xd4722bf8, ioh 0xf2000000
ahc0: bus info: csr 0x2900016
trap: pid 0.1 (system): kernel MCHK trap @ 0x101990 (SRR1=0x41030)
panic: trap
Stopped in pid 0.1 (system) at  netbsd:cpu_Debugger+0x10:       lwz     r0, 
0x14(r1)
0x009703e0: at panic+0x25c
0x00970430: at trap+0x100
0x009704c0: kernel MCHK trap by bsr1+0x4: srr1=0x41030
            r1=0x970580 cr=0x24022042 xer=0x20000000 ctr=0x10198c
saved LR(0xfffffffd) is invalid.
db>


Everything after "panic: trap" is hand-transcribed from the console.
Attempting to get a backtrace with "bt" simply repeats the debugger
output above.

From the look of my added printf() to show the value of "csr", it looks
like memory access, bus-master and MWI cycles are enabled for "ahc"
already.


A curious thing is the "dmesg" excerpt show "pci?: i/o space, memory space
enabled", yet these messages don't show up on the console except after
the attachment of pci0 at uninorth0 bus 0.  Maybe another driver's message
is stepping on them?

Clues?

--
|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645


Home | Main Index | Thread Index | Old Index