[Bug 276308] acpi_wmi: Error getting Embedded MOF on some hardware

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 14 Jan 2024 01:42:14 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276308

            Bug ID: 276308
           Summary: acpi_wmi: Error getting Embedded MOF on some hardware
           Product: Base System
           Version: 14.0-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: kennedy.greg@gmail.com
 Attachment #247632 text/plain
         mime type:

Created attachment 247632
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=247632&action=edit
acpidump -d -t > DSDT.dsl

Hardware -
Dell Latitude E5420 laptop (2011), latest BIOS (A14), 8gb RAM, Intel Core
i5-2430M CPU
FreeBSD-14.0-RELEASE-p4, AMD64 standard kernel.

Issue -
Getting this error in `dmesg` after boot:

acpi_wmi0: <ACPI-WMI mapping> on acpi0
acpi_wmi0: Embedded MOF found
ACPI: \134_SB.AMW0.WQMO: 1 arguments were passed to a non-method ACPI object
(Buffer) (20221020/nsarguments-361)

Seems to be a problem retrieving the BMOF from ACPI: where the kernel expects
to find a method to "block query", instead there is a Buffer w/ the data, and
no query method is present to call.

Reference
https://github.com/freebsd/freebsd-src/blob/main/sys/dev/acpi_support/acpi_wmi.c#L280

On Linux, the result is different.  Instead the kernel reports "data block
query control method not found" and gives up.  See
https://github.com/torvalds/linux/blob/master/drivers/platform/x86/wmi.c#L965
but also, the comments are enlightening - "On some Dell laptops, WQxx may not
be a method at all"

Solution (maybe?) -
Check that the WQxx result from ACPI for this GUID is a method, not a buffer.

If it is a buffer, return the contents directly, instead of attempting to call
the method to get the contents.

Consider also the quirk about "optional" parameters when there is only one
instance for the associated data block.

Attached -
I'm attaching the result of `acpidump -d -t` from the machine.  This doesn't
compile with iasl (because of external references), but it should be everything
needed to help diagnose this issue.

My research into this is also on the forums at
https://forums.freebsd.org/threads/acpi-134_sb-amw0-wqmo-1-arguments-were-passed-to-a-non-method-acpi-object-buffer.91904/
if it is any help.

-- 
You are receiving this mail because:
You are the assignee for the bug.