diff options
author | Hao Wu <hao.a.wu@intel.com> | 2017-01-11 09:54:39 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2017-01-12 21:26:30 +0800 |
commit | b494cf96e70f8640acd9288951be39a0f714f2be (patch) | |
tree | 7d84953a3a01c4ab36f3a62dd9f61918e7c268dc /MdeModulePkg/Bus | |
parent | ce5354d68ce815d98f31ecc03f71fe9cfccedc39 (diff) | |
download | edk2-b494cf96e70f8640acd9288951be39a0f714f2be.zip edk2-b494cf96e70f8640acd9288951be39a0f714f2be.tar.gz edk2-b494cf96e70f8640acd9288951be39a0f714f2be.tar.bz2 |
MdeModulePkg/NonDiscoverable: Compare SIZE_4GB with address type
Refine the codes to compare the definition 'SIZE_4GB' with type
EFI_PHYSICAL_ADDRESS.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r-- | MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c index b07c129..c836ad6 100644 --- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c +++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c @@ -598,7 +598,7 @@ CoherentPciIoMap ( //
Dev = NON_DISCOVERABLE_PCI_DEVICE_FROM_PCI_IO(This);
if ((Dev->Attributes & EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE) == 0 &&
- (UINTN)HostAddress + *NumberOfBytes > SIZE_4GB) {
+ (EFI_PHYSICAL_ADDRESS)(UINTN)HostAddress + *NumberOfBytes > SIZE_4GB) {
//
// Bounce buffering is not possible for consistent mappings
@@ -1006,7 +1006,7 @@ NonCoherentPciIoMap ( // a bounce buffer and copy over the data in case HostAddress >= 4 GB.
//
Bounce = ((Dev->Attributes & EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE) == 0 &&
- (UINTN)HostAddress + *NumberOfBytes > SIZE_4GB);
+ (EFI_PHYSICAL_ADDRESS)(UINTN)HostAddress + *NumberOfBytes > SIZE_4GB);
if (!Bounce) {
switch (Operation) {
|