提交 9abd7928 编写于 作者: A Andi Kleen 提交者: Andi Kleen

[PATCH] i386/x86-64: Only do MCFG e820 check when type 1 works

Needs earlier patch to split type 1 probing from use.

This patch should fix the x86 macs where type 1 PCI config space access
doesn't work, but MCFG does. They also don't have a usable e820 table
so the e820 sanity check failed.

Instead assume now that if type 1 doesn't work then MCFG must work
and don't do the e820 check.
Signed-off-by: NAndi Kleen <ak@suse.de>
上级 5e544d61
...@@ -198,7 +198,9 @@ void __init pci_mmcfg_init(int type) ...@@ -198,7 +198,9 @@ void __init pci_mmcfg_init(int type)
(pci_mmcfg_config[0].base_address == 0)) (pci_mmcfg_config[0].base_address == 0))
return; return;
if (!e820_all_mapped(pci_mmcfg_config[0].base_address, /* Only do this check when type 1 works. If it doesn't work
assume we run on a Mac and always use MCFG */
if (type == 1 && !e820_all_mapped(pci_mmcfg_config[0].base_address,
pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN, pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN,
E820_RESERVED)) { E820_RESERVED)) {
printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n", printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n",
......
...@@ -176,7 +176,9 @@ void __init pci_mmcfg_init(int type) ...@@ -176,7 +176,9 @@ void __init pci_mmcfg_init(int type)
(pci_mmcfg_config[0].base_address == 0)) (pci_mmcfg_config[0].base_address == 0))
return; return;
if (!e820_all_mapped(pci_mmcfg_config[0].base_address, /* Only do this check when type 1 works. If it doesn't work
assume we run on a Mac and always use MCFG */
if (type == 1 && !e820_all_mapped(pci_mmcfg_config[0].base_address,
pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN, pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN,
E820_RESERVED)) { E820_RESERVED)) {
printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n", printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册