Re: NEW_PCIB? pcib1: failed to allocate initial I/O port window: 0x4000-0x4fff

From: John <jwd_at_slowblink.com>
Date: Sat, 11 Jun 2011 05:05:18 +0000
----- John's Original Message -----
> ----- John Baldwin's Original Message -----
> > On Friday, June 10, 2011 11:00:15 am John wrote:
> > > ----- John Baldwin's Original Message -----
> > > > On Thursday, June 09, 2011 2:11:16 am Andriy Gapon wrote:
> > > > > on 09/06/2011 01:30 John said the following:
> > > > > > Sorry John, here's the verbose dmesg output with your patch applied.
> > > > > > 
> > > > > > This is at the tail of the console:
> > > > > > 
> > > > > > pcib1: allocated memory range (0xf6000000-0xf6ffffff) for rid 10 of pci0:1:3:0
> > > > > >         map[14]: type I/O Port, range 32, base 0x4400, size  8, enabled
> > > > > > pcib1: failed to allocate initial I/O port window (0x4000-0x4fff,0x1000)
> > > > > >         map[18]: type Memory, range 32, base 0xf5ff0000, size 12, enabled
> > > > > > 
> > > > > > 
> > > > > > Output ends with a single 'M', not MCA as earlier.
> > > > > 
> > > > > 
> > > > > Just a wild guess - what happens if you revert r222537 (you might need to revert
> > > > > r222804 first)?
> > > > 
> > > > I think he's getting a MCA due to writing to a bad address and getting a
> > > > PCI-e target abort equivalent and that the screen output is broken
> > > > because the VGA device is what is probably getting hosed by the pcib driver.
> > > > 
> > > > Given that, I doubt the printf changes are related.
> > > 
> > > Just for grins, I decided to completely remove usb from the kernel
> > > to see if it might help. Nolonger prints the MCA and/or M, just
> > > hangs while printing out the no driver attached messages. Still
> > > prints out the failed to allocate messages... 
> > 
> > Hmmm.  Your case is a bit different.  PCI-PCI bridges have to allocate I/O
> > space on 4KB boundarys, so the smallest chunk it can allocate for the
> > resources behind your bridge is 0x4000-0x4fff which is what keeps failing.
> > 
> > Hmm, it's claiming that brgphy1 has some I/O ports that conflict allocated.
> > That makes no sense.  brgphy devices have no I/O port resources.  I think
> > the device_t got reused.
> > 
> > Can you try this perhaps to get started relative to sys/x86/x86/nexus.c:
> 
> In the following line, did by chance you want 'child' instead of dev?
> 
> bus_child_pnpinfo_str(dev, buf, 1024);
> 
> /usr/src.2011-06-10_22.00_EST/sys/x86/x86/nexus.c: In function 'nexus_alloc_resource':
> /usr/src.2011-06-10_22.00_EST/sys/x86/x86/nexus.c:403: error: 'dev' undeclared (first use in this function)
> /usr/src.2011-06-10_22.00_EST/sys/x86/x86/nexus.c:403: error: (Each undeclared identifier is reported only once
> /usr/src.2011-06-10_22.00_EST/sys/x86/x86/nexus.c:403: error: for each function it appears in.)
> 

   boot -v output below. Two areas which appear to have the
overlapping and dealt with from your patch:

acpi0: Power Button (fixed)
nexus0: allocating range 0x4800-0x48fe for child of acpi0
        _HID=none _UID=0
        at handle=\_SB_.CFG0.PCI0.GROM
nexus0: allocating range 0x4900-0x4907 for child of acpi0
        _HID=none _UID=0
        at handle=\_SB_.CFG0.PCI0.GROM

and then:

pcib1: <ACPI PCI-PCI bridge> at device 3.0 on pci0
nexus0: allocating range 0x4000-0x4fff for child pcib1 of pci0
        vendor=0x1022 device=0x7460 subvendor=0x0000 subdevice=0x0000 class=0x060400
        at slot=3 function=0 handle=\_SB_.CFG0.PCI0
