Subject: mpacpi boot panic
To: None <fvdl@netbsd.org>
From: Takayoshi Kochi <kochi@netbsd.org>
List: port-i386
Date: 06/01/2003 16:31:07
----Next_Part(Sun_Jun__1_16:31:07_2003_078)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi Frank,

My pc (AOpen AX4PE MAX motherboard, P4 3.06HT processor) doesn't
boot with -current, panics at mpacpi_attach_hook(), with or without
MPACPI_SCANPCI.

The ACPI namespace has _PRT for pci0 and pci2, not pci1.

pci0 (bus#0)
 -ppb0
  - pci1 (bus#1)
 -ppb1
  - pci2 (bus#2)

and kernel panics at ppb0 attach.

Attached is my workaround patch and full healthy boot dmesg.
If the patch is correct, mpbios.c also needs fixed.
---
Takayoshi Kochi

----Next_Part(Sun_Jun__1_16:31:07_2003_078)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="mpacpi-attach-hook.diff"

Index: mpacpi.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/x86/mpacpi.c,v
retrieving revision 1.5
diff -u -r1.5 mpacpi.c
--- mpacpi.c	2003/05/29 20:22:33	1.5
+++ mpacpi.c	2003/06/01 07:09:12
@@ -840,7 +840,7 @@
 		return EINVAL;
 
 	mpb = &mp_busses[pba->pba_bus];
-	if (strcmp(mpb->mb_name, "pci"))
+	if (!mpb->mb_name ||strcmp(mpb->mb_name, "pci"))
 		return EINVAL;
 
 	mpb->mb_configured = 1;

----Next_Part(Sun_Jun__1_16:31:07_2003_078)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="ax4pe.dmesg"

NetBSD 1.6T (AX4PE) #11: Sun Jun  1 16:13:17 JST 2003
	kochi@localhost:/home/kochi/conf/kernel/ax4pe
total memory = 1023 MB
avail memory = 935 MB
using 6144 buffers containing 52508 KB of memory
BIOS32 rev. 0 found at 0xfb0b0
mainbus0 (root)
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel Pentium 4 (686-class), 3069.90 MHz, id 0xf27
cpu0: features bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features bfebfbff<PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX>
cpu0: features bfebfbff<FXSR,SSE,SSE2,SS,HTT,TM,SBF>
cpu0: I-cache 12K uOp cache 8-way, D-cache 8 KB 64b/line 4-way
cpu0: L2 cache 512 KB 64b/line 8-way
cpu0: ITLB 4K/4M: 64 entries
cpu0: DTLB 4K/4M: 64 entries
cpu0: calibrating local timer
cpu0: apic clock running at 133 MHz
cpu0: 16 page colors
cpu1 at mainbus0: apid 1 (application processor)
cpu1: starting
cpu1: Intel Pentium 4 (686-class), 3069.72 MHz, id 0xf27
cpu1: features bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu1: features bfebfbff<PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX>
cpu1: features bfebfbff<FXSR,SSE,SSE2,SS,HTT,TM,SBF>
cpu1: I-cache 12K uOp cache 8-way, D-cache 8 KB 64b/line 4-way
cpu1: L2 cache 512 KB 64b/line 8-way
cpu1: ITLB 4K/4M: 64 entries
cpu1: DTLB 4K/4M: 64 entries
ioapic0 at mainbus0 apid 2 (I/O APIC)
ioapic0: pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 0
ioapic0: remapped to apic 2
acpi0 at mainbus0
acpi0: X/RSDT: OemId <AOpen ,AWRDACPI,42302e31>, AslId <AWRD,00000000>
acpi0: SCI interrupting at int 9
acpi0: fixed-feature power button present
ACPI Object Type 'Processor' (0x0c) at acpi0 not configured
ACPI Object Type 'Processor' (0x0c) at acpi0 not configured
acpibut0 at acpi0 (PNP0C0C): ACPI Power Button
PNP0A03 [PCI Bus] at acpi0 not configured
PNP0C02 [Plug and Play motherboard register resources] at acpi0 not configured
PNP0000 [AT Interrupt Controller] at acpi0 not configured
PNP0200 [AT DMA Controller] at acpi0 not configured
PNP0100 [AT Timer] at acpi0 not configured
PNP0B00 [AT Real-Time Clock] at acpi0 not configured
PNP0800 [AT-style speaker sound] at acpi0 not configured
npx0 at acpi0 (PNP0C04)
npx0: io 0xf0-0xff irq 13
npx0: using exception 16
fdc0 at acpi0 (PNP0700)
fdc0: io 0x3f0-0x3f5,0x3f7 irq 6 drq 2
com0 at acpi0 (PNP0501-1)
com0: io 0x3f8-0x3ff irq 4
com0: ns16550a, working fifo
com1 at acpi0 (PNP0501-2)
com1: io 0x2f8-0x2ff irq 3
com1: ns16550a, working fifo
lpt0 at acpi0 (PNP0400)
lpt0: io 0x378-0x37f,0x778-0x77b irq 7
pckbc0 at acpi0 (PNP0F13): aux port
pckbc0: irq 12
pckbc1 at acpi0 (PNP0303): kbd port
pckbc1: io 0x60,0x64 irq 1
PNPB02F [Joystick/Game port] at acpi0 not configured
PNPB006 [MPU401 compatible ] at acpi0 not configured
PNP0C02 [Plug and Play motherboard register resources] at acpi0 not configured
INT0800 at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C01 [System Board] at acpi0 not configured
PNP0C0B [ACPI Fan] at acpi0 not configured
acpitz0 at acpi0 (): ACPI Thermal Zone
pckbd0 at pckbc1 (kbd slot)
pckbc1: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc1 (aux slot)
pckbc1: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
configuring bus 0
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: vendor 0x8086 product 0x2560 (rev. 0x02)
agp0 at pchb0: can't find internal VGA device config space
ppb0 at pci0 dev 1 function 0: vendor 0x8086 product 0x2561 (rev. 0x02)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
vga0 at pci1 dev 0 function 0: vendor 0x1002 product 0x5159 (rev. 0x00)
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
uhci0 at pci0 dev 29 function 0: vendor 0x8086 product 0x24c2 (rev. 0x02)
uhci0: interrupting at apic 2 int 16 (irq 10)
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 29 function 1: vendor 0x8086 product 0x24c4 (rev. 0x02)
uhci1: interrupting at apic 2 int 19 (irq 11)
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2 at pci0 dev 29 function 2: vendor 0x8086 product 0x24c7 (rev. 0x02)
uhci2: interrupting at apic 2 int 18 (irq 11)
usb2 at uhci2: USB revision 1.0
uhub2 at usb2
uhub2: vendor 0x8086 UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
ehci0 at pci0 dev 29 function 7: vendor 0x8086 product 0x24cd (rev. 0x02)
ehci0: interrupting at apic 2 int 23 (irq 10)
ehci0: EHCI version 1.0
ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2
usb3 at ehci0: USB revision 2.0
uhub3 at usb3
uhub3: vendor 0x8086 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub3: 6 ports with 6 removable, self powered
ppb1 at pci0 dev 30 function 0: vendor 0x8086 product 0x244e (rev. 0x82)
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled
ex0 at pci2 dev 5 function 0: 3Com 3c905C-TX 10/100 Ethernet with mngmt (rev. 0x78)
ex0: interrupting at apic 2 int 17 (irq 11)
ex0: MAC address 00:04:75:a0:2d:b6
exphy0 at ex0 phy 24: 3Com internal media interface
exphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
cmpci0 at pci2 dev 10 function 0: vendor 0x13f6 product 0x0111 (rev. 0x10)
cmpci0: interrupting at apic 2 int 18 (irq 11)
audio0 at cmpci0: full duplex, mmap, independent
opl at cmpci0 not configured
mpu at cmpci0 not configured
vendor 0x1131 product 0x7146 (miscellaneous multimedia, revision 0x01) at pci2 dev 11 function 0 not configured
fwohci0 at pci2 dev 13 function 0: vendor 0x104c product 0x8023 (rev. 0x00)
fwohci0: interrupting at apic 2 int 21 (irq 11)
fwohci0: OHCI 1.1, 00:01:80:00:00:02:12:d5, 400Mb/s, 2 max_rec, 4 ir_ctx, 8 it_ctx
pcib0 at pci0 dev 31 function 0
pcib0: vendor 0x8086 product 0x24c0 (rev. 0x02)
pciide0 at pci0 dev 31 function 1: Intel 82801DB IDE Controller (ICH4) (rev. 0x02)
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
wd0 at pciide0 channel 0 drive 0: <ST380021A>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 76319 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 156301488 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd1 at pciide0 channel 0 drive 1: <ST380021A>
wd1: drive supports 16-sector PIO transfers, LBA addressing
wd1: 76319 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 156301488 sectors
wd1: 32-bit data port
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
pciide0: primary channel interrupting at irq 14
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA data transfers)
wd1(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA data transfers)
pciide0: secondary channel wired to compatibility mode
atapibus0 at pciide0 channel 1: 2 targets
cd0 at atapibus0 drive 0: <PIONEER DVD-RW  DVR-105, BLEA321559JP, 1.30> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
pciide0: secondary channel interrupting at irq 15
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)
vendor 0x8086 product 0x24c3 (SMBus serial bus, revision 0x02) at pci0 dev 31 function 3 not configured
isa0 at pcib0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
sysbeep0 at pcppi0
ioapic0: enabling
fw0 at fwohci0fw0: maximum receive packet (2) is too small
ehci0: unrecoverable error, controller halted
ehci0: blocking intrs 0x10
uhub3: device problem, disabling port 2
wd0: no disk label
boot device: wd1
root on wd1a dumps on wd1b
cpu1: CPU 1 running
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)

----Next_Part(Sun_Jun__1_16:31:07_2003_078)----