- patches.apparmor/remove_suid_new_case_in_2.6.22.diff: Merge fix.
[linux-flexiantxendom0-3.2.10.git] / drivers / acpi / tables / tbfadt.c
index 807c711..1285e91 100644 (file)
@@ -334,7 +334,8 @@ static void acpi_tb_convert_fadt(void)
                                     (acpi_gbl_FADT.xpm1a_event_block.address +
                                      pm1_register_length));
        /* Don't forget to copy space_id of the GAS */
-       acpi_gbl_xpm1a_enable.space_id = acpi_gbl_FADT.xpm1a_event_block.space_id;
+       acpi_gbl_xpm1a_enable.space_id =
+           acpi_gbl_FADT.xpm1a_event_block.space_id;
 
        /* The PM1B register block is optional, ignore if not present */
 
@@ -344,9 +345,22 @@ static void acpi_tb_convert_fadt(void)
                                             (acpi_gbl_FADT.xpm1b_event_block.
                                              address + pm1_register_length));
                /* Don't forget to copy space_id of the GAS */
-               acpi_gbl_xpm1b_enable.space_id = acpi_gbl_FADT.xpm1a_event_block.space_id;
+               acpi_gbl_xpm1b_enable.space_id =
+                   acpi_gbl_FADT.xpm1a_event_block.space_id;
 
        }
+
+       /*
+        * For ACPI 1.0 FADTs, ensure that reserved fields (which should be zero)
+        * are indeed zero. This will workaround BIOSs that inadvertently placed
+        * values in these fields.
+        */
+       if (acpi_gbl_FADT.header.revision < 3) {
+               acpi_gbl_FADT.preferred_profile = 0;
+               acpi_gbl_FADT.pstate_control = 0;
+               acpi_gbl_FADT.cst_control = 0;
+               acpi_gbl_FADT.boot_flags = 0;
+       }
 }
 
 /******************************************************************************