]> git.hungrycats.org Git - linux/commitdiff
[ACPI] handle system with NULL DSDT and valid XDSDT
authorLen Brown <len.brown@intel.com>
Mon, 26 Jan 2004 11:55:20 +0000 (06:55 -0500)
committerLen Brown <lenb@dhcppc3.>
Mon, 26 Jan 2004 11:55:20 +0000 (06:55 -0500)
        from ia64 via Alex Williamson

drivers/acpi/tables.c

index b9bb42f9e37aeeef9cf2d028610d3fd1943b3c1b..e997203d754b3a7ca4041064c85ab611c259e759 100644 (file)
@@ -276,10 +276,17 @@ acpi_get_table_header_early (
 
        /* 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;