3 * - By John Hodge (thePowersGang)
6 * - Process management assembly
9 #include "include/assembly.h"
11 .globl KernelThreadHeader
13 @ SP+8: Argument Count
15 @ SP+0: Thread Pointer
18 @ TODO: Do something with the thread pointer
20 ldr r4, [sp],#4 @ Function
30 .globl Proc_int_DropToUser
40 @ R1: Pointer to where to save old stack
42 @ R3: Pointer to save old IP
43 @ SP+0: New address space
53 @ Only update TTBR0 if the task has an explicit address space
56 mcrne p15, 0, r1, c2, c0, 0 @ Set TTBR0 to r0
58 mcrne p15, 0, r1, c8, c7, 0 @ Invalidate all (HACK! But it fixes things)
75 mov r4, r1 @ Save mem destination
76 str sp, [r0] @ Save SP to SP dest
79 str r0, [r4] @ Save clone return to Mem Dest
81 ldr r0, =Proc_CloneInt_new
90 @ ldr r0, =csProc_CloneInt_NewTaskMessage
99 csProc_CloneInt_NewTaskMessage: