forked from uACPI/uACPI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuacpi.h
76 lines (63 loc) · 1.8 KB
/
uacpi.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#pragma once
#include <uacpi/types.h>
#include <uacpi/status.h>
#include <uacpi/kernel_api.h>
#include <uacpi/namespace.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Bad table checksum should be considered a fatal error
* (table load is fully aborted in this case)
*/
#define UACPI_PARAM_BAD_CSUM_FATAL (1 << 0)
/*
* Bad table header should be considered a fatal error
* (table load is fully aborted in this case)
*/
#define UACPI_PARAM_BAD_TBL_HDR_FATAL (1 << 1)
/*
* Force uACPI to use RSDT even for later revisions
*/
#define UACPI_PARAM_BAD_XSDT (1 << 2)
struct uacpi_params {
enum uacpi_log_level log_level;
uint64_t flags;
};
struct uacpi_init_params {
uacpi_phys_addr rsdp;
struct uacpi_params rt_params;
};
/*
* Initializes the uACPI subsystem, iterates & records all relevant RSDT/XSDT
* tables.
*/
uacpi_status uacpi_initialize(struct uacpi_init_params*);
/*
* Parses & executes all of the DSDT/SSDT tables.
*/
uacpi_status uacpi_namespace_load(void);
/*
* Initializes all the necessary objects in the namespaces by calling
* _STA/_INI etc.
*/
uacpi_status uacpi_namespace_initialize(void);
/*
* Evaluate an object within the namespace and get back its value.
* Either root or path must be valid.
* A value of NULL for 'parent' implies uacpi_namespace_root() relative
* lookups, unless 'path' is already absolute.
*/
uacpi_status uacpi_eval(uacpi_namespace_node *parent, const uacpi_char *path,
uacpi_args *args, uacpi_object **ret);
/*
* Same as uacpi_eval, but the return value type is validated against
* the 'ret_mask'. UACPI_STATUS_TYPE_MISMATCH is returned on error.
*/
uacpi_status uacpi_eval_typed(
uacpi_namespace_node *parent, const uacpi_char *path,
uacpi_args *args, uacpi_u32 ret_mask, uacpi_object **ret
);
#ifdef __cplusplus
}
#endif