MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
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>
---
MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c
index c994ed5fe3..19dceb3f91 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/4,
Image
);
RomInMemory = Image;
--
2.16.2.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#70003): https://edk2.groups.io/g/devel/message/70003
Mute This Topic: https://groups.io/mt/79498239/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Sumana, One minor change below. From reviewing the code before this point, it looks like RomBar, RomImageSize, and Image are all aligned no checking or handling of unaligned start or end needs to be added. Thanks, Mike > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Sumana Venur > Sent: Thursday, January 7, 2021 6:33 PM > To: devel@edk2.groups.io > Cc: Venur, Sumana <sumana.venur@intel.com> > Subject: [edk2-devel] [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Increase the width of the 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 <sumana.venur@intel.com> > --- > MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c > index c994ed5fe3..19dceb3f91 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/4, Recommend using: RomImageSize / sizeof (UINT32) > Image > ); > RomInMemory = Image; > -- > 2.16.2.windows.1 > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#70011): https://edk2.groups.io/g/devel/message/70011 Mute This Topic: https://groups.io/mt/79498239/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2024 Red Hat, Inc.