aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv64/init/start.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv64/init/start.S')
-rw-r--r--arch/riscv64/init/start.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/riscv64/init/start.S b/arch/riscv64/init/start.S
new file mode 100644
index 0000000..7842946
--- /dev/null
+++ b/arch/riscv64/init/start.S
@@ -0,0 +1,12 @@
+.section .init.start
+.global _start
+_start:
+li sp, PM_STACK_TOP
+call init
+
+.section .text
+.global jump_to_kernel
+jump_to_kernel:
+mv a2, a0 // store kernel addr
+mv a0, a1 // move fdt pointer to first argument
+jr a2 // jump to kernel