From da1ccea67ce0fa58dd934abc5535443d7197004b Mon Sep 17 00:00:00 2001 From: Sami Mujawar Date: Sat, 23 May 2026 14:14:05 +0100 Subject: [PATCH] OvmfPkg/FdtPciHostBridgeLib: Map PCI MMIO windows in GCD Map the PCI MMIO32 and MMIO64 windows into the GCD memory map after parsing the DT ranges property. This makes the PCI memory apertures available as MMIO regions. Signed-off-by: Sami Mujawar --- .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c b/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c index 4912355999..783ce27f30 100644 --- a/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c +++ b/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c @@ -297,6 +297,22 @@ ProcessPciHost ( // Status = MapMmioMemory (*IoBase + IoTranslation, *IoSize, EFI_MEMORY_UC); ASSERT_EFI_ERROR (Status); + if (EFI_ERROR (Status)) { + return Status; + } + } + + if (*Mmio32Size != 0) { + Status = MapMmioMemory (*Mmio32Base, *Mmio32Size, EFI_MEMORY_UC); + ASSERT_EFI_ERROR (Status); + if (EFI_ERROR (Status)) { + return Status; + } + } + + if (*Mmio64Size != 0) { + Status = MapMmioMemory (*Mmio64Base, *Mmio64Size, EFI_MEMORY_UC); + ASSERT_EFI_ERROR (Status); } return Status;