65 assert(out->type & allowedTypes);
161 if (expression ==
NULL)
216 if (parentCtx !=
NULL)
#define assert(expression)
#define UNREF_DEFER(ptr)
RAII-style cleanup for scoped references.
#define UNREF(ptr)
Decrement reference count.
#define EINVAL
Invalid argument.
#define errno
Error number variable.
#define EILSEQ
Illegal byte sequence.
#define NULL
Pointer error value.
#define ERR
Integer error value.
uint64_t aml_convert_source(aml_state_t *state, aml_object_t *src, aml_object_t **dest, aml_type_t allowedTypes)
Performs a "Implicit Source Operand Conversion" acording to the rules in section 19....
#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_data_object_read(aml_term_list_ctx_t *ctx, aml_object_t *out)
Read a DataObject structure from the AML stream.
aml_object_t * aml_expression_opcode_read(aml_term_list_ctx_t *ctx)
Reads an ExpressionOpcode structure from the AML byte stream.
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_named_obj_read(aml_term_list_ctx_t *ctx)
Reads a NamedObj 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_statement_opcode_read(aml_term_list_ctx_t *ctx)
Reads an StatementOpcode structure from the AML byte stream.
aml_string_t * aml_term_arg_read_string(aml_term_list_ctx_t *ctx)
Wrapper around aml_term_arg_read() that converts the result to a string.
aml_object_t * aml_term_arg_read(aml_term_list_ctx_t *ctx, aml_type_t allowedTypes)
Reads an TermArg structure from the AML byte stream.
uint64_t aml_term_arg_read_integer(aml_term_list_ctx_t *ctx, aml_uint_t *out)
Wrapper around aml_term_arg_read() that converts the result to an integer.
aml_package_t * aml_term_arg_read_package(aml_term_list_ctx_t *ctx)
Wrapper around aml_term_arg_read() that converts the result to a package.
uint64_t aml_object_read(aml_term_list_ctx_t *ctx)
Reads an Object structure from the AML byte stream.
uint64_t aml_term_obj_read(aml_term_list_ctx_t *ctx)
Reads a TermObj 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.
aml_buffer_t * aml_term_arg_read_buffer(aml_term_list_ctx_t *ctx)
Wrapper around aml_term_arg_read() that converts the result to a buffer.
@ AML_STOP_REASON_NONE
No stop reason, continue execution or has reached the end of the TermList.
uint64_t aml_uint_t
AML Integer type.
aml_type_t
ACPI data types.
aml_object_t * aml_object_new(void)
Allocate a new ACPI object.
const char * aml_token_type_to_string(aml_token_type_t type)
Convert a token type to a string.
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_NAMED
Is a NamedObj (section 20.2.5.2).
@ AML_TOKEN_TYPE_NAMESPACE_MODIFIER
Is a Namespace Modifier Object (section 20.2.5.1).
@ 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_STATEMENT
Is a Statement Opcode (section 20.2.5.3).
@ 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).
Data for a buffer object.
Data for a package object.
Data for a string object.
Context for reading a TermList.
aml_stop_reason_t stopReason
const aml_token_props_t * props