Subject: Re: panic in ACPI configuration
To: Quentin Garnier <cube@cubidou.net>
From: Arne H. Juul <arnej@pvv.ntnu.no>
List: current-users
Date: 08/23/2007 22:49:32
On Thu, 23 Aug 2007, Quentin Garnier wrote:
> On Wed, Aug 22, 2007 at 11:03:12PM +0200, Arne H. Juul wrote:
>> I've recently gotten a new machine running NetBSD/i386,
>> and with a current GENERIC kernel I'm getting a panic during
>> initial kernel configuration:
>>
>> panic: pci_make_tag: bad request
>>
>> does anyone have any tips for what could be wrong?
>
> Yes.  Try the attached patch (in sys/dev/acpi/acpica).

thanks - that works!  dmesg at the end.

> The full trace would still be interesting, though.

I've written down a bit more. the pci_make_tag arguments were

pci_make_tag(pci_chipset_tag_t pc = some pointer,
              int bus = 0,
              int device = 2,
              int function = ffff)

so it looks like it was the "function" that overflowed.
The rest of the stack was (with possible mistakes on my
side, these stack levels are all very similar so it's
easy to make mistakes writing them down on paper :-)

pci_make_tag
AcpiOsReadPciConfiguration
get_bus_number
AcpiOsDerivePciId
AcpiEvPciConfigRegionSetup
AcpiEvAddressSpaceDispatch
AcpiExAccessRegion
AcpiExFieldDatumIo
AcpiExExtractFromField
AcpiExReadDataFromField
AcpiExResolveNodeToValue
AcpiExResolveToValue
AcpiExResolveOperands
AcpiDsExecEndOp
AcpiPsParseLoop
AcpiPsParseAml
AcpiPsExecutePass
AcpiPsExecuteMethod
AcpiNSEvaluateByHandle
AcpiNsInitOneDevice
AcpiNsWalkNamespace
AcpiNsInitializeDevices
AcpiInitializeObjects
acpi_attach
config_attach_loc
config_found_ia
mainbus_attach

and here's the dmesg from GENERIC with the patch applied:

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
     2006, 2007
     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 4.99.30 (GENERIC) #4: Thu Aug 23 09:32:48 CEST 2007
 	root@inngang:/usr/obj/sys/arch/i386/compile/GENERIC
