- Set up the real-mode IDT.
[AROS.git] / arch / ppc-sam440 / exec / superstate.c
blobb800d479347242540224e06bbce6ea1a3498e4db
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: SuperState() - Switch the processor into a higher plane.
6 Lang: english
7 */
9 /*****************************************************************************
11 NAME */
12 #include <proto/exec.h>
13 #include <asm/amcc440.h>
15 AROS_LH0(APTR, SuperState,
17 /* LOCATION */
18 struct ExecBase *, SysBase, 25, Exec)
20 /* FUNCTION
21 Enter supervisor mode (like Supervisor()), but return on the user
22 stack. This will mean that the user stack variables are still there.
23 A call to UserState() will end this mode.
25 INPUTS
26 None.
28 RESULT
29 The old supervisor stack. This must be passed to UserState(). If the
30 processor was already in supervisor mode, then this function will
31 return NULL. In that case do NOT call UserState().
33 NOTES
34 This is not a good function to use, it has limited scope, and will
35 probably be even less useful in the future.
37 EXAMPLE
39 BUGS
40 You can easily cause your system to cease operating normally.
42 SEE ALSO
43 Supervisor(), UserState()
45 INTERNALS
46 For extra details see Supervisor().
48 ******************************************************************************/
50 AROS_LIBFUNC_INIT
52 asm volatile("li %%r3,%0; sc"::"i"(6 /*SC_SUPERSTATE*/):"memory","r3");
54 /* We have to return something. NULL is an invalid address for a
55 stack, so it could be used to say that this function does
56 nothing.
58 return NULL;
60 AROS_LIBFUNC_EXIT
61 } /* SuperState() */