Documentation/wmi/acpi-interface.rst

Source file repositories/reference/linux-study-clean/Documentation/wmi/acpi-interface.rst

File Facts

System
Linux kernel
Corpus path
Documentation/wmi/acpi-interface.rst
Extension
.rst
Size
8967 bytes
Lines
175
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

.. SPDX-License-Identifier: GPL-2.0-or-later

==================
ACPI WMI interface
==================

The ACPI WMI interface is a proprietary extension of the ACPI specification made
by Microsoft to allow hardware vendors to embed WMI (Windows Management Instrumentation)
objects inside their ACPI firmware. Typical functions implemented over ACPI WMI
are hotkey events on modern notebooks and configuration of BIOS options.

PNP0C14 ACPI device
-------------------

Discovery of WMI objects is handled by defining ACPI devices with a PNP ID
of ``PNP0C14``. These devices will contain a set of ACPI buffers and methods
used for mapping and execution of WMI methods and/or queries. If there exist
multiple of such devices, then each device is required to have a
unique ACPI UID.

_WDG buffer
-----------

The ``_WDG`` buffer is used to discover WMI objects and is required to be
static. Its internal structure consists of data blocks with a size of 20 bytes,
containing the following data:

======= =============== =====================================================
Offset  Size (in bytes) Content
======= =============== =====================================================
0x00    16              128 bit Variant 2 object GUID.
0x10    2               2 character method ID or single byte notification ID.
0x12    1               Object instance count.
0x13    1               Object flags.
======= =============== =====================================================

The WMI object flags control whether the method or notification ID is used:

- 0x1: Data block is expensive to collect.
- 0x2: Data block contains WMI methods.
- 0x4: Data block contains ASCIZ string.
- 0x8: Data block describes a WMI event, use notification ID instead
  of method ID.

Each WMI object GUID can appear multiple times inside a system.
The method/notification ID is used to construct the ACPI method names used for
interacting with the WMI object.

WQxx ACPI methods
-----------------

If a data block does not contain WMI methods, then its content can be retrieved
by this required ACPI method. The last two characters of the ACPI method name
are the method ID of the data block to query. Their single parameter is an
integer describing the instance which should be queried. This parameter can be
omitted if the data block contains only a single instance.

WSxx ACPI methods
-----------------

Similar to the ``WQxx`` ACPI methods, except that it is optional and takes an
additional buffer as its second argument. The instance argument also cannot
be omitted.

WMxx ACPI methods
-----------------

Used for executing WMI methods associated with a data block. The last two
characters of the ACPI method name are the method ID of the data block
containing the WMI methods. Their first parameter is a integer describing the

Annotation

Implementation Notes