0001 .. SPDX-License-Identifier: GPL-2.0
0002 .. include:: <isonum.txt>
0003
0004 ================
0005 The AML Debugger
0006 ================
0007
0008 :Copyright: |copy| 2016, Intel Corporation
0009 :Author: Lv Zheng <lv.zheng@intel.com>
0010
0011
0012 This document describes the usage of the AML debugger embedded in the Linux
0013 kernel.
0014
0015 1. Build the debugger
0016 =====================
0017
0018 The following kernel configuration items are required to enable the AML
0019 debugger interface from the Linux kernel::
0020
0021 CONFIG_ACPI_DEBUGGER=y
0022 CONFIG_ACPI_DEBUGGER_USER=m
0023
0024 The userspace utilities can be built from the kernel source tree using
0025 the following commands::
0026
0027 $ cd tools
0028 $ make acpi
0029
0030 The resultant userspace tool binary is then located at::
0031
0032 tools/power/acpi/acpidbg
0033
0034 It can be installed to system directories by running "make install" (as a
0035 sufficiently privileged user).
0036
0037 2. Start the userspace debugger interface
0038 =========================================
0039
0040 After booting the kernel with the debugger built-in, the debugger can be
0041 started by using the following commands::
0042
0043 # mount -t debugfs none /sys/kernel/debug
0044 # modprobe acpi_dbg
0045 # tools/power/acpi/acpidbg
0046
0047 That spawns the interactive AML debugger environment where you can execute
0048 debugger commands.
0049
0050 The commands are documented in the "ACPICA Overview and Programmer Reference"
0051 that can be downloaded from
0052
0053 https://acpica.org/documentation
0054
0055 The detailed debugger commands reference is located in Chapter 12 "ACPICA
0056 Debugger Reference". The "help" command can be used for a quick reference.
0057
0058 3. Stop the userspace debugger interface
0059 ========================================
0060
0061 The interactive debugger interface can be closed by pressing Ctrl+C or using
0062 the "quit" or "exit" commands. When finished, unload the module with::
0063
0064 # rmmod acpi_dbg
0065
0066 The module unloading may fail if there is an acpidbg instance running.
0067
0068 4. Run the debugger in a script
0069 ===============================
0070
0071 It may be useful to run the AML debugger in a test script. "acpidbg" supports
0072 this in a special "batch" mode. For example, the following command outputs
0073 the entire ACPI namespace::
0074
0075 # acpidbg -b "namespace"