}\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