Page 1 of 1

ACPI PCI routing

Posted: Thu Nov 11, 2010 5:26 pm
by Matthew
Hi,

I have an operating system that supports ACPI (via ACPICA) and PCI.
Currently, I am routing my PCI interrupts by examining the old Intel
Multiprocessor Spec table entries. I would like to use the PCI
Routing Table entries from ACPI. However, I am confused about
identifying non-root PCI buses.

Here is my debug dump of the ACPI PRT for PCI bus 0:

Code: Select all

\_SB_.PCI0: 
     PCI_ROOT STA FFFFFFFF ADR 00000000 HID PNP0A08 CID
  PRT entry: len=24 pin=0 addr=0000FFFF fixed IRQ=0x35
  PRT entry: len=24 pin=0 addr=0001FFFF fixed IRQ=0x35
  PRT entry: len=24 pin=0 addr=0002FFFF fixed IRQ=0x35
  PRT entry: len=24 pin=0 addr=0003FFFF fixed IRQ=0x35
  PRT entry: len=24 pin=0 addr=0004FFFF fixed IRQ=0x35
  PRT entry: len=24 pin=0 addr=0005FFFF fixed IRQ=0x35
  PRT entry: len=24 pin=0 addr=0006FFFF fixed IRQ=0x35
  PRT entry: len=24 pin=0 addr=0007FFFF fixed IRQ=0x35
  PRT entry: len=24 pin=0 addr=0008FFFF fixed IRQ=0x35
  PRT entry: len=24 pin=0 addr=0009FFFF fixed IRQ=0x35
  PRT entry: len=24 pin=0 addr=000AFFFF fixed IRQ=0x35
  PRT entry: len=24 pin=0 addr=000DFFFF fixed IRQ=0x35
  PRT entry: len=24 pin=0 addr=0016FFFF fixed IRQ=0x33
  PRT entry: len=24 pin=1 addr=0016FFFF fixed IRQ=0x34
  PRT entry: len=24 pin=2 addr=0016FFFF fixed IRQ=0x35
  PRT entry: len=24 pin=3 addr=0016FFFF fixed IRQ=0x36
  PRT entry: len=24 pin=0 addr=001AFFFF fixed IRQ=0x11
  PRT entry: len=24 pin=1 addr=001AFFFF fixed IRQ=0x12
  PRT entry: len=24 pin=2 addr=001AFFFF fixed IRQ=0x13
  PRT entry: len=24 pin=0 addr=001CFFFF fixed IRQ=0x10
  PRT entry: len=24 pin=1 addr=001CFFFF fixed IRQ=0x11
  PRT entry: len=24 pin=2 addr=001CFFFF fixed IRQ=0x12
  PRT entry: len=24 pin=3 addr=001CFFFF fixed IRQ=0x13
  PRT entry: len=24 pin=0 addr=001DFFFF fixed IRQ=0x15
  PRT entry: len=24 pin=1 addr=001DFFFF fixed IRQ=0x14
  PRT entry: len=24 pin=2 addr=001DFFFF fixed IRQ=0x15
  PRT entry: len=24 pin=3 addr=001DFFFF fixed IRQ=0x14
  PRT entry: len=24 pin=0 addr=001FFFFF fixed IRQ=0x10
  PRT entry: len=24 pin=1 addr=001FFFFF fixed IRQ=0x11
  PRT entry: len=24 pin=2 addr=001FFFFF fixed IRQ=0x17
  PRT entry: len=24 pin=3 addr=001FFFFF fixed IRQ=0x16
As far as I can tell, this information agrees with my Intel MP spec
parse. Now here is the dump of bus 1, which I believe has my Broadcom
PCIe built-in network card:

Code: Select all

\_SB_.PCI0.PEX1: 
     STA FFFFFFFF ADR 00010000
  PRT entry: len=24 pin=0 addr=0000FFFF fixed IRQ=0x24
  PRT entry: len=24 pin=1 addr=0000FFFF fixed IRQ=0x30
  PRT entry: len=24 pin=2 addr=0000FFFF fixed IRQ=0x31
  PRT entry: len=24 pin=3 addr=0000FFFF fixed IRQ=0x37
My understanding from the ADR field is that this is an encoding of
"PCI Express" bus 1, and the IRQ assignments do agree with those in
the Intel MP spec for bus 1.

But my PCI space probing also reveals my Realtek PCIe add-on network
card which is found on bus 2. Intel MP spec has entries for bus 2,
and the card works fine in my OS using that. But ACPI has nothing to
say about bus 2. Instead I've identified the same pattern of IRQ
assignments in this dump:

Code: Select all

\_SB_.PCI0.PEXA: 
     STA FFFFFFFF ADR 000A0000
  PRT entry: len=24 pin=0 addr=0000FFFF fixed IRQ=0x29
  PRT entry: len=24 pin=1 addr=0000FFFF fixed IRQ=0x27
  PRT entry: len=24 pin=2 addr=0000FFFF fixed IRQ=0x36
  PRT entry: len=24 pin=3 addr=0000FFFF fixed IRQ=0x35
There is no bus=0xA found in Intel MP spec tables, nor in PCI probing.
How am I supposed to identify this as the Realtek's IRQ routing table?

Re: ACPI PCI routing

Posted: Fri Nov 12, 2010 7:06 pm
by Cognition
Hi, 0x000A is not the bus number, but the device number, probably identifying a bridge device. You should be able to determine from the bridge header what which bus is behind the bridge. The PCI-to-PCI Bridge Architecture specification lays out how interrupt pins are allocated to devices behind a bridge.

Re: ACPI PCI routing

Posted: Mon Nov 15, 2010 4:31 pm
by Matthew
Thanks, that seems to do the trick.