pcib1: failed to allocate initial I/O port window: 0x4000-0x4fff

   Thoughts?

Thanks,
John




OK boot -v
GDB: no debug ports present
KDB: debugger backends: ddb
KDB: current backend: ddb
SMAP type=01 base=0000000000000000 len=000000000009f400
SMAP type=02 base=000000000009f400 len=0000000000000c00
SMAP type=02 base=00000000000f0000 len=0000000000010000
SMAP type=01 base=0000000000100000 len=00000000f56f8000
SMAP type=03 base=00000000f57f8000 len=0000000000008000
SMAP type=02 base=00000000fec00000 len=0000000000001000
SMAP type=02 base=00000000fec10000 len=0000000000001000
SMAP type=02 base=00000000fec20000 len=0000000000001000
SMAP type=02 base=00000000fdc00000 len=0000000000001000
SMAP type=02 base=00000000fdc10000 len=0000000000001000
SMAP type=02 base=00000000fee00000 len=0000000000010000
SMAP type=02 base=00000000ff800000 len=0000000000800000
SMAP type=01 base=0000000100000000 len=00000002fffff000
Table 'FACP' at 0xf57f8460
Table 'APIC' at 0xf57f8100
APIC: Found table at 0xf57f8100
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 1 ACPI ID 1: enabled
SMP: Added CPU 1 (AP)
MADT: Found CPU APIC ID 2 ACPI ID 2: disabled
MADT: Found CPU APIC ID 3 ACPI ID 3: disabled
MADT: Found CPU APIC ID 4 ACPI ID 4: disabled
MADT: Found CPU APIC ID 5 ACPI ID 5: disabled
MADT: Found CPU APIC ID 6 ACPI ID 6: disabled
MADT: Found CPU APIC ID 7 ACPI ID 7: disabled
Copyright (c) 1992-2011 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 9.0-CURRENT #0: Fri Jun 10 23:07:28 EST 2011
    root_at_zfscarp1p.unx.sas.com:/usr/obj/usr/src.2011-06-10_22.00_EST/sys/GENERIC amd64
WARNING: WITNESS option enabled, expect reduced performance.
Table 'FACP' at 0xf57f8460
Table 'APIC' at 0xf57f8100
Table 'SPCR' at 0xf57f81e0
Table 'SRAT' at 0xf57f8260
SRAT: Found table at 0xf57f8260
SRAT: Found CPU APIC ID 0 domain 1: enabled
SRAT: Found CPU APIC ID 1 domain 2: enabled
SRAT: Found CPU APIC ID 2 domain 3: disabled
SRAT: Found CPU APIC ID 3 domain 4: disabled
SRAT: Found CPU APIC ID 4 domain 1: disabled
SRAT: Found CPU APIC ID 5 domain 2: disabled
SRAT: Found CPU APIC ID 6 domain 3: disabled
SRAT: Found CPU APIC ID 7 domain 4: disabled
SRAT: Found memory domain 1 addr 0 len 200000000: enabled
SRAT: Found memory domain 2 addr 200000000 len 200000000: enabled
SRAT: Found memory domain 3 addr 0 len 0: disabled
SRAT: Found memory domain 4 addr 0 len 0: disabled
Preloaded elf kernel "/boot/kernel/kernel" at 0xffffffff814e0000.
Calibrating TSC clock ... TSC clock: 2605969953 Hz
CPU: AMD Opteron(tm) Processor 252 (2605.97-MHz K8-class CPU)
  Origin = "AuthenticAMD"  Id = 0x20f51  Family = f  Model = 25  Stepping = 1
  Features=0x78bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2>
  Features2=0x1<SSE3>
  AMD Features=0xe2500800<SYSCALL,NX,MMX+,FFXSR,LM,3DNow!+,3DNow!>
