summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseLib/RiscV64/RiscVMmu.S
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/BaseLib/RiscV64/RiscVMmu.S')
-rw-r--r--MdePkg/Library/BaseLib/RiscV64/RiscVMmu.S23
1 files changed, 23 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseLib/RiscV64/RiscVMmu.S b/MdePkg/Library/BaseLib/RiscV64/RiscVMmu.S
new file mode 100644
index 0000000000..ac8f92f38a
--- /dev/null
+++ b/MdePkg/Library/BaseLib/RiscV64/RiscVMmu.S
@@ -0,0 +1,23 @@
+//------------------------------------------------------------------------------
+//
+// CPU scratch register related functions for RISC-V
+//
+// Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
+//
+// SPDX-License-Identifier: BSD-2-Clause-Patent
+//
+//------------------------------------------------------------------------------
+
+#include <Register/RiscV64/RiscVImpl.h>
+
+.data
+.align 3
+.section .text
+
+//
+// Set Supervisor Address Translation and
+// Protection Register.
+//
+ASM_FUNC (RiscVSetSupervisorAddressTranslationRegister)
+ csrw CSR_SATP, a0
+ ret