aml-debugger.txt 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. The AML Debugger
  2. Copyright (C) 2016, Intel Corporation
  3. Author: Lv Zheng <[email protected]>
  4. This document describes the usage of the AML debugger embedded in the Linux
  5. kernel.
  6. 1. Build the debugger
  7. The following kernel configuration items are required to enable the AML
  8. debugger interface from the Linux kernel:
  9. CONFIG_ACPI_DEBUGGER=y
  10. CONFIG_ACPI_DEBUGGER_USER=m
  11. The userspace utlities can be built from the kernel source tree using
  12. the following commands:
  13. $ cd tools
  14. $ make acpi
  15. The resultant userspace tool binary is then located at:
  16. tools/acpi/power/acpi/acpidbg/acpidbg
  17. It can be installed to system directories by running "make install" (as a
  18. sufficiently privileged user).
  19. 2. Start the userspace debugger interface
  20. After booting the kernel with the debugger built-in, the debugger can be
  21. started by using the following commands:
  22. # mount -t debugfs none /sys/kernel/debug
  23. # modprobe acpi_dbg
  24. # tools/acpi/power/acpi/acpidbg/acpidbg
  25. That spawns the interactive AML debugger environment where you can execute
  26. debugger commands.
  27. The commands are documented in the "ACPICA Overview and Programmer Reference"
  28. that can be downloaded from
  29. https://acpica.org/documentation
  30. The detailed debugger commands reference is located in Chapter 12 "ACPICA
  31. Debugger Reference". The "help" command can be used for a quick reference.
  32. 3. Stop the userspace debugger interface
  33. The interactive debugger interface can be closed by pressing Ctrl+C or using
  34. the "quit" or "exit" commands. When finished, unload the module with:
  35. # rmmod acpi_dbg
  36. The module unloading may fail if there is an acpidbg instance running.
  37. 4. Run the debugger in a script
  38. It may be useful to run the AML debugger in a test script. "acpidbg" supports
  39. this in a special "batch" mode. For example, the following command outputs
  40. the entire ACPI namespace:
  41. # acpidbg -b "namespace"