From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754935AbcGELSZ (ORCPT ); Tue, 5 Jul 2016 07:18:25 -0400 Received: from mga03.intel.com ([134.134.136.65]:31572 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754913AbcGELSW (ORCPT ); Tue, 5 Jul 2016 07:18:22 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,579,1459839600"; d="scan'208";a="134070348" From: Lv Zheng To: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Len Brown Cc: Lv Zheng , Lv Zheng , , linux-acpi@vger.kernel.org Subject: [PATCH 3/5] ACPI / debugger: Add AML debugger documentation Date: Tue, 5 Jul 2016 19:18:13 +0800 Message-Id: <8c221ad3601f62334bc4133e31e08285029c45d8.1467717305.git.lv.zheng@intel.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds AML debugger documentation. Signed-off-by: Lv Zheng --- Documentation/acpi/aml-debugger.txt | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Documentation/acpi/aml-debugger.txt diff --git a/Documentation/acpi/aml-debugger.txt b/Documentation/acpi/aml-debugger.txt new file mode 100644 index 0000000..0789332 --- /dev/null +++ b/Documentation/acpi/aml-debugger.txt @@ -0,0 +1,56 @@ +The AML Debugger + +Copyright (C) 2016, Intel Corporation +Author: Lv Zheng + + +Abstract: + +This document describes the usage of the AML debugger embedded in the Linux +kernel. + +1. Build the debugger + + The following kernel configuration items are required to enable the AML + debugger interface from the Linux kernel: + CONFIG_ACPI_DEBUGGER=y + CONFIG_ACPI_DEBUGGER_USER=m + The userspace utlities can be built from the kernel source tree using + the following commands: + # cd tools + # make acpi + The built userspace tool can be found at: + tools/acpi/power/acpi/acpidbg/acpidbg + You can install it to the system directories using the following + command: + # sudo make install + +2. Start the userspace debugger interface + + After booting the kernel with the debugger built-in, developers can + start the debugger with the following commands: + # sudo mount -t debugfs none /sys/kernel/debug + # sudo modprobe acpi_dbg + # sudo tools/acpi/power/acpi/acpidbg/acpidbg + Now you have entered the interactive AML debugger environment, where + you can execute the debugger functionalities by typing the debugger + commands. + You can start to use it from typing "help" command and can download + from the following site: + https://acpica.org/documentation + And find detailed command reference in "Chapter 12. ACPICA Debugger + Reference". + +3. Stop the userspace debugger interface + + You can type the Ctrl+C, quit, exit to end the interactive debugger + interface. And unload the module with the following commands: + # sudo rmmod acpi_dbg + The module unloading may fail if there is an acpidbg instance running. + +4. Run the debugger in a script + + It will be very useful to have the ability to run the AML debugger in + a test script. "acpidbg" supports this in a special "batch" mode. For + example, the following command outputs the entire ACPI namespace: + # sudo acpidbg -b "namespace" -- 1.7.10