From: Sumana Venur Date: Fri, 11 Jun 2021 16:37:44 +0000 (+0800) Subject: MdeModulePkg PciBusDxe: Increase the width of data read during oprom shadow X-Git-Tag: edk2-stable202108~165 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=cdf7544703759df0fa4bd4f065f5c5c7f268026e MdeModulePkg PciBusDxe: Increase the width of data read during oprom shadow REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2989 Long times spent on shadowing oprom from graphics card to system memory. We are currently using 8 bit read cycles. This needs to be wider, at least 32bit reads to reduce the time for oprom shadow. Signed-off-by: Sumana Venur Reviewed-by: Ray Ni --- diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c index c994ed5fe3..a981f93f43 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c @@ -521,9 +521,9 @@ LoadOpRomImage ( // PciDevice->PciRootBridgeIo->Mem.Read ( PciDevice->PciRootBridgeIo, - EfiPciWidthUint8, + EfiPciWidthUint32, RomBar, - (UINT32) RomImageSize, + (UINT32) RomImageSize/sizeof(UINT32), Image ); RomInMemory = Image;