Bug 5741

Summary: boot failure w/o pci=noacpi - PCI Int Link AE_NOT_FOUND - Asus K8N-DL
Product: ACPI Reporter: Andi Kleen (andi-bz)
Component: Config-InterruptsAssignee: Robert Moore (Robert.Moore)
Status: CLOSED CODE_FIX    
Severity: high CC: acpi-bugzilla
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.15rc5 Subsystem:
Regression: --- Bisected commit-id:
Attachments: poor screenshot (sorry for the quality)
DSDT

Description Andi Kleen 2005-12-14 03:31:52 UTC
Most recent kernel where this bug did not occur: none known
Distribution: SUSE 10.0
Hardware Environment: Asus K8N-DL (dual Opteron PCI-E board), x86-64
Software Environment:
Problem Description:

This is a continuation of bug #5135 which resolved the first problem
this board was running into. But it still needs pci=noacpi,
otherwise no interrupts work.

The machine unfortunately has no working serial port, so all
I can offer is a (bad) screen shot and a DSDT. I think what happens 
is that the _PRT/_CRS is evaluated to set up the PCI busses on PCI0
and that fails because two objects (\_SB_.PCI0.APC0 and LNK0) are not resolvable. 

This causes then nearly all PCI interrupts links to end up 
as "disabled" and breaks everything.

When looking at the DSDT these two objects (APC0 and LNK0) are inside
the PIC namespace, which only gets ever returned when the _PIC method
passed in 0. But of course the board runs in APIC mode so they are
never referenced by the methods. But they're still in a single big
_CRS and the AML interpreter just aborts instead of ignoring them.

I suppose Asus never tested the board in PIC mode and some other
ACPI implementation ignores the unused bad references in the _CRS
instead of aborting it.

I tried to hack around it by ignoring the lookup failure in psparse.c,
but that causes the code later that looks at the _CRS to crash
because some state is messed up. Somehow the interpreter needs to 
be taught to evaluate the _CRS lazily.

Hope the analysis did make sense.

Steps to reproduce: Boot it.
Comment 1 Andi Kleen 2005-12-14 03:33:43 UTC
Created attachment 6820 [details]
poor screenshot (sorry for the quality) 

the other links that are not visible are practically all disabled too.
Comment 2 Andi Kleen 2005-12-14 03:34:44 UTC
Created attachment 6821 [details]
DSDT
Comment 3 Len Brown 2005-12-21 18:34:39 UTC
i assume that acpi=noirq is also a sufficient workaround?
Comment 4 Robert Moore 2006-01-20 13:07:55 UTC
We recently modified ACPICA (20051216) to allow unresolved references in 
packages when executing in slack mode.

However, this case is new in that the package is part of a resource 
descriptor. The current resource manager code cannot handle unresolved 
references (yet) and faults (because it expects the package to be fully 
validated at that point.)

Will be fixed for the next release of ACPICA.
Comment 5 Andi Kleen 2006-01-20 13:25:55 UTC
Sorry for the delay. Just tested - yes acpi=noirq works too.
Comment 6 Robert Moore 2006-01-27 14:21:06 UTC
Fixed in ACPICA version 20060127.

However, there still may be a problem if the software above ACPICA cannot 
handle a _PRT package with a null link field.
Comment 7 Andi Kleen 2006-01-27 18:58:28 UTC
Reopening because I'm pretty sure the calling code will need fixes
too.

When can I get a Linux ACPI patch with that ACPICA release integrated
or can you add an individual patch for testing?
Comment 8 Robert Moore 2006-01-30 08:53:08 UTC
Len Brown handles the Linux patches.
Comment 9 Len Brown 2006-01-31 00:42:54 UTC
checed into acpi-test tree
Individual ACPICA update can be had here:
ftp.kernel.org:/pub/linux/kernel/people/lenb/acpi/patches/test/acpica/acpica-unix-20060127.patch.gz

please re-open if testing fails.
Comment 10 Len Brown 2006-02-02 14:41:44 UTC
ACPICA 20050127 shipped in Linux-2.6.16-rc1-git6 -- closing.
Comment 11 Len Brown 2006-02-02 15:02:43 UTC
20060127 that is
Comment 12 Andi Kleen 2006-02-03 03:58:23 UTC
I tested it now with mainline which has the new ACPICA and it works now
without acpi=noirq. Confirmed. Thanks guys.

Well actually i still have quite many disabled links, but at least ethernet 
and simple USB seem to work (the machine is diskless so I didn't test SATA)


ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.HUB0._PRT]
ACPI: PCI Interrupt Link [LNK1] (IRQs *3 4 5 7 9 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNK2] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNK3] (IRQs 3 4 5 7 9 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNK4] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNK5] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LUBA] (IRQs 3 4 5 7 9 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LUBB] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LMAC] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LACI] (IRQs 3 4 *5 7 9 10 11 12 14 15)
ACPI: PCI Interrupt Link [LMCI] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LSMB] (IRQs 3 4 *5 7 9 10 11 12 14 15)
ACPI: PCI Interrupt Link [LUB2] (IRQs *3 4 5 7 9 10 11 12 14 15)
ACPI: PCI Interrupt Link [LIDE] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LSID] (IRQs 3 4 *5 7 9 10 11 12 14 15)
ACPI: PCI Interrupt Link [LFID] (IRQs 3 4 5 7 9 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LPCA] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [APC1] (IRQs 16) *0, disabled.
ACPI: PCI Interrupt Link [APC2] (IRQs 17) *0, disabled.
ACPI: PCI Interrupt Link [APC3] (IRQs 18) *0, disabled.
ACPI: PCI Interrupt Link [APC4] (IRQs 19) *0, disabled.
ACPI: PCI Interrupt Link [APC5] (IRQs *16), disabled.
ACPI: PCI Interrupt Link [APCF] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCG] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCH] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCJ] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCK] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCS] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCL] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCZ] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APSI] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APSJ] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCP] (IRQs 20 21 22 23) *0, disabled.