2 Copyright � 1995-2011, The AROS Development Team. All rights reserved.
5 Desc: Create an empty usable CPU context, ARM version.
9 #include <aros/kernel.h>
10 #include <aros/libcall.h>
12 #include <aros/arm/cpucontext.h>
14 #include <kernel_base.h>
15 #include <kernel_objects.h>
17 AROS_LH0(void *, KrnCreateContext
,
18 struct KernelBase
*, KernelBase
, 18, Kernel
)
23 struct ExceptionContext
*ctx
;
26 * Allocate common data block and FPU data block in one
27 * chunk. This way we simplify things a lot.
29 * On native ports AROSCPUContext can be simply #define'd to ExceptionContext,
30 * so we refer struct AROSCPUContext only for size calculation.
32 ctx
= krnAllocCPUContext();
35 ctx
->FPUType
= KernelBase
->kb_ContextFlags
;
36 ctx
->cpsr
= CPUMODE_USER
; /* Initial value for user mode */
38 ctx
->cpsr
|= CPUMODE_BIGENDIAN
;
40 ctx
->fpuContext
= (APTR
)((IPTR
)ctx
+ sizeof(struct AROSCPUContext
));