Bug 198863

Summary: AE_BAD_PARAMETER, Returned by Handler for [EmbeddedControl]
Product: ACPI Reporter: Roman Ginovich (guard43ru)
Component: ECAssignee: Zhang Rui (rui.zhang)
Status: CLOSED DOCUMENTED    
Severity: normal CC: guard43ru, pmenzel+bugzilla.kernel.org, rui.zhang, yu.c.chen
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.15.3 Subsystem:
Regression: No Bisected commit-id:
Attachments: dmesg with ACPI_DEBUG
acpidump

Description Roman Ginovich 2018-02-21 18:34:58 UTC
Created attachment 274301 [details]
dmesg with ACPI_DEBUG

Hello,
on boot in dmesg:
[1.510126] ACPI Exception: AE_BAD_PARAMETER, Returned by Handler for [EmbeddedControl] (20170831/evregion-300)
[1.510251] ACPI Error: Method parse/execution failed \_TZ.TZ01._TMP, AE_BAD_PARAMETER (20170831/psparse-550)
[1.510537] ACPI Exception: AE_BAD_PARAMETER, Returned by Handler for [EmbeddedControl] (20170831/evregion-300)
[1.510632] ACPI Error: Method parse/execution failed \_TZ.TZ01._TMP, AE_BAD_PARAMETER (20170831/psparse-550)

Laptop have lastest BIOS.
Comment 1 Roman Ginovich 2018-02-21 18:35:58 UTC
Created attachment 274303 [details]
acpidump

acpidump
Comment 2 Zhang Rui 2018-04-02 02:58:49 UTC
                    OperationRegion (ECOR, EmbeddedControl, Zero, 0x0800)
                    Field (ECOR, ByteAcc, NoLock, Preserve)
                    {

                         ...
                         Offset (0x668),
                         CPU1,   8,
                         ...
                    }


            Method (_TMP, 0, Serialized)  // _TMP: Temperature
            {
                Local0 = \_SB.PCI0.LPCB.EC0.CPU1
                Return (Local0)
            }

EC driver has the limitation that the length of EC address space is not longer than 0xFF, and this is the first platform I've seen that breaks is.

I'm not sure where this 0xFF limitation comes from and I will check with others.

can you build custom kernel? if yes, I will modify the EC driver and let's see if it works.
Comment 3 Zhang Rui 2018-05-07 06:47:37 UTC
ping...
Comment 4 Roman Ginovich 2018-05-08 17:24:52 UTC
Yes, i can try build kernel
Comment 5 Paul Menzel 2018-05-15 14:16:08 UTC
For the record, this is a Lenovo laptop.

> DMI: LENOVO 20CDA00XRT/20CDA00XRT, BIOS GQET53WW (1.33 ) 09/15/2017

Roman, there should be updated firmware with Meltdown and Spectre fixes.
Comment 6 Zhang Rui 2018-05-16 06:59:43 UTC
I take back my words.

                    OperationRegion (ECOR, EmbeddedControl, Zero, 0x0800)
                    Field (ECOR, ByteAcc, NoLock, Preserve)
                    {

                         ...
                         Offset (0x668),
                         CPU1,   8,
                         ...
                    }

This is sufficient to say it is a BIOS problem as the maximum length of EC operation region is 0xFF.
So this is a BIOS bug, which breaks Linux ACPI thermal driver.
Please raise the problem to Lenovo instead.
I will try to contact Lenovo as well, but not sure if this can get fixed or not.
Comment 7 Paul Menzel 2018-05-16 11:33:39 UTC
(In reply to Paul Menzel from comment #5)
> For the record, this is a Lenovo laptop.
> 
> > DMI: LENOVO 20CDA00XRT/20CDA00XRT, BIOS GQET53WW (1.33 ) 09/15/2017
> 
> Roman, there should be updated firmware with Meltdown and Spectre fixes.

If that is a Lenovo ThinkPad Yoga device, then firmware revision 1.37 is available [1].

[1] https://support.lenovo.com/de/en/downloads/ds038335