2008-02-12 05:55:12 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS Kernel
|
2008-06-29 02:58:05 +00:00
|
|
|
* LICENSE: BSD - See COPYING.ARM in the top level directory
|
2008-02-12 05:55:12 +00:00
|
|
|
* FILE: ntoskrnl/ke/arm/boot.s
|
|
|
|
* PURPOSE: Implements the kernel entry point for ARM machines
|
|
|
|
* PROGRAMMERS: ReactOS Portable Systems Group
|
|
|
|
*/
|
|
|
|
|
2015-05-14 14:50:07 +00:00
|
|
|
#include <ksarm.h>
|
2008-02-12 05:55:12 +00:00
|
|
|
|
|
|
|
TEXTAREA
|
2015-05-14 14:50:07 +00:00
|
|
|
|
|
|
|
IMPORT KiInitializeSystem
|
|
|
|
|
2008-02-12 05:55:12 +00:00
|
|
|
NESTED_ENTRY KiSystemStartup
|
|
|
|
PROLOG_END KiSystemStartup
|
2015-05-14 14:50:07 +00:00
|
|
|
|
2010-02-09 18:05:01 +00:00
|
|
|
/* Put us in FIQ mode, set IRQ stack */
|
2010-11-24 18:56:35 +00:00
|
|
|
b .
|
|
|
|
mrs r3, cpsr
|
2015-05-14 14:50:07 +00:00
|
|
|
orr r3, r1, #CPSRM_FIQ
|
|
|
|
//msr cpsr, r3
|
|
|
|
msr cpsr_fc, r3
|
|
|
|
ldr sp, [a1, #LpbKernelStack]
|
|
|
|
|
2010-02-09 01:54:14 +00:00
|
|
|
/* Repeat for IRQ mode */
|
2015-05-14 14:50:07 +00:00
|
|
|
mov r3, #CPSRM_INT
|
|
|
|
msr cpsr_c, r3
|
|
|
|
ldr sp, [a1, #LpbKernelStack]
|
2010-02-09 01:54:14 +00:00
|
|
|
|
2010-02-09 18:05:01 +00:00
|
|
|
/* Put us in ABORT mode and set the panic stack */
|
2015-05-14 14:50:07 +00:00
|
|
|
mov r3, #CPSRM_ABT
|
|
|
|
msr cpsr_c, r3
|
|
|
|
ldr sp, [a1, #LpbKernelStack]
|
|
|
|
|
|
|
|
/* Repeat for UDF (Undefined) mode */
|
|
|
|
mov r3, #CPSRM_UDF
|
|
|
|
msr cpsr_c, r3
|
|
|
|
ldr sp, [a1, #LpbKernelStack]
|
|
|
|
|
2010-02-09 18:05:01 +00:00
|
|
|
/* Put us into SVC (Supervisor) mode and set the kernel stack */
|
2015-05-14 14:50:07 +00:00
|
|
|
mov r3, #CPSRM_SVC
|
|
|
|
msr cpsr_c, r3
|
2010-02-09 01:54:14 +00:00
|
|
|
ldr sp, [a1, #LpbKernelStack]
|
2015-05-14 14:50:07 +00:00
|
|
|
|
2010-02-09 01:54:14 +00:00
|
|
|
/* Go to C code */
|
2008-02-12 16:22:01 +00:00
|
|
|
b KiInitializeSystem
|
2010-02-09 01:54:14 +00:00
|
|
|
|
2015-05-14 14:50:07 +00:00
|
|
|
NESTED_END KiSystemStartup
|
|
|
|
|
|
|
|
END
|
2010-02-09 01:54:14 +00:00
|
|
|
/* EOF */
|