Short version:
- Each PCIe downstream port can host only one device.
- Each PCIe downstream port is represented as a PCI bridge.
- If a PCI device needs an IO BAR, then the non-root bridge it is on
  will at least need 0x1000 IO ports (required by the PCI spec), for
  accommodating the IO BARs of all of the devices on it.
- Consequently, each IO BAR requiring device in a PCIe downstream port
  eats up 0x1000 from the limited PCI IO Port aperture (current size:
  0x4000).
- The long term solution is to move away from IO BARs (for example,
  legacy-free virtio-1.0 devices use MMIO BARs only).
- Until then, we can push down PMBASE from 0xB000 to 0x0600 on Q35 (same
  as SeaBIOS does), and then push down the base of the PCI IO Port
  aperture from 0xC000 to 0x6000, increasing its size from 0x4000 to
  0xA000.

Long version:
- https://bugzilla.redhat.com/show_bug.cgi?id=1333238

Public branch:
- https://github.com/lersek/edk2/commits/grow_portspace_bz1333238

Cc: Jordan Justen <[email protected]>

Thanks
Laszlo

Laszlo Ersek (6):
  OvmfPkg: rename PcdAcpiPmBaseAddress to PcdPiix4AcpiPmBaseAddress
  OvmfPkg: add and use industry standard macro PIIX4_PMBA_MASK
  OvmfPkg: introduce PcdIch9AcpiPmBaseAddress
  OvmfPkg: determine PMBA value dependent on host bridge device ID
  OvmfPkg/PlatformPei: set PCI IO port aperture dynamically
  OvmfPkg/PlatformPei: provide 10 * 4KB of PCI IO Port space on Q35

 OvmfPkg/OvmfPkg.dec                                  | 16 ++++---
 OvmfPkg/OvmfPkgIa32.dsc                              |  2 +
 OvmfPkg/OvmfPkgIa32X64.dsc                           |  2 +
 OvmfPkg/OvmfPkgX64.dsc                               |  2 +
 OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf    |  5 +-
 OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.inf |  5 +-
 OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf    |  5 +-
 OvmfPkg/PlatformPei/PlatformPei.inf                  |  3 +-
 OvmfPkg/Include/IndustryStandard/I440FxPiix4.h       |  2 +
 OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c      | 10 +++-
 OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c   | 10 +++-
 OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c      | 22 ++++++++-
 OvmfPkg/PlatformPei/Platform.c                       | 48 +++++++++++++++-----
 13 files changed, 101 insertions(+), 31 deletions(-)

-- 
1.8.3.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to