problems with PRT and PCI routing table
Hi everybody,
I've got some serious problems with ACPI and the IRQ mapping for my devices. (look at my postings "mpparse.c APIC/ACPI support" and "APIC, USB mouse and errors").
It seems that not all devices get the IRQs they should regarding the PRT table. I've verified it and it seems that the table is all right (attachment "PRT_table.txt"). Especially the devices 00:00:10, 00:00:11 and 00:00:12 which point to "\_SB_.PCI0.ALKx[0]" (x=A..D) don't get the interrupts they should regarding the table.
There's perhaps a problem in "acpi_pci_link_add" (pci_link.c), because the function returns ...
<4>ACPI: PCI Interrupt Link [ALKA] (IRQs 20, disabled) <4>ACPI: PCI Interrupt Link [ALKB] (IRQs 21, disabled) <4>ACPI: PCI Interrupt Link [ALKC] (IRQs 22, disabled) <4>ACPI: PCI Interrupt Link [ALKD] (IRQs 23, disabled)
... or "acpi_pci_link_get_current" (pci_link.c) has got a problem ? ...
<4>pci_link-0252 [18] acpi_pci_link_get_curr: No IRQ resource found <4>pci_link-0252 [20] acpi_pci_link_get_curr: No IRQ resource found <4>pci_link-0252 [22] acpi_pci_link_get_curr: No IRQ resource found <4>pci_link-0252 [24] acpi_pci_link_get_curr: No IRQ resource found
I don't know which function I should "blame" - I only know that everything works fine for LNKA-D but not for ALKA-D:
<4>ACPI: PCI Interrupt Link [LNKA] (IRQs 1 3 4 5 6 7 10 *11 12 14 15) <4>ACPI: PCI Interrupt Link [LNKB] (IRQs 1 3 4 5 6 7 *10 11 12 14 15) <4>ACPI: PCI Interrupt Link [LNKC] (IRQs 1 3 4 5 6 7 10 11 *12 14 15) <4>ACPI: PCI Interrupt Link [LNKD] (IRQs 1 3 4 5 6 7 10 11 12 *14 15)
So this causes a lot of linked errors. First of all I get a lot of "<7>Pin 2-xx already programmed" (mp_parse_prt / mpparse.c) messages. Next, "acpi_pci_irq_lookup" (pci_irq.c) fails because it can't find the PRT entries and "acpi_pci_link_get_irq", "acpi_pci_irq_lookup" and "acpi_pci_irq_derive" also fail.
And finally "eisa_set_level_irq" is not called in "acpi_pci_irq_enable" which results in non-functional devices which require a "level" trigger mode.
So could one of the hardware experts pleeeeease help me ???
MANY MANY MANY THANKS in advance,
HOLGER W.
P.S.: if you need more information about my boot messages or sth. similar - feel free to ask for it !!!
<7>ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
<4>PRT entry: 00:00:08[A] -> [16] <4>PRT entry: 00:00:08[B] -> [17] <4>PRT entry: 00:00:08[C] -> [18] <4>PRT entry: 00:00:08[D] -> [19] <4>PRT entry: 00:00:09[A] -> [17] <4>PRT entry: 00:00:09[B] -> [18] <4>PRT entry: 00:00:09[C] -> [19] <4>PRT entry: 00:00:09[D] -> [16] <4>PRT entry: 00:00:0A[A] -> [18] <4>PRT entry: 00:00:0A[B] -> [19] <4>PRT entry: 00:00:0A[C] -> [16] <4>PRT entry: 00:00:0A[D] -> [17] <4>PRT entry: 00:00:0B[A] -> [19] <4>PRT entry: 00:00:0B[B] -> [16] <4>PRT entry: 00:00:0B[C] -> [17] <4>PRT entry: 00:00:0B[D] -> [18] <4>PRT entry: 00:00:0C[A] -> [18] <4>PRT entry: 00:00:0C[B] -> [19] <4>PRT entry: 00:00:0C[C] -> [16] <4>PRT entry: 00:00:0C[D] -> [17] <4>PRT entry: 00:00:0D[A] -> [19] <4>PRT entry: 00:00:0D[B] -> [16] <4>PRT entry: 00:00:0D[C] -> [17] <4>PRT entry: 00:00:0D[D] -> [18] <4>PRT entry: 00:00:0E[A] -> [17] <4>PRT entry: 00:00:0E[B] -> [18] <4>PRT entry: 00:00:0E[C] -> [19] <4>PRT entry: 00:00:0E[D] -> [16] <4>PRT entry: 00:00:10[A] -> \_SB_.PCI0.ALKB[0] <4>PRT entry: 00:00:10[B] -> \_SB_.PCI0.ALKB[0] <4>PRT entry: 00:00:10[C] -> \_SB_.PCI0.ALKB[0] <4>PRT entry: 00:00:10[D] -> \_SB_.PCI0.ALKB[0] <4>PRT entry: 00:00:11[A] -> \_SB_.PCI0.ALKA[0] <4>PRT entry: 00:00:11[B] -> \_SB_.PCI0.ALKB[0] <4>PRT entry: 00:00:11[C] -> \_SB_.PCI0.ALKC[0] <4>PRT entry: 00:00:11[D] -> \_SB_.PCI0.ALKD[0] <4>PRT entry: 00:00:01[A] -> [16] <4>PRT entry: 00:00:01[B] -> [17] <4>PRT entry: 00:00:01[C] -> [18] <4>PRT entry: 00:00:01[D] -> [19] <4>PRT entry: 00:00:12[A] -> \_SB_.PCI0.ALKD[0] <4>PRT entry: 00:00:12[B] -> \_SB_.PCI0.ALKD[0] <4>PRT entry: 00:00:12[C] -> \_SB_.PCI0.ALKD[0] <4>PRT entry: 00:00:12[D] -> \_SB_.PCI0.ALKD[0]
A message that is not in the archive (sent off-list or not yet received): [email protected]
I have to correct myself again. Let me see if I understood everything ...
First of all my PCI interrupt links are detected and I get messages like "ACPI: PCI Interrupt Link [ALKA] (IRQs 20, disabled)". "Disabled" means in this special case that we have to choose/enable an IRQ later.
Now "acpi_pci_irq_init" is called and we have the following calling-structure ...
acpi_irq_init {
-> acpi_pci_link_check -> acpi_pci_link_set
-> mp_parse_prt
-> iosapic_parse_prt
-> acpi_pci_irq_enable
}
"acpi_pci_link_check" will check all my devices for valid IRQs. In my special case it tries to find an IRQ for my interrupt link ALKA. Because we don't have more than one IRQ (20) for ALKA, we don't have a big choice. The attempt to set the IRQ for the link is done by "acpi_pci_link_set".
Now we're here:
acpi_pci_link_set {
-> acpi_set_current_resources
-> acpi_bus_get_status
-> acpi_pci_link_get_current
}
Everything works fine at this point up to "acpi_pci_link_get_current". And now we're one more step further ...
acpi_pci_link_get_current {
-> acpi_bus_get_status
-> acpi_walk_resources -> acpi_pci_link_check_current
}
And after "acpi_walk_resources" ist the point where we fail. The condition "if (!irq)" is true because "acpi_pci_link_get_current" returns with the error "pci_link-0262 [21]acpi_pci_link_get_curr: No IRQ resource found".
That is we have an error in "acpi_pci_link_set" and we will return with this code fragment to "acpi_pci_link_check":
result = acpi_pci_link_get_current(link);
if (result) {
return_VALUE(result);
}Because we failed in "acpi_pci_link_get_current" the irq variable is NULL and we get a message like "ACPI: PCI Interrupt Link [ALKA] enabled at IRQ 0".
Now we're back in "acpi_pci_irq_init". Another problem could be located in "mp_parse_prt":
/* We're only interested in static (non-link) entries. */ if (entry->link.handle)
continue;
I don't understand why only non-link entries are being used !
However, all side effects I mentioned in the last posting will occur due to these errors ... I hope I now analyzed the code properly. Would be nice if some developers could comment :-)
Thanks for your attention !!!
HOLGER W.
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com