Subject: ACPI: Check whether XSDT exists before dump ACPI tables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: ACPI: Check whether XSDT exists before dump ACPI tables
From: Zhao Yakui <yakui.zhao@xxxxxxxxx>

The acpidump tool of 20070714 version has some problems on some
machines.First it will first search XSDT table to
dump ACPI tables. If XSDT exists it will continue search RSDT and
only dump ACPI info that doesn't be dumped through XSDT.
But if XSDT doesn't exist it will report that ACPI tables
can't be found and exit.

So it is necessary to first check whether XSDT table exists.
If XSDT exists(Not check the integrity of XSDT), it will be used to dump
ACPI tables. Otherwise RSDT table will be used.


Signed-off-by: Zhao Yakui  <yakui.zhao@xxxxxxxxx>
---
 acpidump/acpidump.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Index: pmtools-20070714/acpidump/acpidump.c
===================================================================
--- pmtools-20070714.orig/acpidump/acpidump.c
+++ pmtools-20070714/acpidump/acpidump.c
@@ -521,8 +521,11 @@ int main(int argc, char **argv)
 	if (connect) {
 		lseek(fd, sizeof(struct acpi_rsdp_descriptor), SEEK_SET);
 	}
-	if (!acpi_dump_XSDT(fd, &rsdpx))
-		goto not_found;
+	if (rsdpx.revision > 1 && rsdpx.xsdt_physical_address) {
+		/* ACPIDUMP uses xsdt table */
+		if (!acpi_dump_XSDT(fd, &rsdpx))
+			goto not_found;
+	}
 	if (!acpi_dump_RSDT(fd, &rsdpx))
 		goto not_found;
 	if (connect) {
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux