summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
838c730)
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
{\r
EFI_STATUS Status;\r
PCI_TYPE00 PciData;\r
EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
UINTN DevicePathLength;\r
UINT64 EnabledPciAttributes;\r
EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
UINTN DevicePathLength;\r
UINT64 EnabledPciAttributes;\r
&PciDevice->PciIo,\r
EfiPciIoWidthUint32,\r
0x24,\r
&PciDevice->PciIo,\r
EfiPciIoWidthUint32,\r
0x24,\r
&MmioBase\r
);\r
if (EFI_ERROR (Status)) {\r
return EFI_UNSUPPORTED;\r
}\r
\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
DevicePathLength = GetDevicePathSize (PciDevice->DevicePath);\r
DevicePath = PciDevice->DevicePath;\r
\r