RE: [BUG] ACPI Error: ...

From: Moore, Robert
Date: Wed Feb 03 2016 - 15:41:33 EST


After a bit of investigation, this looks to me like a latent bug in the ASL code, namely this SSDT:

DefinitionBlock ("ssdt10.aml", "SSDT", 1, "PmRef", "CpuPm", 0x00003000)

Here is the offending code:

Scope (\_PR.CPU0)
{
Name (HC0, 0x00)
Method (_PDC, 1, NotSerialized) // _PDC: Processor Driver Capabilities
{
Store (CPPC, \_PR.CPU0._PPC) /* External reference */
}


Scope (\_PR.CPU0)
{
Method (_PPC, 0, NotSerialized) // _PPC: Performance Present Capabilities
{
Store (CPLT, Local0)
If (LLessEqual (Local0, 0x03))
{
Return (0x00)
}

Store (Subtract (Local0, 0x03), Local0)
Return (Local0)
}

This change:
> ACPICA: Parser: Fix for SuperName method invocation

Store (CPPC, \_PR.CPU0._PPC) /* External reference */


Causes \_PR.CPU0._PPC to actually be invoked -- As per the ACPI specification.

However, Windows doesn't actually invoke the method. In fact, as far as we can tell, it simply ignores the entire statement. So, the bug was never caught until we made the change.

So, we are going to have to revert the change, regardless of the ACPI specification.

Bob



> -----Original Message-----
> From: Chris Bainbridge [mailto:chris.bainbridge@xxxxxxxxx]
> Sent: Wednesday, February 03, 2016 3:05 AM
> To: Moore, Robert
> Cc: Zheng, Lv; Wysocki, Rafael J; linux-kernel@xxxxxxxxxxxxxxx
> Subject: [BUG] ACPI Error: ...
>
> v4.5-rc2, Macbook IVB, ACPI errors on boot:
>
> [ 0.618382] ACPI Error: Needed type [Reference], found [Integer]
> ffff880260240fa0 (20150930/exresop-103)
> [ 0.618448] ACPI Error: Method parse/execution failed [\_PR.CPU0._PDC]
> (Node ffff880261acb9e0), AE_AML_OPERAND_TYPE (20150930/psparse-542)
> [ 1.581790] ACPI Error: [\_PR_.CPU0._CST] Namespace lookup failure,
> AE_NOT_FOUND (20150930/psargs-360)
> [ 1.581885] ACPI Error: Method parse/execution failed [\_PR.CPU1._CST]
> (Node ffff88025f9962e0), AE_NOT_FOUND (20150930/psparse-542)
> [ 1.585873] ACPI Error: [\_PR_.CPU0._CST] Namespace lookup failure,
> AE_NOT_FOUND (20150930/psargs-360)
> [ 1.585968] ACPI Error: Method parse/execution failed [\_PR.CPU2._CST]
> (Node ffff88025f997b50), AE_NOT_FOUND (20150930/psparse-542)
> [ 1.590267] ACPI Error: [\_PR_.CPU0._CST] Namespace lookup failure,
> AE_NOT_FOUND (20150930/psargs-360)
> [ 1.590360] ACPI Error: Method parse/execution failed [\_PR.CPU3._CST]
> (Node ffff88025f996450), AE_NOT_FOUND (20150930/psparse-542)
>
> ae90fbf562d733a392c7a0ffefe1e09b5a31c99c is the first bad commit commit
> ae90fbf562d733a392c7a0ffefe1e09b5a31c99c
> Author: Bob Moore <robert.moore@xxxxxxxxx>
> Date: Tue Dec 29 14:00:14 2015 +0800
>
> ACPICA: Parser: Fix for SuperName method invocation
>
> ACPICA commit 4b86d1046d06e462dae83ebcd5a66cc132a08f8f
>
> SuperName parameters that are in fact control method invocations were
> not handled correctly by the parser. This change fixes the problem
> by identifying these properly as method invocations. This affects
> about 14 different ASL operators that contain SuperName parameters.
> ACPICA BZ 1002.
>
> Link: https://github.com/acpica/acpica/commit/4b86d104
> Link: https://bugs.acpica.org/show_bug.cgi?id=1002
> Signed-off-by: Bob Moore <robert.moore@xxxxxxxxx>
> Signed-off-by: Lv Zheng <lv.zheng@xxxxxxxxx>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>
> :040000 040000 3c9015e32a1af1bbe211d455138e4940fc313543
> 441172b0f1209cd86fc68f70a0ce7f0adb1f9e33 M drivers