*Mapping = Map;\r
\r
if ((((UINTN)HostAddress & (gCacheAlignment - 1)) != 0) ||\r
- ((*NumberOfBytes % gCacheAlignment) != 0)) {\r
+ ((*NumberOfBytes & (gCacheAlignment - 1)) != 0)) {\r
\r
// Get the cacheability of the region\r
Status = gDS->GetMemorySpaceDescriptor (*DeviceAddress, &GcdDescriptor);\r