[PATCH] Add support for NEW_PCIB to ia64

Marcel Moolenaar marcel at xcllnt.net
Sat Jul 16 15:43:01 UTC 2011


On Jul 15, 2011, at 1:19 PM, John Baldwin wrote:

> Since ia64 uses ACPI, I believe that all it needs is a bus_adjust_resource()
> method in its nexus driver to support the new PCI-PCI bridge driver (and the
> other patches I posted to current@ recently in regards to Host-PCI bridge
> driver decoding ranges).  Can someone try this patch and boot with a kernel
> with 'options NEW_PCIB' to check for any regressions?

Looks good. However, (see below) no devices are attached to the only
real PCI-PCI bridges in this system (the PCIe root ports). Let me know
if that's ok or whether it helps to use my machines so that I can plug
something in a slot (I don't have physical access to this one without
annoying Sean :-)


OK boot -v
Entering /boot/kernel/kernel at 0x9ffc000000010500...
	:
FreeBSD 9.0-CURRENT #7 r224075M: Sat Jul 16 15:16:13 UTC 2011
    marcel at eris.freebsd.org:/usr/obj/tank/usr/src/sys/ERIS ia64
	:
CPU: Montvale (1666 Mhz Itanium 2)
	:
real memory  = 17106690048 (16314 MB)
	:
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
	:
acpi0: <HP> on motherboard
	:
pcib0: <ACPI Host-PCI bridge> on acpi0
pcib0: decoding 3 range 0xff5e2000-0xff5e2007
pcib0: decoding 4 range 0-0xffff
pcib0: decoding 3 range 0xa0000-0xfffff
pcib0: decoding 3 range 0x80000000-0x8fffffff
pcib0: decoding 3 range 0x80004000000-0x800ffffffff
pci0: <ACPI PCI bus> on pcib0
pci0: domain=0, physical bus=0
found->	vendor=0x103c, dev=0x1303, revid=0x00
	domain=0, bus=0, slot=1, func=0
	class=ff-00-00, hdrtype=0x00, mfdev=1
	cmdreg=0x0144, statreg=0x0290, cachelnsz=32 (dwords)
	lattimer=0x80 (3840 ns), mingnt=0x00 (0 ns), maxlat=0x01 (250 ns)
	intpin=a, irq=0
	powerspec 2  supports D0 D3  current D0
	MSI supports 4 messages, 64 bit
pcib0: matched entry for 0.1.INTA
pcib0: slot 1 INTA hardwired to IRQ 16
found->	vendor=0x103c, dev=0x1302, revid=0x00
	domain=0, bus=0, slot=1, func=1
	class=07-80-00, hdrtype=0x00, mfdev=1
	cmdreg=0x0146, statreg=0x0290, cachelnsz=32 (dwords)
	lattimer=0x80 (3840 ns), mingnt=0x00 (0 ns), maxlat=0x01 (250 ns)
	intpin=a, irq=0
	powerspec 2  supports D0 D3  current D0
	MSI supports 8 messages, 64 bit
	map[14]: type Memory, range 64, base 0x88034000, size 12, enabled
pcib0: allocated type 3 (0x88034000-0x88034fff) for rid 14 of pci0:0:1:1
	map[1c]: type Prefetchable Memory, range 64, base 0x80080000000, size 17, enabled
pcib0: allocated type 3 (0x80080000000-0x8008001ffff) for rid 1c of pci0:0:1:1
pcib0: matched entry for 0.1.INTA
pcib0: slot 1 INTA hardwired to IRQ 16
found->	vendor=0x103c, dev=0x1048, revid=0x00
	domain=0, bus=0, slot=1, func=2
	class=07-00-02, hdrtype=0x00, mfdev=1
	cmdreg=0x0146, statreg=0x0290, cachelnsz=32 (dwords)
	lattimer=0x80 (3840 ns), mingnt=0x00 (0 ns), maxlat=0x01 (250 ns)
	intpin=a, irq=0
	powerspec 2  supports D0 D3  current D0
	MSI supports 4 messages, 64 bit
	map[14]: type Memory, range 64, base 0x88033000, size 12, enabled
