42 if (newObject ==
NULL)
74 if (newObject ==
NULL)
#define AML_DEBUG_ERROR(ctx, format,...)
Macro to simplify calling aml_debug_error() with the current function name.
uint64_t aml_data_ref_object_read(aml_term_list_ctx_t *ctx, aml_object_t *out)
Read a DataRefObject structure from the AML 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_def_scope_read(aml_term_list_ctx_t *ctx)
Reads a DefScope structure from the AML byte stream.
uint64_t aml_def_name_read(aml_term_list_ctx_t *ctx)
Reads a DefName structure from the AML byte stream.
uint64_t aml_namespace_modifier_obj_read(aml_term_list_ctx_t *ctx)
Reads a NameSpaceModifierObj structure from the AML byte stream.
uint64_t aml_def_alias_read(aml_term_list_ctx_t *ctx)
Reads a DefAlias structure from the AML byte stream.
uint32_t aml_pkg_length_t
PkgLength structure.
uint64_t aml_pkg_length_read(aml_term_list_ctx_t *ctx, aml_pkg_length_t *out)
Reads a PkgLength structure from the AML byte stream.
uint64_t aml_term_list_read(aml_state_t *state, aml_object_t *scope, const uint8_t *start, const uint8_t *end, aml_term_list_ctx_t *parentCtx)
Reads a TermList structure from the AML byte stream.
uint64_t aml_namespace_add_by_name_string(aml_namespace_overlay_t *overlay, aml_object_t *start, const aml_name_string_t *nameString, aml_object_t *object)
Add an object to the namespace heirarchy using a name string.
aml_type_t
ACPI data types.
aml_object_t * aml_object_new(void)
Allocate a new ACPI object.
uint64_t aml_alias_set(aml_object_t *object, aml_object_t *target)
Set a object as an alias to the given target object.
@ AML_PREDEFINED_SCOPE
Not in the spec, used internally to represent _SB, _GPE, etc.
const char * aml_name_string_to_string(const aml_name_string_t *nameString)
Convert an aml NameString to a string.
const char * aml_type_to_string(aml_type_t type)
Convert an aml data 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_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.
#define DEREF_DEFER(ptr)
RAII-style cleanup for scoped references.
#define errno
Error number variable.
#define EILSEQ
Illegal byte sequence.
#define NULL
Pointer error value.
#define ERR
Integer error value.
aml_namespace_overlay_t overlay
Holds any named objects created during parsing.
Context for reading a TermList.