aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv64/init/start.S
blob: e5b6ced123f101488e47063b59d504a328f6ef77 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* SPDX-License-Identifier: GPL-3.0-or-later */
/* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */

.section .init.start
.global _start
/* Entry point to the kernel loader. */
_start:
/* load static stack */
li sp, PM_STACK_TOP
/* make sure there's no garbage in tp, important for id assignment */
li tp, 0
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