Commit a726c600 authored by John Keller's avatar John Keller Committed by Ingo Molnar

x86: allow MMCONFIG above 4GB on x86_64

SGI UV will have MMCFG base addresses that are greater than 4GB (32 bits).

v2: Use CONFIG_RESOURCES_64BIT instead of CONFIG_X86_64.
v3: Create a flag, that is set by platform specific code,
    to disable the > 4GB check.
Signed-off-by: default avatarJohn Keller <jpk@sgi.com>
Cc: jpk@sgi.com
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 6b356022
...@@ -97,6 +97,8 @@ static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE; ...@@ -97,6 +97,8 @@ static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
#warning ACPI uses CMPXCHG, i486 and later hardware #warning ACPI uses CMPXCHG, i486 and later hardware
#endif #endif
static int acpi_mcfg_64bit_base_addr __initdata = FALSE;
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
Boot-time Configuration Boot-time Configuration
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
...@@ -158,6 +160,14 @@ char *__init __acpi_map_table(unsigned long phys, unsigned long size) ...@@ -158,6 +160,14 @@ char *__init __acpi_map_table(unsigned long phys, unsigned long size)
struct acpi_mcfg_allocation *pci_mmcfg_config; struct acpi_mcfg_allocation *pci_mmcfg_config;
int pci_mmcfg_config_num; int pci_mmcfg_config_num;
static int __init acpi_mcfg_oem_check(struct acpi_table_mcfg *mcfg)
{
if (!strcmp(mcfg->header.oem_id, "SGI"))
acpi_mcfg_64bit_base_addr = TRUE;
return 0;
}
int __init acpi_parse_mcfg(struct acpi_table_header *header) int __init acpi_parse_mcfg(struct acpi_table_header *header)
{ {
struct acpi_table_mcfg *mcfg; struct acpi_table_mcfg *mcfg;
...@@ -190,8 +200,12 @@ int __init acpi_parse_mcfg(struct acpi_table_header *header) ...@@ -190,8 +200,12 @@ int __init acpi_parse_mcfg(struct acpi_table_header *header)
} }
memcpy(pci_mmcfg_config, &mcfg[1], config_size); memcpy(pci_mmcfg_config, &mcfg[1], config_size);
acpi_mcfg_oem_check(mcfg);
for (i = 0; i < pci_mmcfg_config_num; ++i) { for (i = 0; i < pci_mmcfg_config_num; ++i) {
if (pci_mmcfg_config[i].address > 0xFFFFFFFF) { if ((pci_mmcfg_config[i].address > 0xFFFFFFFF) &&
!acpi_mcfg_64bit_base_addr) {
printk(KERN_ERR PREFIX printk(KERN_ERR PREFIX
"MMCONFIG not in low 4GB of memory\n"); "MMCONFIG not in low 4GB of memory\n");
kfree(pci_mmcfg_config); kfree(pci_mmcfg_config);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment