]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg PciBusDxe: Increase the width of data read during oprom shadow
authorSumana Venur <sumana.venur@intel.com>
Fri, 11 Jun 2021 16:37:44 +0000 (00:37 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 17 Jun 2021 03:01:55 +0000 (03:01 +0000)
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 <sumana.venur@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c

index c994ed5fe34b8cad0c1aac80230f5cd8df1952c4..a981f93f43c2d8c7abeb7d94f11a318be8caa8db 100644 (file)
@@ -521,9 +521,9 @@ LoadOpRomImage (
     //\r
     PciDevice->PciRootBridgeIo->Mem.Read (\r
                                       PciDevice->PciRootBridgeIo,\r
-                                      EfiPciWidthUint8,\r
+                                      EfiPciWidthUint32,\r
                                       RomBar,\r
-                                      (UINT32) RomImageSize,\r
+                                      (UINT32) RomImageSize/sizeof(UINT32),\r
                                       Image\r
                                       );\r
     RomInMemory = Image;\r