[kernel] r16280 - in dists/sid/linux-2.6/debian: . patches/bugfix/all patches/series
Ben Hutchings
benh at alioth.debian.org
Tue Sep 14 02:23:08 UTC 2010
Author: benh
Date: Tue Sep 14 02:23:05 2010
New Revision: 16280
Log:
ACPI: add boot option acpi=copy_dsdt to fix corrupt DSDT
...and enable this automatically for known-bad Toshiba models (Closes: #596709)
And add the other required patches.
Added:
dists/sid/linux-2.6/debian/patches/bugfix/all/ACPI-add-boot-option-acpi-copy_dsdt.patch
dists/sid/linux-2.6/debian/patches/bugfix/all/ACPI-fix-early-DSDT-dmi-check-warnings-on-ia64.patch
dists/sid/linux-2.6/debian/patches/bugfix/all/ACPICA-Add-detection-of-corrupted-replaced-DSDT.patch
dists/sid/linux-2.6/debian/patches/bugfix/all/ACPICA-Add-subsystem-option-to-force-copy-of-DSDT.patch
dists/sid/linux-2.6/debian/patches/bugfix/all/ACPICA-Update-DSDT-copy-detection.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/22
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Mon Sep 13 21:17:48 2010 (r16279)
+++ dists/sid/linux-2.6/debian/changelog Tue Sep 14 02:23:05 2010 (r16280)
@@ -56,6 +56,8 @@
* ALSA: emux: Add trivial compat ioctl handler (Closes: #596478)
* hostap_pci: set dev->base_addr during probe (Closes: #595802)
* ethtool: allow non-netadmin to query settings (see #520724)
+ * ACPI: add boot option acpi=copy_dsdt to fix corrupt DSDT, and enable this
+ automatically for known-bad Toshiba models (Closes: #596709)
[ Bastian Blank ]
* Use Breaks instead of Conflicts.
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/ACPI-add-boot-option-acpi-copy_dsdt.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/ACPI-add-boot-option-acpi-copy_dsdt.patch Tue Sep 14 02:23:05 2010 (r16280)
@@ -0,0 +1,123 @@
+From: Lin Ming <ming.m.lin at intel.com>
+Date: Thu, 8 Apr 2010 14:34:27 +0800
+Subject: [PATCH] ACPI: add boot option acpi=copy_dsdt to fix corrupt DSDT
+
+commit aa2110cb1a7510f9b834adfb39b05d4843a35d35 upstream.
+
+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 at intel.com>
+Signed-off-by: Len Brown <len.brown at intel.com>
+---
+ Documentation/kernel-parameters.txt | 1 +
+ arch/x86/kernel/acpi/boot.c | 4 +++
+ drivers/acpi/acpica/tbutils.c | 4 +++
+ 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 e2202e9..93f113a 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
+ strict -- Be less tolerant of platforms that are not
+ strictly ACPI specification compliant.
+ rsdt -- prefer RSDT over (default) XSDT
++ copy_dsdt -- copy DSDT to memory
+
+ See also Documentation/power/pm.txt, pci=noacpi
+
+diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
+index cd40aba..b962938 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)
+ /* "acpi=noirq" disables ACPI interrupt routing */
+ else if (strcmp(arg, "noirq") == 0) {
+ acpi_noirq_set();
++ }
++ /* "acpi=copy_dsdt" copys DSDT */
++ else if (strcmp(arg, "copy_dsdt") == 0) {
++ acpi_gbl_copy_dsdt_locally = 1;
+ } else {
+ /* Core will printk when we return error. */
+ return -EINVAL;
+diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
+index 54a8712..a9b105f 100644
+--- a/drivers/acpi/acpica/tbutils.c
++++ b/drivers/acpi/acpica/tbutils.c
+@@ -373,6 +373,10 @@ void acpi_tb_check_dsdt_header(void)
+ acpi_tb_print_table_header(0, &acpi_gbl_original_dsdt_header);
+ acpi_tb_print_table_header(0, acpi_gbl_DSDT);
+
++ ACPI_ERROR((AE_INFO,
++ "Please send DMI info to linux-acpi at vger.kernel.org\n"
++ "If system does not work as expected, please boot with acpi=copy_dsdt"));
++
+ /* Disable further error messages */
+
+ acpi_gbl_original_dsdt_header.length = acpi_gbl_DSDT->length;
+diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
+index 37132dc..49af19b 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[] = {
+ };
+
+
++static int set_copy_dsdt(const struct dmi_system_id *id)
++{
++ printk(KERN_NOTICE "%s detected - "
++ "force copy of DSDT to local memory\n", id->ident);
++ acpi_gbl_copy_dsdt_locally = 1;
++ return 0;
++}
++
++static struct dmi_system_id dsdt_dmi_table[] __initdata = {
++ /*
++ * Insyde BIOS on some TOSHIBA machines corrupt the DSDT.
++ * https://bugzilla.kernel.org/show_bug.cgi?id=14679
++ */
++ {
++ .callback = set_copy_dsdt,
++ .ident = "TOSHIBA Satellite A505",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "Satellite A505"),
++ },
++ },
++ {
++ .callback = set_copy_dsdt,
++ .ident = "TOSHIBA Satellite L505D",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L505D"),
++ },
++ }
++};
++
+ /* --------------------------------------------------------------------------
+ Device Management
+ -------------------------------------------------------------------------- */
+@@ -813,6 +844,12 @@ void __init acpi_early_init(void)
+
+ acpi_gbl_permanent_mmap = 1;
+
++ /*
++ * If the machine falls into the DMI check table,
++ * DSDT will be copied to memory
++ */
++ dmi_check_system(dsdt_dmi_table);
++
+ status = acpi_reallocate_root_table();
+ if (ACPI_FAILURE(status)) {
+ printk(KERN_ERR PREFIX
+--
+1.7.1
+
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/ACPI-fix-early-DSDT-dmi-check-warnings-on-ia64.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/ACPI-fix-early-DSDT-dmi-check-warnings-on-ia64.patch Tue Sep 14 02:23:05 2010 (r16280)
@@ -0,0 +1,54 @@
+From: Lin Ming <ming.m.lin at intel.com>
+Date: Wed, 12 May 2010 09:26:48 +0800
+Subject: [PATCH] ACPI: fix early DSDT dmi check warnings on ia64
+
+commit cce4f632db200aef147c59084437168174b23f11 upstream.
+
+WARNING: at drivers/firmware/dmi_scan.c:423 dmi_matches+0x70/0x160()
+dmi check: not initialized yet.
+
+This is caused by commit aa2110c
+(ACPI: add boot option acpi=copy_dsdt to fix corrupt DSDT).
+DMI is not initialized yet in acpi_early_init on ia64.
+
+The DSDT DMI check table is x86 specific, so make it empty on other archs.
+And this fixes the warnings on ia64.
+
+Reported-and-tested-by: Tony Luck <tony.luck at intel.com>
+Signed-off-by: Lin Ming <ming.m.lin at intel.com>
+Signed-off-by: Len Brown <len.brown at intel.com>
+---
+ drivers/acpi/bus.c | 9 ++++++++-
+ 1 files changed, 8 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
+index 49af19b..e1bfe71 100644
+--- a/drivers/acpi/bus.c
++++ b/drivers/acpi/bus.c
+@@ -69,6 +69,7 @@ static struct dmi_system_id __cpuinitdata power_nocheck_dmi_table[] = {
+ };
+
+
++#ifdef CONFIG_X86
+ static int set_copy_dsdt(const struct dmi_system_id *id)
+ {
+ printk(KERN_NOTICE "%s detected - "
+@@ -97,8 +98,14 @@ static struct dmi_system_id dsdt_dmi_table[] __initdata = {
+ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L505D"),
+ },
+- }
++ },
++ {}
+ };
++#else
++static struct dmi_system_id dsdt_dmi_table[] __initdata = {
++ {}
++};
++#endif
+
+ /* --------------------------------------------------------------------------
+ Device Management
+--
+1.7.1
+
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/ACPICA-Add-detection-of-corrupted-replaced-DSDT.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/ACPICA-Add-detection-of-corrupted-replaced-DSDT.patch Tue Sep 14 02:23:05 2010 (r16280)
@@ -0,0 +1,170 @@
+From: Lin Ming <ming.m.lin at intel.com>
+Date: Thu, 1 Apr 2010 10:47:56 +0800
+Subject: [PATCH] ACPICA: Add detection of corrupted/replaced DSDT
+
+commit 729df0f848daf2f17d02107199fa92efe909d995 upstream.
+
+This change adds support to detect a DSDT that has been corrupted
+and/or replaced from outside the OS (by firmware). This is
+typically catastrophic for the system, but has been seen on
+some machines.
+
+https://bugzilla.kernel.org/show_bug.cgi?id=14679
+
+Signed-off-by: Lin Ming <ming.m.lin at intel.com>
+Signed-off-by: Bob Moore <robert.moore at intel.com>
+Signed-off-by: Len Brown <len.brown at intel.com>
+---
+ drivers/acpi/acpica/acglobal.h | 5 +++++
+ drivers/acpi/acpica/actables.h | 2 ++
+ drivers/acpi/acpica/psxface.c | 4 ++++
+ drivers/acpi/acpica/tbutils.c | 38 ++++++++++++++++++++++++++++++++++++++
+ drivers/acpi/acpica/tbxface.c | 32 ++++++++++++--------------------
+ 5 files changed, 61 insertions(+), 20 deletions(-)
+
+diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
+index 2b2e61e..a419fe9 100644
+--- a/drivers/acpi/acpica/acglobal.h
++++ b/drivers/acpi/acpica/acglobal.h
+@@ -165,6 +165,11 @@ ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1a_enable;
+ ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1b_status;
+ ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1b_enable;
+
++/* DSDT information. Used to check for DSDT corruption */
++
++ACPI_EXTERN struct acpi_table_desc *acpi_gbl_DSDT;
++ACPI_EXTERN struct acpi_table_header acpi_gbl_original_dsdt_header;
++
+ /*
+ * Handle both ACPI 1.0 and ACPI 2.0 Integer widths. The integer width is
+ * determined by the revision of the DSDT: If the DSDT revision is less than
+diff --git a/drivers/acpi/acpica/actables.h b/drivers/acpi/acpica/actables.h
+index 8ff3b74..fc52b6f 100644
+--- a/drivers/acpi/acpica/actables.h
++++ b/drivers/acpi/acpica/actables.h
+@@ -107,6 +107,8 @@ u8 acpi_tb_checksum(u8 *buffer, u32 length);
+ acpi_status
+ acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length);
+
++void acpi_tb_check_dsdt_header(void);
++
+ void
+ acpi_tb_install_table(acpi_physical_address address,
+ char *signature, u32 table_index);
+diff --git a/drivers/acpi/acpica/psxface.c b/drivers/acpi/acpica/psxface.c
+index 6064dd4..67e7ad5 100644
+--- a/drivers/acpi/acpica/psxface.c
++++ b/drivers/acpi/acpica/psxface.c
+@@ -220,6 +220,10 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info)
+
+ ACPI_FUNCTION_TRACE(ps_execute_method);
+
++ /* Quick validation of DSDT header */
++
++ acpi_tb_check_dsdt_header();
++
+ /* Validate the Info and method Node */
+
+ if (!info || !info->resolved_node) {
+diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
+index f47a70e..07bc743 100644
+--- a/drivers/acpi/acpica/tbutils.c
++++ b/drivers/acpi/acpica/tbutils.c
+@@ -349,6 +349,44 @@ u8 acpi_tb_checksum(u8 *buffer, u32 length)
+
+ /*******************************************************************************
+ *
++ * FUNCTION: acpi_tb_check_dsdt_header
++ *
++ * PARAMETERS: None
++ *
++ * RETURN: None
++ *
++ * DESCRIPTION: Quick compare to check validity of the DSDT. This will detect
++ * if the DSDT has been replaced from outside the OS and/or if
++ * the DSDT header has been corrupted.
++ *
++ ******************************************************************************/
++
++void acpi_tb_check_dsdt_header(void)
++{
++
++ /* Compare original length and checksum to current values */
++
++ if (acpi_gbl_original_dsdt_header.length !=
++ acpi_gbl_DSDT->pointer->length
++ || acpi_gbl_original_dsdt_header.checksum !=
++ acpi_gbl_DSDT->pointer->checksum) {
++ ACPI_ERROR((AE_INFO,
++ "The DSDT has been corrupted or replaced - old, new headers below"));
++ acpi_tb_print_table_header(0, &acpi_gbl_original_dsdt_header);
++ acpi_tb_print_table_header(acpi_gbl_DSDT->address,
++ acpi_gbl_DSDT->pointer);
++
++ /* Disable further error messages */
++
++ acpi_gbl_original_dsdt_header.length =
++ acpi_gbl_DSDT->pointer->length;
++ acpi_gbl_original_dsdt_header.checksum =
++ acpi_gbl_DSDT->pointer->checksum;
++ }
++}
++
++/*******************************************************************************
++ *
+ * FUNCTION: acpi_tb_install_table
+ *
+ * PARAMETERS: Address - Physical address of DSDT or FACS
+diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
+index 684614d..3056510 100644
+--- a/drivers/acpi/acpica/tbxface.c
++++ b/drivers/acpi/acpica/tbxface.c
+@@ -518,33 +518,25 @@ static acpi_status acpi_tb_load_namespace(void)
+
+ (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
+
++ acpi_gbl_DSDT = &acpi_gbl_root_table_list.tables[ACPI_TABLE_INDEX_DSDT];
++
+ /*
+- * Load the namespace. The DSDT is required, but any SSDT and PSDT tables
+- * are optional.
++ * Load the namespace. The DSDT is required, but any SSDT and
++ * PSDT tables are optional. Verify the DSDT.
+ */
+ if (!acpi_gbl_root_table_list.count ||
+- !ACPI_COMPARE_NAME(&
+- (acpi_gbl_root_table_list.
+- tables[ACPI_TABLE_INDEX_DSDT].signature),
+- ACPI_SIG_DSDT)
+- ||
+- ACPI_FAILURE(acpi_tb_verify_table
+- (&acpi_gbl_root_table_list.
+- tables[ACPI_TABLE_INDEX_DSDT]))) {
++ !ACPI_COMPARE_NAME(&acpi_gbl_DSDT->signature, ACPI_SIG_DSDT) ||
++ ACPI_FAILURE(acpi_tb_verify_table(acpi_gbl_DSDT))) {
+ status = AE_NO_ACPI_TABLES;
+ goto unlock_and_exit;
+ }
+
+- /* A valid DSDT is required */
+-
+- status =
+- acpi_tb_verify_table(&acpi_gbl_root_table_list.
+- tables[ACPI_TABLE_INDEX_DSDT]);
+- if (ACPI_FAILURE(status)) {
+-
+- status = AE_NO_ACPI_TABLES;
+- goto unlock_and_exit;
+- }
++ /*
++ * Save the original DSDT header for detection of table corruption
++ * and/or replacement of the DSDT from outside the OS.
++ */
++ ACPI_MEMCPY(&acpi_gbl_original_dsdt_header, acpi_gbl_DSDT->pointer,
++ sizeof(struct acpi_table_header));
+
+ (void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
+
+--
+1.7.1
+
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/ACPICA-Add-subsystem-option-to-force-copy-of-DSDT.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/ACPICA-Add-subsystem-option-to-force-copy-of-DSDT.patch Tue Sep 14 02:23:05 2010 (r16280)
@@ -0,0 +1,152 @@
+From: Lin Ming <ming.m.lin at intel.com>
+Date: Thu, 1 Apr 2010 11:14:12 +0800
+Subject: [PATCH] ACPICA: Add subsystem option to force copy of DSDT to local memory
+
+commit 69ec87efa815d69140423014bb5f91e034faac22 upstream.
+
+Optionally copy the entire DSDT to local memory (instead of
+simply mapping it.) There are some BIOSs that corrupt or replace
+the original DSDT, creating the need for this option. Default is
+FALSE, do not copy the DSDT.
+
+https://bugzilla.kernel.org/show_bug.cgi?id=14679
+
+Signed-off-by: Lin Ming <ming.m.lin at intel.com>
+Signed-off-by: Bob Moore <robert.moore at intel.com>
+Signed-off-by: Len Brown <len.brown at intel.com>
+[bwh: Adjust context for 2.6.32]
+---
+ drivers/acpi/acpica/acglobal.h | 8 ++++++++
+ drivers/acpi/acpica/actables.h | 2 ++
+ drivers/acpi/acpica/psxface.c | 1 +
+ drivers/acpi/acpica/tbutils.c | 35 +++++++++++++++++++++++++++++++++++
+ drivers/acpi/acpica/tbxface.c | 10 ++++++++++
+ include/acpi/acpixf.h | 1 +
+ 6 files changed, 57 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
+index a419fe9..e3813d2 100644
+--- a/drivers/acpi/acpica/acglobal.h
++++ b/drivers/acpi/acpica/acglobal.h
+@@ -117,6 +117,14 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_use_default_register_widths, TRUE);
+ */
+ u8 ACPI_INIT_GLOBAL(acpi_gbl_use_default_register_widths, TRUE);
+
++/*
++ * Optionally copy the entire DSDT to local memory (instead of simply
++ * mapping it.) There are some BIOSs that corrupt or replace the original
++ * DSDT, creating the need for this option. Default is FALSE, do not copy
++ * the DSDT.
++ */
++u8 ACPI_INIT_GLOBAL(acpi_gbl_copy_dsdt_locally, FALSE);
++
+ /* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */
+
+ struct acpi_table_fadt acpi_gbl_FADT;
+diff --git a/drivers/acpi/acpica/actables.h b/drivers/acpi/acpica/actables.h
+index fc52b6f..b7197bf 100644
+--- a/drivers/acpi/acpica/actables.h
++++ b/drivers/acpi/acpica/actables.h
+@@ -109,6 +109,8 @@ acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length);
+
+ void acpi_tb_check_dsdt_header(void);
+
++void acpi_tb_copy_dsdt(struct acpi_table_desc *table_desc);
++
+ void
+ acpi_tb_install_table(acpi_physical_address address,
+ char *signature, u32 table_index);
+diff --git a/drivers/acpi/acpica/psxface.c b/drivers/acpi/acpica/psxface.c
+index 67e7ad5..c42f067 100644
+--- a/drivers/acpi/acpica/psxface.c
++++ b/drivers/acpi/acpica/psxface.c
+@@ -46,6 +46,7 @@
+ #include "acparser.h"
+ #include "acdispat.h"
+ #include "acinterp.h"
++#include "actables.h"
+ #include "amlcode.h"
+
+ #define _COMPONENT ACPI_PARSER
+diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
+index 07bc743..1efb094 100644
+--- a/drivers/acpi/acpica/tbutils.c
++++ b/drivers/acpi/acpica/tbutils.c
+@@ -387,6 +387,41 @@ void acpi_tb_check_dsdt_header(void)
+
+ /*******************************************************************************
+ *
++ * FUNCTION: acpi_tb_copy_dsdt
++ *
++ * PARAMETERS: table_desc - Installed table to copy
++ *
++ * RETURN: None
++ *
++ * DESCRIPTION: Implements a subsystem option to copy the DSDT to local memory.
++ * Some very bad BIOSs are known to either corrupt the DSDT or
++ * install a new, bad DSDT. This copy works around the problem.
++ *
++ ******************************************************************************/
++
++void acpi_tb_copy_dsdt(struct acpi_table_desc *table_desc)
++{
++ struct acpi_table_header *new_table;
++
++ new_table = ACPI_ALLOCATE(table_desc->length);
++ if (!new_table) {
++ ACPI_ERROR((AE_INFO, "Could not copy DSDT of length 0x%X",
++ table_desc->length));
++ return;
++ }
++
++ ACPI_MEMCPY(new_table, table_desc->pointer, table_desc->length);
++ acpi_tb_delete_table(table_desc);
++ table_desc->pointer = new_table;
++ table_desc->flags = ACPI_TABLE_ORIGIN_ALLOCATED;
++
++ ACPI_INFO((AE_INFO,
++ "Forced DSDT copy: length 0x%05X copied locally, original unmapped",
++ new_table->length));
++}
++
++/*******************************************************************************
++ *
+ * FUNCTION: acpi_tb_install_table
+ *
+ * PARAMETERS: Address - Physical address of DSDT or FACS
+diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
+index 3056510..f5378fc 100644
+--- a/drivers/acpi/acpica/tbxface.c
++++ b/drivers/acpi/acpica/tbxface.c
+@@ -532,6 +532,16 @@ static acpi_status acpi_tb_load_namespace(void)
+ }
+
+ /*
++ * Optionally copy the entire DSDT to local memory (instead of simply
++ * mapping it.) There are some BIOSs that corrupt or replace the original
++ * DSDT, creating the need for this option. Default is FALSE, do not copy
++ * the DSDT.
++ */
++ if (acpi_gbl_copy_dsdt_locally) {
++ acpi_tb_copy_dsdt(acpi_gbl_DSDT);
++ }
++
++ /*
+ * Save the original DSDT header for detection of table corruption
+ * and/or replacement of the DSDT from outside the OS.
+ */
+diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
+index f753222..fd815f6 100644
+--- a/include/acpi/acpixf.h
++++ b/include/acpi/acpixf.h
+@@ -68,6 +68,7 @@ extern u8 acpi_gbl_use_default_register_widths;
+ extern u8 acpi_gbl_use_default_register_widths;
+ extern acpi_name acpi_gbl_trace_method_name;
+ extern u32 acpi_gbl_trace_flags;
++extern u8 acpi_gbl_copy_dsdt_locally;
+
+ extern u32 acpi_current_gpe_count;
+ extern struct acpi_table_fadt acpi_gbl_FADT;
+--
+1.7.1
+
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/ACPICA-Update-DSDT-copy-detection.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/ACPICA-Update-DSDT-copy-detection.patch Tue Sep 14 02:23:05 2010 (r16280)
@@ -0,0 +1,192 @@
+From: Bob Moore <robert.moore at intel.com>
+Date: Wed, 7 Apr 2010 11:05:11 +0800
+Subject: [PATCH] ACPICA: Update DSDT copy/detection.
+
+commit 43323cb4c4b619414913f54fef9d492aabadd033 upstream.
+
+Move initialization of DSDT pointer. Emit address of DSDT
+in the dump of both table headers (good/bad DSDT).
+Now handles the case where the root table can be reallocated,
+which would invalidate the original pointer.
+
+Signed-off-by: Bob Moore <robert.moore at intel.com>
+Signed-off-by: Lin Ming <ming.m.lin at intel.com>
+Signed-off-by: Len Brown <len.brown at intel.com>
+---
+ drivers/acpi/acpica/acglobal.h | 2 +-
+ drivers/acpi/acpica/actables.h | 2 +-
+ drivers/acpi/acpica/tbutils.c | 23 ++++++++++++-----------
+ drivers/acpi/acpica/tbxface.c | 29 +++++++++++++++++++++++------
+ drivers/acpi/acpica/utglobal.c | 1 +
+ 5 files changed, 38 insertions(+), 19 deletions(-)
+
+diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
+index e3813d2..87f21d9 100644
+--- a/drivers/acpi/acpica/acglobal.h
++++ b/drivers/acpi/acpica/acglobal.h
+@@ -175,7 +175,7 @@ ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1b_enable;
+
+ /* DSDT information. Used to check for DSDT corruption */
+
+-ACPI_EXTERN struct acpi_table_desc *acpi_gbl_DSDT;
++ACPI_EXTERN struct acpi_table_header *acpi_gbl_DSDT;
+ ACPI_EXTERN struct acpi_table_header acpi_gbl_original_dsdt_header;
+
+ /*
+diff --git a/drivers/acpi/acpica/actables.h b/drivers/acpi/acpica/actables.h
+index b7197bf..62a576e 100644
+--- a/drivers/acpi/acpica/actables.h
++++ b/drivers/acpi/acpica/actables.h
+@@ -109,7 +109,7 @@ acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length);
+
+ void acpi_tb_check_dsdt_header(void);
+
+-void acpi_tb_copy_dsdt(struct acpi_table_desc *table_desc);
++struct acpi_table_header *acpi_tb_copy_dsdt(u32 table_index);
+
+ void
+ acpi_tb_install_table(acpi_physical_address address,
+diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
+index 1efb094..54a8712 100644
+--- a/drivers/acpi/acpica/tbutils.c
++++ b/drivers/acpi/acpica/tbutils.c
+@@ -366,22 +366,18 @@ void acpi_tb_check_dsdt_header(void)
+
+ /* Compare original length and checksum to current values */
+
+- if (acpi_gbl_original_dsdt_header.length !=
+- acpi_gbl_DSDT->pointer->length
+- || acpi_gbl_original_dsdt_header.checksum !=
+- acpi_gbl_DSDT->pointer->checksum) {
++ if (acpi_gbl_original_dsdt_header.length != acpi_gbl_DSDT->length ||
++ acpi_gbl_original_dsdt_header.checksum != acpi_gbl_DSDT->checksum) {
+ ACPI_ERROR((AE_INFO,
+ "The DSDT has been corrupted or replaced - old, new headers below"));
+ acpi_tb_print_table_header(0, &acpi_gbl_original_dsdt_header);
+- acpi_tb_print_table_header(acpi_gbl_DSDT->address,
+- acpi_gbl_DSDT->pointer);
++ acpi_tb_print_table_header(0, acpi_gbl_DSDT);
+
+ /* Disable further error messages */
+
+- acpi_gbl_original_dsdt_header.length =
+- acpi_gbl_DSDT->pointer->length;
++ acpi_gbl_original_dsdt_header.length = acpi_gbl_DSDT->length;
+ acpi_gbl_original_dsdt_header.checksum =
+- acpi_gbl_DSDT->pointer->checksum;
++ acpi_gbl_DSDT->checksum;
+ }
+ }
+
+@@ -399,15 +395,18 @@ void acpi_tb_check_dsdt_header(void)
+ *
+ ******************************************************************************/
+
+-void acpi_tb_copy_dsdt(struct acpi_table_desc *table_desc)
++struct acpi_table_header *acpi_tb_copy_dsdt(u32 table_index)
+ {
+ struct acpi_table_header *new_table;
++ struct acpi_table_desc *table_desc;
++
++ table_desc = &acpi_gbl_root_table_list.tables[table_index];
+
+ new_table = ACPI_ALLOCATE(table_desc->length);
+ if (!new_table) {
+ ACPI_ERROR((AE_INFO, "Could not copy DSDT of length 0x%X",
+ table_desc->length));
+- return;
++ return (NULL);
+ }
+
+ ACPI_MEMCPY(new_table, table_desc->pointer, table_desc->length);
+@@ -418,6 +417,8 @@ void acpi_tb_copy_dsdt(struct acpi_table_desc *table_desc)
+ ACPI_INFO((AE_INFO,
+ "Forced DSDT copy: length 0x%05X copied locally, original unmapped",
+ new_table->length));
++
++ return (new_table);
+ }
+
+ /*******************************************************************************
+diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
+index f5378fc..adb7f56 100644
+--- a/drivers/acpi/acpica/tbxface.c
++++ b/drivers/acpi/acpica/tbxface.c
+@@ -513,39 +513,56 @@ static acpi_status acpi_tb_load_namespace(void)
+ {
+ acpi_status status;
+ u32 i;
++ struct acpi_table_header *new_dsdt;
+
+ ACPI_FUNCTION_TRACE(tb_load_namespace);
+
+ (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
+
+- acpi_gbl_DSDT = &acpi_gbl_root_table_list.tables[ACPI_TABLE_INDEX_DSDT];
+-
+ /*
+ * Load the namespace. The DSDT is required, but any SSDT and
+ * PSDT tables are optional. Verify the DSDT.
+ */
+ if (!acpi_gbl_root_table_list.count ||
+- !ACPI_COMPARE_NAME(&acpi_gbl_DSDT->signature, ACPI_SIG_DSDT) ||
+- ACPI_FAILURE(acpi_tb_verify_table(acpi_gbl_DSDT))) {
++ !ACPI_COMPARE_NAME(&
++ (acpi_gbl_root_table_list.
++ tables[ACPI_TABLE_INDEX_DSDT].signature),
++ ACPI_SIG_DSDT)
++ ||
++ ACPI_FAILURE(acpi_tb_verify_table
++ (&acpi_gbl_root_table_list.
++ tables[ACPI_TABLE_INDEX_DSDT]))) {
+ status = AE_NO_ACPI_TABLES;
+ goto unlock_and_exit;
+ }
+
+ /*
++ * Save the DSDT pointer for simple access. This is the mapped memory
++ * address. We must take care here because the address of the .Tables
++ * array can change dynamically as tables are loaded at run-time. Note:
++ * .Pointer field is not validated until after call to acpi_tb_verify_table.
++ */
++ acpi_gbl_DSDT =
++ acpi_gbl_root_table_list.tables[ACPI_TABLE_INDEX_DSDT].pointer;
++
++ /*
+ * Optionally copy the entire DSDT to local memory (instead of simply
+ * mapping it.) There are some BIOSs that corrupt or replace the original
+ * DSDT, creating the need for this option. Default is FALSE, do not copy
+ * the DSDT.
+ */
+ if (acpi_gbl_copy_dsdt_locally) {
+- acpi_tb_copy_dsdt(acpi_gbl_DSDT);
++ new_dsdt = acpi_tb_copy_dsdt(ACPI_TABLE_INDEX_DSDT);
++ if (new_dsdt) {
++ acpi_gbl_DSDT = new_dsdt;
++ }
+ }
+
+ /*
+ * Save the original DSDT header for detection of table corruption
+ * and/or replacement of the DSDT from outside the OS.
+ */
+- ACPI_MEMCPY(&acpi_gbl_original_dsdt_header, acpi_gbl_DSDT->pointer,
++ ACPI_MEMCPY(&acpi_gbl_original_dsdt_header, acpi_gbl_DSDT,
+ sizeof(struct acpi_table_header));
+
+ (void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
+diff --git a/drivers/acpi/acpica/utglobal.c b/drivers/acpi/acpica/utglobal.c
+index eda3e65..6611675 100644
+--- a/drivers/acpi/acpica/utglobal.c
++++ b/drivers/acpi/acpica/utglobal.c
+@@ -785,6 +785,7 @@ acpi_status acpi_ut_init_globals(void)
+
+ /* Miscellaneous variables */
+
++ acpi_gbl_DSDT = NULL;
+ acpi_gbl_cm_single_step = FALSE;
+ acpi_gbl_db_terminate_threads = FALSE;
+ acpi_gbl_shutdown = FALSE;
+--
+1.7.1
+
Modified: dists/sid/linux-2.6/debian/patches/series/22
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/22 Mon Sep 13 21:17:48 2010 (r16279)
+++ dists/sid/linux-2.6/debian/patches/series/22 Tue Sep 14 02:23:05 2010 (r16280)
@@ -126,3 +126,8 @@
+ bugfix/all/ALSA-emux-Add-trivial-compat-ioctl-handler.patch
+ bugfix/all/hostap_pci-set-dev-base_addr-during-probe.patch
+ features/all/ethtool-allow-non-netadmin-to-query-settings.patch
++ bugfix/all/ACPICA-Add-detection-of-corrupted-replaced-DSDT.patch
++ bugfix/all/ACPICA-Add-subsystem-option-to-force-copy-of-DSDT.patch
++ bugfix/all/ACPICA-Update-DSDT-copy-detection.patch
++ bugfix/all/ACPI-add-boot-option-acpi-copy_dsdt.patch
++ bugfix/all/ACPI-fix-early-DSDT-dmi-check-warnings-on-ia64.patch
More information about the Kernel-svn-changes
mailing list