3 * - By John Hodge (thePowersGang)
6 * - Process management assembly
20 str r10, [sp,#-11*4];\
21 str r11, [sp,#-12*4];\
22 str r12, [sp,#-13*4];\
27 #define POP_GPRS add sp, #16*4; \
37 ldr r9, [sp,#-10*4]; \
38 ldr r10, [sp,#-11*4]; \
39 ldr r11, [sp,#-12*4]; \
40 ldr r12, [sp,#-13*4]; \
43 .globl KernelThreadHeader
45 @ SP+8: Argument Count
47 @ SP+0: Thread Pointer
50 @ TODO: Do something with the thread pointer
52 ldr r4, [sp],#4 @ Function
73 @ R1: Pointer to where to save old stack
75 @ R3: Pointer to save old IP
76 @ SP+0: New address space
85 @ Only update TTBR0 if the task has an explicit address space
88 mcrne p15, 0, r0, c2, c0, 0 @ Set TTBR0 to r0