aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2007-11-23 20:08:02 -0500
committerLen Brown <len.brown@intel.com>2007-12-14 02:36:24 -0500
commit239665a3bb0a2234980f918913add31bc536cfd1 (patch)
tree260262706ce5223bf3d1cec0e8083ea42260f2fb /arch/x86/kernel
parent2ffbb8377c7a0713baf6644e285adc27a5654582 (diff)
ACPI: tables: complete searching upon RSDP w/ bad checksum.
ACPI tables follow a tree structure in memory. The root of the tree is the RSDP (Root System Description Pointer). To find the RSDP, the OS searches for the signature "RSD PTR " in well known physical memory locations. Then the OS computes a table checksum to verify that the signature is really part of a valid table header. Some systems have a proper signature but an invalid checksum; followed elsewhere by a proper signature with valid checksum. http://bugzilla.kernel.org/show_bug.cgi?id=9444 The Linux RSDP scanning code bailed out on those systems and as a result they booted with ACPI disabled. Fix this by deleting the Linux RSDP scanning code and plugging in the ACPICA RSDP scanning code. Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/acpi/boot.c40
-rw-r--r--arch/x86/kernel/srat_32.c2
2 files changed, 1 insertions, 41 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 0ca27c7b0e8..719c74b0141 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -581,25 +581,6 @@ int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base)
581 581
582EXPORT_SYMBOL(acpi_unregister_ioapic); 582EXPORT_SYMBOL(acpi_unregister_ioapic);
583 583
584static unsigned long __init
585acpi_scan_rsdp(unsigned long start, unsigned long length)
586{
587 unsigned long offset = 0;
588 unsigned long sig_len = sizeof("RSD PTR ") - 1;
589
590 /*
591 * Scan all 16-byte boundaries of the physical memory region for the
592 * RSDP signature.
593 */
594 for (offset = 0; offset < length; offset += 16) {
595 if (strncmp((char *)(phys_to_virt(start) + offset), "RSD PTR ", sig_len))
596 continue;
597 return (start + offset);
598 }
599
600 return 0;
601}
602
603static int __init acpi_parse_sbf(struct acpi_table_header *table) 584static int __init acpi_parse_sbf(struct acpi_table_header *table)
604{ 585{
605 struct acpi_table_boot *sb; 586 struct acpi_table_boot *sb;
@@ -742,27 +723,6 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
742 return 0; 723 return 0;
743} 724}
744 725
745unsigned long __init acpi_find_rsdp(void)
746{
747 unsigned long rsdp_phys = 0;
748
749 if (efi_enabled) {
750 if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
751 return efi.acpi20;
752 else if (efi.acpi != EFI_INVALID_TABLE_ADDR)
753 return efi.acpi;
754 }
755 /*
756 * Scan memory looking for the RSDP signature. First search EBDA (low
757 * memory) paragraphs and then search upper memory (E0000-FFFFF).
758 */
759 rsdp_phys = acpi_scan_rsdp(0, 0x400);
760 if (!rsdp_phys)
761 rsdp_phys = acpi_scan_rsdp(0xE0000, 0x20000);
762
763 return rsdp_phys;
764}
765
766#ifdef CONFIG_X86_LOCAL_APIC 726#ifdef CONFIG_X86_LOCAL_APIC
767/* 727/*
768 * Parse LAPIC entries in MADT 728 * Parse LAPIC entries in MADT
diff --git a/arch/x86/kernel/srat_32.c b/arch/x86/kernel/srat_32.c
index 2a8713ec0f9..b3b2c95f19d 100644
--- a/arch/x86/kernel/srat_32.c
+++ b/arch/x86/kernel/srat_32.c
@@ -276,7 +276,7 @@ int __init get_memcfg_from_srat(void)
276 int tables = 0; 276 int tables = 0;
277 int i = 0; 277 int i = 0;
278 278
279 rsdp_address = acpi_find_rsdp(); 279 rsdp_address = acpi_os_get_root_pointer();
280 if (!rsdp_address) { 280 if (!rsdp_address) {
281 printk("%s: System description tables not found\n", 281 printk("%s: System description tables not found\n",
282 __FUNCTION__); 282 __FUNCTION__);