1 /* Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 * Switch the processor into user mode.
7 * Parameters to this function:
8 * function to continue with afterwards
9 * pointer to the user stack to be used
13 .globl switch_to_user_mode
14 .type switch_to_user_mode,function
18 * r0: function where to continue afterwards.
19 * r1: user stack pointer
22 * Load the user stack pointer with its future value!
27 * Make sure we are in SVC mode
28 * Disable all interrupts
32 orr r1, r1,#(0x80|0x40|0x13)
35 * Do the actual switch into user mode
36 * Disable all interrupts: 0x80, 0x40
41 orr r1, r1, #(0x80|0x40|0x10)
44 * Call the follow up function