summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2017-01-11 09:54:39 +0800
committerHao Wu <hao.a.wu@intel.com>2017-01-12 21:26:30 +0800
commitb494cf96e70f8640acd9288951be39a0f714f2be (patch)
tree7d84953a3a01c4ab36f3a62dd9f61918e7c268dc /MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib
parentce5354d68ce815d98f31ecc03f71fe9cfccedc39 (diff)
downloadedk2-b494cf96e70f8640acd9288951be39a0f714f2be.tar.gz
edk2-b494cf96e70f8640acd9288951be39a0f714f2be.tar.bz2
edk2-b494cf96e70f8640acd9288951be39a0f714f2be.zip
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/Library/NonDiscoverableDeviceRegistrationLib')
-rw-r--r--MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.c b/MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.c
index 6f46dfac0f..536dfc7297 100644
--- a/MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.c
+++ b/MdeModulePkg/Library/NonDiscoverableDeviceRegistrationLib/NonDiscoverableDeviceRegistrationLib.c
@@ -163,7 +163,7 @@ RegisterNonDiscoverableMmioDevice (
Desc->AddrLen = Size;
Desc->AddrRangeMax = Base + Size - 1;
Desc->ResType = ACPI_ADDRESS_SPACE_TYPE_MEM;
- Desc->AddrSpaceGranularity = (Base + Size > SIZE_4GB) ? 64 : 32;
+ Desc->AddrSpaceGranularity = ((EFI_PHYSICAL_ADDRESS)Base + Size > SIZE_4GB) ? 64 : 32;
Desc->AddrTranslationOffset = 0;
}
VA_END (Args);