L1 2MB data TLB: 8 entries, fully associative
L1 2MB instruction TLB: 8 entries, fully associative
L1 4KB data TLB: 32 entries, fully associative
L1 4KB instruction TLB: 32 entries, fully associative
L1 data cache: 64 kbytes, 64 bytes/line, 1 lines/tag, 2-way associative
L1 instruction cache: 64 kbytes, 64 bytes/line, 1 lines/tag, 2-way associative
L2 2MB unified TLB: 0 entries, disabled/not present
L2 4KB data TLB: 512 entries, 4-way associative
L2 4KB instruction TLB: 512 entries, 4-way associative
L2 unified cache: 1024 kbytes, 64 bytes/line, 1 lines/tag, 16-way associative
WARNING: This architecture revision has known SMP hardware bugs which may cause random instability
real memory  = 17179869184 (16384 MB)
Physical memory chunk(s):
0x0000000000001000 - 0x000000000009bfff, 634880 bytes (155 pages)
0x0000000000100000 - 0x00000000001fffff, 1048576 bytes (256 pages)
0x000000000151b000 - 0x00000000f57f7fff, 4096643072 bytes (1000157 pages)
0x0000000100000000 - 0x00000003e1eaefff, 12380205056 bytes (3022511 pages)
avail memory = 16372862976 (15614 MB)
Event timer "LAPIC" quality 400
ACPI APIC Table: <HP     00000083>
INTR: Adding local APIC 1 as a target
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
FreeBSD/SMP: 2 package(s) x 1 core(s)
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
SRAT: CPU 0 has memory domain 1
SRAT: CPU 1 has memory domain 2
x86bios:  IVT 0x000000-0x0004ff at 0xfffffe0000000000
x86bios: SSEG 0x001000-0x001fff at 0xffffff8000236000
x86bios: EBDA 0x09f000-0x09ffff at 0xfffffe000009f000
x86bios:  ROM 0x0a0000-0x0fefff at 0xfffffe00000a0000
APIC: CPU 0 has ACPI ID 0
APIC: CPU 1 has ACPI ID 1
ULE: setup cpu 0
ULE: setup cpu 1
ACPI: RSDP 0xf4f20 00024 (v02 HP    )
ACPI: XSDT 0xf57f83e0 00044 (v01 HP     A05      00000002   ?? 0000162E)
ACPI: FACP 0xf57f8460 000F4 (v03 HP     A05      00000002   ?? 0000162E)
ACPI Warning: Invalid length for Pm1aControlBlock: 32, using default 16 (20110527/tbfadt-638)
ACPI Warning: Invalid length for Pm1bControlBlock: 32, using default 16 (20110527/tbfadt-638)
ACPI: DSDT 0xf57f8560 0422D (v01 HP         DSDT 00000001 MSFT 02000001)
ACPI: FACS 0xf57f80c0 00040
ACPI: APIC 0xf57f8100 000B8 (v01 HP     00000083 00000002      00000000)
ACPI: SPCR 0xf57f81e0 00050 (v01 HP     SPCRRBSU 00000001   ?? 0000162E)
ACPI: SRAT 0xf57f8260 00150 (v01 HP     A05      00000001      00000000)
MADT: Found IO APIC ID 4, Interrupt 0 at 0xfec00000
ioapic0: Routing external 8259A's -> intpin 0
MADT: Found IO APIC ID 5, Interrupt 24 at 0xfec10000
MADT: Found IO APIC ID 6, Interrupt 28 at 0xfec20000
MADT: Found IO APIC ID 7, Interrupt 32 at 0xfdc00000
MADT: Found IO APIC ID 8, Interrupt 36 at 0xfdc10000
MADT: Interrupt override: source 0, irq 2
ioapic0: Routing IRQ 0 -> intpin 2
lapic: Routing NMI -> LINT1
lapic: LINT1 trigger: edge
lapic: LINT1 polarity: high
MADT: Forcing active-low polarity and level trigger for SCI
ioapic0: intpin 9 polarity: low
ioapic0: intpin 9 trigger: level
ioapic0 <Version 1.1> irqs 0-23 on motherboard
ioapic1 <Version 1.1> irqs 24-27 on motherboard
ioapic2 <Version 1.1> irqs 28-31 on motherboard
ioapic3 <Version 1.1> irqs 32-35 on motherboard
ioapic4 <Version 1.1> irqs 36-39 on motherboard
cpu0 BSP:
     ID: 0x00000000   VER: 0x00040010 LDR: 0x00000000 DFR: 0xffffffff
  lint0: 0x00010700 lint1: 0x00000400 TPR: 0x00000000 SVR: 0x000001ff
  timer: 0x000100ef therm: 0x00000000 err: 0x000000f0 pmc: 0x00010400
