linux_dsm_epyc7002/arch/x86/pci
Robert Hancock 7752d5cfe3 x86: validate against acpi motherboard resources
This path adds validation of the MMCONFIG table against the ACPI reserved
motherboard resources.  If the MMCONFIG table is found to be reserved in
ACPI, we don't bother checking the E820 table.  The PCI Express firmware
spec apparently tells BIOS developers that reservation in ACPI is required
and E820 reservation is optional, so checking against ACPI first makes
sense.  Many BIOSes don't reserve the MMCONFIG region in E820 even though
it is perfectly functional, the existing check needlessly disables MMCONFIG
in these cases.

In order to do this, MMCONFIG setup has been split into two phases.  If PCI
configuration type 1 is not available then MMCONFIG is enabled early as
before.  Otherwise, it is enabled later after the ACPI interpreter is
enabled, since we need to be able to execute control methods in order to
check the ACPI reserved resources.  Presently this is just triggered off
the end of ACPI interpreter initialization.

There are a few other behavioral changes here:

- Validate all MMCONFIG configurations provided, not just the first one.

- Validate the entire required length of each configuration according to
  the provided ending bus number is reserved, not just the minimum required
  allocation.

- Validate that the area is reserved even if we read it from the chipset
  directly and not from the MCFG table.  This catches the case where the
  BIOS didn't set the location properly in the chipset and has mapped it
  over other things it shouldn't have.

This also cleans up the MMCONFIG initialization functions so that they
simply do nothing if MMCONFIG is not compiled in.

Based on an original patch by Rajesh Shah from Intel.

[akpm@linux-foundation.org: many fixes and cleanups]
Signed-off-by: Robert Hancock <hancockr@shaw.ca>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Andi Kleen <ak@suse.de>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andi Kleen <ak@suse.de>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-26 23:41:03 +02:00
..
acpi.c PCI: remove "pci=routeirq" noise from dmesg 2008-04-20 21:47:03 -07:00
common.c PCI: x86: use generic pci_enable_resources() 2008-04-20 21:47:04 -07:00
direct.c Change pci_raw_ops to pci_raw_read/write 2008-02-10 12:52:46 -08:00
early.c i386: move pci 2007-10-11 11:16:36 +02:00
fixup.c Change pci_raw_ops to pci_raw_read/write 2008-02-10 12:52:46 -08:00
i386.c PCI: x86: use generic pci_enable_resources() 2008-04-20 21:47:04 -07:00
init.c x86: validate against acpi motherboard resources 2008-04-26 23:41:03 +02:00
irq.c x86, pci: fix off-by-one errors in some pirq warnings 2008-04-17 17:40:45 +02:00
k8-bus_64.c x86_64: move pci 2007-10-11 11:17:12 +02:00
legacy.c Change pci_raw_ops to pci_raw_read/write 2008-02-10 12:52:46 -08:00
Makefile x86_64: move pci 2007-10-11 11:17:12 +02:00
Makefile_32 i386: move pci 2007-10-11 11:16:36 +02:00
Makefile_64 x86_64: move pci 2007-10-11 11:17:12 +02:00
mmconfig_32.c Change pci_raw_ops to pci_raw_read/write 2008-02-10 12:52:46 -08:00
mmconfig_64.c Change pci_raw_ops to pci_raw_read/write 2008-02-10 12:52:46 -08:00
mmconfig-shared.c x86: validate against acpi motherboard resources 2008-04-26 23:41:03 +02:00
numa.c x86: remove mpc_oem_bus_info() 2008-04-17 17:41:08 +02:00
pcbios.c PCI: remove initial bios sort of PCI devices on x86 2008-04-20 21:46:58 -07:00
pci.h x86: validate against acpi motherboard resources 2008-04-26 23:41:03 +02:00
visws.c Change pci_raw_ops to pci_raw_read/write 2008-02-10 12:52:46 -08:00