1#pragma once
2
3#include <uacpi/types.h>
4#include <uacpi/status.h>
5#include <uacpi/uacpi.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11#ifndef UACPI_BAREBONES_MODE
12
13/**
14 * Set the firmware waking vector in FACS.
15 *
16 * 'addr32' is the real mode entry-point address
17 * 'addr64' is the protected mode entry-point address
18 */
19UACPI_ALWAYS_ERROR_FOR_REDUCED_HARDWARE(
20uacpi_status uacpi_set_waking_vector(
21 uacpi_phys_addr addr32, uacpi_phys_addr addr64
22))
23
24typedef enum uacpi_sleep_state {
25 UACPI_SLEEP_STATE_S0 = 0,
26 UACPI_SLEEP_STATE_S1,
27 UACPI_SLEEP_STATE_S2,
28 UACPI_SLEEP_STATE_S3,
29 UACPI_SLEEP_STATE_S4,
30 UACPI_SLEEP_STATE_S5,
31 UACPI_SLEEP_STATE_MAX = UACPI_SLEEP_STATE_S5,
32} uacpi_sleep_state;
33
34/**
35 * Prepare for a given sleep state.
36 */
37uacpi_status uacpi_prepare_for_sleep_state(uacpi_sleep_state);
38
39/**
40 * Enter the given sleep state after preparation.
41 */
42uacpi_status uacpi_enter_sleep_state(uacpi_sleep_state);
43
44/**
45 * Prepare to leave the given sleep state.
46 */
47uacpi_status uacpi_prepare_for_wake_from_sleep_state(uacpi_sleep_state);
48
49/**
50 * Wake from the given sleep state.
51 */
52uacpi_status uacpi_wake_from_sleep_state(uacpi_sleep_state);
53
54/**
55 * Attempt reset via the FADT reset register.
56 */
57uacpi_status uacpi_reboot(void);
58
59#endif // !UACPI_BAREBONES_MODE
60
61#ifdef __cplusplus
62}
63#endif
64