提交 5f0db7a2 编写于 作者: F Feng Tang 提交者: Len Brown

SFI: Hook PCI MMCONFIG

First check ACPI, and if that fails, ask SFI to find the MCFG.
Signed-off-by: NFeng Tang <feng.tang@intel.com>
Signed-off-by: NLen Brown <len.brown@intel.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
上级 efafc8b2
...@@ -1880,7 +1880,7 @@ config PCI_DIRECT ...@@ -1880,7 +1880,7 @@ config PCI_DIRECT
config PCI_MMCONFIG config PCI_MMCONFIG
def_bool y def_bool y
depends on X86_32 && PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY) depends on X86_32 && PCI && (ACPI || SFI) && (PCI_GOMMCONFIG || PCI_GOANY)
config PCI_OLPC config PCI_OLPC
def_bool y def_bool y
......
...@@ -13,10 +13,12 @@ ...@@ -13,10 +13,12 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/acpi.h> #include <linux/acpi.h>
#include <linux/sfi_acpi.h>
#include <linux/bitmap.h> #include <linux/bitmap.h>
#include <linux/sort.h> #include <linux/sort.h>
#include <asm/e820.h> #include <asm/e820.h>
#include <asm/pci_x86.h> #include <asm/pci_x86.h>
#include <asm/acpi.h>
#define PREFIX "PCI: " #define PREFIX "PCI: "
...@@ -493,7 +495,7 @@ static void __init pci_mmcfg_reject_broken(int early) ...@@ -493,7 +495,7 @@ static void __init pci_mmcfg_reject_broken(int early)
(unsigned int)cfg->start_bus_number, (unsigned int)cfg->start_bus_number,
(unsigned int)cfg->end_bus_number); (unsigned int)cfg->end_bus_number);
if (!early) if (!early && !acpi_disabled)
valid = is_mmconf_reserved(is_acpi_reserved, addr, size, i, cfg, 0); valid = is_mmconf_reserved(is_acpi_reserved, addr, size, i, cfg, 0);
if (valid) if (valid)
...@@ -608,7 +610,7 @@ static void __init __pci_mmcfg_init(int early) ...@@ -608,7 +610,7 @@ static void __init __pci_mmcfg_init(int early)
} }
if (!known_bridge) if (!known_bridge)
acpi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg); acpi_sfi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg);
pci_mmcfg_reject_broken(early); pci_mmcfg_reject_broken(early);
......
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/acpi.h>
#include <asm/e820.h> #include <asm/e820.h>
#include <asm/pci_x86.h> #include <asm/pci_x86.h>
#include <acpi/acpi.h>
/* Assume systems with more busses have correct MCFG */ /* Assume systems with more busses have correct MCFG */
#define mmcfg_virt_addr ((void __iomem *) fix_to_virt(FIX_PCIE_MCFG)) #define mmcfg_virt_addr ((void __iomem *) fix_to_virt(FIX_PCIE_MCFG))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册