linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Subject: ACPI: Check whether XSDT exists before dump ACPI tables
@ 2007-11-20  8:33 Zhao Yakui
  2007-11-20 17:59 ` Len Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Zhao Yakui @ 2007-11-20  8:33 UTC (permalink / raw)
  To: lenb; +Cc: linux-acpi

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

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@intel.com>
---
 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) {

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Subject: ACPI: Check whether XSDT exists before dump ACPI tables
  2007-11-20  8:33 Subject: ACPI: Check whether XSDT exists before dump ACPI tables Zhao Yakui
@ 2007-11-20 17:59 ` Len Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2007-11-20 17:59 UTC (permalink / raw)
  To: Zhao Yakui; +Cc: linux-acpi

This patch is included in the latest release:

http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/utils/pmtools-20071116.tar.gz

thanks,
-Len

On Tuesday 20 November 2007 03:33, Zhao Yakui wrote:
> Subject: ACPI: Check whether XSDT exists before dump ACPI tables
> From: Zhao Yakui <yakui.zhao@intel.com>
> 
> 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@intel.com>
> ---
>  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) {
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-20 17:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-20  8:33 Subject: ACPI: Check whether XSDT exists before dump ACPI tables Zhao Yakui
2007-11-20 17:59 ` Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).