]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/ArmDmaLib/ArmDmaLib.c
ArmPkg/ArmDmaLib: interpret GCD attributes as a bit field
[mirror_edk2.git] / ArmPkg / Library / ArmDmaLib / ArmDmaLib.c
index 66f3469eb1b5805e6211233bff48b02341111f4e..2144699c08b94008f5cd20d56c79b74bb024720a 100644 (file)
@@ -102,9 +102,7 @@ DmaMap (
     }\r
 \r
     // If the mapped buffer is not an uncached buffer\r
-    if ( (GcdDescriptor.Attributes != EFI_MEMORY_WC) &&\r
-         (GcdDescriptor.Attributes != EFI_MEMORY_UC) )\r
-    {\r
+    if ((GcdDescriptor.Attributes & (EFI_MEMORY_WB | EFI_MEMORY_WT)) != 0) {\r
       //\r
       // If the buffer does not fill entire cache lines we must double buffer into\r
       // uncached memory. Device (PCI) address becomes uncached page.\r