summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/RiscVVirt/Sec/SecEntry.S
diff options
context:
space:
mode:
Diffstat (limited to 'OvmfPkg/RiscVVirt/Sec/SecEntry.S')
-rw-r--r--OvmfPkg/RiscVVirt/Sec/SecEntry.S21
1 files changed, 21 insertions, 0 deletions
diff --git a/OvmfPkg/RiscVVirt/Sec/SecEntry.S b/OvmfPkg/RiscVVirt/Sec/SecEntry.S
new file mode 100644
index 0000000000..e919a3cb0e
--- /dev/null
+++ b/OvmfPkg/RiscVVirt/Sec/SecEntry.S
@@ -0,0 +1,21 @@
+/*
+ Copyright (c) 2022 Ventana Micro Systems Inc.
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+ */
+
+#include "SecMain.h"
+
+.text
+.align 3
+
+ASM_FUNC (_ModuleEntryPoint)
+ /* Use Temp memory as the stack for calling to C code */
+ li a4, FixedPcdGet32 (PcdOvmfSecPeiTempRamBase)
+ li a5, FixedPcdGet32 (PcdOvmfSecPeiTempRamSize)
+
+ /* Use Temp memory as the stack for calling to C code */
+ add sp, a4, a5
+
+ call SecStartup