Which ACPI table for IRQ info?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
slide_rule
Posts: 16
Joined: Sat Nov 24, 2007 6:41 pm
Location: loglogdecalog

Which ACPI table for IRQ info?

Post by slide_rule »

This is one of those questions I hate to ask because I just know I've missed something stupid. I've been banging my head against the ACPI spec, google, the forums and the wiki for a few days, so here we go:

Which ACPI table has the IRQ routing/triggering/polarity info? Between my actual machine and qemu, I've hunted up the MADT, FADT, MCFG, DSDT and OEMB tables. The MADT on my real box has LAPIC structs, an IOAPIC struct and a couple interrupt override structs. I can see in linux's dmesg a whole list of PCI interrupt routings, I just can't tell where the blasted things are being parsed. They look like this:

Code: Select all

ACPI: PCI Interrupt 0000:00:01.0[A] -> GSI 16 (level, low) -> IRQ 16
I also see things like this, a little earlier on:

Code: Select all

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P9._PRT]
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 *11 12 14 15)
I've found documentation on the ACPI _PRT object, but I can't figure out how to turn that into information I can make C understand. I'm in the middle of wading through the linux source, but haven't managed to sort my way through all the function calls and macros yet. Thanks in advance for any help.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Which ACPI table for IRQ info?

Post by Brendan »

Hi,
slide_rule wrote:I've found documentation on the ACPI _PRT object, but I can't figure out how to turn that into information I can make C understand.
You're on the right track then.. :)

The problem is that the information (e.g. the _PRT object) is in AML (or "ACPI Machine Language") which is a portable byte-code language. You need an AML interpretter to execute the AML code to get the information you want. :(


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
slide_rule
Posts: 16
Joined: Sat Nov 24, 2007 6:41 pm
Location: loglogdecalog

Re: Which ACPI table for IRQ info?

Post by slide_rule »

Brendan wrote: The problem is that the information (e.g. the _PRT object) is in AML (or "ACPI Machine Language") which is a portable byte-code language. You need an AML interpretter to execute the AML code to get the information you want. :(
Brendan
That's what I was afraid of. :( indeed. Ok, thanks very much. And all that is in the "n bytes of AML code" in the DSDT?
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Which ACPI table for IRQ info?

Post by Brendan »

Hi,
slide_rule wrote:And all that is in the "n bytes of AML code" in the DSDT?
Yes - all the AML is in the DSDT.

There's also an open source package made by Intel that (AFAIK) includes an AML interpretter, called "ACPI CA" (or ACPI Component Architecture). This is the same stuff Linux uses for it's ACPI support...


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Post Reply