boot/platform/efi: Fill out riscv64 kernel entry assembly
Change-Id: I18867f2c1188b43d5c663a7ceb3aab4a4dedb454 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3731 Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com> Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
This commit is contained in:
parent
9e4c5cf124
commit
0cbad7f3a3
@ -1,35 +1,32 @@
|
||||
/*
|
||||
* Copyright 2011, François Revol <revol@free.fr>.
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
* Copyright 2020-2021, Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
#include <asm_defs.h>
|
||||
|
||||
|
||||
.text
|
||||
|
||||
/* status_t arch_enter_kernel(struct kernel_args *kernelArgs,
|
||||
addr_t kernelEntry, addr_t kernelStackTop);
|
||||
|
||||
r0 - kernelArgs
|
||||
r1 - kernelEntry
|
||||
r2 - kernelStackTop
|
||||
a0 - kernelArgs
|
||||
a1 - kernelEntry
|
||||
a2 - kernelStackTop
|
||||
*/
|
||||
FUNCTION(arch_enter_kernel):
|
||||
nop
|
||||
// set the kernel stack
|
||||
mv sp,a2
|
||||
|
||||
// // set the kernel stack
|
||||
// mov sp,r2
|
||||
//
|
||||
// // set up kernel _start args
|
||||
// //mov r0,r0 // kernelArgs
|
||||
// mov r4,r1
|
||||
// mov r1,#0 // currentCPU=0
|
||||
//
|
||||
// // call the kernel
|
||||
// mov pc,r4
|
||||
//
|
||||
// // return
|
||||
// mov r0,#-1 // B_ERROR
|
||||
// mov pc,lr
|
||||
// Setup kernel args
|
||||
//mv a0,a0 // kernelArgs
|
||||
mv a4,a1
|
||||
li a1,0 // currentCPU=0
|
||||
|
||||
// call the kernel
|
||||
jr a4
|
||||
|
||||
// return
|
||||
li a0,-1 // B_ERROR
|
||||
ret
|
||||
FUNCTION_END(arch_enter_kernel)
|
||||
|
Loading…
Reference in New Issue
Block a user