Enabling AML Debugging
The aml-debugger.txt, the instruction for enabling AML runtime debugger, is available at Documentation/acpi/ in Linux kernel source code. In short, two things are required for AML runtime debugging
- Enable AML debugging (CONFIG_ACPI_DEBUGGER=y & CONFIG_ACPI_DEBUGGER_USER=m) when compiling Linux kernel
- Compile an utility, acpidbg from Linux kernel (I uploaded a copy here)
Running AML Debugging
Executing acpidbg on Ubuntu 18.04 (x64) is straight-forward
and "help" shows a list supported commands
Examples
acpidbg is particularly handy when one needs to evaluate any ACPI AML objects during runtime - especially ones that change under different conditions. This may be explained by some examples below:
Example 1 - To determine AC power status in runtime.
- Find _PSR objects
- Evaluate _PSR when AC is disconnected
- Evaluate _PSR when AC is connected.
acpidbg also works with complex objects such as packages.
Example 2 - To determine battery information and status.
- Find _BIF and _BST objects
- Evaluate _BIF and _BST objects (note _BST changes dynamically).
acpidbg can decode bit fields and save time on counting bits. Try to run acpidbg to evaluate any _PLD objects and you will see what I mean :).
good sharing. does 18.04.1 has it enabled by default as well?
ReplyDeleteIt is enabled on 18.04 (and later) for PC.
DeleteTommy, 18.04.1 support it, because 18.04.1 and 18.04 use the same kernel.
ReplyDelete