ACPI PCI routing problem
Hi, I have an Epox 8RDA+ NForce2-based motherboard (uniprocessor, Athlon XP). This board has an IO-APIC with 0x17 pins. I can't tell you much more specific about it, as it is in the nforce2 chipset to which I do not have docs. I'm using kernel 2.5.74, with APIC, IO-APIC, ACPI turned on.
First of all, here are the symptoms:
Kernel boots OK, devices with IRQs <=15 are fine. However, the system attempts to allocate some devices (e.g. USB) to IRQs 20 and 21, as told by the AML code in my BIOS (more on this later).
The USB busses do not work. The devices are detected, but all attempts to send USB packets time out. Examining /proc/interrupts shows the reason: IRQ21 has had MILLIONS of spurious interrupts. It is receiving them even before the USB driver starts, so the kernel detected that no driver is registered, and disabled the IRQ (in arch/i386/kernel/irq.c). It prints "IRQ 21:nobody cared".
The other USB bus just seems to receive no interrupts at all.
If I pass pci=noapci as a kernel parameter, everything works (USB busses are allocated to IRQs <=15), but I thought I would take the time to debug this issue properly. Also, it gave me an excuse to learn about ACPI and APICs :)
The PCI Interrupt Link names for my USB devices are APCF, APCG respectively. Here is the output from the ACPI PRT parsing code during kernel bootup:
pci_link-0256 [39] acpi_pci_link_get_curr: No IRQ resource found
ACPI: PCI Interrupt Link [APCF] (IRQs 20 21 22, disabled) pci_link-0256 [41] acpi_pci_link_get_curr: No IRQ resource found
ACPI: PCI Interrupt Link [APCG] (IRQs 20 21 22, disabled)
I have decompiled the AML code in my BIOS to verify that the ACPI parser is functioning correctly. It is.
During the initialisation of the IO-APIC (and the parsing of the MADT ACPI table), the following is printed:
IO-APIC (apicid-pin) 2-0, 2-16, 2-17, 2-18, 2-19, 2-20, 2-21, 2-22, 2-23 not
connected.
Heres my problem: is this a bug in my BIOS's ACPI tables, or a bug in the kernel. The "not connected" stuff above kinda implies that the PRT information is duff.. but I'm not sure what "not connected" means here... does it mean physically unconnected, or just logically?
From the ACPI spec, I got the impression that the MADT table contains overrides for the *8539 PIC* IRQs.. so you wouldn't get IRQs > 15 in there anyway.
If this is a BIOS bug, I'll probably develop a patch which warns when duff PRT tables are present, and forces pci=noacpi.
If this is a kernel bug, can anyone suggest where to go next. I can provide more information if necessary...
Incidentally, this only started in kernel 2.5.63 (or very close to there) when a bug was fixed in the ACPI parser when a device does not have an IRQ allocated already (The "No IRQ resource found" printout above). Prior to this, I think the PRT parser just bombed out completely, and the system used some other IRQ routing method.
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
Quoted 4 lines
From the ACPI spec, I got the impression that the MADT table contains overrides for the *8539 PIC* IRQs.. so you wouldn't get IRQs > 15 in there anyway.
I mean the two i8259 PICs, sorry.
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
Quoted 11 lines · Andrew de Quincey
Hi, I have an Epox 8RDA+ NForce2-based motherboard (uniprocessor, Athlon XP). This board has an IO-APIC with
0x17pins. I can't tell you much more specific about it, as it is in the nforce2 chipset to which I do not have docs. I'm using kernel 2.5.74, with APIC, IO-APIC, ACPI turned on.First of all, here are the symptoms:
Kernel boots OK, devices with IRQs <=15 are fine. However, the system attempts to allocate some devices (e.g. USB) to IRQs 20 and 21, as told by the AML code in my BIOS (more on this later).
How look /proc/interrupts with IO-APIC, but without ACPI (I mean, no acpi at all at compile time)?
Signature · 11 lines
Ducrot Bruno -- Which is worse: ignorance or apathy? -- Don't know. Don't care. ------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps1
Quoted 6 lines · Ducrot Bruno
Quoted 5 lines · Andrew de Quincey
Hi, I have an Epox 8RDA+ NForce2-based motherboard (uniprocessor, Athlon XP). This board has an IO-APIC with
0x17pins. I can't tell you much more specific about it, as it is in the nforce2 chipset to which I do not have docs. I'm using kernel 2.5.74, with APIC, IO-APIC, ACPI turned on.
Quoted 8 lines
Quoted 5 lines
First of all, here are the symptoms:
Kernel boots OK, devices with IRQs <=15 are fine. However, the system attempts to allocate some devices (e.g. USB) to IRQs 20 and 21, as told by the AML code in my BIOS (more on this later).
How look
/proc/interruptswith IO-APIC, but without ACPI (I mean, no acpi at all at compile time)?
Hi, here you go. ACPI disabled, but APIC/IO-APIC left in. Interesting, everything is set to XT-PIC....
During boot it says: Found and enabled local APIC! But does not have any mention of the IO-APIC.
CPU0
0: 50946 XT-PIC timer 1: 16 XT-PIC i8042 2: 0 XT-PIC cascade 11: 13 XT-PIC ohci-hcd 12: 346 XT-PIC ohci-hcd 14: 1024 XT-PIC ide0 15: 18 XT-PIC ide1 NMI: 0 LOC: 50874 ERR: 91 MIS: 0
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
Quoted 23 lines · Andrew de Quincey
Quoted 6 lines · Ducrot Bruno
Quoted 5 lines · Andrew de Quincey
Hi, I have an Epox 8RDA+ NForce2-based motherboard (uniprocessor, Athlon XP). This board has an IO-APIC with
0x17pins. I can't tell you much more specific about it, as it is in the nforce2 chipset to which I do not have docs. I'm using kernel 2.5.74, with APIC, IO-APIC, ACPI turned on.Quoted 8 lines
Quoted 5 lines
First of all, here are the symptoms:
Kernel boots OK, devices with IRQs <=15 are fine. However, the system attempts to allocate some devices (e.g. USB) to IRQs 20 and 21, as told by the AML code in my BIOS (more on this later).
How look
/proc/interruptswith IO-APIC, but without ACPI (I mean, no acpi at all at compile time)?Hi, here you go. ACPI disabled, but APIC/IO-APIC left in. Interesting, everything is set to XT-PIC....
During boot it says: Found and enabled local APIC! But does not have any mention of the IO-APIC.
CPU0
Quoted 13 lines
0: 50946 XT-PIC timer 1: 16 XT-PIC i8042 2: 0 XT-PIC cascade 11: 13 XT-PIC ohci-hcd 12: 346 XT-PIC ohci-hcd 14: 1024 XT-PIC ide0 15: 18 XT-PIC ide1 NMI: 0 LOC: 50874 ERR: 91 MIS: 0
Then perhaps you may turn off IO-APIC. I know there are troubles with some SiS based system. Though, it may be problematic with NForce2 as well?
A Guru of that kind of stuff should help more than me (Alan perhaps?).
Signature · 11 lines
Ducrot Bruno -- Which is worse: ignorance or apathy? -- Don't know. Don't care. ------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps1
Quoted 16 lines
Quoted 4 lines
During boot it says: Found and enabled local APIC! But does not have any mention of the IO-APIC.
CPU0
Quoted 11 lines
0: 50946 XT-PIC timer 1: 16 XT-PIC i8042 2: 0 XT-PIC cascade 11: 13 XT-PIC ohci-hcd 12: 346 XT-PIC ohci-hcd 14: 1024 XT-PIC ide0 15: 18 XT-PIC ide1 NMI: 0 LOC: 50874 ERR: 91 MIS: 0
Quoted 5 lines
Then perhaps you may turn off IO-APIC. I know there are troubles with some SiS based system. Though, it may be problematic with NForce2 as well?
A Guru of that kind of stuff should help more than me (Alan perhaps?).
Yeah, I can easily make it work by turning it off or supplying pci=noacpi. However, I'm pursuing this problem to develop a fix for the issue.
The new ACPI PCI routing seems to cause other people problems as well.. I've seen mention on various web pages. Not really a good situation to leave these problems in the OS.
Wish I had docs on the nforce2 chipset. Sigh.
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
Quoted 20 lines · Andrew de Quincey
Quoted 20 lines
Quoted 4 lines
During boot it says: Found and enabled local APIC! But does not have any mention of the IO-APIC.
CPU0
Quoted 11 lines
0: 50946 XT-PIC timer 1: 16 XT-PIC i8042 2: 0 XT-PIC cascade 11: 13 XT-PIC ohci-hcd 12: 346 XT-PIC ohci-hcd 14: 1024 XT-PIC ide0 15: 18 XT-PIC ide1 NMI: 0 LOC: 50874 ERR: 91 MIS: 0Then perhaps you may turn off IO-APIC. I know there are troubles with some SiS based system. Though, it may be problematic with NForce2 as well?
Quoted 8 lines
Quoted 1 line
A Guru of that kind of stuff should help more than me (Alan perhaps?).
Yeah, I can easily make it work by turning it off or supplying pci=noacpi. However, I'm pursuing this problem to develop a fix for the issue.
The new ACPI PCI routing seems to cause other people problems as well.. I've seen mention on various web pages. Not really a good situation to leave these problems in the OS.
Forgot to say: have you also the same kind of output, but with ACPI? If all (at least the 15 first one) look like XT-PIC...
Quoted 2 lines
Wish I had docs on the nforce2 chipset. Sigh.
Good luck...
Cheers,
Signature · 11 lines
Ducrot Bruno -- Which is worse: ignorance or apathy? -- Don't know. Don't care. ------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps1
Quoted 8 lines · Andrew de Quincey
Quoted 2 lines
How look
/proc/interruptswith IO-APIC, but without ACPI (I mean, no acpi at all at compile time)?Hi, here you go. ACPI disabled, but APIC/IO-APIC left in. Interesting, everything is set to XT-PIC....
During boot it says: Found and enabled local APIC! But does not have any mention of the IO-APIC.
local apic and i/o apic are seperate devices. A system can have one (on the CPU) but not the other
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
Quoted 11 lines
Quoted 8 lines
Yeah, I can easily make it work by turning it off or supplying pci=noacpi. However, I'm pursuing this problem to develop a fix for the issue.
The new ACPI PCI routing seems to cause other people problems as well.. I've seen mention on various web pages. Not really a good situation to leave these problems in the OS.
Forgot to say: have you also the same kind of output, but with ACPI? If all (at least the 15 first one) look like XT-PIC...
Yeah, its pretty much the same, although it says IO-APIC instead of XT-PIC.
If I don't use pci=noacpi, I get the problem I'm describing (obviously), with IRQs 21 etc mentioned.
If I use pci=noacpi, it also says IO-APIC, but it only has 16 IRQs total.
(I can't remember the _exact_ word it uses offhand.. something like IO-APIC-edge I think)
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
Quoted 4 lines · Alan Cox
Quoted 3 lines · Andrew de Quincey
Quoted 2 lines
How look
/proc/interruptswith IO-APIC, but without ACPI (I mean, no acpi at all at compile time)?
Quoted 8 lines
Quoted 5 lines
Hi, here you go. ACPI disabled, but APIC/IO-APIC left in. Interesting, everything is set to XT-PIC....
During boot it says: Found and enabled local APIC! But does not have any mention of the IO-APIC.
local apic and i/o apic are seperate devices. A system can have one (on the CPU) but not the other
Yep. My system does have an IO APIC however. It doesn't find it when I disable ACPI. I assume this is the expected behaviour, since otherwise you'd have to scan in the area of memory they're mapped to.
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
Instability without ACPI
In reply to a message not in the archiveHmm, since I disabled ACPI, my system has become very unstable. I'm having the old random gcc segfaults during compilation which usually indicates some kind of hardware issue.
I've been running 2.5.74 for 5-6days _with_ ACPI, and it has been rock solid. I've re-enabled ACPI now, so hopefully, the instability will stop.
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
Re: Instability without ACPI
In reply to a message not in the archiveQuoted 8 lines · Andrew de Quincey
Hmm, since I disabled ACPI, my system has become very unstable. I'm having the old random gcc segfaults during compilation which usually indicates some kind of hardware issue.
I've been running 2.5.74 for 5-6days _with_ ACPI, and it has been rock solid. I've re-enabled ACPI now, so hopefully, the instability will stop.
You probably need acpi due to power states for the cpu. Common problem with laptop shipped with athlon in general (there is a tool called lvcool though if you do not have acpi).
Signature · 11 lines
Ducrot Bruno -- Which is worse: ignorance or apathy? -- Don't know. Don't care. ------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps1
Re: Instability without ACPI
In reply to a message not in the archiveQuoted 4 lines · Ducrot Bruno
You probably need acpi due to power states for the cpu. Common problem with laptop shipped with athlon in general (there is a tool called lvcool though if you do not have acpi).
sounds cool
I have one athlon 4 on one KT133.
but after reading
http://cip.uni-trier.de/nofftz/linux/Athlon-Powersaving-HOWTO.html
in 2.5
This is the only solution which does not use the ACPI system of the Linux kernel.
in 3.1. Known Bugs/Problems
There could be following problems (caused by the bugs):
skips during sound playback
skips and slowdown during video playback slowdown of the ultra-DMA harddisk transfers system hangs
what could be worst ? :-)
2.1. The Command-line Hack
you can enable/disable the power-saving right from the command-line without any need for rebooting.
on KT133/133A, KX133, KL/KLE133, KM/KN133, ...:
enable: setpci -v -H1 -s 0:0.0 52=$(printf %x $((0x$(setpci -H1 -s 0:0.0
52) | 0x80)))
disable: setpci -v -H1 -s 0:0.0 52=$(printf %x $((0x$(setpci -H1 -s 0:0.0 52) & 0x7f)))
How I know if it enable or disable ?
is it safe try this commands?
thanks in advance
Quoted 8 lines
Signature · 5 lines
-- Ducrot Bruno -- Which is worse: ignorance or apathy? -- Don't know. Don't care.
Signature · 10 lines
Sérgio Basto ------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps1
Re: Instability without ACPI
In reply to a message not in the archiveQuoted 6 lines · Sérgio Monteiro Basto
Quoted 4 lines · Ducrot Bruno
You probably need acpi due to power states for the cpu. Common problem with laptop shipped with athlon in general (there is a tool called lvcool though if you do not have acpi).
Quoted 8 lines
sounds cool
I have one athlon 4 on one KT133.
but after reading
http://cip.uni-trier.de/nofftz/linux/Athlon-Powersaving-HOWTO.htmlin 2.5
This is the only solution which does not use the ACPI system of the Linux kernel.
This one will do exactly what ACPI does (that is, in the main loop, read LVL2 register). So the exact same issue will likely happens.
...
Quoted 11 lines
2.1. The Command-line Hack
you can enable/disable the power-saving right from the command-line without any need for rebooting.on KT133/133A, KX133, KL/KLE133, KM/KN133, ...:
enable: setpci -v -H1 -s 0:0.0 52=$(printf %x $((0x$(setpci -H1 -s 0:0.0
52) |0x80)))
disable: setpci -v -H1 -s 0:0.0 52=$(printf %x $((0x$(setpci -H1 -s 0:0.0 52) &0x7f)))How I know if it enable or disable ?
setpci -H1 -s 0:0.0 52
then look if bit 8 is set (enable) or not (disable).
Quoted 1 line
is it safe try this commands?
I don't know.
Signature · 11 lines
Ducrot Bruno -- Which is worse: ignorance or apathy? -- Don't know. Don't care. ------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps1
Re: Instability without ACPI and quirks
In reply to a message not in the archiveHi thanks for replying
Results:
root@darkstar:~#/setpci -v -H1 -s 0:0.0 52
00:00.0:52 = eb
root@darkstar:~#setpci -v -H1 -s 0:0.0 52=$(printf %x $((0x$(setpci -H1 -s 0:0.0 52) | 0x80))) 00:00.0:52 eb
root@darkstar:~#setpci -v -H1 -s 0:0.0 52=$(printf %x $((0x$(setpci -H1 -s 0:0.0 52) & 0x7f))) 00:00.0:52 6b
root@darkstar:~#setpci -v -H1 -s 0:0.0 52=$(printf %x $((0x$(setpci -H1 -s 0:0.0 52) | 0x80))) 00:00.0:52 eb
I don't resit to tell you, this doesn't do nothing ! so why 52 ?
I have a compaq presario 706EA
00:00.0 Host bridge: VIA Technologies, Inc. VT8363/8365 [KT133/KM133] (rev 80)
00:07.4 Bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev
40)
Seems to be one KT133 but I am not sure,
This for me doesn't make sense every via chipset or every Athlons have a rol of bugs, but for me the conclusion is:
Without acpi, we can put this kind of machine working correctly. first because they are purely ACPI implementation ( the beginning of implementation of ACPI in ordinary laptops? )
Other thing is APIC, with someones APIC is disable by kernel, sometimes we have to disable it and other time APIC seems to be detected but we have problems with IRQ routing.
So many time I ask people to disable APIC no know if it work better or if can resolve some problem, for me, is a test that I like to be informed.
So I try to find out IRQ routing problems on my laptop (of course) and I found one bunch of quirks, so my (not well proved) theory is that bunch of quirks is to correct the problem of don't have ACPI. Since now (happily) have ACPI in main kernel maybe we can begging removing quirks from kernel.
I am testing (in my laptop) the first two removing quirks quirk_via_acpiquirk_vt82c686_acpi
this two applied are applied to 00:07.4 Apollo Super ACPI after 4 days, nothing happens (everything works fine).
And now I am going for next two
this are applied to 00:07.5 VT82C686 AC97 Audio Controller and 00:07.2 USB Controller and is the same function in drivers/pci/quirks.c where you can read :
* Via 686A/B: The PCI_INTERRUPT_LINE register for the on-chip
* devices, USB0/1, AC97, MC97, and ACPI, has an unusual feature:
* when written, it makes an internal connection to the PIC.
* For these devices, this register is defined to be 4 bits wide.
* Normally this is fine. However for IO-APIC motherboards, or
* non-x86 architectures (yes Via exists on PPC among other places),
* we must mask the PCI_INTERRUPT_LINE value versus 0xf to get
* interrupts delivered properly.
*
* TODO: When we have device-specific interrupt routers,
* quirk_via_irqpic will go away from quirks.
Thanks
Quoted 56 lines · Ducrot Bruno
Quoted 6 lines · Sérgio Monteiro Basto
Quoted 4 lines · Ducrot Bruno
You probably need acpi due to power states for the cpu. Common problem with laptop shipped with athlon in general (there is a tool called lvcool though if you do not have acpi).
Quoted 8 lines
sounds cool
I have one athlon 4 on one KT133.
but after reading
http://cip.uni-trier.de/nofftz/linux/Athlon-Powersaving-HOWTO.htmlin 2.5
This is the only solution which does not use the ACPI system of the Linux kernel.This one will do exactly what ACPI does (that is, in the main loop, read LVL2 register). So the exact same issue will likely happens.
...
Quoted 11 lines
2.1. The Command-line Hack
you can enable/disable the power-saving right from the command-line without any need for rebooting.on KT133/133A, KX133, KL/KLE133, KM/KN133, ...:
enable: setpci -v -H1 -s 0:0.0 52=$(printf %x $((0x$(setpci -H1 -s 0:0.0
52) |0x80)))
disable: setpci -v -H1 -s 0:0.0 52=$(printf %x $((0x$(setpci -H1 -s 0:0.0 52) &0x7f)))How I know if it enable or disable ?
setpci -H1 -s 0:0.0 52
then look if bit 8 is set (enable) or not (disable).Quoted 1 line
is it safe try this commands?
I don't know.
Signature · 15 lines
Ducrot Bruno -- Which is worse: ignorance or apathy? -- Don't know. Don't care. ------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps1 _______________________________________________ Acpi-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/acpi-devel
Signature · 12 lines
SérgioMB email: [email protected] Who gives me one shell, give me everything. ------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps1
Re: Instability without ACPI and quirks
In reply to a message not in the archiveQuoted 13 lines
I am testing (in my laptop) the first two removing quirks
quirk_via_acpiquirk_vt82c686_acpi
this two applied are applied to 00:07.4 Apollo Super ACPI after 4 days, nothing happens (everything works fine).
And now I am going for next two
this are applied to 00:07.5 VT82C686 AC97 Audio Controller and 00:07.2 USB Controller and is the same function indrivers/pci/quirks.cwhere you can read :
* Via 686A/B: ThePCI_INTERRUPT_LINEregister for the on-chip
* devices, USB0/1, AC97, MC97, and ACPI, has an unusual feature:
* when written, it makes an internal connection to the PIC.
Quoted 8 lines
* For these devices, this register is defined to be 4 bits wide.
* Normally this is fine. However for IO-APIC motherboards, or
* non-x86 architectures (yes Via exists on PPC among other places),
* we must mask thePCI_INTERRUPT_LINEvalue versus0xfto get
* interrupts delivered properly.
*
* TODO: When we have device-specific interrupt routers,
*quirk_via_irqpicwill go away from quirks.
Now that IS interesting. The nvidia/nvidia2 chipset has parts of the hardware bought from VIA.. e.g. lspci shows that I have a:
00:05.0 Multimedia audio controller: nVidia Corporation nForce MultiMedia audio [Via VT82C686B] (rev a2)
But the manufacturer's ID is different (set to nvidia), so the quirks will not be applied. I will try the opposite of you: turning selected appropriate quirks on.
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1