1/* 2 * Copyright 2020-2021, Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 6#include <asm_defs.h> 7 8 .text 9 10/* status_t arch_enter_kernel(struct kernel_args *kernelArgs, 11 addr_t kernelEntry, addr_t kernelStackTop); 12 13 a0 - kernelArgs 14 a1 - kernelEntry 15 a2 - kernelStackTop 16*/ 17FUNCTION(arch_enter_kernel): 18 // set the kernel stack 19 mv sp,a2 20 21 // Setup kernel args 22 //mv a0,a0 // kernelArgs 23 mv a4,a1 24 li a1,0 // currentCPU=0 25 26 // call the kernel 27 jr a4 28 29 // return 30 li a0,-1 // B_ERROR 31 ret 32FUNCTION_END(arch_enter_kernel) 33