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 20 // set the kernel stack 21 mov sp,r2 22 23 // set up kernel _start args 24 //mov r0,r0 // kernelArgs 25 mov r4,r1 26 mov r1,#0 // currentCPU=0 27 28 // call the kernel 29 mov pc,r4 30 31 // return 32 mov r0,#-1 // B_ERROR 33 mov pc,lr 34 35FUNCTION_END(arch_enter_kernel) 36 37