PatchworkOS
Loading...
Searching...
No Matches
name.h
Go to the documentation of this file.
1#pragma once
2
3#include <stdint.h>
4#include <sys/list.h>
5
6typedef struct aml_term_list_ctx aml_term_list_ctx_t;
7typedef struct aml_object aml_object_t;
8typedef struct aml_term_list_ctx aml_term_list_ctx_t;
9
28#define AML_IS_LEAD_NAME_CHAR(token) \
29 (((token)->num >= AML_NAME_CHAR_A && (token)->num <= AML_NAME_CHAR_Z) || (token)->num == AML_NAME_CHAR)
30
37#define AML_IS_DIGIT_CHAR(token) (((token)->num >= AML_DIGIT_CHAR_0 && (token)->num <= AML_DIGIT_CHAR_9))
38
45#define AML_IS_NAME_CHAR(token) (AML_IS_DIGIT_CHAR(token) || AML_IS_LEAD_NAME_CHAR(token))
46
51typedef struct
52{
56
61typedef struct
62{
63 bool present;
65
71
81
92
103
115
127
140
150
161
174
185
196
210
223
233
246
uint64_t aml_seg_count_read(aml_term_list_ctx_t *ctx, uint8_t *out)
Reads the next data as a SegCount structure from the AML bytecode stream.
Definition name.c:17
uint64_t aml_name_string_read(aml_term_list_ctx_t *ctx, aml_name_string_t *out)
Reads the next data as a NameString structure from the AML bytecode stream.
Definition name.c:189
uint32_t aml_name_seg_t
Definition name.h:70
aml_object_t * aml_name_string_read_and_resolve(aml_term_list_ctx_t *ctx)
Reads the next data as a NameString structure from the AML bytecode stream and resolves it to a objec...
Definition name.c:227
uint64_t aml_null_name_read(aml_term_list_ctx_t *ctx)
Definition name.c:113
uint64_t aml_multi_name_path_read(aml_term_list_ctx_t *ctx, aml_name_seg_t **outSegments, uint64_t *outSegCount)
Reads the next data as a MultiNamePath structure from the AML bytecode stream.
Definition name.c:80
aml_object_t * aml_simple_name_read_and_resolve(aml_term_list_ctx_t *ctx)
Reads a SimpleName structure from the AML byte stream and resolves it to a object.
Definition name.c:253
uint64_t aml_name_seg_read(aml_term_list_ctx_t *ctx, aml_name_seg_t **out)
Reads the next data as a NameSeg from the AML bytecode stream.
Definition name.c:27
uint64_t aml_name_path_read(aml_term_list_ctx_t *ctx, aml_name_path_t *out)
Reads the next data as a NamePath structure from the AML bytecode stream.
Definition name.c:124
aml_object_t * aml_super_name_read_and_resolve(aml_term_list_ctx_t *ctx)
Reads a SuperName structure from the AML byte stream and resolves it to a object.
Definition name.c:285
uint64_t aml_root_char_read(aml_term_list_ctx_t *ctx, aml_root_char_t *out)
Reads the next data as a RootChar from the AML bytecode stream.
Definition name.c:177
uint64_t aml_target_read_and_resolve(aml_term_list_ctx_t *ctx, aml_object_t **out)
Reads a Target structure from the AML byte stream and resolves it to a object.
Definition name.c:319
uint64_t aml_dual_name_path_read(aml_term_list_ctx_t *ctx, aml_name_seg_t **out)
Reads the next data as a DualNamePath structure from the AML bytecode stream.
Definition name.c:58
uint64_t aml_prefix_path_read(aml_term_list_ctx_t *ctx, aml_prefix_path_t *out)
Reads the next data as a PrefixPath structure from the AML bytecode stream.
Definition name.c:159
__UINT32_TYPE__ uint32_t
Definition stdint.h:15
__UINT64_TYPE__ uint64_t
Definition stdint.h:17
__UINT8_TYPE__ uint8_t
Definition stdint.h:11
__UINT16_TYPE__ uint16_t
Definition stdint.h:13
Represents the NamePath, DualNamePath, MultiNamePath and NullPath structures.
Definition name.h:77
aml_name_seg_t * segments
Array of segments in the name path.
Definition name.h:79
uint64_t segmentCount
Number of segments in the name path.
Definition name.h:78
A NameSeg strcture.
A NameString structure.
Definition name.h:87
aml_name_path_t namePath
Definition name.h:90
aml_prefix_path_t prefixPath
Definition name.h:89
aml_root_char_t rootChar
Definition name.h:88
ACPI object.
Definition object.h:425
A PrefixPath structure.
Definition name.h:52
uint16_t depth
Definition name.h:53
A RootChar structure.
Definition name.h:62
bool present
If the first character is a root character ('\'), if yes, the name string is absolute.
Definition name.h:63
Context for reading a TermList.
Definition term.h:37