* Understandig ACPI routing PCI IRQ
@ 2006-11-19 16:12 Niccolo Rigacci
2006-11-20 16:49 ` Bjorn Helgaas
2006-12-11 5:44 ` Len Brown
0 siblings, 2 replies; 3+ messages in thread
From: Niccolo Rigacci @ 2006-11-19 16:12 UTC (permalink / raw)
To: linux-acpi
Hi, I'm trying to write a little howto about IRQ on modern PCs.
I still have some obscure points, can someone help me
understanding the following dmesg messages?
ACPI: PCI Interrupt Link [LNK1] (IRQs *5 7 9 10 11 14 15)
ACPI: PCI Interrupt Link [APSI] (IRQs 20 21 22 23) *0, disabled.
Is the label [APSI] coming from the BIOS? I see several labels in
dmesg like LNK1, LUBA, LSID, APC1, ... what is the meaning?
What it the IRQs list? Are those the possible values to route
that phisical link to?
Why some PCI interrupt links are assigned at the very begin of
boot process, where others are first disabled and then enabled
later?
ACPI: PCI Interrupt Link [APSI] enabled at IRQ 23
ACPI: PCI Interrupt 0000:00:0e.0[A] -> Link [APSI] -> GSI 23 (level, low) -> IRQ 185
In the above log entries, what does it means GSI?
I understand that in PCI slot 0e, there is a device 0, that uses
the first slot interrupt line (INTA#), which is routed to the CPU
IRQ 185. But what there is in the middle?
If someone knows detailed explanation of lspci and dmesg, give me
a pointer.
Thank you very much.
--
Niccolo Rigacci
Firenze - Italy
Iraq, missione di pace: 47249 morti - www.iraqbodycount.net
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Understandig ACPI routing PCI IRQ
2006-11-19 16:12 Understandig ACPI routing PCI IRQ Niccolo Rigacci
@ 2006-11-20 16:49 ` Bjorn Helgaas
2006-12-11 5:44 ` Len Brown
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2006-11-20 16:49 UTC (permalink / raw)
To: Niccolo Rigacci; +Cc: linux-acpi
On Sunday 19 November 2006 09:12, Niccolo Rigacci wrote:
> Hi, I'm trying to write a little howto about IRQ on modern PCs.
>
> I still have some obscure points, can someone help me
> understanding the following dmesg messages?
>
> ACPI: PCI Interrupt Link [LNK1] (IRQs *5 7 9 10 11 14 15)
> ACPI: PCI Interrupt Link [APSI] (IRQs 20 21 22 23) *0, disabled.
>
> Is the label [APSI] coming from the BIOS?
Yes. The PCI interrupt link is a device in the ACPI namespace, and
"APSI" is the name of it.
> I see several labels in
> dmesg like LNK1, LUBA, LSID, APC1, ... what is the meaning?
These names are completely arbitrary and are made up by the BIOS
writer. There's no consistency between different BIOSes.
> What it the IRQs list? Are those the possible values to route
> that phisical link to?
Yes. The ACPI link device shows the "possible" resource settings,
which are printed as this list. The currently setting is shown
with the "*".
> Why some PCI interrupt links are assigned at the very begin of
> boot process, where others are first disabled and then enabled
> later?
We currently disable all PCI interrupt links initially at the end
of acpi_pci_link_add().
We used to route all PCI interrupts at boot-time. That was
somewhat wasteful because we assigned IRQs for devices that
didn't have drivers, for unused PCI interrupt lines (if device
0000:00:0e.0 used INTA#, we assigned IRQs for the unused INTB#,
INTC#, and INTD# lines as well), and even for empty slots.
We now route the interrupt when the device driver calls
pci_enable_device().
> ACPI: PCI Interrupt Link [APSI] enabled at IRQ 23
> ACPI: PCI Interrupt 0000:00:0e.0[A] -> Link [APSI] -> GSI 23 (level, low) -> IRQ 185
>
> In the above log entries, what does it means GSI?
"GSI" is an ACPI term that means "global system interrupt." There's
some discussion in section 5.2.12 of the ACPI 3.0 spec. Basically
it's a number that identifies either an I/O APIC interrupt input or
a legacy 8259 IRQ.
For every I/O APIC in the system, ACPI tells you the base GSI and
the APIC type and address (this is either in the MADT or in _MAT
objects). Given the type (IOAPIC, IOSAPIC, etc) and the address,
you can read the APIC "Max Redir Entry" register to find out how
many interrupt inputs it has.
So if you have this:
GSI base #inputs
IOAPIC 0 32 16
IOAPIC 1 48 16
IOAPIC 2 64 8
GSIs 32-47 correspond to inputs on IOAPIC 0, GSIs 48-63 correspond
to IOAPIC 1, and GSIs 64-71 correspond to IOAPIC 2.
The GSI numbers are determined by the BIOS. The Linux IRQ numbers
(e.g., IRQ 185) are determined by the OS.
> I understand that in PCI slot 0e, there is a device 0, that uses
> the first slot interrupt line (INTA#), which is routed to the CPU
> IRQ 185. But what there is in the middle?
I don't know much about the link devices.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Understandig ACPI routing PCI IRQ
2006-11-19 16:12 Understandig ACPI routing PCI IRQ Niccolo Rigacci
2006-11-20 16:49 ` Bjorn Helgaas
@ 2006-12-11 5:44 ` Len Brown
1 sibling, 0 replies; 3+ messages in thread
From: Len Brown @ 2006-12-11 5:44 UTC (permalink / raw)
To: Niccolo Rigacci; +Cc: linux-acpi
On Sunday 19 November 2006 11:12, Niccolo Rigacci wrote:
> Hi, I'm trying to write a little howto about IRQ on modern PCs.
>
> I still have some obscure points, can someone help me
> understanding the following dmesg messages?
>
> ACPI: PCI Interrupt Link [LNK1] (IRQs *5 7 9 10 11 14 15)
> ACPI: PCI Interrupt Link [APSI] (IRQs 20 21 22 23) *0, disabled.
>
> Is the label [APSI] coming from the BIOS? I see several labels in
> dmesg like LNK1, LUBA, LSID, APC1, ... what is the meaning?
Arbitrary 4-character AML names chosen by the BIOS programmer
for ACPI PCI Interrupt Link devices.
There are basically two modes, PIC mode and APIC mode.
It is common for programmers to use names that begin with 'A"
for APIC mode devices -- which clearly is the case above
since the GSI's are above 15.
> What it the IRQs list? Are those the possible values to route
> that phisical link to?
Yes, as communicated by the BIOS AML _PRS -- Possibile resource settings.
> Why some PCI interrupt links are assigned at the very begin of
> boot process, where others are first disabled and then enabled
> later?
>
> ACPI: PCI Interrupt Link [APSI] enabled at IRQ 23
> ACPI: PCI Interrupt 0000:00:0e.0[A] -> Link [APSI] -> GSI 23 (level, low) -> IRQ 185
>
> In the above log entries, what does it means GSI?
GSI = Global System Interrupt.
Ie. interrupts as seen as a single list from 0..n for the entire system.
This used to be synonymous with the IRQ#, but got screwed up by
the MSI code and also some platforms specific IRQ re-numbering code
that make the IRQ numbers look "funny". Some of this code is being
un-done now and the GSI and IRQ will more often be the same
in 2.6.19 onward.
> I understand that in PCI slot 0e, there is a device 0, that uses
> the first slot interrupt line (INTA#), which is routed to the CPU
> IRQ 185. But what there is in the middle?
That is the ACPI PCI Interrupt Link. Its name is APSI and per the message
above it could be programmed to 20, 21, 22, or 23. Here Linux chose 23 --
which will depend on what other devices are in the system and the probe order.
> If someone knows detailed explanation of lspci and dmesg, give me
> a pointer.
Well, the other part of the dmesg line above it the '*' which tells you where
the link is currently programmed. Generally Linux tries to not move IRQs
in PIC mode, but by default will balance them in IO-APIC mode to minimize
sharing.
cheers,
-Len
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-12-11 5:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-19 16:12 Understandig ACPI routing PCI IRQ Niccolo Rigacci
2006-11-20 16:49 ` Bjorn Helgaas
2006-12-11 5:44 ` Len Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox