Skip to content

Commit 5f0db7a

Browse files
ftang1lenb
authored andcommitted
SFI: Hook PCI MMCONFIG
First check ACPI, and if that fails, ask SFI to find the MCFG. Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
1 parent efafc8b commit 5f0db7a

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎arch/x86/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1880,7 +1880,7 @@ config PCI_DIRECT
18801880

18811881
config PCI_MMCONFIG
18821882
def_bool y
1883-
depends on X86_32 && PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY)
1883+
depends on X86_32 && PCI && (ACPI || SFI) && (PCI_GOMMCONFIG || PCI_GOANY)
18841884

18851885
config PCI_OLPC
18861886
def_bool y

‎arch/x86/pci/mmconfig-shared.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@
1313
#include <linux/pci.h>
1414
#include <linux/init.h>
1515
#include <linux/acpi.h>
16+
#include <linux/sfi_acpi.h>
1617
#include <linux/bitmap.h>
1718
#include <linux/sort.h>
1819
#include <asm/e820.h>
1920
#include <asm/pci_x86.h>
21+
#include <asm/acpi.h>
2022

2123
#define PREFIX "PCI: "
2224

@@ -493,7 +495,7 @@ static void __init pci_mmcfg_reject_broken(int early)
493495
(unsigned int)cfg->start_bus_number,
494496
(unsigned int)cfg->end_bus_number);
495497

496-
if (!early)
498+
if (!early && !acpi_disabled)
497499
valid = is_mmconf_reserved(is_acpi_reserved, addr, size, i, cfg, 0);
498500

499501
if (valid)
@@ -608,7 +610,7 @@ static void __init __pci_mmcfg_init(int early)
608610
}
609611

610612
if (!known_bridge)
611-
acpi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg);
613+
acpi_sfi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg);
612614

613615
pci_mmcfg_reject_broken(early);
614616

‎arch/x86/pci/mmconfig_32.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111

1212
#include <linux/pci.h>
1313
#include <linux/init.h>
14-
#include <linux/acpi.h>
1514
#include <asm/e820.h>
1615
#include <asm/pci_x86.h>
16+
#include <acpi/acpi.h>
1717

1818
/* Assume systems with more busses have correct MCFG */
1919
#define mmcfg_virt_addr ((void __iomem *) fix_to_virt(FIX_PCIE_MCFG))

0 commit comments

Comments
 (0)