aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2006-03-26 04:37:08 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 11:56:54 -0500
commitb2c99e3c70d77fb194df5aa1642030080d28ea48 (patch)
tree65f2a173e49b3e15e90b8cabf45b7dd4f3691e29 /arch/ia64
parent27d8e3d15bcf9d7cd99bf6ca910ea9e34328c7fb (diff)
[PATCH] EFI: keep physical table addresses in efi structure
Almost all users of the table addresses from the EFI system table want physical addresses. So rather than doing the pa->va->pa conversion, just keep physical addresses in struct efi. This fixes a DMI bug: the efi structure contained the physical SMBIOS address on x86 but the virtual address on ia64, so dmi_scan_machine() used ioremap() on a virtual address on ia64. This is essentially the same as an earlier patch by Matt Tolentino: http://marc.theaimsgroup.com/?l=linux-kernel&m=112130292316281&w=2 except that this changes all table addresses, not just ACPI addresses. Matt's original patch was backed out because it caused MCAs on HP sx1000 systems. That problem is resolved by the ioremap() attribute checking added for ia64. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Matt Domsch <Matt_Domsch@dell.com> Cc: "Tolentino, Matthew E" <matthew.e.tolentino@intel.com> Cc: "Brown, Len" <len.brown@intel.com> Cc: Andi Kleen <ak@muc.de> Acked-by: "Luck, Tony" <tony.luck@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/kernel/acpi.c6
-rw-r--r--arch/ia64/kernel/efi.c21
-rw-r--r--arch/ia64/kernel/setup.c2
-rw-r--r--arch/ia64/sn/kernel/setup.c5
4 files changed, 22 insertions, 12 deletions
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index a4e218ce2edb..58c93a30348c 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -651,9 +651,9 @@ unsigned long __init acpi_find_rsdp(void)
651{ 651{
652 unsigned long rsdp_phys = 0; 652 unsigned long rsdp_phys = 0;
653 653
654 if (efi.acpi20) 654 if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
655 rsdp_phys = __pa(efi.acpi20); 655 rsdp_phys = efi.acpi20;
656 else if (efi.acpi) 656 else if (efi.acpi != EFI_INVALID_TABLE_ADDR)
657 printk(KERN_WARNING PREFIX 657 printk(KERN_WARNING PREFIX
658 "v1.0/r0.71 tables no longer supported\n"); 658 "v1.0/r0.71 tables no longer supported\n");
659 return rsdp_phys; 659 return rsdp_phys;
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index 2993748c13df..12cfedce73b1 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -458,24 +458,33 @@ efi_init (void)
458 printk(KERN_INFO "EFI v%u.%.02u by %s:", 458 printk(KERN_INFO "EFI v%u.%.02u by %s:",
459 efi.systab->hdr.revision >> 16, efi.systab->hdr.revision & 0xffff, vendor); 459 efi.systab->hdr.revision >> 16, efi.systab->hdr.revision & 0xffff, vendor);
460 460
461 efi.mps = EFI_INVALID_TABLE_ADDR;
462 efi.acpi = EFI_INVALID_TABLE_ADDR;
463 efi.acpi20 = EFI_INVALID_TABLE_ADDR;
464 efi.smbios = EFI_INVALID_TABLE_ADDR;
465 efi.sal_systab = EFI_INVALID_TABLE_ADDR;
466 efi.boot_info = EFI_INVALID_TABLE_ADDR;
467 efi.hcdp = EFI_INVALID_TABLE_ADDR;
468 efi.uga = EFI_INVALID_TABLE_ADDR;
469
461 for (i = 0; i < (int) efi.systab->nr_tables; i++) { 470 for (i = 0; i < (int) efi.systab->nr_tables; i++) {
462 if (efi_guidcmp(config_tables[i].guid, MPS_TABLE_GUID) == 0) { 471 if (efi_guidcmp(config_tables[i].guid, MPS_TABLE_GUID) == 0) {
463 efi.mps = __va(config_tables[i].table); 472 efi.mps = config_tables[i].table;
464 printk(" MPS=0x%lx", config_tables[i].table); 473 printk(" MPS=0x%lx", config_tables[i].table);
465 } else if (efi_guidcmp(config_tables[i].guid, ACPI_20_TABLE_GUID) == 0) { 474 } else if (efi_guidcmp(config_tables[i].guid, ACPI_20_TABLE_GUID) == 0) {
466 efi.acpi20 = __va(config_tables[i].table); 475 efi.acpi20 = config_tables[i].table;
467 printk(" ACPI 2.0=0x%lx", config_tables[i].table); 476 printk(" ACPI 2.0=0x%lx", config_tables[i].table);
468 } else if (efi_guidcmp(config_tables[i].guid, ACPI_TABLE_GUID) == 0) { 477 } else if (efi_guidcmp(config_tables[i].guid, ACPI_TABLE_GUID) == 0) {
469 efi.acpi = __va(config_tables[i].table); 478 efi.acpi = config_tables[i].table;
470 printk(" ACPI=0x%lx", config_tables[i].table); 479 printk(" ACPI=0x%lx", config_tables[i].table);
471 } else if (efi_guidcmp(config_tables[i].guid, SMBIOS_TABLE_GUID) == 0) { 480 } else if (efi_guidcmp(config_tables[i].guid, SMBIOS_TABLE_GUID) == 0) {
472 efi.smbios = __va(config_tables[i].table); 481 efi.smbios = config_tables[i].table;
473 printk(" SMBIOS=0x%lx", config_tables[i].table); 482 printk(" SMBIOS=0x%lx", config_tables[i].table);
474 } else if (efi_guidcmp(config_tables[i].guid, SAL_SYSTEM_TABLE_GUID) == 0) { 483 } else if (efi_guidcmp(config_tables[i].guid, SAL_SYSTEM_TABLE_GUID) == 0) {
475 efi.sal_systab = __va(config_tables[i].table); 484 efi.sal_systab = config_tables[i].table;
476 printk(" SALsystab=0x%lx", config_tables[i].table); 485 printk(" SALsystab=0x%lx", config_tables[i].table);
477 } else if (efi_guidcmp(config_tables[i].guid, HCDP_TABLE_GUID) == 0) { 486 } else if (efi_guidcmp(config_tables[i].guid, HCDP_TABLE_GUID) == 0) {
478 efi.hcdp = __va(config_tables[i].table); 487 efi.hcdp = config_tables[i].table;
479 printk(" HCDP=0x%lx", config_tables[i].table); 488 printk(" HCDP=0x%lx", config_tables[i].table);
480 } 489 }
481 } 490 }
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index a4421a66ea5b..e4dfda1eb7dd 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -434,7 +434,7 @@ setup_arch (char **cmdline_p)
434 find_memory(); 434 find_memory();
435 435
436 /* process SAL system table: */ 436 /* process SAL system table: */
437 ia64_sal_init(efi.sal_systab); 437 ia64_sal_init(__va(efi.sal_systab));
438 438
439 ia64_setup_printk_clock(); 439 ia64_setup_printk_clock();
440 440
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
index 8b6d5c844708..30988dfbddff 100644
--- a/arch/ia64/sn/kernel/setup.c
+++ b/arch/ia64/sn/kernel/setup.c
@@ -327,10 +327,11 @@ sn_scan_pcdp(void)
327 struct pcdp_interface_pci if_pci; 327 struct pcdp_interface_pci if_pci;
328 extern struct efi efi; 328 extern struct efi efi;
329 329
330 pcdp = efi.hcdp; 330 if (efi.hcdp == EFI_INVALID_TABLE_ADDR)
331 if (! pcdp)
332 return; /* no hcdp/pcdp table */ 331 return; /* no hcdp/pcdp table */
333 332
333 pcdp = __va(efi.hcdp);
334
334 if (pcdp->rev < 3) 335 if (pcdp->rev < 3)
335 return; /* only support PCDP (rev >= 3) */ 336 return; /* only support PCDP (rev >= 3) */
336 337