REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4041
There is a mistake in getting MMIO base using PciDevicePpi that
can lead to the data corruption.
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Maciej Czajkowski <maciej.czajkowski@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
{\r
EFI_STATUS Status;\r
PCI_TYPE00 PciData;\r
- UINTN MmioBase;\r
+ UINT32 MmioBase;\r
EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
UINTN DevicePathLength;\r
UINT64 EnabledPciAttributes;\r
&PciDevice->PciIo,\r
EfiPciIoWidthUint32,\r
0x24,\r
- sizeof (UINTN),\r
+ 1,\r
&MmioBase\r
);\r
if (EFI_ERROR (Status)) {\r
return EFI_UNSUPPORTED;\r
}\r
\r
+ MmioBase &= 0xFFFFFFF0;\r
+\r
DevicePathLength = GetDevicePathSize (PciDevice->DevicePath);\r
DevicePath = PciDevice->DevicePath;\r
\r