Re: page fault panic in device_get_softc/acpi_pcib_route_interrupt

From: Pawel Worach <pawel.worach_at_telia.com>
Date: Thu, 9 Dec 2004 22:13:58 +0100 (MET)
Finally got around to fetch some more info about this.

boot output and kgdb symbol decodes.

FreeBSD 6.0-CURRENT #0: Wed Dec  8 17:58:20 CET 2004
    root_at_zero:/usr/obj/usr/src/sys/ZERO
Preloaded elf kernel "/boot/kernel/kernel" at 0xc07ee000.
Preloaded elf module "/boot/kernel/acpi.ko" at 0xc07ee16c.
Calibrating clock(s) ... i8254 clock: 1193157 Hz
CLK_USE_I8254_CALIBRATION not specified - using default frequency
Timecounter "i8254" frequency 1193182 Hz quality 0
Calibrating TSC clock ... TSC clock: 2793900608 Hz
CPU: Intel(R) Xeon(TM) CPU 2.80GHz (2793.90-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf29  Stepping = 9
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,
PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HT
T,TM,PBE>
real memory  = 1073590272 (1023 MB)
Physical memory chunk(s):
0x0000000000001000 - 0x000000000009cfff, 638976 bytes (156 pages)
0x0000000000100000 - 0x00000000003fffff, 3145728 bytes (768 pages)
0x0000000000828000 - 0x000000003edaafff, 1045966848 bytes (255363 pages)
avail memory = 1046142976 (997 MB)
MP Configuration Table version 1.4 found at 0xc009e2a0
Table 'FACP' at 0x3ffdff00
Table 'APIC' at 0x3ffdfe80
MADT: Found table at 0x3ffdfe80
APIC: Using the MADT enumerator.
MADT: Found CPU APIC ID 0 ACPI ID 0: enabled
SMP: Added CPU 0 (AP)
MADT: Found CPU APIC ID 6 ACPI ID 1: enabled
SMP: Added CPU 6 (AP)
ACPI APIC Table: <IBM    SERONYXP>
APIC ID: physical 0, logical 0:0
APIC ID: physical 6, logical 0:1
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  6
bios32: Found BIOS32 Service Directory header at 0xc00fd790
bios32: Entry = 0xfd7a1 (c00fd7a1)  Rev = 0  Len = 1
pcibios: PCI BIOS entry at 0xf0000+0xd7dc
pnpbios: Found PnP BIOS data at 0xc00fdf90
pnpbios: Entry = f0000:444c  Rev = 1.0
Other BIOS signatures found:
APIC: CPU 0 has ACPI ID 0
APIC: CPU 1 has ACPI ID 1
MADT: Found IO APIC ID 14, Interrupt 0 at 0xfec00000
ioapic0: Routing external 8259A's -> intpin 0
ioapic0: intpin 0 -> ExtINT (edge, high)
ioapic0: intpin 1 -> ISA IRQ 1 (edge, high)
ioapic0: intpin 2 -> ISA IRQ 2 (edge, high)
ioapic0: intpin 3 -> ISA IRQ 3 (edge, high)
ioapic0: intpin 4 -> ISA IRQ 4 (edge, high)
ioapic0: intpin 5 -> ISA IRQ 5 (edge, high)
ioapic0: intpin 6 -> ISA IRQ 6 (edge, high)
ioapic0: intpin 7 -> ISA IRQ 7 (edge, high)
ioapic0: intpin 8 -> ISA IRQ 8 (edge, high)
ioapic0: intpin 9 -> ISA IRQ 9 (edge, high)
ioapic0: intpin 10 -> ISA IRQ 10 (edge, high)
ioapic0: intpin 11 -> ISA IRQ 11 (edge, high)
ioapic0: intpin 12 -> ISA IRQ 12 (edge, high)
ioapic0: intpin 13 -> ISA IRQ 13 (edge, high)
ioapic0: intpin 14 -> ISA IRQ 14 (edge, high)
ioapic0: intpin 15 -> ISA IRQ 15 (edge, high)
MADT: Found IO APIC ID 13, Interrupt 16 at 0xfec01000
ioapic1: intpin 0 -> PCI IRQ 16 (level, low)
ioapic1: intpin 1 -> PCI IRQ 17 (level, low)
ioapic1: intpin 2 -> PCI IRQ 18 (level, low)
ioapic1: intpin 3 -> PCI IRQ 19 (level, low)
ioapic1: intpin 4 -> PCI IRQ 20 (level, low)
ioapic1: intpin 5 -> PCI IRQ 21 (level, low)
ioapic1: intpin 6 -> PCI IRQ 22 (level, low)
ioapic1: intpin 7 -> PCI IRQ 23 (level, low)
ioapic1: intpin 8 -> PCI IRQ 24 (level, low)
ioapic1: intpin 9 -> PCI IRQ 25 (level, low)
ioapic1: intpin 10 -> PCI IRQ 26 (level, low)
ioapic1: intpin 11 -> PCI IRQ 27 (level, low)
ioapic1: intpin 12 -> PCI IRQ 28 (level, low)
ioapic1: intpin 13 -> PCI IRQ 29 (level, low)
ioapic1: intpin 14 -> PCI IRQ 30 (level, low)
ioapic1: intpin 15 -> PCI IRQ 31 (level, low)
MADT: Found IO APIC ID 12, Interrupt 32 at 0xfec02000
ioapic2: intpin 0 -> PCI IRQ 32 (level, low)
ioapic2: intpin 1 -> PCI IRQ 33 (level, low)
ioapic2: intpin 2 -> PCI IRQ 34 (level, low)
ioapic2: intpin 3 -> PCI IRQ 35 (level, low)
ioapic2: intpin 4 -> PCI IRQ 36 (level, low)
ioapic2: intpin 5 -> PCI IRQ 37 (level, low)
ioapic2: intpin 6 -> PCI IRQ 38 (level, low)
ioapic2: intpin 7 -> PCI IRQ 39 (level, low)
ioapic2: intpin 8 -> PCI IRQ 40 (level, low)
ioapic2: intpin 9 -> PCI IRQ 41 (level, low)
ioapic2: intpin 10 -> PCI IRQ 42 (level, low)
ioapic2: intpin 11 -> PCI IRQ 43 (level, low)
ioapic2: intpin 12 -> PCI IRQ 44 (level, low)
ioapic2: intpin 13 -> PCI IRQ 45 (level, low)
ioapic2: intpin 14 -> PCI IRQ 46 (level, low)
ioapic2: intpin 15 -> PCI IRQ 47 (level, low)
MADT: intr override: source 0, irq 2
ioapic0: Routing IRQ 0 -> intpin 2
ioapic0: intpin 2 trigger: edge
ioapic0: intpin 2 polarity: high
lapic0: Routing NMI -> LINT1
MADT: Ignoring local NMI routed to ACPI CPU 6
MADT: Forcing active-low polarity and level trigger for SCI
ioapic0: intpin 3 polarity: low
ioapic0: intpin 3 trigger: level
ioapic2 <Version 1.1> irqs 32-47 on motherboard
ioapic1 <Version 1.1> irqs 16-31 on motherboard
ioapic0 <Version 1.1> irqs 0-15 on motherboard
cpu0 BSP:
     ID: 0x00000000   VER: 0x00050014 LDR: 0x01000000 DFR: 0x0fffffff
  lint0: 0x00010700 lint1: 0x00000400 TPR: 0x00000000 SVR: 0x000001ff
random: <entropy source, Software, Yarrow>
io: <I/O>
mem: <memory>
Pentium Pro MTRR support enabled
null: <null device, zero device>
npx0: [FAST]
npx0: <math processor> on motherboard
npx0: INT 16 interface
acpi0: <IBM SERONYXP> on motherboard
acpi0: [MPSAFE]
pci_open(1):    mode 1 addr port (0x0cf8) is 0x80002800
pci_open(1a):   mode1res=0x80000000 (0x80000000)
pci_cfgcheck:   device 0 [class=060000] [hdr=80] is there (id=00141166)
pcibios: BIOS version 2.10
AcpiOsDerivePciId: bus 0 dev 15 func 2
acpi0: Power Button (fixed)
AcpiOsDerivePciId: bus 0 dev 0 func 0
AcpiOsDerivePciId: bus 0 dev 16 func 0
AcpiOsDerivePciId: bus 0 dev 16 func 2
AcpiOsDerivePciId: bus 0 dev 17 func 0
AcpiOsDerivePciId: bus 0 dev 17 func 2
acpi0: reservation of 460, 2 (4) failed
ACPI timer: 0/3 0/3 0/3 0/3 0/3 0/3 0/3 0/3 0/3 0/3 -> 0
Timecounter "ACPI-safe" frequency 3579545 Hz quality 1000
acpi_timer0: <32-bit timer at 3.579545MHz> port 0x488-0x48b on acpi0
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
pcib0: <ACPI Host-PCI bridge> on acpi0
pci0: <ACPI PCI bus> on pcib0
pci0: physical bus=0
found-> vendor=0x1166, dev=0x0014, revid=0x33
        bus=0, slot=0, func=0
        class=06-00-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0000, statreg=0x0000, cachelnsz=16 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
found-> vendor=0x1166, dev=0x0014, revid=0x00
        bus=0, slot=0, func=1
        class=06-00-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0000, statreg=0x0000, cachelnsz=16 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
found-> vendor=0x1166, dev=0x0014, revid=0x00
        bus=0, slot=0, func=2
        class=06-00-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0000, statreg=0x0000, cachelnsz=16 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
        map[10]: type 1, range 32, base fd000000, size 24, enabled
        map[14]: type 4, range 32, base 00002400, size  8, enabled
        map[18]: type 1, range 32, base febff000, size 12, enabled
pcib0: matched entry for 0.6.INTA
pcib0: slot 6 INTA hardwired to IRQ 26
found-> vendor=0x1002, dev=0x4752, revid=0x27
        bus=0, slot=6, func=0
        class=03-00-00, hdrtype=0x00, mfdev=0
        cmdreg=0x0087, statreg=0x0290, cachelnsz=8 (dwords)
        lattimer=0x40 (1920 ns), mingnt=0x08 (2000 ns), maxlat=0x00 (0 
ns)
        intpin=a, irq=26
        powerspec 2  supports D0 D1 D2 D3  current D0
found-> vendor=0x1166, dev=0x0201, revid=0x93
        bus=0, slot=15, func=0
        class=06-00-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0147, statreg=0x2200, cachelnsz=0 (dwords)
        lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
        map[20]: type 4, range 32, base 00000700, size  4, enabled
found-> vendor=0x1166, dev=0x0212, revid=0x93
        bus=0, slot=15, func=1
        class=01-01-82, hdrtype=0x00, mfdev=1
        cmdreg=0x0155, statreg=0x0200, cachelnsz=8 (dwords)
        lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
        map[10]: type 1, range 32, base febfe000, size 12, enabled
pcib0: matched entry for 0.15.INTA (src \LPUS:0)


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x48
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc051d7a7
stack pointer           = 0x10:0xc08208d8
frame pointer           = 0x10:0xc08208ec
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 0 (swapper)
[thread pid 0 tid 0 ]
Stopped at      device_get_softc+0x7:   movl    0x48(%eax),%eax
db> tr
Tracing pid 0 tid 0 td 0xc06eda40
device_get_softc(c07db4a0,c07d690d,35a,c0820928,c07b0e59) at device_get_softc+0x7
acpi_pci_link_route_interrupt(0,0,c0820a28,f,41) at acpi_pci_link_route_interrupt+0x37
acpi_pcib_route_interrupt(c1f16d00,c1f8b780,1,c1f7e214,1) at acpi_pcib_route_interrupt+0x33c
acpi_pcib_acpi_route_interrupt(c1f16d00,c1f8b780,1,c06c60d0,c1f8b808) at 
acpi_pcib_acpi_route_interrupt+0x2f
pci_assign_interrupt_method(c1f16a00,c1f8b780,f,2,24) at pci_assign_interrupt_method+0x71
pci_add_child(c1f16a00,c1f8b800,f,2,80) at pci_add_child+0x207
pci_add_children(c1f16a00,0,80,c0820b54,c051fbaf) at pci_add_children+0x123
acpi_pci_attach(c1f16a00,c1f5684c,c06bf6bc,c06a8919,0) at acpi_pci_attach+0x86
device_attach(c1f16a00,c1ed5d80,c0820bdc,c07c234c,c1f16d00) at device_attach+0x2c9
bus_generic_attach(c1f16d00,c07d61e7,0,c0820bcc,0) at bus_generic_attach+0x18
acpi_pcib_attach(c1f16d00,c1f7e214,0,c0820c04,c07bcf57) at acpi_pcib_attach+0xec
acpi_pcib_acpi_attach(c1f16d00,c1f5584c,c06bf6bc,c06a8919,0) at acpi_pcib_acpi_attach+0xf9
device_attach(c1f16d00,2f,c0820cbc,c07bf784,c1ed5d80) at device_attach+0x2c9
bus_generic_attach(c1ed5d80,2e,2f,c1f7dc48,2e) at bus_generic_attach+0x18
acpi_attach(c1ed5d80,c1f5804c,c06bf6bc,c06a8919,0) at acpi_attach+0x7b4
device_attach(c1ed5d80,c1f15000,c0820d18,c067852a,c1f15000) at device_attach+0x2c9
bus_generic_attach(c1f15000,c1f1504c,c0820d54,c051eb59,c1f15000) at bus_generic_attach+0x18
nexus_attach(c1f15000,c1f4684c,c06bf6bc,c06a8919,0) at nexus_attach+0x1a
device_attach(c1f15000,c06dbb50,c0820d78,c0665758,c1f15680) at device_attach+0x2c9
root_bus_configure(c1f15680,c06b95b7,0,c0820d98,c04d06a6) at root_bus_configure+0x19
configure(0,0,c1e6f774,81ec00,81e000) at configure+0x28
mi_startup() at mi_startup+0xd6
begin() at begin+0x2c
db> 

(kgdb) l *device_get_softc+0x7
0xc051d7a7 is in device_get_softc (/usr/src/sys/kern/subr_bus.c:1937).
1932     * on the size field of the driver.
1933     */
1934    void *
1935    device_get_softc(device_t dev)
1936    {
1937            return (dev->softc);
1938    }
1939
1940    /**
1941     * _at_brief Set the device's softc field
(kgdb) l *acpi_pci_link_route_interrupt+0x37
0x35ba7 is in acpi_pci_link_route_interrupt (/usr/src/sys/modules/acpi/acpi/..
/../../dev/acpica/acpi_pci_link.c:860).
855     {
856             struct link *link;
857
858             ACPI_SERIAL_BEGIN(pci_link);
859             link = acpi_pci_link_lookup(dev, index);
860             if (link == NULL)
861                     panic("%s: apparently invalid index %d", __func__, 
index);
862
863             /*
864              * If this link device is already routed to an interrupt, 
just return
(kgdb) l *acpi_pcib_route_interrupt+0x33c
0x327dc is in acpi_pcib_route_interrupt (acpivar.h:208).
203     acpivar.h: No such file or directory.
        in acpivar.h
(kgdb) l *acpi_pcib_acpi_route_interrupt+0x2f
0x32d9f is in acpi_pcib_acpi_route_interrupt (/usr/src/sys/modules/acpi/acpi/..
/../../dev/acpica/acpi_pcib_acpi.c:303).
298     acpi_pcib_acpi_route_interrupt(device_t pcib, device_t dev, int 
pin)
299     {
300         struct acpi_hpcib_softc *sc = device_get_softc(pcib);
301
302         return (acpi_pcib_route_interrupt(pcib, dev, pin, &sc->ap_prt));
303     }
304
305     static u_long acpi_host_mem_start = 0x80000000;
306     TUNABLE_ULONG("hw.acpi.host_mem_start", &acpi_host_mem_start);
307
(kgdb) l *pci_assign_interrupt_method+0x71
0xc04b24b1 is in pci_assign_interrupt_method (/usr/src/sys/dev/pci/pci.c:
1814).
1809            struct pci_devinfo *dinfo = device_get_ivars(child);
1810            pcicfgregs *cfg = &dinfo->cfg;
1811
1812            return (PCIB_ROUTE_INTERRUPT(device_get_parent(dev), child,
1813                cfg->intpin));
1814    }
1815
1816    static int
1817    pci_modevent(module_t mod, int what, void *arg)
1818    {
(kgdb) l *pci_add_child+0x207
0xc04b0187 is in pci_add_child (/usr/src/sys/dev/pci/pci.c:940).
935                      * firmware may leave bogus values in these registers.
936                      * If the re-route fails, then just stick with 
what we
937                      * have.
938                      */
939                     irq = PCI_ASSIGN_INTERRUPT(bus, dev);
940                     if (PCI_INTERRUPT_VALID(irq)) {
941                             pci_write_config(dev, PCIR_INTLINE, irq, 
1);
942                             cfg->intline = irq;
943                     } else
944     #endif
(kgdb) 

ps. sorry for the top-post, lost the original mail.

-- 
Pawel


-- 
Pawel
Received on Thu Dec 09 2004 - 20:14:00 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:24 UTC