df121fde055203db6967e4d482d6c32ef0faa828
[AROS.git] / arch / ppc-chrp / exec / coldreboot.c
blobdf121fde055203db6967e4d482d6c32ef0faa828
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: ColdReboot() - Reboot the computer.
6 Lang: english
7 */
9 #include <exec/types.h>
10 #include <exec/execbase.h>
11 #include <exec/tasks.h>
12 #include <aros/libcall.h>
14 #include <proto/exec.h>
16 #include "exec_util.h"
18 /*****************************************************************************
20 NAME */
22 AROS_LH0(void, ColdReboot,
24 /* LOCATION */
25 struct ExecBase *, SysBase, 121, Exec)
27 /* FUNCTION
28 This function will reboot the computer.
30 INPUTS
31 None.
33 RESULT
34 This function does not return.
36 NOTES
37 It can be quite harmful to call this function. It may be possible that
38 you will lose data from other tasks not having saved, or disk buffers
39 not being flushed. Plus you could annoy the (other) users.
41 EXAMPLE
43 BUGS
45 SEE ALSO
47 INTERNALS
49 ******************************************************************************/
51 AROS_LIBFUNC_INIT
53 Exec_DoResetCallbacks((struct IntExecBase *)SysBase, SD_ACTION_WARMREBOOT);
55 asm volatile("li %%r3,%0; sc"::"i"(0x100 /*SC_REBOOT*/):"memory","r3");
57 AROS_LIBFUNC_EXIT