diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c index 9944fcdc06..7a1d30e07c 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c @@ -356,6 +356,20 @@ Returns: PciIoDevice->PciIo.RomSize = PlatformOpRomSize; PciIoDevice->PciIo.RomImage = PlatformOpRomBuffer; + // + // For OpROM read from gPciPlatformProtocol: + // Add the Rom Image to internal database for later PCI light enumeration + // + PciRomAddImageMapping ( + NULL, + PciIoDevice->PciRootBridgeIo->SegmentNumber, + PciIoDevice->BusNumber, + PciIoDevice->DeviceNumber, + PciIoDevice->FunctionNumber, + (UINT64) (UINTN) PciIoDevice->PciIo.RomImage, + PciIoDevice->PciIo.RomSize + ); + // // Process Image // diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c index c3f31bed97..05339f3afb 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c @@ -284,6 +284,10 @@ Returns: PciDevice->PciIo.RomSize = RomImageSize; PciDevice->PciIo.RomImage = RomInMemory; + // + // For OpROM read from PCI device: + // Add the Rom Image to internal database for later PCI light enumeration + // PciRomAddImageMapping ( NULL, PciDevice->PciRootBridgeIo->SegmentNumber,