aml-debugger.rst 2.1 KB

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