pcib0: allocated type 3 (0x88033000-0x88033fff) for rid 14 of pci0:0:1:2
pcib0: matched entry for 0.1.INTA
pcib0: slot 1 INTA hardwired to IRQ 16
found->	vendor=0x1033, dev=0x0035, revid=0x43
	domain=0, bus=0, slot=2, func=0
	class=0c-03-10, hdrtype=0x00, mfdev=1
	cmdreg=0x0146, statreg=0x0210, cachelnsz=32 (dwords)
	lattimer=0x80 (3840 ns), mingnt=0x01 (250 ns), maxlat=0x2a (10500 ns)
	intpin=a, irq=0
	powerspec 2  supports D0 D1 D2 D3  current D0
	map[10]: type Memory, range 32, base 0x88032000, size 12, enabled
pcib0: allocated type 3 (0x88032000-0x88032fff) for rid 10 of pci0:0:2:0
pcib0: matched entry for 0.2.INTA
pcib0: slot 2 INTA hardwired to IRQ 17
found->	vendor=0x1033, dev=0x0035, revid=0x43
	domain=0, bus=0, slot=2, func=1
	class=0c-03-10, hdrtype=0x00, mfdev=0
	cmdreg=0x0146, statreg=0x0210, cachelnsz=32 (dwords)
	lattimer=0x80 (3840 ns), mingnt=0x01 (250 ns), maxlat=0x2a (10500 ns)
	intpin=b, irq=0
	powerspec 2  supports D0 D1 D2 D3  current D0
	map[10]: type Memory, range 32, base 0x88031000, size 12, enabled
pcib0: allocated type 3 (0x88031000-0x88031fff) for rid 10 of pci0:0:2:1
pcib0: matched entry for 0.2.INTB
pcib0: slot 2 INTB hardwired to IRQ 18
found->	vendor=0x1033, dev=0x00e0, revid=0x04
	domain=0, bus=0, slot=2, func=2
	class=0c-03-20, hdrtype=0x00, mfdev=0
	cmdreg=0x0146, statreg=0x0210, cachelnsz=32 (dwords)
	lattimer=0x80 (3840 ns), mingnt=0x10 (4000 ns), maxlat=0x22 (8500 ns)
	intpin=c, irq=0
	powerspec 2  supports D0 D1 D2 D3  current D0
	map[10]: type Memory, range 32, base 0x88030000, size  8, enabled
pcib0: allocated type 3 (0x88030000-0x880300ff) for rid 10 of pci0:0:2:2
pcib0: matched entry for 0.2.INTC
pcib0: slot 2 INTC hardwired to IRQ 19
found->	vendor=0x1002, dev=0x515e, revid=0x02
	domain=0, bus=0, slot=3, func=0
	class=03-00-00, hdrtype=0x00, mfdev=0
	cmdreg=0x0187, statreg=0x0290, cachelnsz=32 (dwords)
	lattimer=0x80 (3840 ns), mingnt=0x08 (2000 ns), maxlat=0x00 (0 ns)
	intpin=a, irq=255
	powerspec 2  supports D0 D1 D2 D3  current D0
	map[10]: type Prefetchable Memory, range 32, base 0x80000000, size 27, enabled
pcib0: allocated type 3 (0x80000000-0x87ffffff) for rid 10 of pci0:0:3:0
	map[14]: type I/O Port, range 32, base 0x1000, size  8, enabled
pcib0: allocated type 4 (0x1000-0x10ff) for rid 14 of pci0:0:3:0
	map[18]: type Memory, range 32, base 0x88020000, size 16, enabled
pcib0: allocated type 3 (0x88020000-0x8802ffff) for rid 18 of pci0:0:3:0
	:
