The first 9 patches are uninteresting (although they certainly decimated my grey matter):
- Patch #1 copies PciHostBridgeDxe from PcAtChipsetPkg to OvmfPkg. I paid attention and passed the --find-copies-harder option to git-format-patch, hence reviewers should be able to spot the minimal differences easily. - Patches #2 to #9 reformat the copied driver's source code so that it is actually possible to work with it. Trailing whitespace is stripped, overlong lines are rewrapped to 79 characters. This was suprisingly difficult because the original code consistently uses 130-148 columns. Rather than dump the reformatting into one huge patch, I broke it up in order to help reviewers, generally keeping comment reformatting separate from code reformatting. These patches are responsible for the bulk of the diffstat. This half of the series would actually apply to PcAtChipsetPkg/PciHostBridgeDxe itself, and it would be possible to clone the driver for OvmfPkg only at the end of the first half. The other half of the series is more interesting: - Patches #10 to #12 tweak PlatformBdsLib in preparation for multiple root buses. For these: Cc: Gabriel Somlo <so...@cmu.edu> - Patches #13 to #19 clean up the cloned PciHostBridgeDxe, eliminating the nominal (never used) multi-host-bridge bits, and fixing bugs in the (until now unused, but soon to be exercised) multi-root-bridge bits. At the end of this subset, "single host bridge" will be a hard-coded trait, and "several root bridges" will be an actual possibility. - Patch #20 detects the extra root buses with a brute-force scan, creating root bridge protocol instances in turn. The feature is functionally complete after this patch. - Patch #21 constrains the search based on fw_cfg, omitting it if QEMU doesn't expose the number of extra root buses in fw_cfg, and terminating the search ASAP otherwise. Public branch: https://github.com/lersek/edk2/commits/multiple_root_bridges_bz1193080 Laszlo Ersek (21): OvmfPkg: clone PciHostBridgeDxe from PcAtChipsetPkg OvmfPkg: PciHostBridgeDxe: rewrap IoFifo source files to 79 columns OvmfPkg: PciHostBridgeDxe: rewrap INF file to 79 columns OvmfPkg/PciHostBridgeDxe/PciHostBridge.h: rewrap comments to 79 columns OvmfPkg/PciHostBridgeDxe/PciHostBridge.h: strip trailing ws from code OvmfPkg/PciHostBridgeDxe/PciHostBridge.c: rewrap leading comments OvmfPkg/PciHostBridgeDxe/PciHostBridge.c: rewrap code, strip trailing ws OvmfPkg/PciHostBridgeDxe/PciRootBridgeIo.c: rewrap leading comments OvmfPkg/PciHostBridgeDxe/PciRootBridgeIo.c: rewrap code, strip trailing ws OvmfPkg: PlatformBdsLib: debug log interrupt line assignments OvmfPkg: PlatformBdsLib: refine PCI host bridge assertion OvmfPkg: PlatformBdsLib: connect all PCI root buses OvmfPkg: PciHostBridgeDxe: eliminate nominal support for multiple host bridges OvmfPkg: PciHostBridgeDxe: kill RootBridgeNumber and RootBridgeAttribute OvmfPkg: PciHostBridgeDxe: embed device path in private root bridge struct OvmfPkg: PciHostBridgeDxe: factor out InitRootBridge() function OvmfPkg: PciHostBridgeDxe: release resources on driver entry failure OvmfPkg: PciHostBridgeDxe: use private buffer in RootBridgeIoConfiguration() OvmfPkg: PciHostBridgeDxe: eliminate PCI_HOST_BRIDGE_INSTANCE.RootBridgeNumber OvmfPkg: PciHostBridgeDxe: look for all root buses OvmfPkg: PciHostBridgeDxe: shorten search for extra root buses OvmfPkg/Library/PlatformBdsLib/PlatformBdsLib.inf | 2 +- {PcAtChipsetPkg => OvmfPkg}/PciHostBridgeDxe/PciHostBridgeDxe.inf | 21 +- OvmfPkg/Library/PlatformBdsLib/BdsPlatform.h | 25 +- {PcAtChipsetPkg => OvmfPkg}/PciHostBridgeDxe/IoFifo.h | 11 +- OvmfPkg/PciHostBridgeDxe/PciHostBridge.h | 651 +++++ OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c | 82 +- OvmfPkg/Library/PlatformBdsLib/PlatformData.c | 13 - OvmfPkg/PciHostBridgeDxe/PciHostBridge.c | 1551 ++++++++++++ OvmfPkg/PciHostBridgeDxe/PciRootBridgeIo.c | 2628 ++++++++++++++++++++ OvmfPkg/OvmfPkgIa32.dsc | 2 +- OvmfPkg/OvmfPkgIa32.fdf | 2 +- OvmfPkg/OvmfPkgIa32X64.dsc | 2 +- OvmfPkg/OvmfPkgIa32X64.fdf | 2 +- OvmfPkg/OvmfPkgX64.dsc | 2 +- OvmfPkg/OvmfPkgX64.fdf | 2 +- {PcAtChipsetPkg => OvmfPkg}/PciHostBridgeDxe/Ia32/IoFifo.S | 7 +- {PcAtChipsetPkg => OvmfPkg}/PciHostBridgeDxe/Ia32/IoFifo.asm | 7 +- {PcAtChipsetPkg => OvmfPkg}/PciHostBridgeDxe/X64/IoFifo.S | 7 +- {PcAtChipsetPkg => OvmfPkg}/PciHostBridgeDxe/X64/IoFifo.asm | 7 +- 19 files changed, 4915 insertions(+), 109 deletions(-) copy {PcAtChipsetPkg => OvmfPkg}/PciHostBridgeDxe/PciHostBridgeDxe.inf (72%) copy {PcAtChipsetPkg => OvmfPkg}/PciHostBridgeDxe/IoFifo.h (91%) create mode 100644 OvmfPkg/PciHostBridgeDxe/PciHostBridge.h create mode 100644 OvmfPkg/PciHostBridgeDxe/PciHostBridge.c create mode 100644 OvmfPkg/PciHostBridgeDxe/PciRootBridgeIo.c copy {PcAtChipsetPkg => OvmfPkg}/PciHostBridgeDxe/Ia32/IoFifo.S (90%) copy {PcAtChipsetPkg => OvmfPkg}/PciHostBridgeDxe/Ia32/IoFifo.asm (90%) copy {PcAtChipsetPkg => OvmfPkg}/PciHostBridgeDxe/X64/IoFifo.S (92%) copy {PcAtChipsetPkg => OvmfPkg}/PciHostBridgeDxe/X64/IoFifo.asm (91%) -- 1.8.3.1 ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel