aboutsummaryrefslogtreecommitdiffstats
path: root/roms/edk2/MdePkg/Library/BaseLib/RiscV64/FlushCache.S
diff options
context:
space:
mode:
Diffstat (limited to 'roms/edk2/MdePkg/Library/BaseLib/RiscV64/FlushCache.S')
-rw-r--r--roms/edk2/MdePkg/Library/BaseLib/RiscV64/FlushCache.S21
1 files changed, 21 insertions, 0 deletions
diff --git a/roms/edk2/MdePkg/Library/BaseLib/RiscV64/FlushCache.S b/roms/edk2/MdePkg/Library/BaseLib/RiscV64/FlushCache.S
new file mode 100644
index 000000000..7c10fdd26
--- /dev/null
+++ b/roms/edk2/MdePkg/Library/BaseLib/RiscV64/FlushCache.S
@@ -0,0 +1,21 @@
+//------------------------------------------------------------------------------
+//
+// RISC-V cache operation.
+//
+// Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+//
+// SPDX-License-Identifier: BSD-2-Clause-Patent
+//
+//------------------------------------------------------------------------------
+
+.align 3
+ASM_GLOBAL ASM_PFX(RiscVInvalidateInstCacheAsm)
+ASM_GLOBAL ASM_PFX(RiscVInvalidateDataCacheAsm)
+
+ASM_PFX(RiscVInvalidateInstCacheAsm):
+ fence.i
+ ret
+
+ASM_PFX(RiscVInvalidateDataCacheAsm):
+ fence
+ ret