2 Copyright © 1995-2017, The AROS Development Team. All rights reserved.
5 Desc: default x86 power state handlers
9 #include <exec/interrupts.h>
12 #include <proto/exec.h>
14 #define __AROS_KERNEL__
16 #include "exec_intern.h"
18 /* Call the kernel to perform a Cold Reset */
19 AROS_INTH1(Exec_X86ColdResetHandler
, struct Interrupt
*, handler
)
23 UBYTE action
= handler
->is_Node
.ln_Type
;
25 if (action
== SD_ACTION_COLDREBOOT
)
27 krnSysCallChangePMState(0xFF);
35 /* Call the kernel to perform a Warm Reset */
36 AROS_INTH1(Exec_X86WarmResetHandler
, struct Interrupt
*, handler
)
40 UBYTE action
= handler
->is_Node
.ln_Type
;
42 if (action
== SD_ACTION_WARMREBOOT
)
44 /* Tell kernel to reboot */
45 __asm__
__volatile__ ("int $0xfe"::"a"(0x100));
48 /* We really should not return from that */
54 /* This reset handler is called at the end of the shut down
55 * chain (after the power-off screen), and calls the kernel
56 * provided routine to power off the hardware if possible.
58 AROS_INTH1(Exec_X86ShutdownHandler
, struct Interrupt
*, handler
)
66 * Either we will forever loop looking for a
67 * syscall shutdown handler, or call an appropriate one =)
70 krnSysCallChangePMState(0);
73 /* We really should not return from that */