summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseLib/RiscV64/MemoryFence.S
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/BaseLib/RiscV64/MemoryFence.S')
-rw-r--r--MdePkg/Library/BaseLib/RiscV64/MemoryFence.S22
1 files changed, 22 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseLib/RiscV64/MemoryFence.S b/MdePkg/Library/BaseLib/RiscV64/MemoryFence.S
new file mode 100644
index 0000000000..cc81683692
--- /dev/null
+++ b/MdePkg/Library/BaseLib/RiscV64/MemoryFence.S
@@ -0,0 +1,22 @@
+//------------------------------------------------------------------------------
+//
+// MemoryFence() for RiscV64
+//
+// Copyright (c) 2021, Hewlett Packard Enterprise Development. All rights reserved.
+//
+// SPDX-License-Identifier: BSD-2-Clause-Patent
+//
+//------------------------------------------------------------------------------
+
+.text
+.p2align 2
+
+ASM_GLOBAL ASM_PFX(MemoryFence)
+
+//
+// Memory fence for RiscV64
+//
+//
+ASM_PFX(MemoryFence):
+ fence // Fence on all memory and I/O
+ ret