total memory = 1919 MB
rbus: rbus_min_start set to 0x80000000
avail memory = 1875 MB
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
BIOS32 rev. 0 found at 0xf0010
mainbus0 (root)
cpu0 at mainbus0 apid 0: (boot processor)
cpu0: AMD Athlon X2 or Athlon 64 X2 (686-class), 2310.48 MHz, id 0x60fb1
cpu0: features ffdbfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features ffdbfbff<PGE,MCA,CMOV,PAT,PSE36,MPC,NOX,MMXX,MMX>
cpu0: features ffdbfbff<FXSR,SSE,SSE2,RDTSCP,HTT,LONG,3DNOW2,3DNOW>
cpu0: features2 2001<SSE3>
cpu0: "AMD Athlon(tm) 64 X2 Dual Core Processor 4400+"
cpu0: I-cache 64 KB 64B/line 2-way, D-cache 64 KB 64B/line 2-way
cpu0: L2 cache 512 KB 64B/line 16-way
cpu0: ITLB 32 4 KB entries fully associative, 8 4 MB entries fully associative
cpu0: DTLB 32 4 KB entries fully associative, 8 4 MB entries fully associative
cpu0: AMD Power Management features: 7f<STC,TM,TTP,VID,FID,TS>
cpu0: AMD PowerNow! Technology 2300 MHz
cpu0: available frequencies (Mhz): 1000 1800 2000 2200 2300
cpu0: calibrating local timer
cpu0: apic clock running at 200 MHz
cpu0: 8 page colors
cpu1 at mainbus0 apid 1: (application processor)
cpu1: not started
ioapic0 at mainbus0 apid 2
ioapic0: pa 0xfec00000, version 11, 24 pins
acpi0 at mainbus0: Advanced Configuration and Power Interface
acpi0: using Intel ACPI CA subsystem version 20060217
acpi0: X/RSDT: OemId <A_M_I ,OEMRSDT ,05000704>, AslId <MSFT,00000097>
acpi0: SCI interrupting at int 9
acpi0: fixed-feature power button present
timecounter: Timecounter "ACPI-Fast" frequency 3579545 Hz quality 1000
ACPI-Fast 24-bit timer
P001 (ACPI Object Type 'Processor' [0x0c]) at acpi0 not configured
P002 (ACPI Object Type 'Processor' [0x0c]) at acpi0 not configured
CPU1 (ACPI Object Type 'Processor' [0x0c]) at acpi0 not configured
CPU2 (ACPI Object Type 'Processor' [0x0c]) at acpi0 not configured
PCI0 (PNP0A03) [PCI/PCI-X Host Bridge] at acpi0 not configured
PIC (PNP0000) [AT Interrupt Controller] at acpi0 not configured
DMAD (PNP0200) [AT DMA Controller] at acpi0 not configured
attimer1 at acpi0 (TMR, PNP0100): AT Timer
attimer1: io 0x40-0x43 irq 0
RTC0 (PNP0B00) [AT Real-Time Clock] at acpi0 not configured
pcppi1 at acpi0 (SPKR, PNP0800)
pcppi1: io 0x61
midi0 at pcppi1: PC speaker (CPU-intensive output)
sysbeep0 at pcppi1
npx1 at acpi0 (COPR, PNP0C04)
npx1: io 0xf0-0xff irq 13
npx1: reported by CPUID; using exception 16
lpt3 at acpi0 (LPTE, PNP0401)
lpt3: io 0x378-0x37f,0x778-0x77f irq 7 drq 3
joy0 at acpi0 (GAME, PNPB02F)
joy0: io 0x200-0x207
joy0: joystick not connected
RMSC (PNP0C02) [Plug and Play motherboard register resources] at acpi0 not configured
hpet0 at acpi0 (HPET, PNP0103-0)
hpet0: mem 0xfed00000-0xfed00fff
timecounter: Timecounter "hpet0" frequency 25000000 Hz quality 2000
OMSC (PNP0C02) [Plug and Play motherboard register resources] at acpi0 not configured
pckbc1 at acpi0 (PS2K, PNP0303): kbd port
pckbc1: io 0x60,0x64 irq 1
pckbc2 at acpi0 (PS2M, PNP0F03): aux port
pckbc2: irq 12
com3 at acpi0 (UAR1, PNP0501-1)
com3: io 0x3f8-0x3ff irq 4
com3: ns16550a, working fifo
SIOR (PNP0C02) [Plug and Play motherboard register resources] at acpi0 not configured
PCIE (PNP0C02) [Plug and Play motherboard register resources] at acpi0 not configured
RMEM (PNP0C01) [System Board] at acpi0 not configured
acpibut0 at acpi0 (PWRB, PNP0C0C-170): ACPI Power Button
LNKA (PNP0C0F) [PCI interrupt link device] at acpi0 not configured
LUB0 (PNP0C0F) [PCI interrupt link device] at acpi0 not configured
LUB2 (PNP0C0F) [PCI interrupt link device] at acpi0 not configured
LMAC (PNP0C0F) [PCI interrupt link device] at acpi0 not configured
LAZA (PNP0C0F) [PCI interrupt link device] at acpi0 not configured
LMC9 (PNP0C0F) [PCI interrupt link device] at acpi0 not configured
LSMB (PNP0C0F) [PCI interrupt link device] at acpi0 not configured
LSA0 (PNP0C0F) [PCI interrupt link device] at acpi0 not configured
LSA1 (PNP0C0F) [PCI interrupt link device] at acpi0 not configured
apm0 at acpi0: Power Management spec V1.2
pcppi1: attached to attimer1
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
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
NVIDIA product 0x03ea (RAM memory, revision 0xa1) at pci0 dev 0 function 0 not configured
pcib0 at pci0 dev 1 function 0
pcib0: NVIDIA nForce MCP61 PCI-ISA Bridge (rev. 0xa2)
NVIDIA nForce MCP61 SMBus Controller (SMBus serial bus, revision 0xa2) at pci0 dev 1 function 1 not configured
NVIDIA product 0x03f5 (RAM memory, revision 0xa2) at pci0 dev 1 function 2 not configured
ohci0 at pci0 dev 2 function 0: NVIDIA product 0x03f1 (rev. 0xa2)
LUB0: Picked IRQ 20 with weight 0
ohci0: interrupting at ioapic0 pin 20 (irq 5)
ohci0: OHCI version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: NVIDIA OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 10 ports with 10 removable, self powered
ehci0 at pci0 dev 2 function 1: NVIDIA product 0x03f2 (rev. 0xa2)
LUB2: Picked IRQ 21 with weight 0
ehci0: interrupting at ioapic0 pin 21 (irq 10)
ehci0: BIOS has given up ownership
ehci0: EHCI version 1.0
ehci0: companion controller, 10 ports each: ohci0
usb1 at ehci0: USB revision 2.0
uhub1 at usb1
uhub1: NVIDIA EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub1: 10 ports with 10 removable, self powered
ppb0 at pci0 dev 4 function 0: NVIDIA product 0x03f3 (rev. 0xa1)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
fxp0 at pci1 dev 8 function 0: i82559 Ethernet, rev 8
LNKA: Picked IRQ 16 with weight 0
fxp0: interrupting at ioapic0 pin 16 (irq 11)
fxp0: Ethernet address 00:90:27:dc:0c:98
inphy0 at fxp0 phy 1: i82555 10/100 media interface, rev. 4
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
azalia0 at pci0 dev 5 function 0: Generic High Definition Audio Controller
LAZA: Picked IRQ 22 with weight 0
azalia0: interrupting at ioapic0 pin 22 (irq 11)
azalia0: host: 0x10de/0x03f0 (rev. 162)
azalia0: host: High Definition Audio rev. 1.0
viaide0 at pci0 dev 6 function 0
viaide0: NVIDIA MCP61 IDE Controller (rev. 0xa2)
viaide0: bus-master DMA support present
viaide0: primary channel configured to compatibility mode
viaide0: primary channel interrupting at ioapic0 pin 14 (irq 14)
atabus0 at viaide0 channel 0
viaide0: secondary channel configured to compatibility mode
viaide0: secondary channel ignored (disabled)
nfe0 at pci0 dev 7 function 0: NVIDIA nForce MCP61 Gigabit Ethernet Controller (rev. 0xa2)
LMAC: Picked IRQ 23 with weight 0
nfe0: interrupting at ioapic0 pin 23 (irq 5)
nfe0: Ethernet address f4:49:e1:8f:13:00
rgephy0 at nfe0 phy 1: RTL8169S/8110S 1000BASE-T media interface, rev. 2
rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
viaide1 at pci0 dev 8 function 0
viaide1: NVIDIA MCP61 Serial ATA Controller (rev. 0xa2)
viaide1: bus-master DMA support present
viaide1: primary channel wired to native-PCI mode
LSA0: Picked IRQ 20 with weight 1
viaide1: using ioapic0 pin 20 (irq 10) for native-PCI interrupt
atabus1 at viaide1 channel 0
viaide1: secondary channel wired to native-PCI mode
atabus2 at viaide1 channel 1
viaide2 at pci0 dev 8 function 1
viaide2: NVIDIA MCP61 Serial ATA Controller (rev. 0xa2)
viaide2: bus-master DMA support present
viaide2: primary channel wired to native-PCI mode
LSA1: Picked IRQ 21 with weight 1
viaide2: using ioapic0 pin 21 (irq 10) for native-PCI interrupt
atabus3 at viaide2 channel 0
viaide2: secondary channel wired to native-PCI mode
atabus4 at viaide2 channel 1
ppb1 at pci0 dev 9 function 0: NVIDIA nForce MCP61 PCI-PCI Bridge (rev. 0xa2)
pci2 at ppb1 bus 2
pci2: no spaces enabled!
ppb2 at pci0 dev 11 function 0: NVIDIA nForce MCP61 PCI-PCI Bridge (rev. 0xa2)
pci3 at ppb2 bus 3
pci3: no spaces enabled!
ppb3 at pci0 dev 12 function 0: NVIDIA nForce MCP61 PCI-PCI Bridge (rev. 0xa2)
pci4 at ppb3 bus 4
pci4: no spaces enabled!
vga1 at pci0 dev 13 function 0: NVIDIA product 0x03d0 (rev. 0xa2)
vga1: WARNING: ignoring 64-bit BAR @ 0x14
vga1: WARNING: ignoring 64-bit BAR @ 0x1c
wsdisplay0 at vga1 kbdmux 1: console (80x25, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
direct rendering for vga1 unsupported
pchb0 at pci0 dev 24 function 0
pchb0: Advanced Micro Devices K8 AMD64 HyperTransport configuration (rev. 0x00)
pchb1 at pci0 dev 24 function 1
pchb1: Advanced Micro Devices K8 AMD64 Address Map configuration (rev. 0x00)
pchb2 at pci0 dev 24 function 2
pchb2: Advanced Micro Devices K8 AMD64 DRAM configuration (rev. 0x00)
pchb3 at pci0 dev 24 function 3
pchb3: Advanced Micro Devices K8 AMD64 Miscellaneous configuration (rev. 0x00)
isa0 at pcib0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
isapnp0: no ISA Plug 'n Play devices found
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
azalia0: codec[0]: Realtek ALC888 (rev. 0.1)
azalia0: codec[0]: High Definition Audio rev. 1.0
azalia0: playback: max channels=8, encodings=1<PCM>
azalia0: playback: PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
azalia0: recording: max channels=4, encodings=1<PCM>
azalia0: recording: PCM formats=60160<20bit,16bit,96kHz,48kHz,44.1kHz>
audio0 at azalia0: full duplex, independent
Kernelized RAIDframe activated
viaide1 port 0: device present, speed: 3.0Gb/s
viaide1 port 1: device present, speed: 1.5Gb/s
viaide2 port 0: device present, speed: 1.5Gb/s
wd0 at atabus1 drive 0: <WDC WD2500JS-00NCB1>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 232 GB, 484521 cyl, 16 head, 63 sec, 512 bytes/sect x 488397168 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd0(viaide1:0:0): using PIO mode 4, Ultra-DMA mode 6 (Ultra/133) (using DMA)
atapibus0 at atabus2: 2 targets
cd0 at atapibus0 drive 0: <TSSTcorpCD/DVDW SH-S183A, , SB02> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
cd0(viaide1:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
wd1 at atabus3 drive 0: <Maxtor 6Y120M0>
wd1: drive supports 16-sector PIO transfers, LBA addressing
wd1: 114 GB, 238216 cyl, 16 head, 63 sec, 512 bytes/sect x 240121728 sectors
wd1: 32-bit data port
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd1(viaide2:0:0): using PIO mode 4, Ultra-DMA mode 6 (Ultra/133) (using DMA)
findroot: unable to read block 266245176
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
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)