public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] x86/pci: Work around lack of ECAM space reservation
@ 2023-11-21 18:36 Bjorn Helgaas
  2023-11-21 18:36 ` [PATCH 1/9] x86/pci: Reserve ECAM if BIOS didn't include it in PNP0C02 _CRS Bjorn Helgaas
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Bjorn Helgaas @ 2023-11-21 18:36 UTC (permalink / raw)
  To: linux-pci
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H . Peter Anvin, Rafael J . Wysocki, Dan Williams, Kan Liang,
	Tony Luck, Giovanni Cabiddu, Yunying Sun, Tomasz Pala,
	Sebastian Manciulea, linux-kernel, Bjorn Helgaas

From: Bjorn Helgaas <bhelgaas@google.com>

The ECAM space described in the ACPI MCFG table should be reserved via a
PNP0C02 _CRS method, per PCI Firmware spec (r3.3, sec 4.1.2).

Some platforms (at least Supermicro X9DRi-LN4+, HP Proliant ML30 Gen9) do
not include these PNP0C02 reservations, and at the same time, they *do*
include that space in the PNP0A03 host bridge windows, which makes it
available for assignment to PCI devices.

In this case, we treat the ECAM space as valid (after fd3a8cff4d4a
("x86/pci: Treat EfiMemoryMappedIO as reservation of ECAM space")), but
there was no actual reservation to prevent assignment to PCI devices.

This series adds that reservation to prevent assigning ECAM space to PCI
BARs, adds more debug logging, changes "MMCONFIG" to "ECAM" to match the
spec terminology, and cleans up some coding style.

I propose to merge this via the PCI tree for v6.8.

Bjorn Helgaas (9):
  x86/pci: Reserve ECAM if BIOS didn't include it in PNP0C02 _CRS
  x86/pci: Reword ECAM EfiMemoryMappedIO logging to avoid 'reserved'
  x86/pci: Add MCFG debug logging
  x86/pci: Rename 'MMCONFIG' to 'ECAM', use pr_fmt
  x86/pci: Rename acpi_mcfg_check_entry() to acpi_mcfg_valid_entry()
  x86/pci: Rename pci_mmcfg_check_reserved() to pci_mmcfg_reserved()
  x86/pci: Comment pci_mmconfig_insert() obscure MCFG dependency
  x86/pci: Return pci_mmconfig_add() failure early
  x86/pci: Reorder pci_mmcfg_arch_map() definition before calls

 arch/x86/pci/acpi.c            |   3 +
 arch/x86/pci/mmconfig-shared.c | 178 ++++++++++++++++++---------------
 arch/x86/pci/mmconfig_32.c     |   2 +-
 arch/x86/pci/mmconfig_64.c     |  42 ++++----
 4 files changed, 120 insertions(+), 105 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-11-21 18:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-21 18:36 [PATCH 0/9] x86/pci: Work around lack of ECAM space reservation Bjorn Helgaas
2023-11-21 18:36 ` [PATCH 1/9] x86/pci: Reserve ECAM if BIOS didn't include it in PNP0C02 _CRS Bjorn Helgaas
2023-11-21 18:36 ` [PATCH 2/9] x86/pci: Reword ECAM EfiMemoryMappedIO logging to avoid 'reserved' Bjorn Helgaas
2023-11-21 18:36 ` [PATCH 3/9] x86/pci: Add MCFG debug logging Bjorn Helgaas
2023-11-21 18:36 ` [PATCH 4/9] x86/pci: Rename 'MMCONFIG' to 'ECAM', use pr_fmt Bjorn Helgaas
2023-11-21 18:36 ` [PATCH 5/9] x86/pci: Rename acpi_mcfg_check_entry() to acpi_mcfg_valid_entry() Bjorn Helgaas
2023-11-21 18:36 ` [PATCH 6/9] x86/pci: Rename pci_mmcfg_check_reserved() to pci_mmcfg_reserved() Bjorn Helgaas
2023-11-21 18:36 ` [PATCH 7/9] x86/pci: Comment pci_mmconfig_insert() obscure MCFG dependency Bjorn Helgaas
2023-11-21 18:36 ` [PATCH 8/9] x86/pci: Return pci_mmconfig_add() failure early Bjorn Helgaas
2023-11-21 18:36 ` [PATCH 9/9] x86/pci: Reorder pci_mmcfg_arch_map() definition before calls Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox