diff options
-rw-r--r-- | IntelFrameworkModulePkg/Bus/Pci/PciBus/Dxe/PciLib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBus/Dxe/PciLib.c b/IntelFrameworkModulePkg/Bus/Pci/PciBus/Dxe/PciLib.c index 9a0de96a15..8fe80a1819 100644 --- a/IntelFrameworkModulePkg/Bus/Pci/PciBus/Dxe/PciLib.c +++ b/IntelFrameworkModulePkg/Bus/Pci/PciBus/Dxe/PciLib.c @@ -2328,7 +2328,7 @@ WriteConfigData ( //
UpdateConfigData (PciDeviceInfo, PCI_REGISTER_READ, AccessWidth, AccessAddress & 0xff, &Data);
- Shift = (UINTN) ((Address - AccessAddress) * 8);
+ Shift = (UINTN)(Address - AccessAddress) * 8;
switch (Width) {
case EfiPciWidthUint8:
Data = (* (UINT8 *) Buffer) << Shift | (Data & ~(0xff << Shift));
@@ -2342,7 +2342,7 @@ WriteConfigData ( //
// check data write incompatibility
//
- UpdateConfigData (PciDeviceInfo, PCI_REGISTER_WRITE, AccessWidth, AccessAddress * 0xff, &Data);
+ UpdateConfigData (PciDeviceInfo, PCI_REGISTER_WRITE, AccessWidth, MultU64x32 (AccessAddress, 0xff), &Data);
}
if (PciRootBridgeIo != NULL) {
|