xref: /haiku/src/system/boot/platform/efi/arch/riscv64/entry.S (revision 8c78892580f132d10e624aef96f835df8d94bf19)
1/*
2 * Copyright 2011, François Revol <revol@free.fr>.
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
5
6#include <asm_defs.h>
7
8
9    .text
10
11/*  status_t arch_enter_kernel(struct kernel_args *kernelArgs,
12        addr_t kernelEntry, addr_t kernelStackTop);
13
14    r0  - kernelArgs
15    r1  - kernelEntry
16    r2  - kernelStackTop
17*/
18FUNCTION(arch_enter_kernel):
19	nop
20
21//	// set the kernel stack
22//	mov     sp,r2
23//
24//	// set up kernel _start args
25//	//mov   r0,r0   // kernelArgs
26//	mov     r4,r1
27//	mov     r1,#0   // currentCPU=0
28//
29//	// call the kernel
30//	mov     pc,r4
31//
32//	// return
33//	mov     r0,#-1  // B_ERROR
34//	mov     pc,lr
35FUNCTION_END(arch_enter_kernel)
36