99 for (
size_t i = 0; i < segCount; i++)
109 *outSegCount = segCount;
#define AML_DEBUG_ERROR(ctx, format,...)
Macro to simplify calling aml_debug_error() with the current function name.
aml_object_t * aml_arg_obj_read(aml_term_list_ctx_t *ctx)
Reads a ArgObj structure from the AML byte stream.
uint64_t aml_byte_data_read(aml_term_list_ctx_t *ctx, uint8_t *out)
Read a ByteData structure from the AML stream.
aml_object_t * aml_debug_obj_read(aml_term_list_ctx_t *ctx)
Reads a DebugObj structure from the AML byte stream.
aml_object_t * aml_reference_type_opcode_read(aml_term_list_ctx_t *ctx)
aml_object_t * aml_local_obj_read(aml_term_list_ctx_t *ctx)
Reads a LocalObj structure from the AML byte stream.
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.
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.
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...
uint64_t aml_null_name_read(aml_term_list_ctx_t *ctx)
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.
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.
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.
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.
#define AML_IS_LEAD_NAME_CHAR(token)
Check if a token is a LeadNameChar structure.
#define AML_IS_NAME_CHAR(token)
Check if a token is a NameChar structure.
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.
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.
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.
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.
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.
aml_object_t * aml_namespace_find_by_name_string(aml_namespace_overlay_t *overlay, aml_object_t *start, const aml_name_string_t *nameString)
Find an object in the namespace heirarchy by a name string.
const char * aml_token_type_to_string(aml_token_type_t type)
Convert a token type to a string.
static uint64_t aml_token_expect(aml_term_list_ctx_t *ctx, aml_token_num_t expected)
Reads a token from the AML stream and verifies it matches the expected token.
static void aml_token_read(aml_term_list_ctx_t *ctx, aml_token_t *out)
Attempt to read a token from the AML stream.
static void aml_token_peek(aml_term_list_ctx_t *ctx, aml_token_t *out)
Attempt to read a token from the AML stream, without advancing the instruction pointer.
@ AML_TOKEN_TYPE_DEBUG
Is a Debug Object (section 20.2.6.3).
@ AML_TOKEN_TYPE_EXPRESSION
Is an Expression Opcode (section 20.2.5.4).
@ AML_TOKEN_TYPE_NAME
Is a Name Object (section 20.2.2).
@ AML_TOKEN_TYPE_ARG
Is an Arg Object (section 20.2.6.1).
@ AML_TOKEN_TYPE_LOCAL
Is a Local Object (section 20.2.6.2).
#define DEREF(ptr)
Decrement reference count.
#define ENOENT
No such file or directory.
#define errno
Error number variable.
#define EILSEQ
Illegal byte sequence.
#define NULL
Pointer error value.
#define ERR
Integer error value.
Represents the NamePath, DualNamePath, MultiNamePath and NullPath structures.
aml_name_seg_t * segments
Array of segments in the name path.
uint64_t segmentCount
Number of segments in the name path.
aml_prefix_path_t prefixPath
bool present
If the first character is a root character ('\'), if yes, the name string is absolute.
aml_namespace_overlay_t overlay
Holds any named objects created during parsing.
Context for reading a TermList.
const aml_token_props_t * props