2003-08-07 21:14:31

by Alex Williamson

[permalink] [raw]
Subject: [PATCH] Check for X__DSDT in acpi_get_table_header_early()

--- linux/drivers/acpi/tables.c 2003-07-27 11:00:40.000000000 -0600
+++ linux/drivers/acpi/tables.c 2003-08-07 14:15:11.000000000 -0600
@@ -256,10 +256,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->header.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;


Attachments:
xdsdt.diff (886.00 B)