10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
13 #include <config/reboot.h>
16 * Calculate static inline reboot API function name
18 * @v _prefix Subsystem prefix
19 * @v _api_func API function
20 * @ret _subsys_func Subsystem API function
22 #define REBOOT_INLINE( _subsys, _api_func ) \
23 SINGLE_API_INLINE ( REBOOT_PREFIX_ ## _subsys, _api_func )
26 * Provide an reboot API implementation
28 * @v _prefix Subsystem prefix
29 * @v _api_func API function
30 * @v _func Implementing function
32 #define PROVIDE_REBOOT( _subsys, _api_func, _func ) \
33 PROVIDE_SINGLE_API ( REBOOT_PREFIX_ ## _subsys, _api_func, _func )
36 * Provide a static inline reboot API implementation
38 * @v _prefix Subsystem prefix
39 * @v _api_func API function
41 #define PROVIDE_REBOOT_INLINE( _subsys, _api_func ) \
42 PROVIDE_SINGLE_API_INLINE ( REBOOT_PREFIX_ ## _subsys, _api_func )
44 /* Include all architecture-independent reboot API headers */
45 #include <ipxe/null_reboot.h>
46 #include <ipxe/efi/efi_reboot.h>
48 /* Include all architecture-dependent reboot API headers */
49 #include <bits/reboot.h>
54 * @v warm Perform a warm reboot
56 void reboot ( int warm );
61 * @ret rc Return status code
63 * This function may fail, since not all systems support being powered
66 int poweroff ( void );
68 #endif /* _IPXE_REBOOT_H */