xref: /linux/include/uapi/linux/reboot.h (revision 498495dba268b20e8eadd7fe93c140c68b6cc9d2)
1*6f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2607ca46eSDavid Howells #ifndef _UAPI_LINUX_REBOOT_H
3607ca46eSDavid Howells #define _UAPI_LINUX_REBOOT_H
4607ca46eSDavid Howells 
5607ca46eSDavid Howells /*
6607ca46eSDavid Howells  * Magic values required to use _reboot() system call.
7607ca46eSDavid Howells  */
8607ca46eSDavid Howells 
9607ca46eSDavid Howells #define	LINUX_REBOOT_MAGIC1	0xfee1dead
10607ca46eSDavid Howells #define	LINUX_REBOOT_MAGIC2	672274793
11607ca46eSDavid Howells #define	LINUX_REBOOT_MAGIC2A	85072278
12607ca46eSDavid Howells #define	LINUX_REBOOT_MAGIC2B	369367448
13607ca46eSDavid Howells #define	LINUX_REBOOT_MAGIC2C	537993216
14607ca46eSDavid Howells 
15607ca46eSDavid Howells 
16607ca46eSDavid Howells /*
17607ca46eSDavid Howells  * Commands accepted by the _reboot() system call.
18607ca46eSDavid Howells  *
19607ca46eSDavid Howells  * RESTART     Restart system using default command and mode.
20607ca46eSDavid Howells  * HALT        Stop OS and give system control to ROM monitor, if any.
21607ca46eSDavid Howells  * CAD_ON      Ctrl-Alt-Del sequence causes RESTART command.
22607ca46eSDavid Howells  * CAD_OFF     Ctrl-Alt-Del sequence sends SIGINT to init task.
23607ca46eSDavid Howells  * POWER_OFF   Stop OS and remove all power from system, if possible.
24607ca46eSDavid Howells  * RESTART2    Restart system using given command string.
25607ca46eSDavid Howells  * SW_SUSPEND  Suspend system using software suspend if compiled in.
26607ca46eSDavid Howells  * KEXEC       Restart system using a previously loaded Linux kernel
27607ca46eSDavid Howells  */
28607ca46eSDavid Howells 
29607ca46eSDavid Howells #define	LINUX_REBOOT_CMD_RESTART	0x01234567
30607ca46eSDavid Howells #define	LINUX_REBOOT_CMD_HALT		0xCDEF0123
31607ca46eSDavid Howells #define	LINUX_REBOOT_CMD_CAD_ON		0x89ABCDEF
32607ca46eSDavid Howells #define	LINUX_REBOOT_CMD_CAD_OFF	0x00000000
33607ca46eSDavid Howells #define	LINUX_REBOOT_CMD_POWER_OFF	0x4321FEDC
34607ca46eSDavid Howells #define	LINUX_REBOOT_CMD_RESTART2	0xA1B2C3D4
35607ca46eSDavid Howells #define	LINUX_REBOOT_CMD_SW_SUSPEND	0xD000FCE2
36607ca46eSDavid Howells #define	LINUX_REBOOT_CMD_KEXEC		0x45584543
37607ca46eSDavid Howells 
38607ca46eSDavid Howells 
39607ca46eSDavid Howells 
40607ca46eSDavid Howells #endif /* _UAPI_LINUX_REBOOT_H */
41