ReactOS 0.4.17-dev-251-gcbc75d1
types.h
Go to the documentation of this file.
1#pragma once
2
3#include <uacpi/status.h>
4#include <uacpi/types.h>
6
7#ifndef UACPI_BAREBONES_MODE
8
9// object->flags field if object->type == UACPI_OBJECT_REFERENCE
16};
17
18// object->flags field if object->type == UACPI_OBJECT_STRING
22};
23
24typedef struct uacpi_buffer {
26 union {
27 void *data;
30 };
33
34typedef struct uacpi_package {
39
40typedef struct uacpi_buffer_field {
46
47typedef struct uacpi_buffer_index {
51
52typedef struct uacpi_mutex {
59
60typedef struct uacpi_event {
64
72
73#define UACPI_ADDRESS_SPACE_HANDLER_DEFAULT (1 << 0)
76
77/*
78 * NOTE: These are common object headers.
79 * Any changes to these structs must be propagated to all objects.
80 * ==============================================================
81 * Common for the following objects:
82 * - UACPI_OBJECT_OPERATION_REGION
83 * - UACPI_OBJECT_PROCESSOR
84 * - UACPI_OBJECT_DEVICE
85 * - UACPI_OBJECT_THERMAL_ZONE
86 */
91
97
98/*
99 * Common for the following objects:
100 * - UACPI_OBJECT_PROCESSOR
101 * - UACPI_OBJECT_DEVICE
102 * - UACPI_OBJECT_THERMAL_ZONE
103 */
104typedef struct uacpi_handlers {
109
110// This region has a corresponding _REG method that was succesfully executed
111#define UACPI_OP_REGION_STATE_REG_EXECUTED (1 << 0)
112
113// This region was successfully attached to a handler
114#define UACPI_OP_REGION_STATE_ATTACHED (1 << 1)
115
124
125 union {
126 // If space == TABLE_DATA
128
129 // If space == PCC
131 };
132
133 // Used to link regions sharing the same handler
136
137typedef struct uacpi_device {
142
143typedef struct uacpi_processor {
151
152typedef struct uacpi_thermal_zone {
157
158typedef struct uacpi_power_resource {
162
165);
166
167typedef struct uacpi_control_method {
169 union {
172 };
182
183typedef enum uacpi_access_type {
191
192typedef enum uacpi_lock_rule {
196
197typedef enum uacpi_update_rule {
202
208
209typedef struct uacpi_field_unit {
211
212 union {
213 // UACPI_FIELD_UNIT_KIND_NORMAL
214 struct {
216 };
217
218 // UACPI_FIELD_UNIT_KIND_INDEX
219 struct {
222 };
223
224 // UACPI_FIELD_UNIT_KIND_BANK
225 struct {
229 };
230 };
231
233
240
246
247typedef struct uacpi_object {
251
252 union {
270 };
272
274
278};
279
282
285
288);
290
294};
295
297 uacpi_package *pkg, uacpi_size num_elements,
298 enum uacpi_prealloc_objects prealloc_objects
299);
300
303
305
307
309
310#endif // !UACPI_BAREBONES_MODE
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7512
struct uacpi_object * uacpi_create_internal_reference(enum uacpi_reference_kind kind, uacpi_object *child)
Definition: types.c:1453
uacpi_prealloc_objects
Definition: types.h:291
@ UACPI_PREALLOC_OBJECTS_YES
Definition: types.h:293
@ UACPI_PREALLOC_OBJECTS_NO
Definition: types.h:292
uacpi_object * uacpi_create_object(uacpi_object_type type)
Definition: types.c:327
void uacpi_object_detach_child(uacpi_object *parent)
Definition: types.c:959
uacpi_bool uacpi_package_fill(uacpi_package *pkg, uacpi_size num_elements, enum uacpi_prealloc_objects prealloc_objects)
Definition: types.c:124
uacpi_update_rule
Definition: types.h:197
@ UACPI_UPDATE_RULE_PRESERVE
Definition: types.h:198
@ UACPI_UPDATE_RULE_WRITE_AS_ZEROES
Definition: types.h:200
@ UACPI_UPDATE_RULE_WRITE_AS_ONES
Definition: types.h:199
uacpi_status(* uacpi_native_call_handler)(uacpi_handle ctx, uacpi_object *retval)
Definition: types.h:163
void uacpi_buffer_to_view(uacpi_buffer *, uacpi_data_view *)
Definition: types.c:1034
uacpi_reference_kind
Definition: types.h:10
@ UACPI_REFERENCE_KIND_LOCAL
Definition: types.h:12
@ UACPI_REFERENCE_KIND_ARG
Definition: types.h:13
@ UACPI_REFERENCE_KIND_REFOF
Definition: types.h:11
@ UACPI_REFERENCE_KIND_PKG_INDEX
Definition: types.h:15
@ UACPI_REFERENCE_KIND_NAMED
Definition: types.h:14
uacpi_field_unit_kind
Definition: types.h:203
@ UACPI_FIELD_UNIT_KIND_NORMAL
Definition: types.h:204
@ UACPI_FIELD_UNIT_KIND_BANK
Definition: types.h:206
@ UACPI_FIELD_UNIT_KIND_INDEX
Definition: types.h:205
uacpi_mutex * uacpi_create_mutex(void)
Definition: types.c:181
void uacpi_object_attach_child(uacpi_object *parent, uacpi_object *child)
Definition: types.c:943
uacpi_access_type
Definition: types.h:183
@ UACPI_ACCESS_TYPE_WORD
Definition: types.h:186
@ UACPI_ACCESS_TYPE_ANY
Definition: types.h:184
@ UACPI_ACCESS_TYPE_BUFFER
Definition: types.h:189
@ UACPI_ACCESS_TYPE_DWORD
Definition: types.h:187
@ UACPI_ACCESS_TYPE_BYTE
Definition: types.h:185
@ UACPI_ACCESS_TYPE_QWORD
Definition: types.h:188
uacpi_status uacpi_object_assign(uacpi_object *dst, uacpi_object *src, enum uacpi_assign_behavior)
Definition: types.c:1360
void uacpi_method_unref(uacpi_control_method *)
Definition: types.c:648
uacpi_assign_behavior
Definition: types.h:275
@ UACPI_ASSIGN_BEHAVIOR_DEEP_COPY
Definition: types.h:276
@ UACPI_ASSIGN_BEHAVIOR_SHALLOW_COPY
Definition: types.h:277
void uacpi_mutex_unref(uacpi_mutex *)
Definition: types.c:492
uacpi_lock_rule
Definition: types.h:192
@ UACPI_LOCK_RULE_NO_LOCK
Definition: types.h:193
@ UACPI_LOCK_RULE_LOCK
Definition: types.h:194
void uacpi_address_space_handler_unref(uacpi_address_space_handler *handler)
Definition: types.c:548
uacpi_string_kind
Definition: types.h:19
@ UACPI_STRING_KIND_PATH
Definition: types.h:21
@ UACPI_STRING_KIND_NORMAL
Definition: types.h:20
uacpi_object * uacpi_unwrap_internal_reference(uacpi_object *object)
Definition: types.c:1468
size_t uacpi_size
Definition: types.h:37
uint32_t uacpi_u32
Definition: types.h:21
bool uacpi_bool
Definition: types.h:31
uint64_t uacpi_u64
Definition: types.h:22
char uacpi_char
Definition: types.h:44
uint16_t uacpi_u16
Definition: types.h:20
uint8_t uacpi_u8
Definition: types.h:19
uacpi_status
Definition: status.h:10
uacpi_status(* uacpi_notify_handler)(uacpi_handle context, uacpi_namespace_node *node, uacpi_u64 value)
Definition: types.h:508
uacpi_status(* uacpi_region_handler)(uacpi_region_op op, uacpi_handle op_data)
Definition: types.h:505
uacpi_object_type
Definition: types.h:104
r parent
Definition: btrfs.c:3010
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340
static HWND child
Definition: cursoricon.c:298
uacpi_region_handler callback
Definition: types.h:67
uacpi_handle user_context
Definition: types.h:68
struct uacpi_address_space_handler * next
Definition: types.h:69
struct uacpi_operation_region * regions
Definition: types.h:70
struct uacpi_shareable shareable
Definition: types.h:66
uacpi_address_space_handler * head
Definition: types.h:89
struct uacpi_shareable shareable
Definition: types.h:88
uacpi_buffer * backing
Definition: types.h:41
uacpi_u32 bit_length
Definition: types.h:43
uacpi_bool force_buffer
Definition: types.h:44
uacpi_size bit_index
Definition: types.h:42
uacpi_buffer * buffer
Definition: types.h:49
uacpi_size idx
Definition: types.h:48
uacpi_size size
Definition: types.h:31
uacpi_char * text
Definition: types.h:29
uacpi_u8 * byte_data
Definition: types.h:28
struct uacpi_shareable shareable
Definition: types.h:25
void * data
Definition: types.h:27
uacpi_u8 sync_level
Definition: types.h:175
uacpi_u8 args
Definition: types.h:176
uacpi_u8 named_objects_persist
Definition: types.h:178
struct uacpi_shareable shareable
Definition: types.h:168
uacpi_u8 owns_code
Definition: types.h:180
uacpi_u8 native_call
Definition: types.h:179
uacpi_u8 * code
Definition: types.h:170
uacpi_u32 size
Definition: types.h:174
uacpi_mutex * mutex
Definition: types.h:173
uacpi_u8 is_serialized
Definition: types.h:177
uacpi_native_call_handler handler
Definition: types.h:171
struct uacpi_device_notify_handler * next
Definition: types.h:95
uacpi_notify_handler callback
Definition: types.h:93
uacpi_handle user_context
Definition: types.h:94
uacpi_device_notify_handler * notify_handlers
Definition: types.h:140
struct uacpi_shareable shareable
Definition: types.h:138
uacpi_address_space_handler * address_space_handlers
Definition: types.h:139
struct uacpi_shareable shareable
Definition: types.h:61
uacpi_handle handle
Definition: types.h:62
uacpi_u64 bank_value
Definition: types.h:228
uacpi_u8 bit_offset_within_first_byte
Definition: types.h:237
struct uacpi_field_unit * bank_selection
Definition: types.h:227
uacpi_u32 pin_offset
Definition: types.h:236
uacpi_u32 byte_offset
Definition: types.h:234
uacpi_namespace_node * region
Definition: types.h:215
uacpi_u32 bit_length
Definition: types.h:235
uacpi_u8 update_rule
Definition: types.h:242
uacpi_u8 access_length
Definition: types.h:239
uacpi_u8 attributes
Definition: types.h:241
uacpi_u8 access_width_bytes
Definition: types.h:238
uacpi_namespace_node * bank_region
Definition: types.h:226
uacpi_u8 lock_rule
Definition: types.h:244
uacpi_u8 kind
Definition: types.h:243
uacpi_object * connection
Definition: types.h:232
struct uacpi_shareable shareable
Definition: types.h:210
struct uacpi_field_unit * index
Definition: types.h:220
struct uacpi_field_unit * data
Definition: types.h:221
uacpi_address_space_handler * address_space_head
Definition: types.h:106
uacpi_device_notify_handler * notify_head
Definition: types.h:107
struct uacpi_shareable shareable
Definition: types.h:105
uacpi_handle handle
Definition: types.h:54
uacpi_u16 depth
Definition: types.h:56
uacpi_thread_id owner
Definition: types.h:55
struct uacpi_shareable shareable
Definition: types.h:53
uacpi_u8 sync_level
Definition: types.h:57
struct uacpi_shareable shareable
Definition: types.h:248
uacpi_u8 flags
Definition: types.h:250
uacpi_address_space_handlers * address_space_handlers
Definition: types.h:266
uacpi_processor * processor
Definition: types.h:264
uacpi_control_method * method
Definition: types.h:257
uacpi_u8 type
Definition: types.h:249
uacpi_handlers * handlers
Definition: types.h:267
uacpi_field_unit * field_unit
Definition: types.h:269
uacpi_event * event
Definition: types.h:260
uacpi_buffer_field buffer_field
Definition: types.h:255
uacpi_buffer_index buffer_index
Definition: types.h:261
uacpi_package * package
Definition: types.h:254
uacpi_u64 integer
Definition: types.h:253
uacpi_object * inner_object
Definition: types.h:256
uacpi_power_resource power_resource
Definition: types.h:268
uacpi_buffer * buffer
Definition: types.h:258
uacpi_thermal_zone * thermal_zone
Definition: types.h:265
uacpi_device * device
Definition: types.h:263
uacpi_mutex * mutex
Definition: types.h:259
uacpi_operation_region * op_region
Definition: types.h:262
uacpi_u64 offset
Definition: types.h:122
struct uacpi_operation_region * next
Definition: types.h:134
uacpi_u8 * internal_buffer
Definition: types.h:130
uacpi_u8 state_flags
Definition: types.h:121
uacpi_u64 table_idx
Definition: types.h:127
uacpi_u16 space
Definition: types.h:120
struct uacpi_shareable shareable
Definition: types.h:117
uacpi_u64 length
Definition: types.h:123
uacpi_address_space_handler * handler
Definition: types.h:118
uacpi_handle user_context
Definition: types.h:119
uacpi_object ** objects
Definition: types.h:36
uacpi_size count
Definition: types.h:37
struct uacpi_shareable shareable
Definition: types.h:35
uacpi_u8 system_level
Definition: types.h:159
uacpi_u16 resource_order
Definition: types.h:160
uacpi_address_space_handler * address_space_handlers
Definition: types.h:145
uacpi_u32 block_address
Definition: types.h:148
uacpi_device_notify_handler * notify_handlers
Definition: types.h:146
uacpi_u8 id
Definition: types.h:147
uacpi_u8 block_length
Definition: types.h:149
struct uacpi_shareable shareable
Definition: types.h:144
struct uacpi_shareable shareable
Definition: types.h:153
uacpi_device_notify_handler * notify_handlers
Definition: types.h:155
uacpi_address_space_handler * address_space_handlers
Definition: types.h:154
int retval
Definition: wcstombs.cpp:91