Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174749
b: refs/heads/master
c: 9a08f7d
h: refs/heads/master
i:
  174747: 109187b
v: v3
  • Loading branch information
Bjorn Helgaas authored and Jesse Barnes committed Nov 4, 2009
1 parent 9960078 commit b2a4967
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2992e545ea006992ec9dc91c4fa996ce1e15f921
refs/heads/master: 9a08f7d3506019e3833cd4394ca0d7da0ae3689f
31 changes: 20 additions & 11 deletions trunk/arch/x86/pci/mmconfig-shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/acpi.h>
#include <linux/sfi_acpi.h>
#include <linux/bitmap.h>
#include <linux/dmi.h>
#include <linux/sort.h>
#include <asm/e820.h>
#include <asm/pci_x86.h>
Expand Down Expand Up @@ -527,18 +528,31 @@ static void __init pci_mmcfg_reject_broken(int early)

static int __initdata known_bridge;

static int acpi_mcfg_64bit_base_addr __initdata = FALSE;

/* The physical address of the MMCONFIG aperture. Set from ACPI tables. */
struct acpi_mcfg_allocation *pci_mmcfg_config;
int pci_mmcfg_config_num;

static int __init acpi_mcfg_oem_check(struct acpi_table_mcfg *mcfg)
static int __init acpi_mcfg_check_entry(struct acpi_table_mcfg *mcfg,
struct acpi_mcfg_allocation *cfg)
{
int year;

if (cfg->address < 0xFFFFFFFF)
return 0;

if (!strcmp(mcfg->header.oem_id, "SGI"))
acpi_mcfg_64bit_base_addr = TRUE;
return 0;

return 0;
if (mcfg->header.revision >= 1) {
if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) &&
year >= 2010)
return 0;
}

printk(KERN_ERR PREFIX "MCFG region for %04x:%02x-%02x at %#llx "
"is above 4GB, ignored\n", cfg->pci_segment,
cfg->start_bus_number, cfg->end_bus_number, cfg->address);
return -EINVAL;
}

static int __init pci_parse_mcfg(struct acpi_table_header *header)
Expand Down Expand Up @@ -574,13 +588,8 @@ static int __init pci_parse_mcfg(struct acpi_table_header *header)

memcpy(pci_mmcfg_config, &mcfg[1], config_size);

acpi_mcfg_oem_check(mcfg);

for (i = 0; i < pci_mmcfg_config_num; ++i) {
if ((pci_mmcfg_config[i].address > 0xFFFFFFFF) &&
!acpi_mcfg_64bit_base_addr) {
printk(KERN_ERR PREFIX
"MMCONFIG not in low 4GB of memory\n");
if (acpi_mcfg_check_entry(mcfg, &pci_mmcfg_config[i])) {
kfree(pci_mmcfg_config);
pci_mmcfg_config_num = 0;
return -ENODEV;
Expand Down

0 comments on commit b2a4967

Please sign in to comment.