# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>\r
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
# Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>\r
-# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>\r
+# Copyright (c) 2020 - 2021, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>\r
#\r
# SPDX-License-Identifier: BSD-2-Clause-Patent\r
#\r
RiscV64/DisableInterrupts.c\r
RiscV64/EnableInterrupts.c\r
RiscV64/CpuPause.c\r
+ RiscV64/MemoryFence.S | GCC\r
RiscV64/RiscVSetJumpLongJump.S | GCC\r
RiscV64/RiscVCpuBreakpoint.S | GCC\r
RiscV64/RiscVCpuPause.S | GCC\r
--- /dev/null
+//------------------------------------------------------------------------------\r
+//\r
+// MemoryFence() for RiscV64\r
+//\r
+// Copyright (c) 2021, Hewlett Packard Enterprise Development. All rights reserved.\r
+//\r
+// SPDX-License-Identifier: BSD-2-Clause-Patent\r
+//\r
+//------------------------------------------------------------------------------\r
+\r
+.text\r
+.p2align 2\r
+\r
+ASM_GLOBAL ASM_PFX(MemoryFence)\r
+\r
+//\r
+// Memory fence for RiscV64\r
+//\r
+//\r
+ASM_PFX(MemoryFence):\r
+ fence // Fence on all memory and I/O\r
+ ret\r