Alex Hung of Canonical — and one of the FirmWare Test Suite developers — has a new blog post, showing how to debug ACPI on recent builds of Ubuntu:
ACPICA is a project that provides an operating system (OS)-independent reference implementation. It also contains a list of utilities such as ASL compiler (iasl), acpiexec (an AML emulator) and so on. However, debugging AML on Linux in real time wasn’t provided in ACPICA … until Linux Kernel 4.13. The aml-debugger.txt the instruction of how to enable AML debugger, is available at Documentation/acpi/ in Linux kernel source code. In short, two things are required to run AML debugging. […] While compiling a custom-build kernel with the above two config is nothing new to kernel developers, it is often inconvenient for firmware developers who need to verify ACPI implementation in their firmware. Fortunately, Ubuntu 18.04 (x64) enables these two config by default, and one can run acpidbg on Ubuntu 18.04 – even on Ubuntu Live from USB too! Executing acpidbg on Ubuntu 18.04 is very straight-forward[…]
http://alexhungdmz.blogspot.ca/2018/05/acpi-debugging-1-acpi-aml-debugger-in.html
See also:
https://raw.githubusercontent.com/torvalds/linux/master/Documentation/acpi/aml-debugger.txt
https://www.kernel.org/doc/Documentation/acpi/debug.txt
https://wiki.ubuntu.com/DebuggingACPI
https://wiki.ubuntu.com/Kernel/Reference/ACPITricksAndTips
https://01.org/linux-acpi/documentation/debug-how-isolate-linux-acpi-issues
https://lwn.net/Articles/237085/