pcib1: <ACPI Host-PCI bridge> on acpi0
pcib1: decoding 4 range 0-0xffff
pcib1: decoding 3 range 0xa0000000-0xafffffff
pcib1: decoding 3 range 0x80204000000-0x802ffffffff
pci1: <ACPI PCI bus> on pcib1
pci1: domain=0, physical bus=1
found->	vendor=0x1000, dev=0x0054, revid=0x01
	domain=0, bus=1, slot=1, func=0
	class=01-00-00, hdrtype=0x00, mfdev=0
	cmdreg=0x0147, statreg=0x0230, cachelnsz=32 (dwords)
	lattimer=0x40 (1920 ns), mingnt=0x40 (16000 ns), maxlat=0x0a (2500 ns)
	intpin=a, irq=0
	powerspec 2  supports D0 D1 D2 D3  current D0
	MSI supports 1 message, 64 bit
	MSI-X supports 1 message in map 0x14
	map[10]: type I/O Port, range 32, base 0x1000, size  8, enabled
	map[14]: type Memory, range 64, base 0xa0470000, size 14, enabled
pcib1: allocated type 3 (0xa0470000-0xa0473fff) for rid 14 of pci0:1:1:0
	map[1c]: type Memory, range 64, base 0xa0460000, size 16, enabled
pcib1: allocated type 3 (0xa0460000-0xa046ffff) for rid 1c of pci0:1:1:0
pcib1: matched entry for 1.1.INTA
pcib1: slot 1 INTA hardwired to IRQ 27
found->	vendor=0x14e4, dev=0x1648, revid=0x10
	domain=0, bus=1, slot=2, func=0
	class=02-00-00, hdrtype=0x00, mfdev=1
	cmdreg=0x0146, statreg=0x02b0, cachelnsz=32 (dwords)
	lattimer=0x40 (1920 ns), mingnt=0x40 (16000 ns), maxlat=0x00 (0 ns)
	intpin=a, irq=29
	powerspec 2  supports D0 D3  current D0
	MSI supports 8 messages, 64 bit
	map[10]: type Memory, range 64, base 0xa0450000, size 16, enabled
pcib1: allocated type 3 (0xa0450000-0xa045ffff) for rid 10 of pci0:1:2:0
pcib1: matched entry for 1.2.INTA
pcib1: slot 2 INTA hardwired to IRQ 29
found->	vendor=0x14e4, dev=0x1648, revid=0x10
	domain=0, bus=1, slot=2, func=1
	class=02-00-00, hdrtype=0x00, mfdev=1
	cmdreg=0x0146, statreg=0x02b0, cachelnsz=32 (dwords)
	lattimer=0x40 (1920 ns), mingnt=0x40 (16000 ns), maxlat=0x00 (0 ns)
	intpin=b, irq=30
	powerspec 2  supports D0 D3  current D0
	MSI supports 8 messages, 64 bit
	map[10]: type Memory, range 64, base 0xa0440000, size 16, enabled
pcib1: allocated type 3 (0xa0440000-0xa044ffff) for rid 10 of pci0:1:2:1
pcib1: matched entry for 1.2.INTB
pcib1: slot 2 INTB hardwired to IRQ 30
mpt0: <LSILogic SAS/SATA Adapter> mem 0xa0470000-0xa0473fff,0xa0460000-0xa046ffff irq 27 at device 1.0 on pci1
pcib1: allocated type 4 (0-0xff) for rid 10 of mpt0
mpt0: Lazy allocation of 0x100 bytes rid 0x10 type 4 at 0
	:
pcib2: <ACPI Host-PCI bridge> on acpi0
pcib2: decoding 4 range 0-0xffff
pcib2: decoding 3 range 0xb0000000-0xbfffffff
pcib2: decoding 3 range 0x80304000000-0x803ffffffff
pci2: <ACPI PCI bus> on pcib2
pci2: domain=0, physical bus=2
found->	vendor=0x103c, dev=0x403b, revid=0x00
	domain=0, bus=2, slot=0, func=0
	class=06-04-00, hdrtype=0x01, mfdev=0
	cmdreg=0x0147, statreg=0x0010, cachelnsz=32 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x03 (750 ns), maxlat=0x00 (0 ns)
	intpin=a, irq=0
	powerspec 3  supports D0 D3  current D0
	MSI supports 2 messages, 64 bit
