]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.c
ArmPkg/ArmLib: Drain Write Buffer before DCache maintenance operations.
[mirror_edk2.git] / ArmPkg / Library / ArmLib / ArmV7 / ArmV7Lib.c
index cc5074bfc27325bd66298849e06e47e99c3dac4d..65709780edaa4508cced8c85c28270ed18efe8ed 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
@@ -233,6 +234,7 @@ ArmInvalidateDataCache (
   VOID\r
   )\r
 {\r
+  ArmDrainWriteBuffer ();\r
   ArmV7DataCacheOperation (ArmInvalidateDataCacheEntryBySetWay);\r
 }\r
 \r
@@ -242,6 +244,7 @@ ArmCleanInvalidateDataCache (
   VOID\r
   )\r
 {\r
+  ArmDrainWriteBuffer ();\r
   ArmV7DataCacheOperation (ArmCleanInvalidateDataCacheEntryBySetWay);\r
 }\r
 \r
@@ -251,6 +254,7 @@ ArmCleanDataCache (
   VOID\r
   )\r
 {\r
+  ArmDrainWriteBuffer ();\r
   ArmV7DataCacheOperation (ArmCleanDataCacheEntryBySetWay);\r
 }\r
 \r
@@ -260,5 +264,6 @@ ArmCleanDataCacheToPoU (
   VOID\r
   )\r
 {\r
+  ArmDrainWriteBuffer ();\r
   ArmV7PoUDataCacheOperation (ArmCleanDataCacheEntryBySetWay);\r
 }\r