xref: /reactos/ntoskrnl/ke/arm/boot.s (revision 1734f297)
1/*
2 * PROJECT:         ReactOS Kernel
3 * LICENSE:         BSD - See COPYING.ARM in the top level directory
4 * FILE:            ntoskrnl/ke/arm/boot.s
5 * PURPOSE:         Implements the kernel entry point for ARM machines
6 * PROGRAMMERS:     ReactOS Portable Systems Group
7 */
8
9#include <ksarm.h>
10
11    TEXTAREA
12
13    IMPORT KiInitializeSystem
14
15    NESTED_ENTRY KiSystemStartup
16    PROLOG_END KiSystemStartup
17
18    /* Put us in FIQ mode, set IRQ stack */
19    b .
20    mrs r3, cpsr
21    orr r3, r1, #CPSRM_FIQ
22    //msr cpsr, r3
23    msr cpsr_fc, r3
24    ldr sp, [a1, #LpbKernelStack]
25
26    /* Repeat for IRQ mode */
27    mov r3, #CPSRM_INT
28    msr cpsr_c, r3
29    ldr sp, [a1, #LpbKernelStack]
30
31    /* Put us in ABORT mode and set the panic stack */
32    mov r3, #CPSRM_ABT
33    msr cpsr_c, r3
34    ldr sp, [a1, #LpbKernelStack]
35
36    /* Repeat for UDF (Undefined) mode */
37    mov r3, #CPSRM_UDF
38    msr cpsr_c, r3
39    ldr sp, [a1, #LpbKernelStack]
40
41    /* Put us into SVC (Supervisor) mode and set the kernel stack */
42    mov r3, #CPSRM_SVC
43    msr cpsr_c, r3
44    ldr sp, [a1, #LpbKernelStack]
45
46    /* Go to C code */
47    b KiInitializeSystem
48
49    NESTED_END KiSystemStartup
50
51    END
52/* EOF */
53