]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c
ArmPkg/ArmLib: Drain Write Buffer before DCache maintenance operations.
[mirror_edk2.git] / ArmPkg / Library / ArmLib / AArch64 / AArch64Lib.c
index fd7f14f9cfadd1eed648c268e6230d8c420d7594..a4e1f20ad910a8703daea7da7289b786ceee720c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 \r
   Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
-  Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>\r
+  Portions copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -232,6 +232,7 @@ ArmInvalidateDataCache (
   VOID\r
   )\r
 {\r
+  ArmDrainWriteBuffer ();\r
   AArch64DataCacheOperation (ArmInvalidateDataCacheEntryBySetWay);\r
 }\r
 \r
@@ -241,6 +242,7 @@ ArmCleanInvalidateDataCache (
   VOID\r
   )\r
 {\r
+  ArmDrainWriteBuffer ();\r
   AArch64DataCacheOperation (ArmCleanInvalidateDataCacheEntryBySetWay);\r
 }\r
 \r
@@ -250,6 +252,7 @@ ArmCleanDataCache (
   VOID\r
   )\r
 {\r
+  ArmDrainWriteBuffer ();\r
   AArch64DataCacheOperation (ArmCleanDataCacheEntryBySetWay);\r
 }\r
 \r
@@ -259,5 +262,6 @@ ArmCleanDataCacheToPoU (
   VOID\r
   )\r
 {\r
+  ArmDrainWriteBuffer ();\r
   AArch64PoUDataCacheOperation (ArmCleanDataCacheEntryBySetWay);\r
 }\r