aboutsummaryrefslogtreecommitdiff
path: root/tools/power/acpi/tools/acpidump/apmain.c
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2014-04-30 10:05:48 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-05-07 00:55:02 +0200
commitc79322677d95c7cab65e02828677b43d8656eb61 (patch)
tree1e9beedc40d76f21884a82f927fa2fb2707b38d0 /tools/power/acpi/tools/acpidump/apmain.c
parentfea79bc01cb184432309148af9bf53a961a4d920 (diff)
downloadlinux-stericsson-c79322677d95c7cab65e02828677b43d8656eb61.tar.gz
ACPICA: acpidump: Add support to force using RSDT.
This patch adds "-x" and "-x -x" options to disable XSDT for acpidump. The single "-x" can be used to stop using XSDT, RSDT will be forced to find static tables, note that XSDT will still be dumped. The double "-x" can stop dumping XSDT, which is useful when the XSDT address reported by RSDP is pointing to an invalid address. It is reported there are platforms having broken XSDT shipped, acpidump will stop working while accessing such XSDT. This patch adds new option so that users can force acpidump to dump tables listed in the RSDT. Lv Zheng. Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=73911 Buglink: https://bugs.archlinux.org/task/39811 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Reported-and-tested-by: Bruce Chiarelli <mano155@gmail.com> Reported-and-tested-by: Spyros Stathopoulos <spystath@gmail.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/power/acpi/tools/acpidump/apmain.c')
-rw-r--r--tools/power/acpi/tools/acpidump/apmain.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/power/acpi/tools/acpidump/apmain.c b/tools/power/acpi/tools/acpidump/apmain.c
index 70d71ec687a5..51e8d638db18 100644
--- a/tools/power/acpi/tools/acpidump/apmain.c
+++ b/tools/power/acpi/tools/acpidump/apmain.c
@@ -80,7 +80,7 @@ struct ap_dump_action action_table[AP_MAX_ACTIONS];
u32 current_action = 0;
#define AP_UTILITY_NAME "ACPI Binary Table Dump Utility"
-#define AP_SUPPORTED_OPTIONS "?a:bcf:hn:o:r:svz"
+#define AP_SUPPORTED_OPTIONS "?a:bcf:hn:o:r:svxz"
/******************************************************************************
*
@@ -109,6 +109,8 @@ static void ap_display_usage(void)
ACPI_OPTION("-a <Address>", "Get table via a physical address");
ACPI_OPTION("-f <BinaryFile>", "Get table via a binary file");
ACPI_OPTION("-n <Signature>", "Get table via a name/signature");
+ ACPI_OPTION("-x", "Do not use but dump XSDT");
+ ACPI_OPTION("-x -x", "Do not use or dump XSDT");
printf("\n"
"Invocation without parameters dumps all available tables\n"
@@ -210,6 +212,15 @@ static int ap_do_options(int argc, char **argv)
gbl_summary_mode = TRUE;
continue;
+ case 'x': /* Do not use XSDT */
+
+ if (!acpi_gbl_do_not_use_xsdt) {
+ acpi_gbl_do_not_use_xsdt = TRUE;
+ } else {
+ gbl_do_not_dump_xsdt = TRUE;
+ }
+ continue;
+
case 'v': /* Revision/version */
printf(ACPI_COMMON_SIGNON(AP_UTILITY_NAME));