]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/ArmCacheMaintenanceLib/ArmCacheMaintenanceLib.c
ArmPkg/ArmLib: Drain Write Buffer before DCache maintenance operations.
[mirror_edk2.git] / ArmPkg / Library / ArmCacheMaintenanceLib / ArmCacheMaintenanceLib.c
index 2557a2cf096abe4d7d13fd4c3ce9ec80c7882092..f4c12e71731748032b835f819a9baabc12407c33 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
 \r
   Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
+  Copyright (c) 2011 - 2014, ARM Limited. All rights reserved.\r
   \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -28,6 +29,7 @@ CacheRangeOperation (
   UINTN ArmCacheOperationThreshold = PcdGet32(PcdArmCacheOperationThreshold);\r
   \r
   if ((CacheOperation != NULL) && (Length >= ArmCacheOperationThreshold)) {\r
+    ArmDrainWriteBuffer ();\r
     CacheOperation ();\r
   } else {\r
     // Align address (rounding down)\r