Easy inspection of ACPI AML opcodes w/o need for CONFIG_ACPI_DEBUG and the ACPI debug tweaks.
Colin Ian King
colin.king at canonical.com
Thu Jun 23 14:57:09 UTC 2011
Hi there,
I've written a SystemTap script that allows one to trace the execution
of the ACPI AML code without the need to build a kernel with
CONFIG_ACPI_DEBUG and do all that messy debug_level and debug_layer
configuration to get the correct kind of debug out of the kernel.
The script is in my pmdebug git repo:
http://kernel.ubuntu.com/git?p=cking/pmdebug.git;a=blob;f=systemtap/amltrace/amltrace.stp;h=80f9915a1bc4e022021823748c31d3510cda4a56;hb=279d2852ad5336e7bb667cde3cad71856d23c2cc
To run, install systemtap and a relevant kernel .ddeb (do you need to
reboot after installing this?)
Then download the script and run with:
sudo ./stap -g
and wait for the "Starting ACPI debugger." message
If you exercise AML code (e.g. hit volume keys) the opcodes are dumped
to your terminal in real-time. Apart from being a handy tool for
debugging AML issues, it's a neat demo of what can be done with
SystemTap.
Caveat: This has been tested on Oneiric. You mileage may vary.
Oh, and if you want to see the AML code from your firmware, you can dump
this quite easily using:
sudo fwts --disassemble-aml
Colin
More information about the kernel-team
mailing list