summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseLib/RiscV64/ReadTimer.S
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/BaseLib/RiscV64/ReadTimer.S')
-rw-r--r--MdePkg/Library/BaseLib/RiscV64/ReadTimer.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseLib/RiscV64/ReadTimer.S b/MdePkg/Library/BaseLib/RiscV64/ReadTimer.S
index 39a06efa51..36781c29c0 100644
--- a/MdePkg/Library/BaseLib/RiscV64/ReadTimer.S
+++ b/MdePkg/Library/BaseLib/RiscV64/ReadTimer.S
@@ -21,3 +21,10 @@
ASM_FUNC (RiscVReadTimer)
csrr a0, CSR_TIME
ret
+
+//
+// Set Supervisor Time Compare Register
+//
+ASM_FUNC (RiscVSetSupervisorTimeCompareRegister)
+ csrw CSR_STIMECMP, a0
+ ret