wlan: <802.11 Link Layer>
kbd: new array size 4
kbd1 at kbdmux0
mem: <memory>
nfslock: pseudo-device
null: <null device, zero device>
random: <entropy source, Software, Yarrow>
io: <I/O>
hptrr: RocketRAID 17xx/2xxx SATA controller driver v1.2
CPU0: local APIC error 0x80
acpi0: <HP A05> on motherboard
ioapic0: routing intpin 9 (ISA IRQ 9) to lapic 0 vector 48
ACPI: SSDT 0xf57fd000 0059D (v01 HP        SSDT0 00000001 MSFT 02000001)
ACPI: Dynamic OEM Table Load:
ACPI: SSDT 0 0059D (v01 HP        SSDT0 00000001 MSFT 02000001)
ACPI: SSDT 0xf57fd700 0059D (v01 HP        SSDT1 00000001 MSFT 02000001)
ACPI: Dynamic OEM Table Load:
ACPI: SSDT 0 0059D (v01 HP        SSDT1 00000001 MSFT 02000001)
acpi0: Power Button (fixed)
nexus0: allocating range 0x4800-0x48fe for child of acpi0
	_HID=none _UID=0
	at handle=\_SB_.CFG0.PCI0.GROM
nexus0: allocating range 0x4900-0x4907 for child of acpi0
	_HID=none _UID=0
	at handle=\_SB_.CFG0.PCI0.GROM
ACPI timer: 1/2 1/2 1/2 1/1 1/1 1/2 0/4 0/4 0/4 0/4 -> 6
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <32-bit timer at 3.579545MHz> port 0x908-0x90b on acpi0
cpu0: <ACPI CPU> on acpi0
cpu0: switching to generic Cx mode
cpu1: <ACPI CPU> on acpi0
pci_link0:        Index  IRQ  Rtd  Ref  IRQs
  Initial Probe       0    7   N     0  3 5 7 10 11
  Validation          0    7   N     0  3 5 7 10 11
  After Disable       0  255   N     0  3 5 7 10 11
pci_link1:        Index  IRQ  Rtd  Ref  IRQs
  Initial Probe       0   10   N     0  3 5 7 10 11
  Validation          0   10   N     0  3 5 7 10 11
  After Disable       0  255   N     0  3 5 7 10 11
pci_link2:        Index  IRQ  Rtd  Ref  IRQs
  Initial Probe       0   11   N     0  3 5 7 10 11
  Validation          0   11   N     0  3 5 7 10 11
  After Disable       0  255   N     0  3 5 7 10 11
pci_link3:        Index  IRQ  Rtd  Ref  IRQs
  Initial Probe       0    5   N     0  3 5 7 10 11
  Validation          0    5   N     0  3 5 7 10 11
  After Disable       0  255   N     0  3 5 7 10 11
pcib0: <ACPI Host-PCI bridge> on acpi0
pci0: <ACPI PCI bus> on pcib0
pci0: domain=0, physical bus=0
found->	vendor=0x1022, dev=0x7460, revid=0x07
	domain=0, bus=0, slot=3, func=0
	class=06-04-00, hdrtype=0x01, mfdev=0
	cmdreg=0x0147, statreg=0x0230, cachelnsz=0 (dwords)
	lattimer=0x40 (1920 ns), mingnt=0x09 (2250 ns), maxlat=0x00 (0 ns)
found->	vendor=0x1022, dev=0x7468, revid=0x05
	domain=0, bus=0, slot=4, func=0
	class=06-01-00, hdrtype=0x00, mfdev=1
	cmdreg=0x0007, statreg=0x0220, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
