public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH] 2.4/2.6 use xdsdt to print table header
@ 2004-01-13  7:38 Yu, Luming
       [not found] ` <3ACA40606221794F80A5670F0AF15F8401720CC2-SRlDPOYGfgogGBtAFL8yw7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Yu, Luming @ 2004-01-13  7:38 UTC (permalink / raw)
  To: Alex Williamson, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: Brown, Len

>    I'm resending this patch to get it into the main ACPI source.  This
> fixes a problem where the DSDT pointer in the FADT is NULL because it
> uses the 64bit XDSDT instead.  The current code is happy to map a NULL
> address and return success to the caller.  This can crash the 
> system or
> printout garbage headers to the console.  It's a simple 
> matter to check
> table revision and use the XDSDT in favor of the DSDT.  This has been
> living happily in both the 2.4 and 2.6 ia64 tree for some 
> time.  Please
> accept.  Thanks,

I just checked with http://lia64.bkbits.net:8080/linux-ia64-2.4 .
The patch has been merged. Please take a look at
http://lia64.bkbits.net:8080/linux-ia64-2.4/diffs/drivers/acpi/tables.c@
1.11.1.1?nav=index.html|src/.|src/drivers|src/drivers/acpi|hist/drivers/
acpi/tables.c
and
http://lia64.bkbits.net:8080/linux-ia64-2.4/diffs/drivers/acpi/tables.c@
1.11.1.2?nav=index.html|src/.|src/drivers|src/drivers/acpi|hist/drivers/
acpi/tables.c


-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html

^ permalink raw reply	[flat|nested] 5+ messages in thread
* RE: [PATCH] 2.4/2.6 use xdsdt to print table header
@ 2004-01-18  2:41 Yu, Luming
  0 siblings, 0 replies; 5+ messages in thread
From: Yu, Luming @ 2004-01-18  2:41 UTC (permalink / raw)
  To: Alex Williamson
  Cc: linux-kernel, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	Brown, Len


> indefinitely.  This is a generic ACPI issue for an system that chooses
> to use the xdsdt in place of the dsdt.  It should be included in the
> ACPI tree and pushed up from there.  Thanks,
> 
All right, I'll push this to Len.


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH] 2.4/2.6 use xdsdt to print table header
@ 2004-01-13  0:32 Alex Williamson
       [not found] ` <1073953935.6497.173.camel-Wmjt7DDUnIVxnVILBQAtiA@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Williamson @ 2004-01-13  0:32 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: len.brown-ral2JQCrhuEAvxtiuMwx3w


   I'm resending this patch to get it into the main ACPI source.  This
fixes a problem where the DSDT pointer in the FADT is NULL because it
uses the 64bit XDSDT instead.  The current code is happy to map a NULL
address and return success to the caller.  This can crash the system or
printout garbage headers to the console.  It's a simple matter to check
table revision and use the XDSDT in favor of the DSDT.  This has been
living happily in both the 2.4 and 2.6 ia64 tree for some time.  Please
accept.  Thanks,

	Alex

-- 
Alex Williamson                             HP Linux & Open Source Lab

diff -Nru a/drivers/acpi/tables.c b/drivers/acpi/tables.c
--- a/drivers/acpi/tables.c	Mon Jan 12 15:37:12 2004
+++ b/drivers/acpi/tables.c	Mon Jan 12 15:37:12 2004
@@ -262,10 +262,17 @@
 
 	/* Map the DSDT header via the pointer in the FADT */
 	if (id == ACPI_DSDT) {
-		struct acpi_table_fadt *fadt = (struct acpi_table_fadt *) *header;
+		struct fadt_descriptor_rev2 *fadt = (struct fadt_descriptor_rev2 *) *header;
+
+		if (fadt->revision == 3 && fadt->Xdsdt) {
+			*header = (void *) __acpi_map_table(fadt->Xdsdt,
+					sizeof(struct acpi_table_header));
+		} else if (fadt->V1_dsdt) {
+			*header = (void *) __acpi_map_table(fadt->V1_dsdt,
+					sizeof(struct acpi_table_header));
+		} else
+			*header = 0;
 
-		*header = (void *) __acpi_map_table(fadt->dsdt_addr,
-				sizeof(struct acpi_table_header));
 		if (!*header) {
 			printk(KERN_WARNING PREFIX "Unable to map DSDT\n");
 			return -ENODEV;





-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html

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

end of thread, other threads:[~2004-01-26 21:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-13  7:38 [PATCH] 2.4/2.6 use xdsdt to print table header Yu, Luming
     [not found] ` <3ACA40606221794F80A5670F0AF15F8401720CC2-SRlDPOYGfgogGBtAFL8yw7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-01-13 15:28   ` Alex Williamson
  -- strict thread matches above, loose matches on Subject: below --
2004-01-18  2:41 Yu, Luming
2004-01-13  0:32 Alex Williamson
     [not found] ` <1073953935.6497.173.camel-Wmjt7DDUnIVxnVILBQAtiA@public.gmane.org>
2004-01-26 21:58   ` Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox