diff --git a/src/system/boot/platform/efi/arch/riscv64/entry.S b/src/system/boot/platform/efi/arch/riscv64/entry.S index 3399ae9931..7ae5221a49 100644 --- a/src/system/boot/platform/efi/arch/riscv64/entry.S +++ b/src/system/boot/platform/efi/arch/riscv64/entry.S @@ -1,35 +1,32 @@ /* - * Copyright 2011, François Revol . - * 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 - .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)