found->	vendor=0x1022, dev=0x7469, revid=0x03
	domain=0, bus=0, slot=4, func=1
	class=01-01-8a, hdrtype=0x00, mfdev=0
	cmdreg=0x0005, statreg=0x0200, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
	map[20]: type I/O Port, range 32, base 0x2000, size  4, enabled
found->	vendor=0x1022, dev=0x746b, revid=0x05
	domain=0, bus=0, slot=4, func=3
	class=06-80-00, hdrtype=0x00, mfdev=0
	cmdreg=0x0000, statreg=0x0280, cachelnsz=0 (dwords)
	lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
found->	vendor=0x1022, dev=0x7450, revid=0x12
	domain=0, bus=0, slot=7, func=0
	class=06-04-00, hdrtype=0x01, mfdev=1
	cmdreg=0x0147, statreg=0x0230, cachelnsz=0 (dwords)
	lattimer=0x40 (1920 ns), mingnt=0x01 (250 ns), maxlat=0x00 (0 ns)
found->	vendor=0x1022, dev=0x7451, revid=0x01
	domain=0, bus=0, slot=7, func=1
	class=08-00-10, hdrtype=0x00, mfdev=0
	cmdreg=0x0006, statreg=0x0200, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
found->	vendor=0x1022, dev=0x7450, revid=0x12
	domain=0, bus=0, slot=8, func=0
	class=06-04-00, hdrtype=0x01, mfdev=1
	cmdreg=0x0147, statreg=0x0230, cachelnsz=0 (dwords)
	lattimer=0x40 (1920 ns), mingnt=0x01 (250 ns), maxlat=0x00 (0 ns)
found->	vendor=0x1022, dev=0x7451, revid=0x01
	domain=0, bus=0, slot=8, func=1
	class=08-00-10, hdrtype=0x00, mfdev=0
	cmdreg=0x0006, statreg=0x0200, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
found->	vendor=0x1022, dev=0x1100, revid=0x00
	domain=0, bus=0, slot=24, func=0
	class=06-00-00, hdrtype=0x00, mfdev=1
	cmdreg=0x0000, statreg=0x0010, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
found->	vendor=0x1022, dev=0x1101, revid=0x00
	domain=0, bus=0, slot=24, func=1
	class=06-00-00, hdrtype=0x00, mfdev=1
	cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
found->	vendor=0x1022, dev=0x1102, revid=0x00
	domain=0, bus=0, slot=24, func=2
	class=06-00-00, hdrtype=0x00, mfdev=1
	cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
found->	vendor=0x1022, dev=0x1103, revid=0x00
	domain=0, bus=0, slot=24, func=3
	class=06-00-00, hdrtype=0x00, mfdev=1
	cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
found->	vendor=0x1022, dev=0x1100, revid=0x00
	domain=0, bus=0, slot=25, func=0
	class=06-00-00, hdrtype=0x00, mfdev=1
	cmdreg=0x0000, statreg=0x0010, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
found->	vendor=0x1022, dev=0x1101, revid=0x00
	domain=0, bus=0, slot=25, func=1
	class=06-00-00, hdrtype=0x00, mfdev=1
	cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
found->	vendor=0x1022, dev=0x1102, revid=0x00
	domain=0, bus=0, slot=25, func=2
	class=06-00-00, hdrtype=0x00, mfdev=1
	cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
found->	vendor=0x1022, dev=0x1103, revid=0x00
	domain=0, bus=0, slot=25, func=3
	class=06-00-00, hdrtype=0x00, mfdev=1
	cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
pcib1: <ACPI PCI-PCI bridge> at device 3.0 on pci0
nexus0: allocating range 0x4000-0x4fff for child pcib1 of pci0
	vendor=0x1022 device=0x7460 subvendor=0x0000 subdevice=0x0000 class=0x060400
	at slot=3 function=0 handle=\_SB_.CFG0.PCI0
pcib1: failed to allocate initial I/O port window: 0x4000-0x4fff
p
Received on Sat Jun 11 2011 - 03:05:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:14 UTC