pcib2: matched entry for 2.0.INTA
pcib2: slot 0 INTA hardwired to IRQ 38
pcib3: <ACPI PCI-PCI bridge> irq 38 at device 0.0 on pci2
pcib3: failed to allocate initial I/O port window: 0x1000-0xffff
pcib2: allocated type 3 (0xb0000000-0xbfffffff) for rid 20 of pcib3
pcib2: allocated type 3 (0x80380000000-0x803ffffffff) for rid 24 of pcib3
pcib3:   domain            0
pcib3:   secondary bus     3
pcib3:   subordinate bus   3
pcib3:   memory decode     0xb0000000-0xbfffffff
pcib3:   prefetched decode 0x80380000000-0x803ffffffff
pcib3: could not get PCI interrupt routing table for \_SB_.SBA0.L003.RP00 - AE_NOT_FOUND
pci3: <ACPI PCI bus> on pcib3
pci3: domain=0, physical bus=3
pcib4: <ACPI Host-PCI bridge> on acpi0
pcib4: decoding 4 range 0-0xffff
pcib4: decoding 3 range 0xe0000000-0xefffffff
pcib4: decoding 3 range 0x80604000000-0x806ffffffff
pci4: <ACPI PCI bus> on pcib4
pci4: domain=0, physical bus=4
pcib5: <ACPI Host-PCI bridge> on acpi0
pcib5: decoding 4 range 0-0xffff
pcib5: decoding 3 range 0xf0000000-0xfdffffff
pcib5: decoding 3 range 0x80704000000-0x807ffffffff
pci5: <ACPI PCI bus> on pcib5
pci5: domain=0, physical bus=5
found->	vendor=0x103c, dev=0x403b, revid=0x00
	domain=0, bus=5, slot=0, func=0
	class=06-04-00, hdrtype=0x01, mfdev=0
	cmdreg=0x0147, statreg=0x0010, cachelnsz=32 (dwords)
	lattimer=0x00 (0 ns), mingnt=0x03 (750 ns), maxlat=0x00 (0 ns)
	intpin=a, irq=0
	powerspec 3  supports D0 D3  current D0
	MSI supports 2 messages, 64 bit
pcib5: matched entry for 5.0.INTA
pcib5: slot 0 INTA hardwired to IRQ 56
pcib6: <ACPI PCI-PCI bridge> irq 56 at device 0.0 on pci5
pcib6: failed to allocate initial I/O port window: 0x1000-0xffff
pcib5: allocated type 3 (0xf0000000-0xfdffffff) for rid 20 of pcib6
pcib5: allocated type 3 (0x80780000000-0x807ffffffff) for rid 24 of pcib6
pcib6:   domain            0
pcib6:   secondary bus     6
pcib6:   subordinate bus   6
pcib6:   memory decode     0xf0000000-0xfdffffff
pcib6:   prefetched decode 0x80780000000-0x807ffffffff
pcib6: could not get PCI interrupt routing table for \_SB_.SBA0.L007.RP00 - AE_NOT_FOUND
pci6: <ACPI PCI bus> on pcib6
pci6: domain=0, physical bus=6
	:
*snip*
	:
Sat Jul 16 15:22:13 UTC 2011

FreeBSD/ia64 (eris.freebsd.org) (ttyu0)

login: 



eris# pciconf -lv
	*snip*
pcib3 at pci0:2:0:0:       class=0x060400 card=0x00000000 chip=0x403b103c rev=0x00 hdr=0x01
    vendor     = 'Hewlett-Packard Company'
    device     = 'PCIe Root Port'
    class      = bridge
    subclass   = PCI-PCI
pcib6 at pci0:5:0:0:       class=0x060400 card=0x00000000 chip=0x403b103c rev=0x00 hdr=0x01
    vendor     = 'Hewlett-Packard Company'
    device     = 'PCIe Root Port'
    class      = bridge
    subclass   = PCI-PCI


FYI,

-- 
Marcel Moolenaar
marcel at xcllnt.net




More information about the freebsd-ia64 mailing list