diff options
| author | Lin Ming <ming.m.lin@intel.com> | 2010-04-08 02:34:27 -0400 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2010-04-20 10:43:16 -0400 |
| commit | aa2110cb1a7510f9b834adfb39b05d4843a35d35 (patch) | |
| tree | 0dda563bb8a8251fb6f6b878f16598a3901f992f | |
| parent | 43323cb4c4b619414913f54fef9d492aabadd033 (diff) | |
ACPI: add boot option acpi=copy_dsdt to fix corrupt DSDT
Some BIOS on Toshiba machines corrupt the DSDT, so add a new
boot option acpi=copy_dsdt to workaround it.
Add warning message to ask users to use this option if corrupt DSDT detected.
Also build a DMI blacklist to check it and automatically copy DSDT.
https://bugzilla.kernel.org/show_bug.cgi?id=14679
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
| -rw-r--r-- | Documentation/kernel-parameters.txt | 1 | ||||
| -rw-r--r-- | arch/x86/kernel/acpi/boot.c | 4 | ||||
| -rw-r--r-- | drivers/acpi/acpica/tbutils.c | 4 | ||||
| -rw-r--r-- | drivers/acpi/bus.c | 37 |
4 files changed, 46 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index e2202e93b148..93f113a1b326 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
| @@ -151,6 +151,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
| 151 | strict -- Be less tolerant of platforms that are not | 151 | strict -- Be less tolerant of platforms that are not |
| 152 | strictly ACPI specification compliant. | 152 | strictly ACPI specification compliant. |
| 153 | rsdt -- prefer RSDT over (default) XSDT | 153 | rsdt -- prefer RSDT over (default) XSDT |
| 154 | copy_dsdt -- copy DSDT to memory | ||
| 154 | 155 | ||
| 155 | See also Documentation/power/pm.txt, pci=noacpi | 156 | See also Documentation/power/pm.txt, pci=noacpi |
| 156 | 157 | ||
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index cd40aba6aa95..b9629384263c 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
| @@ -1576,6 +1576,10 @@ static int __init parse_acpi(char *arg) | |||
| 1576 | /* "acpi=noirq" disables ACPI interrupt routing */ | 1576 | /* "acpi=noirq" disables ACPI interrupt routing */ |
| 1577 | else if (strcmp(arg, "noirq") == 0) { | 1577 | else if (strcmp(arg, "noirq") == 0) { |
| 1578 | acpi_noirq_set(); | 1578 | acpi_noirq_set(); |
| 1579 | } | ||
| 1580 | /* "acpi=copy_dsdt" copys DSDT */ | ||
| 1581 | else if (strcmp(arg, "copy_dsdt") == 0) { | ||
| 1582 | acpi_gbl_copy_dsdt_locally = 1; | ||
| 1579 | } else { | 1583 | } else { |
| 1580 | /* Core will printk when we return error. */ | 1584 | /* Core will printk when we return error. */ |
| 1581 | return -EINVAL; | 1585 | return -EINVAL; |
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c index 54a8712bae62..a9b105fc2e55 100644 --- a/drivers/acpi/acpica/tbutils.c +++ b/drivers/acpi/acpica/tbutils.c | |||
| @@ -373,6 +373,10 @@ void acpi_tb_check_dsdt_header(void) | |||
| 373 | acpi_tb_print_table_header(0, &acpi_gbl_original_dsdt_header); | 373 | acpi_tb_print_table_header(0, &acpi_gbl_original_dsdt_header); |
| 374 | acpi_tb_print_table_header(0, acpi_gbl_DSDT); | 374 | acpi_tb_print_table_header(0, acpi_gbl_DSDT); |
| 375 | 375 | ||
| 376 | ACPI_ERROR((AE_INFO, | ||
| 377 | "Please send DMI info to linux-acpi@vger.kernel.org\n" | ||
| 378 | "If system does not work as expected, please boot with acpi=copy_dsdt")); | ||
| 379 | |||
| 376 | /* Disable further error messages */ | 380 | /* Disable further error messages */ |
| 377 | 381 | ||
| 378 | acpi_gbl_original_dsdt_header.length = acpi_gbl_DSDT->length; | 382 | acpi_gbl_original_dsdt_header.length = acpi_gbl_DSDT->length; |
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 37132dc2da03..49af19bb8c9b 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
| @@ -69,6 +69,37 @@ static struct dmi_system_id __cpuinitdata power_nocheck_dmi_table[] = { | |||
| 69 | }; | 69 | }; |
| 70 | 70 | ||
| 71 | 71 | ||
| 72 | static int set_copy_dsdt(const struct dmi_system_id *id) | ||
| 73 | { | ||
| 74 | printk(KERN_NOTICE "%s detected - " | ||
| 75 | "force copy of DSDT to local memory\n", id->ident); | ||
| 76 | acpi_gbl_copy_dsdt_locally = 1; | ||
| 77 | return 0; | ||
| 78 | } | ||
| 79 | |||
| 80 | static struct dmi_system_id dsdt_dmi_table[] __initdata = { | ||
| 81 | /* | ||
| 82 | * Insyde BIOS on some TOSHIBA machines corrupt the DSDT. | ||
| 83 | * https://bugzilla.kernel.org/show_bug.cgi?id=14679 | ||
| 84 | */ | ||
| 85 | { | ||
| 86 | .callback = set_copy_dsdt, | ||
| 87 | .ident = "TOSHIBA Satellite A505", | ||
| 88 | .matches = { | ||
| 89 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | ||
| 90 | DMI_MATCH(DMI_PRODUCT_NAME, "Satellite A505"), | ||
| 91 | }, | ||
| 92 | }, | ||
| 93 | { | ||
| 94 | .callback = set_copy_dsdt, | ||
| 95 | .ident = "TOSHIBA Satellite L505D", | ||
| 96 | .matches = { | ||
| 97 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | ||
| 98 | DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L505D"), | ||
| 99 | }, | ||
| 100 | } | ||
| 101 | }; | ||
| 102 | |||
| 72 | /* -------------------------------------------------------------------------- | 103 | /* -------------------------------------------------------------------------- |
| 73 | Device Management | 104 | Device Management |
| 74 | -------------------------------------------------------------------------- */ | 105 | -------------------------------------------------------------------------- */ |
| @@ -813,6 +844,12 @@ void __init acpi_early_init(void) | |||
| 813 | 844 | ||
| 814 | acpi_gbl_permanent_mmap = 1; | 845 | acpi_gbl_permanent_mmap = 1; |
| 815 | 846 | ||
| 847 | /* | ||
| 848 | * If the machine falls into the DMI check table, | ||
| 849 | * DSDT will be copied to memory | ||
| 850 | */ | ||
| 851 | dmi_check_system(dsdt_dmi_table); | ||
| 852 | |||
| 816 | status = acpi_reallocate_root_table(); | 853 | status = acpi_reallocate_root_table(); |
| 817 | if (ACPI_FAILURE(status)) { | 854 | if (ACPI_FAILURE(status)) { |
| 818 | printk(KERN_ERR PREFIX | 855 | printk(KERN_ERR PREFIX |
