]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseCacheMaintenanceLib/IpfCache.c
Change Name
[mirror_edk2.git] / MdePkg / Library / BaseCacheMaintenanceLib / IpfCache.c
index b37ac9ee1f4b8830eaea0d72e017d754258002ed..17060eb70fdb942cfbbf982d77855abbcaf65c78 100644 (file)
 \r
 **/\r
 \r
-typedef struct {\r
-  UINT64                            Status;\r
-  UINT64                            r9;\r
-  UINT64                            r10;\r
-  UINT64                            r11;\r
-} PAL_PROC_RETURN;\r
-\r
-PAL_PROC_RETURN\r
-CallPalProcStatic (\r
-  IN      UINT64                    Arg1,\r
-  IN      UINT64                    Arg2,\r
-  IN      UINT64                    Arg3,\r
-  IN      UINT64                    Arg4\r
-  );\r
 \r
 /**\r
   Invalidates the entire instruction cache in cache coherency domain of the\r
@@ -41,7 +27,7 @@ InvalidateInstructionCache (
   VOID\r
   )\r
 {\r
-  CallPalProcStatic (1, 1, 1, 0);\r
+  PalCallStatic (NULL, 1, 1, 1, 0);\r
 }\r
 \r
 /**\r
@@ -69,19 +55,14 @@ InvalidateInstructionCache (
   @return Address\r
 \r
 **/\r
-VOID*\r
+VOID *\r
 EFIAPI\r
 InvalidateInstructionCacheRange (\r
   IN      VOID                      *Address,\r
   IN      UINTN                     Length\r
   )\r
 {\r
-  ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1);\r
-\r
-  if (Length > 0) {\r
-    InvalidateInstructionCache ();\r
-  }\r
-  return Address;\r
+  return IpfFlushCacheRange (Address, Length);\r
 }\r
 \r
 /**\r
@@ -100,7 +81,7 @@ WriteBackInvalidateDataCache (
   VOID\r
   )\r
 {\r
-  CallPalProcStatic (1, 2, 1, 0);\r
+  PalCallStatic (NULL, 1, 2, 1, 0);\r
 }\r
 \r
 /**\r
@@ -138,10 +119,7 @@ WriteBackInvalidateDataCacheRange (
 {\r
   ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1);\r
 \r
-  if (Length > 0) {\r
-    WriteBackInvalidateDataCache ();\r
-  }\r
-  return Address;\r
+  return IpfFlushCacheRange (Address, Length);\r
 }\r
 \r
 /**\r
@@ -160,7 +138,7 @@ WriteBackDataCache (
   VOID\r
   )\r
 {\r
-  CallPalProcStatic (1, 2, 0, 0);\r
+  PalCallStatic (NULL, 1, 2, 0, 0);\r
 }\r
 \r
 /**\r
@@ -197,10 +175,7 @@ WriteBackDataCacheRange (
 {\r
   ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1);\r
 \r
-  if (Length > 0) {\r
-    WriteBackDataCache ();\r
-  }\r
-  return Address;\r
+  return IpfFlushCacheRange (Address, Length);\r
 }\r
 \r
 /**\r
@@ -257,5 +232,5 @@ InvalidateDataCacheRange (
   IN      UINTN                     Length\r
   )\r
 {\r
-  return WriteBackInvalidateDataCacheRange (Address, Length);\r
+  return IpfFlushCacheRange (Address, Length);\r
 }\r