PatchworkOS
Loading...
Searching...
No Matches
Expression Opcodes

Expression Opcodes Encoding. More...

Data Structures

struct  aml_term_arg_list_t
 TermArgList structure. More...
 

Enumerations

enum  aml_match_opcode_t {
  AML_MATCH_MTR = 0 ,
  AML_MATCH_MEQ = 1 ,
  AML_MATCH_MLE = 2 ,
  AML_MATCH_MLT = 3 ,
  AML_MATCH_MGE = 4 ,
  AML_MATCH_MGT = 5
}
 Match opcodes for DefMatch. More...
 

Functions

aml_object_taml_operand_read (aml_term_list_ctx_t *ctx, aml_type_t allowedTypes)
 Reads an Operand structure from the AML byte stream.
 
uint64_t aml_buffer_size_read (aml_term_list_ctx_t *ctx, aml_integer_t *out)
 Reads a BufferSize structure from the AML byte stream.
 
uint64_t aml_def_buffer_read (aml_term_list_ctx_t *ctx, aml_object_t *out)
 Reads a DefBuffer structure from the AML byte stream.
 
uint64_t aml_term_arg_list_read (aml_term_list_ctx_t *ctx, uint64_t argCount, aml_term_arg_list_t *out)
 Reads a TermArgList structure from the AML byte stream.
 
aml_object_taml_method_invocation_read (aml_term_list_ctx_t *ctx)
 Reads a MethodInvocation structure from the AML byte stream.
 
aml_object_taml_def_cond_ref_of_read (aml_term_list_ctx_t *ctx)
 Reads a DefCondRefOf structure from the AML byte stream.
 
aml_object_taml_def_store_read (aml_term_list_ctx_t *ctx)
 Reads a DefStore structure from the AML byte stream.
 
uint64_t aml_dividend_read (aml_term_list_ctx_t *ctx, aml_integer_t *out)
 Reads a Dividend structure from the AML byte stream.
 
uint64_t aml_divisor_read (aml_term_list_ctx_t *ctx, aml_integer_t *out)
 Reads a Divisor structure from the AML byte stream.
 
aml_object_taml_remainder_read (aml_term_list_ctx_t *ctx)
 Reads a Remainder structure from the AML byte stream.
 
aml_object_taml_quotient_read (aml_term_list_ctx_t *ctx)
 Reads a Quotient structure from the AML byte stream.
 
aml_object_taml_def_add_read (aml_term_list_ctx_t *ctx)
 Reads a DefAdd structure from the AML byte stream.
 
aml_object_taml_def_subtract_read (aml_term_list_ctx_t *ctx)
 Reads a DefSubtract structure from the AML byte stream.
 
aml_object_taml_def_multiply_read (aml_term_list_ctx_t *ctx)
 Reads a DefMultiply structure from the AML byte stream.
 
aml_object_taml_def_divide_read (aml_term_list_ctx_t *ctx)
 Reads a DefDivide structure from the AML byte stream.
 
aml_object_taml_def_mod_read (aml_term_list_ctx_t *ctx)
 Reads a DefMod structure from the AML byte stream.
 
aml_object_taml_def_and_read (aml_term_list_ctx_t *ctx)
 Reads a DefAnd structure from the AML byte stream.
 
aml_object_taml_def_nand_read (aml_term_list_ctx_t *ctx)
 Reads a DefNAnd structure from the AML byte stream.
 
aml_object_taml_def_or_read (aml_term_list_ctx_t *ctx)
 Reads a DefOr structure from the AML byte stream.
 
aml_object_taml_def_nor_read (aml_term_list_ctx_t *ctx)
 Reads a DefNOr structure from the AML byte stream.
 
aml_object_taml_def_xor_read (aml_term_list_ctx_t *ctx)
 Reads a DefXOr structure from the AML byte stream.
 
aml_object_taml_def_not_read (aml_term_list_ctx_t *ctx)
 Reads a DefNot structure from the AML byte stream.
 
uint64_t aml_shift_count_read (aml_term_list_ctx_t *ctx, aml_integer_t *out)
 Reads a ShiftCount structure from the AML byte stream.
 
aml_object_taml_def_shift_left_read (aml_term_list_ctx_t *ctx)
 Reads a DefShiftLeft structure from the AML byte stream.
 
aml_object_taml_def_shift_right_read (aml_term_list_ctx_t *ctx)
 Reads a DefShiftRight structure from the AML byte stream.
 
aml_object_taml_def_increment_read (aml_term_list_ctx_t *ctx)
 Reads a DefIncrement structure from the AML byte stream.
 
aml_object_taml_def_decrement_read (aml_term_list_ctx_t *ctx)
 Reads a DefDecrement structure from the AML byte stream.
 
aml_object_taml_obj_reference_read (aml_term_list_ctx_t *ctx)
 Reads an ObjReference structure from the AML byte stream.
 
aml_object_taml_def_deref_of_read (aml_term_list_ctx_t *ctx)
 Reads a DefDerefOf structure from the AML byte stream.
 
aml_object_taml_buff_pkg_str_obj_read (aml_term_list_ctx_t *ctx)
 Reads a BuffPkgStrObj structure from the AML byte stream.
 
uint64_t aml_index_value_read (aml_term_list_ctx_t *ctx, aml_integer_t *out)
 Reads an IndexValue structure from the AML byte stream.
 
aml_object_taml_def_index_read (aml_term_list_ctx_t *ctx)
 Reads a DefIndex structure from the AML byte stream.
 
aml_object_taml_def_land_read (aml_term_list_ctx_t *ctx)
 Reads a DefLAnd structure from the AML byte stream.
 
aml_object_taml_def_lequal_read (aml_term_list_ctx_t *ctx)
 Reads a DefLEqual structure from the AML byte stream.
 
aml_object_taml_def_lgreater_read (aml_term_list_ctx_t *ctx)
 Reads a DefLGreater structure from the AML byte stream.
 
aml_object_taml_def_lgreater_equal_read (aml_term_list_ctx_t *ctx)
 Reads a DefLGreaterEqual structure from the AML byte stream.
 
aml_object_taml_def_lless_read (aml_term_list_ctx_t *ctx)
 Reads a DefLLess structure from the AML byte stream.
 
aml_object_taml_def_lless_equal_read (aml_term_list_ctx_t *ctx)
 Reads a DefLLessEqual structure from the AML byte stream.
 
aml_object_taml_def_lnot_read (aml_term_list_ctx_t *ctx)
 Reads a DefLNot structure from the AML byte stream.
 
aml_object_taml_def_lnot_equal_read (aml_term_list_ctx_t *ctx)
 Reads a DefLNotEqual structure from the AML byte stream.
 
aml_object_taml_def_lor_read (aml_term_list_ctx_t *ctx)
 Reads a DefLOr structure from the AML byte stream.
 
aml_object_taml_mutex_object_read (aml_term_list_ctx_t *ctx)
 Reads a MutexObject structure from the AML byte stream.
 
uint64_t aml_timeout_read (aml_term_list_ctx_t *ctx, uint16_t *out)
 Reads a Timeout structure from the AML byte stream.
 
aml_object_taml_def_acquire_read (aml_term_list_ctx_t *ctx)
 Reads a DefAcquire structure from the AML byte stream.
 
aml_object_taml_def_to_bcd_read (aml_term_list_ctx_t *ctx)
 Reads a DefToBcd structure from the AML byte stream.
 
aml_object_taml_def_to_buffer_read (aml_term_list_ctx_t *ctx)
 Reads a DefToBuffer structure from the AML byte stream.
 
aml_object_taml_def_to_decimal_string_read (aml_term_list_ctx_t *ctx)
 Reads a DefToDecimalString structure from the AML byte stream.
 
aml_object_taml_def_to_hex_string_read (aml_term_list_ctx_t *ctx)
 Reads a DefToHexString structure from the AML byte stream.
 
aml_object_taml_def_to_integer_read (aml_term_list_ctx_t *ctx)
 Reads a DefToInteger structure from the AML byte stream.
 
uint64_t aml_length_arg_read (aml_term_list_ctx_t *ctx, aml_integer_t *out)
 Reads a LengthArg structure from the AML byte stream.
 
aml_object_taml_def_to_string_read (aml_term_list_ctx_t *ctx)
 Reads a DefToString structure from the AML byte stream.
 
aml_object_taml_def_timer_read (aml_term_list_ctx_t *ctx)
 Reads a DefTimer structure from the AML byte stream.
 
aml_object_taml_def_copy_object_read (aml_term_list_ctx_t *ctx)
 Reads a DefCopyObject structure from the AML byte stream.
 
aml_object_taml_data_read (aml_term_list_ctx_t *ctx)
 Reads a Data structure from the AML byte stream.
 
aml_object_taml_def_concat_read (aml_term_list_ctx_t *ctx)
 Reads a DefConcat structure from the AML byte stream.
 
aml_object_taml_def_size_of_read (aml_term_list_ctx_t *ctx)
 Reads a DefSizeOf structure from the AML byte stream.
 
aml_object_taml_def_ref_of_read (aml_term_list_ctx_t *ctx)
 Reads a DefRefOf structure from the AML byte stream.
 
aml_object_taml_def_object_type_read (aml_term_list_ctx_t *ctx)
 Reads a DefObjectType structure from the AML byte stream.
 
aml_object_taml_reference_type_opcode_read (aml_term_list_ctx_t *ctx)
 
aml_object_taml_def_find_set_left_bit_read (aml_term_list_ctx_t *ctx)
 Reads a DefFindSetLeftBit structure from the AML byte stream.
 
aml_object_taml_def_find_set_right_bit_read (aml_term_list_ctx_t *ctx)
 Reads a DefFindSetRightBit structure from the AML byte stream.
 
aml_package_obj_taml_search_pkg_read (aml_term_list_ctx_t *ctx)
 Reads a SearchPkg structure from the AML byte stream.
 
uint64_t aml_match_opcode_read (aml_term_list_ctx_t *ctx, aml_match_opcode_t *out)
 Reads a MatchOpcode structure from the AML byte stream.
 
uint64_t aml_start_index_read (aml_term_list_ctx_t *ctx, aml_integer_t *out)
 Reads a StartIndex structure from the AML byte stream.
 
aml_object_taml_def_match_read (aml_term_list_ctx_t *ctx)
 Reads a DefMatch structure from the AML byte stream.
 
aml_object_taml_expression_opcode_read (aml_term_list_ctx_t *ctx)
 Reads an ExpressionOpcode structure from the AML byte stream.
 

Detailed Description

Expression Opcodes Encoding.

See also
Section 20.2.5.4 of the ACPI specification for more details.

Enumeration Type Documentation

◆ aml_match_opcode_t

Match opcodes for DefMatch.

Enumerator
AML_MATCH_MTR 
AML_MATCH_MEQ 
AML_MATCH_MLE 
AML_MATCH_MLT 
AML_MATCH_MGE 
AML_MATCH_MGT 

Definition at line 789 of file expression.h.

Function Documentation

◆ aml_buff_pkg_str_obj_read()

aml_object_t * aml_buff_pkg_str_obj_read ( aml_term_list_ctx_t ctx)

Reads a BuffPkgStrObj structure from the AML byte stream.

A BuffPkgStrObj structure is defined as BuffPkgStrObj := TermArg => Buffer, Package, or String.

Note that the TermArg must resolve to an ObjectReference that points to a Buffer, Package, or String. Becouse taking a reference to an object within a temporary object does not make sense, temporary objects are not allowed.

Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1150 of file expression.c.

References AML_BUFFER, AML_DEBUG_ERROR, AML_PACKAGE, AML_STRING, aml_term_arg_read(), and NULL.

Referenced by aml_def_index_read().

◆ aml_buffer_size_read()

uint64_t aml_buffer_size_read ( aml_term_list_ctx_t ctx,
aml_integer_t out 
)

Reads a BufferSize structure from the AML byte stream.

A BufferSize structure is defined as BufferSize := TermArg => Integer.

See also
Section 19.6.10 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
outOutput pointer where the buffer size will be stored.
Returns
On success, the buffer size. On failure, ERR and errno is set.

Definition at line 286 of file expression.c.

References AML_DEBUG_ERROR, aml_term_arg_read_integer(), and ERR.

Referenced by aml_def_buffer_read().

◆ aml_data_read()

aml_object_t * aml_data_read ( aml_term_list_ctx_t ctx)

Reads a Data structure from the AML byte stream.

A Data structure is defined as Data := TermArg => ComputationalData.

Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1887 of file expression.c.

References AML_COMPUTATIONAL_DATA_OBJECTS, AML_DEBUG_ERROR, aml_term_arg_read(), and NULL.

Referenced by aml_op_data_data_target_read().

◆ aml_def_acquire_read()

aml_object_t * aml_def_acquire_read ( aml_term_list_ctx_t ctx)

Reads a DefAcquire structure from the AML byte stream.

A DefAcquire structure is defined as DefAcquire := AcquireOp MutexObject Timeout.

See also
Section 19.6.2 of the ACPI specification for more details.
Section 19.6.89 of the ACPI specification for details about SyncLevel handling.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1579 of file expression.c.

References AML_ACQUIRE_OP, AML_DEBUG_ERROR, aml_integer_set(), AML_MUTEX, aml_mutex_acquire(), aml_mutex_object_read(), aml_object_new(), aml_timeout_read(), aml_token_expect(), assert, CLOCKS_NEVER, CLOCKS_PER_SEC, DEREF_DEFER, ERR, mutex, NULL, and REF.

Referenced by aml_expression_opcode_read().

◆ aml_def_add_read()

aml_object_t * aml_def_add_read ( aml_term_list_ctx_t ctx)

Reads a DefAdd structure from the AML byte stream.

The DefAdd structure is defined as DefAdd := AddOp Operand Operand Target.

See also
Section 19.6.3 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 544 of file expression.c.

References AML_ADD_OP, AML_DEBUG_ERROR, AML_INTEGER, aml_integer_set(), aml_object_new(), aml_op_operand_operand_target_read(), aml_store(), DEREF_DEFER, ERR, aml_object_t::integer, NULL, REF, aml_term_list_ctx_t::state, and aml_integer_obj_t::value.

Referenced by aml_expression_opcode_read().

◆ aml_def_and_read()

aml_object_t * aml_def_and_read ( aml_term_list_ctx_t ctx)

Reads a DefAnd structure from the AML byte stream.

The DefAnd structure is defined as DefAnd := AndOp Operand Operand Target.

See also
Section 19.6.5 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 754 of file expression.c.

References AML_AND_OP, AML_DEBUG_ERROR, AML_INTEGER, aml_integer_set(), aml_object_new(), aml_op_operand_operand_target_read(), aml_store(), DEREF_DEFER, ERR, aml_object_t::integer, NULL, REF, aml_term_list_ctx_t::state, and aml_integer_obj_t::value.

Referenced by aml_expression_opcode_read().

◆ aml_def_buffer_read()

uint64_t aml_def_buffer_read ( aml_term_list_ctx_t ctx,
aml_object_t out 
)

Reads a DefBuffer structure from the AML byte stream.

The DefBuffer structure is defined as DefBuffer := BufferOp PkgLength BufferSize ByteList.

See also
Section 19.6.10 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
outOutput pointer to the object to store the result.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 296 of file expression.c.

References AML_BUFFER_OP, aml_buffer_set(), aml_buffer_size_read(), AML_DEBUG_ERROR, aml_pkg_length_read(), aml_token_expect(), aml_term_list_ctx_t::current, ERR, and start().

Referenced by aml_computational_data_read(), and aml_expression_opcode_read().

◆ aml_def_concat_read()

aml_object_t * aml_def_concat_read ( aml_term_list_ctx_t ctx)

Reads a DefConcat structure from the AML byte stream.

A DefConcat structure is defined as DefConcat := ConcatOp Data Data Target.

See also
Section 19.6.20 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1899 of file expression.c.

References aml_concat(), AML_CONCAT_OP, AML_DEBUG_ERROR, aml_object_new(), aml_op_data_data_target_read(), aml_store(), DEREF_DEFER, ERR, NULL, REF, and aml_term_list_ctx_t::state.

Referenced by aml_expression_opcode_read().

◆ aml_def_cond_ref_of_read()

aml_object_t * aml_def_cond_ref_of_read ( aml_term_list_ctx_t ctx)

Reads a DefCondRefOf structure from the AML byte stream.

A DefCondRefOf structure is defined as DefCondRefOf := CondRefOfOp SuperName Target.

See also
Section 19.6.14 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 406 of file expression.c.

References AML_COND_REF_OF_OP, AML_DEBUG_ERROR, aml_integer_set(), aml_object_new(), aml_object_reference_set(), aml_super_name_read_and_resolve(), aml_target_read_and_resolve(), aml_token_expect(), AML_TRUE, DEREF_DEFER, ERR, NULL, and REF.

Referenced by aml_expression_opcode_read().

◆ aml_def_copy_object_read()

aml_object_t * aml_def_copy_object_read ( aml_term_list_ctx_t ctx)

Reads a DefCopyObject structure from the AML byte stream.

A DefCopyObject structure is defined as DefCopyObject := CopyObjectOp TermArg SimpleName.

See also
Section 19.6.17 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1866 of file expression.c.

References aml_copy_object(), AML_COPY_OBJECT_OP, AML_DATA_REF_OBJECTS, AML_DEBUG_ERROR, aml_op_termarg_simplename_read(), DEREF_DEFER, ERR, NULL, REF, and aml_term_list_ctx_t::state.

Referenced by aml_expression_opcode_read().

◆ aml_def_decrement_read()

aml_object_t * aml_def_decrement_read ( aml_term_list_ctx_t ctx)

Reads a DefDecrement structure from the AML byte stream.

The DefDecrement structure is defined as DefDecrement := DecrementOp SuperName.

See also
Section 19.6.27 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1067 of file expression.c.

References aml_convert_result(), aml_convert_source(), AML_DEBUG_ERROR, AML_DECREMENT_OP, AML_INTEGER, aml_integer_set(), aml_object_new(), aml_op_supername_read(), DEREF_DEFER, ERR, aml_object_t::integer, NULL, REF, aml_term_list_ctx_t::state, and aml_integer_obj_t::value.

Referenced by aml_expression_opcode_read().

◆ aml_def_deref_of_read()

aml_object_t * aml_def_deref_of_read ( aml_term_list_ctx_t ctx)

Reads a DefDerefOf structure from the AML byte stream.

A DefDerefOf structure is defined as DefDerefOf := DerefOfOp ObjReference.

See also
Section 19.6.30 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1132 of file expression.c.

References AML_DEBUG_ERROR, AML_DEREF_OF_OP, aml_obj_reference_read(), aml_token_expect(), ERR, and NULL.

Referenced by aml_def_object_type_read(), aml_expression_opcode_read(), and aml_reference_type_opcode_read().

◆ aml_def_divide_read()

aml_object_t * aml_def_divide_read ( aml_term_list_ctx_t ctx)

Reads a DefDivide structure from the AML byte stream.

The DefDivide structure is defined as DefDivide := DivideOp Dividend Divisor Remainder Quotient.

See also
Section 19.6.32 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 634 of file expression.c.

References AML_DEBUG_ERROR, AML_DIVIDE_BY_ZERO, AML_DIVIDE_OP, aml_dividend_read(), aml_divisor_read(), AML_EXCEPTION_RAISE, aml_integer_set(), aml_object_new(), aml_quotient_read(), aml_remainder_read(), aml_store(), aml_token_expect(), DEREF_DEFER, ERR, NULL, REF, and aml_term_list_ctx_t::state.

Referenced by aml_expression_opcode_read().

◆ aml_def_find_set_left_bit_read()

aml_object_t * aml_def_find_set_left_bit_read ( aml_term_list_ctx_t ctx)

Reads a DefFindSetLeftBit structure from the AML byte stream.

A DefFindSetLeftBit structure is defined as DefFindSetLeftBit := FindSetLeftBitOp Operand Target.

See also
Section 19.6.49 the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 2170 of file expression.c.

References AML_DEBUG_ERROR, AML_FIND_SET_LEFT_BIT_OP, AML_INTEGER, aml_integer_bit_size(), aml_integer_set(), aml_object_new(), aml_op_operand_target_read(), aml_store(), DEREF_DEFER, ERR, aml_object_t::integer, NULL, REF, aml_term_list_ctx_t::state, and aml_integer_obj_t::value.

Referenced by aml_expression_opcode_read().

◆ aml_def_find_set_right_bit_read()

aml_object_t * aml_def_find_set_right_bit_read ( aml_term_list_ctx_t ctx)

Reads a DefFindSetRightBit structure from the AML byte stream.

A DefFindSetRightBit structure is defined as DefFindSetRightBit := FindSetRightBitOp Operand Target.

See also
Section 19.6.50 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 2219 of file expression.c.

References AML_DEBUG_ERROR, AML_FIND_SET_RIGHT_BIT_OP, AML_INTEGER, aml_integer_bit_size(), aml_integer_set(), aml_object_new(), aml_op_operand_target_read(), aml_store(), DEREF_DEFER, ERR, aml_object_t::integer, NULL, REF, aml_term_list_ctx_t::state, and aml_integer_obj_t::value.

Referenced by aml_expression_opcode_read().

◆ aml_def_increment_read()

aml_object_t * aml_def_increment_read ( aml_term_list_ctx_t ctx)

Reads a DefIncrement structure from the AML byte stream.

The DefIncrement structure is defined as DefIncrement := IncrementOp SuperName.

See also
Section 19.6.62 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1034 of file expression.c.

References aml_convert_result(), aml_convert_source(), AML_DEBUG_ERROR, AML_INCREMENT_OP, AML_INTEGER, aml_integer_set(), aml_object_new(), aml_op_supername_read(), DEREF_DEFER, ERR, aml_object_t::integer, NULL, REF, aml_term_list_ctx_t::state, and aml_integer_obj_t::value.

Referenced by aml_expression_opcode_read().

◆ aml_def_index_read()

aml_object_t * aml_def_index_read ( aml_term_list_ctx_t ctx)

Reads a DefIndex structure from the AML byte stream.

A DefIndex structure is defined as DefIndex := IndexOp BuffPkgStrObj IndexValue Target.

Returns a reference to an indexed element within the buffer, package or string stored in BuffPkgStrObj, and optionally stores that reference in Target.

See also
Section 19.6.63 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1173 of file expression.c.

References aml_buff_pkg_str_obj_read(), AML_BUFFER, aml_buffer_field_set(), AML_DEBUG_ERROR, AML_INDEX_OP, aml_index_value_read(), aml_object_new(), aml_object_reference_set(), AML_PACKAGE, aml_store(), AML_STRING, aml_target_read_and_resolve(), aml_token_expect(), aml_type_to_string(), aml_object_t::buffer, DEREF_DEFER, EILSEQ, ERR, errno, aml_buffer_obj_t::length, aml_string_obj_t::length, NULL, REF, aml_term_list_ctx_t::state, and aml_object_t::string.

Referenced by aml_def_object_type_read(), aml_expression_opcode_read(), and aml_reference_type_opcode_read().

◆ aml_def_land_read()

aml_object_t * aml_def_land_read ( aml_term_list_ctx_t ctx)

Reads a DefLAnd structure from the AML byte stream.

A DefLAnd structure is defined as DefLAnd := LandOp Operand Operand.

See also
Section 19.6.69 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1301 of file expression.c.

References aml_compare(), AML_COMPARE_AND, AML_DEBUG_ERROR, AML_INTEGER, aml_integer_set(), AML_LAND_OP, aml_object_new(), aml_op_operand_operand_read(), DEREF_DEFER, ERR, NULL, and REF.

Referenced by aml_expression_opcode_read().

◆ aml_def_lequal_read()

aml_object_t * aml_def_lequal_read ( aml_term_list_ctx_t ctx)

Reads a DefLEqual structure from the AML byte stream.

A DefLEqual structure is defined as DefLEqual := LequalOp Operand Operand.

See also
Section 19.6.70 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1328 of file expression.c.

References AML_BUFFER, aml_compare(), AML_COMPARE_EQUAL, AML_DEBUG_ERROR, AML_INTEGER, aml_integer_set(), AML_LEQUAL_OP, aml_object_new(), aml_op_operand_operand_read(), AML_STRING, DEREF_DEFER, ERR, NULL, and REF.

Referenced by aml_expression_opcode_read().

◆ aml_def_lgreater_equal_read()

aml_object_t * aml_def_lgreater_equal_read ( aml_term_list_ctx_t ctx)

Reads a DefLGreaterEqual structure from the AML byte stream.

A DefLGreaterEqual structure is defined as DefLGreaterEqual := LgreaterEqualOp Operand Operand.

See also
Section 19.6.72 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1384 of file expression.c.

References AML_BUFFER, aml_compare(), AML_COMPARE_GREATER_EQUAL, AML_DEBUG_ERROR, AML_INTEGER, aml_integer_set(), AML_LGREATER_EQUAL_OP, aml_object_new(), aml_op_operand_operand_read(), AML_STRING, DEREF_DEFER, ERR, NULL, and REF.

Referenced by aml_expression_opcode_read().

◆ aml_def_lgreater_read()

aml_object_t * aml_def_lgreater_read ( aml_term_list_ctx_t ctx)

Reads a DefLGreater structure from the AML byte stream.

A DefLGreater structure is defined as DefLGreater := LgreaterOp Operand Operand.

See also
Section 19.6.71 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1356 of file expression.c.

References AML_BUFFER, aml_compare(), AML_COMPARE_GREATER, AML_DEBUG_ERROR, AML_INTEGER, aml_integer_set(), AML_LGREATER_OP, aml_object_new(), aml_op_operand_operand_read(), AML_STRING, DEREF_DEFER, ERR, NULL, and REF.

Referenced by aml_expression_opcode_read().

◆ aml_def_lless_equal_read()

aml_object_t * aml_def_lless_equal_read ( aml_term_list_ctx_t ctx)

Reads a DefLLessEqual structure from the AML byte stream.

A DefLLessEqual structure is defined as DefLLessEqual := LlessEqualOp Operand Operand.

See also
Section 19.6.74 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1440 of file expression.c.

References AML_BUFFER, aml_compare(), AML_COMPARE_LESS_EQUAL, AML_DEBUG_ERROR, AML_INTEGER, aml_integer_set(), AML_LLESS_EQUAL_OP, aml_object_new(), aml_op_operand_operand_read(), AML_STRING, DEREF_DEFER, ERR, NULL, and REF.

Referenced by aml_expression_opcode_read().

◆ aml_def_lless_read()

aml_object_t * aml_def_lless_read ( aml_term_list_ctx_t ctx)

Reads a DefLLess structure from the AML byte stream.

A DefLLess structure is defined as DefLLess := LlessOp Operand Operand.

See also
Section 19.6.73 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1412 of file expression.c.

References AML_BUFFER, aml_compare(), AML_COMPARE_LESS, AML_DEBUG_ERROR, AML_INTEGER, aml_integer_set(), AML_LLESS_OP, aml_object_new(), aml_op_operand_operand_read(), AML_STRING, DEREF_DEFER, ERR, NULL, and REF.

Referenced by aml_expression_opcode_read().

◆ aml_def_lnot_equal_read()

aml_object_t * aml_def_lnot_equal_read ( aml_term_list_ctx_t ctx)

Reads a DefLNotEqual structure from the AML byte stream.

A DefLNotEqual structure is defined as DefLNotEqual := LnotEqualOp Operand Operand.

See also
Section 19.6.76 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1493 of file expression.c.

References AML_BUFFER, aml_compare(), AML_COMPARE_NOT_EQUAL, AML_DEBUG_ERROR, AML_INTEGER, aml_integer_set(), AML_LNOT_EQUAL_OP, aml_object_new(), aml_op_operand_operand_read(), AML_STRING, DEREF_DEFER, ERR, NULL, and REF.

Referenced by aml_expression_opcode_read().

◆ aml_def_lnot_read()

aml_object_t * aml_def_lnot_read ( aml_term_list_ctx_t ctx)

Reads a DefLNot structure from the AML byte stream.

A DefLNot structure is defined as DefLNot := LnotOp Operand.

See also
Section 19.6.75 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1468 of file expression.c.

References aml_compare_not(), AML_DEBUG_ERROR, AML_INTEGER, aml_integer_set(), AML_LNOT_OP, aml_object_new(), aml_op_operand_read(), DEREF_DEFER, ERR, aml_object_t::integer, NULL, REF, and aml_integer_obj_t::value.

Referenced by aml_expression_opcode_read().

◆ aml_def_lor_read()

aml_object_t * aml_def_lor_read ( aml_term_list_ctx_t ctx)

Reads a DefLOr structure from the AML byte stream.

A DefLOr structure is defined as DefLOr := LorOp Operand Operand.

See also
Section 19.6.80 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1521 of file expression.c.

References aml_compare(), AML_COMPARE_OR, AML_DEBUG_ERROR, AML_INTEGER, aml_integer_set(), AML_LOR_OP, aml_object_new(), aml_op_operand_operand_read(), DEREF_DEFER, ERR, NULL, and REF.

Referenced by aml_expression_opcode_read().

◆ aml_def_match_read()

aml_object_t * aml_def_match_read ( aml_term_list_ctx_t ctx)

Reads a DefMatch structure from the AML byte stream.

A DefMatch structure is defined as DefMatch := MatchOp SearchPkg MatchOpcode Operand MatchOpcode Operand StartIndex.

See also
Section 19.6.81 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 2334 of file expression.c.

References AML_BUFFER, aml_convert_source(), AML_DEBUG_ERROR, AML_INTEGER, aml_integer_ones(), aml_integer_set(), aml_match_compare(), AML_MATCH_OP, aml_match_opcode_read(), aml_object_new(), aml_operand_read(), aml_search_pkg_read(), aml_start_index_read(), AML_STRING, aml_token_expect(), AML_UNINITIALIZED, DEREF_DEFER, aml_package_obj_t::elements, EOK, ERR, errno, aml_package_obj_t::length, NULL, REF, and aml_term_list_ctx_t::state.

Referenced by aml_expression_opcode_read().

◆ aml_def_mod_read()

aml_object_t * aml_def_mod_read ( aml_term_list_ctx_t ctx)

Reads a DefMod structure from the AML byte stream.

The DefMod structure is defined as DefMod := ModOp Dividend Divisor Target.

See also
Section 19.6.87 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 703 of file expression.c.

References AML_DEBUG_ERROR, AML_DIVIDE_BY_ZERO, aml_dividend_read(), aml_divisor_read(), AML_EXCEPTION_RAISE, aml_integer_set(), AML_MOD_OP, aml_object_new(), aml_store(), aml_target_read_and_resolve(), aml_token_expect(), DEREF_DEFER, ERR, NULL, REF, and aml_term_list_ctx_t::state.

Referenced by aml_expression_opcode_read().

◆ aml_def_multiply_read()

aml_object_t * aml_def_multiply_read ( aml_term_list_ctx_t ctx)

Reads a DefMultiply structure from the AML byte stream.

The DefMultiply structure is defined as DefMultiply := MultiplyOp Operand Operand Target.

See also
Section 19.6.88 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 604 of file expression.c.

References AML_DEBUG_ERROR, AML_INTEGER, aml_integer_set(), AML_MULTIPLY_OP, aml_object_new(), aml_op_operand_operand_target_read(), aml_store(), DEREF_DEFER, ERR, aml_object_t::integer, NULL, REF, aml_term_list_ctx_t::state, and aml_integer_obj_t::value.

Referenced by aml_expression_opcode_read().

◆ aml_def_nand_read()

aml_object_t * aml_def_nand_read ( aml_term_list_ctx_t ctx)

Reads a DefNAnd structure from the AML byte stream.

The DefNAnd structure is defined as DefNAnd := NandOp Operand Operand Target.

See also
Section 19.6.69 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 784 of file expression.c.

References AML_DEBUG_ERROR, AML_INTEGER, aml_integer_set(), AML_NAND_OP, aml_object_new(), aml_op_operand_operand_target_read(), aml_store(), DEREF_DEFER, ERR, aml_object_t::integer, NULL, REF, aml_term_list_ctx_t::state, and aml_integer_obj_t::value.

Referenced by aml_expression_opcode_read().

◆ aml_def_nor_read()

aml_object_t * aml_def_nor_read ( aml_term_list_ctx_t ctx)

Reads a DefNOr structure from the AML byte stream.

The DefNOr structure is defined as DefNOr := NorOp Operand Operand Target.

See also
Section 19.6.93 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 844 of file expression.c.

References AML_DEBUG_ERROR, AML_INTEGER, aml_integer_set(), AML_NOR_OP, aml_object_new(), aml_op_operand_operand_target_read(), aml_store(), DEREF_DEFER, ERR, aml_object_t::integer, NULL, REF, aml_term_list_ctx_t::state, and aml_integer_obj_t::value.

Referenced by aml_expression_opcode_read().

◆ aml_def_not_read()

aml_object_t * aml_def_not_read ( aml_term_list_ctx_t ctx)

Reads a DefNot structure from the AML byte stream.

The DefNot structure is defined as DefNot := NotOp Operand Target.

See also
Section 19.6.94 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 904 of file expression.c.

References AML_DEBUG_ERROR, AML_INTEGER, aml_integer_set(), AML_NOT_OP, aml_object_new(), aml_op_operand_target_read(), aml_store(), DEREF_DEFER, ERR, aml_object_t::integer, NULL, REF, aml_term_list_ctx_t::state, and aml_integer_obj_t::value.

Referenced by aml_expression_opcode_read().

◆ aml_def_object_type_read()

aml_object_t * aml_def_object_type_read ( aml_term_list_ctx_t ctx)

Reads a DefObjectType structure from the AML byte stream.

A DefObjectType structure is defined as DefObjectType := ObjectTypeOp <SimpleName | DebugObj | DefRefOf | DefDerefOf | DefIndex>.

See also
Section 19.6.97 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 2015 of file expression.c.

References AML_BUFFER, AML_BUFFER_FIELD, AML_DEBUG_ERROR, aml_debug_obj_read(), AML_DEBUG_OBJECT, AML_DEBUG_OP, aml_def_deref_of_read(), aml_def_index_read(), aml_def_ref_of_read(), AML_DEREF_OF_OP, AML_DEVICE, AML_EVENT, AML_FIELD_UNIT, AML_INDEX_OP, AML_INTEGER, aml_integer_set(), AML_METHOD, AML_MUTEX, aml_object_new(), AML_OBJECT_REFERENCE, AML_OBJECT_TYPE_OP, AML_OPERATION_REGION, AML_PACKAGE, AML_POWER_RESOURCE, AML_REF_OF_OP, aml_simple_name_read_and_resolve(), AML_STRING, AML_THERMAL_ZONE, aml_token_expect(), aml_token_peek(), DEREF_DEFER, ERR, aml_token_props_t::name, NULL, aml_token_t::num, aml_object_t::objectReference, aml_token_t::props, REF, and aml_object_reference_obj_t::target.

Referenced by aml_expression_opcode_read().

◆ aml_def_or_read()

aml_object_t * aml_def_or_read ( aml_term_list_ctx_t ctx)

Reads a DefOr structure from the AML byte stream.

The DefOr structure is defined as DefOr := OrOp Operand Operand Target.

See also
Section 19.6.100 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 814 of file expression.c.

References AML_DEBUG_ERROR, AML_INTEGER, aml_integer_set(), aml_object_new(), aml_op_operand_operand_target_read(), AML_OR_OP, aml_store(), DEREF_DEFER, ERR, aml_object_t::integer, NULL, REF, aml_term_list_ctx_t::state, and aml_integer_obj_t::value.

Referenced by aml_expression_opcode_read().

◆ aml_def_ref_of_read()

aml_object_t * aml_def_ref_of_read ( aml_term_list_ctx_t ctx)

Reads a DefRefOf structure from the AML byte stream.

A DefRefOf structure is defined as DefRefOf := RefOfOp SuperName.

See also
Section 19.6.115 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1990 of file expression.c.

References AML_DEBUG_ERROR, aml_object_new(), aml_object_reference_set(), aml_op_supername_read(), AML_REF_OF_OP, DEREF_DEFER, ERR, NULL, and REF.

Referenced by aml_def_object_type_read(), aml_expression_opcode_read(), and aml_reference_type_opcode_read().

◆ aml_def_shift_left_read()

aml_object_t * aml_def_shift_left_read ( aml_term_list_ctx_t ctx)

Reads a DefShiftLeft structure from the AML byte stream.

The DefShiftLeft structure is defined as DefShiftLeft := ShiftLeftOp Operand ShiftCount Target.

See also
Section 19.6.123 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 942 of file expression.c.

References AML_DEBUG_ERROR, AML_INTEGER, aml_integer_bit_size(), aml_integer_set(), aml_object_new(), aml_op_operand_shiftcount_target_read(), AML_SHIFT_LEFT_OP, aml_store(), DEREF_DEFER, ERR, aml_object_t::integer, NULL, REF, aml_term_list_ctx_t::state, and aml_integer_obj_t::value.

Referenced by aml_expression_opcode_read().

◆ aml_def_shift_right_read()

aml_object_t * aml_def_shift_right_read ( aml_term_list_ctx_t ctx)

Reads a DefShiftRight structure from the AML byte stream.

The DefShiftRight structure is defined as DefShiftRight := ShiftRightOp Operand ShiftCount Target.

See also
Section 19.6.124 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 988 of file expression.c.

References AML_DEBUG_ERROR, AML_INTEGER, aml_integer_bit_size(), aml_integer_set(), aml_object_new(), aml_op_operand_shiftcount_target_read(), AML_SHIFT_RIGHT_OP, aml_store(), DEREF_DEFER, ERR, aml_object_t::integer, NULL, REF, aml_term_list_ctx_t::state, and aml_integer_obj_t::value.

Referenced by aml_expression_opcode_read().

◆ aml_def_size_of_read()

aml_object_t * aml_def_size_of_read ( aml_term_list_ctx_t ctx)

Reads a DefSizeOf structure from the AML byte stream.

A DefSizeOf structure is defined as DefSizeOf := SizeOfOp SuperName.

See also
Section 19.6.126 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1928 of file expression.c.

References AML_ARG, AML_BUFFER, AML_DEBUG_ERROR, aml_integer_set(), AML_LOCAL, aml_object_new(), aml_op_supername_read(), AML_PACKAGE, AML_SIZE_OF_OP, AML_STRING, aml_object_t::arg, aml_object_t::buffer, DEREF_DEFER, EINVAL, ERR, errno, aml_buffer_obj_t::length, aml_package_obj_t::length, aml_string_obj_t::length, aml_object_t::local, NULL, aml_object_t::package, REF, aml_object_t::string, aml_arg_obj_t::value, and aml_local_obj_t::value.

Referenced by aml_expression_opcode_read().

◆ aml_def_store_read()

aml_object_t * aml_def_store_read ( aml_term_list_ctx_t ctx)

Reads a DefStore structure from the AML byte stream.

A DefStore structure is defined as DefStore := StoreOp TermArg SuperName.

See also
Section 19.6.132 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 476 of file expression.c.

References AML_DATA_REF_OBJECTS, AML_DEBUG_ERROR, AML_NAME_TO_STRING, aml_op_termarg_supername_read(), aml_store(), AML_STORE_OP, DEREF_DEFER, ERR, NULL, REF, and aml_term_list_ctx_t::state.

Referenced by aml_expression_opcode_read().

◆ aml_def_subtract_read()

aml_object_t * aml_def_subtract_read ( aml_term_list_ctx_t ctx)

Reads a DefSubtract structure from the AML byte stream.

The DefSubtract structure is defined as DefSubtract := SubtractOp Operand Operand Target.

See also
Section 19.6.133 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 574 of file expression.c.

References AML_DEBUG_ERROR, AML_INTEGER, aml_integer_set(), aml_object_new(), aml_op_operand_operand_target_read(), aml_store(), AML_SUBTRACT_OP, DEREF_DEFER, ERR, aml_object_t::integer, NULL, REF, aml_term_list_ctx_t::state, and aml_integer_obj_t::value.

Referenced by aml_expression_opcode_read().

◆ aml_def_timer_read()

aml_object_t * aml_def_timer_read ( aml_term_list_ctx_t ctx)

Reads a DefTimer structure from the AML byte stream.

A DefTimer structure is defined as DefTimer := TimerOp.

See also
Section 19.6.136 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1840 of file expression.c.

References AML_DEBUG_ERROR, aml_integer_set(), aml_object_new(), AML_TIMER_OP, aml_token_expect(), DEREF_DEFER, ERR, NULL, REF, and timer_uptime().

Referenced by aml_expression_opcode_read().

◆ aml_def_to_bcd_read()

aml_object_t * aml_def_to_bcd_read ( aml_term_list_ctx_t ctx)

Reads a DefToBcd structure from the AML byte stream.

A DefToBcd structure is defined as DefToBCD := ToBCDOp Operand Target.

See also
Section 19.6.137 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1628 of file expression.c.

References aml_convert_integer_to_bcd(), AML_DEBUG_ERROR, AML_INTEGER, aml_integer_set(), aml_object_new(), aml_op_operand_target_read(), aml_store(), AML_TO_BCD_OP, DEREF, DEREF_DEFER, ERR, aml_object_t::integer, NULL, REF, aml_term_list_ctx_t::state, and aml_integer_obj_t::value.

Referenced by aml_expression_opcode_read().

◆ aml_def_to_buffer_read()

aml_object_t * aml_def_to_buffer_read ( aml_term_list_ctx_t ctx)

Reads a DefToBuffer structure from the AML byte stream.

A DefToBuffer structure is defined as DefToBuffer := ToBufferOp Operand Target.

See also
Section 19.6.138 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1662 of file expression.c.

References AML_BUFFER, aml_convert_to_buffer(), AML_DEBUG_ERROR, AML_INTEGER, aml_op_operand_target_read(), aml_store(), AML_STRING, AML_TO_BUFFER_OP, DEREF, DEREF_DEFER, ERR, NULL, and aml_term_list_ctx_t::state.

Referenced by aml_expression_opcode_read().

◆ aml_def_to_decimal_string_read()

aml_object_t * aml_def_to_decimal_string_read ( aml_term_list_ctx_t ctx)

Reads a DefToDecimalString structure from the AML byte stream.

A DefToDecimalString structure is defined as DefToDecimalString := ToDecimalStringOp Operand Target.

See also
Section 19.6.139 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1690 of file expression.c.

References aml_convert_to_decimal_string(), AML_DEBUG_ERROR, AML_INTEGER, aml_op_operand_target_read(), aml_store(), AML_TO_DECIMAL_STRING_OP, DEREF, DEREF_DEFER, ERR, NULL, and aml_term_list_ctx_t::state.

Referenced by aml_expression_opcode_read().

◆ aml_def_to_hex_string_read()

aml_object_t * aml_def_to_hex_string_read ( aml_term_list_ctx_t ctx)

Reads a DefToHexString structure from the AML byte stream.

A DefToHexString structure is defined as DefToHexString := ToHexStringOp Operand Target.

See also
Section 19.6.140 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1717 of file expression.c.

References aml_convert_to_hex_string(), AML_DEBUG_ERROR, AML_INTEGER, aml_op_operand_target_read(), aml_store(), AML_TO_HEX_STRING_OP, DEREF, DEREF_DEFER, ERR, NULL, and aml_term_list_ctx_t::state.

Referenced by aml_expression_opcode_read().

◆ aml_def_to_integer_read()

aml_object_t * aml_def_to_integer_read ( aml_term_list_ctx_t ctx)

Reads a DefToInteger structure from the AML byte stream.

A DefToInteger structure is defined as DefToInteger := ToIntegerOp Operand Target.

See also
Section 19.6.141 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1744 of file expression.c.

References AML_BUFFER, aml_convert_to_integer(), AML_DEBUG_ERROR, AML_INTEGER, aml_op_operand_target_read(), aml_store(), AML_STRING, AML_TO_INTEGER_OP, DEREF, DEREF_DEFER, ERR, NULL, and aml_term_list_ctx_t::state.

Referenced by aml_expression_opcode_read().

◆ aml_def_to_string_read()

aml_object_t * aml_def_to_string_read ( aml_term_list_ctx_t ctx)

Reads a DefToString structure from the AML byte stream.

A DefToString structure is defined as DefToString := ToStringOp TermArg LengthArg Target.

See also
Section 19.6.143 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1783 of file expression.c.

References AML_DEBUG_ERROR, aml_length_arg_read(), aml_object_new(), aml_store(), aml_string_set_empty(), aml_target_read_and_resolve(), aml_term_arg_read_buffer(), AML_TO_STRING_OP, aml_token_expect(), aml_buffer_obj_t::content, aml_string_obj_t::content, DEREF_DEFER, ERR, aml_buffer_obj_t::length, MIN, NULL, REF, aml_term_list_ctx_t::state, and aml_object_t::string.

Referenced by aml_expression_opcode_read().

◆ aml_def_xor_read()

aml_object_t * aml_def_xor_read ( aml_term_list_ctx_t ctx)

Reads a DefXOr structure from the AML byte stream.

The DefXOr structure is defined as DefXOr := XorOp Operand Operand Target.

See also
Section 19.6.155 of the ACPI specification for more details.
Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 874 of file expression.c.

References AML_DEBUG_ERROR, AML_INTEGER, aml_integer_set(), aml_object_new(), aml_op_operand_operand_target_read(), aml_store(), AML_XOR_OP, DEREF_DEFER, ERR, aml_object_t::integer, NULL, REF, aml_term_list_ctx_t::state, and aml_integer_obj_t::value.

Referenced by aml_expression_opcode_read().

◆ aml_dividend_read()

uint64_t aml_dividend_read ( aml_term_list_ctx_t ctx,
aml_integer_t out 
)

Reads a Dividend structure from the AML byte stream.

A Dividend structure is defined as Dividend := TermArg => Integer.

Parameters
ctxThe TermList context.
outOutput pointer where the integer value of the dividend will be stored.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 498 of file expression.c.

References AML_DEBUG_ERROR, aml_term_arg_read_integer(), and ERR.

Referenced by aml_def_divide_read(), and aml_def_mod_read().

◆ aml_divisor_read()

uint64_t aml_divisor_read ( aml_term_list_ctx_t ctx,
aml_integer_t out 
)

Reads a Divisor structure from the AML byte stream.

A Divisor structure is defined as Divisor := TermArg => Integer.

Parameters
ctxThe TermList context.
outOutput pointer where the integer value of the divisor will be stored.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 509 of file expression.c.

References AML_DEBUG_ERROR, aml_term_arg_read_integer(), and ERR.

Referenced by aml_def_divide_read(), and aml_def_mod_read().

◆ aml_expression_opcode_read()

aml_object_t * aml_expression_opcode_read ( aml_term_list_ctx_t ctx)

Reads an ExpressionOpcode structure from the AML byte stream.

An ExpressionOpcode structure is defined as ExpressionOpcode := DefAcquire | DefAdd | DefAnd | DefBuffer | DefConcat | DefConcatRes | DefCondRefOf | DefCopyObject | DefDecrement | DefDerefOf | DefDivide | DefFindSetLeftBit | DefFindSetRightBit | DefFromBCD | DefIncrement | DefIndex | DefLAnd | DefLEqual | DefLGreater | DefLGreaterEqual | DefLLess | DefLLessEqual | DefMid | DefLNot | DefLNotEqual | DefLoadTable | DefLOr | DefMatch | DefMod | DefMultiply | DefNAnd | DefNOr | DefNot | DefObjectType | DefOr | DefPackage | DefVarPackage | DefRefOf | DefShiftLeft | DefShiftRight | DefSizeOf | DefStore | DefSubtract | DefTimer | DefToBCD | DefToBuffer | DefToDecimalString | DefToHexString | DefToInteger | DefToString | DefWait | DefXOr | MethodInvocation.

Currently unimplemented Opcodes are:

  • DefConcatRes
  • DefFromBCD
  • DefMid
  • DefLoadTable
  • DefWait

The result may have the AML_OBJECT_EXCEPTION_ON_USE flag set.

Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 2441 of file expression.c.

References AML_ACQUIRE_OP, AML_ADD_OP, AML_AND_OP, AML_BUFFER_OP, AML_CONCAT_OP, AML_COND_REF_OF_OP, AML_COPY_OBJECT_OP, AML_DEBUG_ERROR, AML_DECREMENT_OP, aml_def_acquire_read(), aml_def_add_read(), aml_def_and_read(), aml_def_buffer_read(), aml_def_concat_read(), aml_def_cond_ref_of_read(), aml_def_copy_object_read(), aml_def_decrement_read(), aml_def_deref_of_read(), aml_def_divide_read(), aml_def_find_set_left_bit_read(), aml_def_find_set_right_bit_read(), aml_def_increment_read(), aml_def_index_read(), aml_def_land_read(), aml_def_lequal_read(), aml_def_lgreater_equal_read(), aml_def_lgreater_read(), aml_def_lless_equal_read(), aml_def_lless_read(), aml_def_lnot_equal_read(), aml_def_lnot_read(), aml_def_lor_read(), aml_def_match_read(), aml_def_mod_read(), aml_def_multiply_read(), aml_def_nand_read(), aml_def_nor_read(), aml_def_not_read(), aml_def_object_type_read(), aml_def_or_read(), aml_def_package_read(), aml_def_ref_of_read(), aml_def_shift_left_read(), aml_def_shift_right_read(), aml_def_size_of_read(), aml_def_store_read(), aml_def_subtract_read(), aml_def_timer_read(), aml_def_to_bcd_read(), aml_def_to_buffer_read(), aml_def_to_decimal_string_read(), aml_def_to_hex_string_read(), aml_def_to_integer_read(), aml_def_to_string_read(), aml_def_var_package_read(), aml_def_xor_read(), AML_DEREF_OF_OP, AML_DIVIDE_OP, AML_FIND_SET_LEFT_BIT_OP, AML_FIND_SET_RIGHT_BIT_OP, AML_INCREMENT_OP, AML_INDEX_OP, AML_LAND_OP, AML_LEQUAL_OP, AML_LGREATER_EQUAL_OP, AML_LGREATER_OP, AML_LLESS_EQUAL_OP, AML_LLESS_OP, AML_LNOT_EQUAL_OP, AML_LNOT_OP, AML_LOR_OP, AML_MATCH_OP, aml_method_invocation_read(), AML_MOD_OP, AML_MULTIPLY_OP, AML_NAND_OP, AML_NOR_OP, AML_NOT_OP, aml_object_new(), AML_OBJECT_TYPE_OP, AML_OR_OP, AML_PACKAGE_OP, AML_REF_OF_OP, AML_SHIFT_LEFT_OP, AML_SHIFT_RIGHT_OP, AML_SIZE_OF_OP, aml_state_result_set(), AML_STORE_OP, AML_SUBTRACT_OP, AML_TIMER_OP, AML_TO_BCD_OP, AML_TO_BUFFER_OP, AML_TO_DECIMAL_STRING_OP, AML_TO_HEX_STRING_OP, AML_TO_INTEGER_OP, AML_TO_STRING_OP, aml_token_peek(), AML_TOKEN_TYPE_NAME, AML_VAR_PACKAGE_OP, AML_XOR_OP, DEREF, ENOSYS, ERR, errno, aml_token_props_t::name, NULL, aml_token_t::num, aml_token_t::props, aml_term_list_ctx_t::state, and aml_token_props_t::type.

Referenced by aml_term_arg_read(), and aml_term_obj_read().

◆ aml_index_value_read()

uint64_t aml_index_value_read ( aml_term_list_ctx_t ctx,
aml_integer_t out 
)

Reads an IndexValue structure from the AML byte stream.

An IndexValue structure is defined as IndexValue := TermArg => Integer.

Parameters
ctxThe TermList context.
outOutput pointer where the integer result will be stored.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 1162 of file expression.c.

References AML_DEBUG_ERROR, aml_term_arg_read_integer(), and ERR.

Referenced by aml_def_index_read().

◆ aml_length_arg_read()

uint64_t aml_length_arg_read ( aml_term_list_ctx_t ctx,
aml_integer_t out 
)

Reads a LengthArg structure from the AML byte stream.

A LengthArg structure is defined as LengthArg := TermArg => Integer.

Parameters
ctxThe TermList context.
outOutput pointer where the integer result will be stored.
Returns
On success, the integer value. On failure, ERR and errno is set.

Definition at line 1772 of file expression.c.

References AML_DEBUG_ERROR, aml_term_arg_read_integer(), and ERR.

Referenced by aml_def_to_string_read().

◆ aml_match_opcode_read()

uint64_t aml_match_opcode_read ( aml_term_list_ctx_t ctx,
aml_match_opcode_t out 
)

Reads a MatchOpcode structure from the AML byte stream.

A MatchOpcode structure is defined as MatchOpcode := ByteData // 0 MTR // 1 MEQ // 2 MLE // 3 MLT // 4 MGE // 5 MGT.

Parameters
ctxThe TermList context.
outOutput pointer where the match opcode will be stored.
Returns
On success, the match opcode. On failure, ERR and errno is set.

Definition at line 2280 of file expression.c.

References aml_byte_data_read(), AML_DEBUG_ERROR, AML_MATCH_MGT, EILSEQ, ERR, and errno.

Referenced by aml_def_match_read().

◆ aml_method_invocation_read()

aml_object_t * aml_method_invocation_read ( aml_term_list_ctx_t ctx)

Reads a MethodInvocation structure from the AML byte stream.

A MethodInvocation structure is defined as MethodInvocation := NameString TermArgList.

So this is a bit confusing, but my interpretation is that despite the name, a MethodInvocation can be any object, not just methods. For example, fields. In such cases, the TermArgList is empty. Its the only thing that makes any sense when I inspect the aml bytecode as there are clearly named objects referenced in TermArgs, but there is no "child" definition that contains such a thing, atleast that i can find. But the specification says literally nothing about this. I guess you could say that any object is being "invoked" when it is being read, it just happens to not take any arguments.

The result may have the AML_OBJECT_EXCEPTION_ON_USE flag set.

Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 360 of file expression.c.

References AML_DEBUG_ERROR, AML_METHOD, aml_method_evaluate(), aml_name_string_read_and_resolve(), AML_NAME_TO_STRING, aml_state_result_set(), aml_term_arg_list_read(), aml_method_flags_t::argCount, aml_term_arg_list_t::args, DEREF, DEREF_DEFER, ERR, aml_object_t::method, aml_method_obj_t::methodFlags, NULL, REF, and aml_term_list_ctx_t::state.

Referenced by aml_expression_opcode_read().

◆ aml_mutex_object_read()

aml_object_t * aml_mutex_object_read ( aml_term_list_ctx_t ctx)

Reads a MutexObject structure from the AML byte stream.

A MutexObject structure is defined as MutexObject := SuperName.

Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1548 of file expression.c.

References AML_DEBUG_ERROR, AML_MUTEX, aml_super_name_read_and_resolve(), DEREF_DEFER, EILSEQ, errno, NULL, and REF.

Referenced by aml_def_acquire_read(), and aml_def_release_read().

◆ aml_obj_reference_read()

aml_object_t * aml_obj_reference_read ( aml_term_list_ctx_t ctx)

Reads an ObjReference structure from the AML byte stream.

An ObjReference structure is defined as ObjReference := TermArg => ObjectReference | String.

If a String is read then it is considered a path to an object and will be resolved to an ObjectReference.

Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 1100 of file expression.c.

References AML_DEBUG_ERROR, aml_namespace_find_by_path(), AML_OBJECT_REFERENCE, AML_STRING, aml_term_arg_read(), aml_string_obj_t::content, DEREF_DEFER, EILSEQ, errno, NULL, aml_object_t::objectReference, aml_state_t::overlay, REF, aml_term_list_ctx_t::scope, aml_term_list_ctx_t::state, aml_object_t::string, and aml_object_reference_obj_t::target.

Referenced by aml_def_deref_of_read().

◆ aml_operand_read()

aml_object_t * aml_operand_read ( aml_term_list_ctx_t ctx,
aml_type_t  allowedTypes 
)

Reads an Operand structure from the AML byte stream.

An Operand structure is defined as Operand := TermArg => Integer in the spec but this must be wrong.

For example, Operand is used in the definition of DefLGreaterEqual which is defined as DefLGreaterEqual := LgreaterEqualOp Operand Operand. Clearly using the Operand structure.

However, this does not make any sense as in section 19.6.72, regarding LGreaterEqual, it states that "Source1 and Source2 must each evaluate to an integer, a string or a buffer" clearly contradicting the definition of Operand as only being able to evaluate to an integer. More examples of this can be found all over the place.

So instead we use let the caller specify what types are allowed.

Parameters
ctxThe TermList context.
outOutput pointer to be filled with the object pointer storing the result.
allowedTypesThe allowed types that the TermArg can evaluate to.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 24 of file expression.c.

References AML_DEBUG_ERROR, aml_term_arg_read(), and NULL.

Referenced by aml_def_match_read(), aml_op_operand_operand_read(), aml_op_operand_operand_target_read(), aml_op_operand_read(), aml_op_operand_shiftcount_target_read(), and aml_op_operand_target_read().

◆ aml_quotient_read()

aml_object_t * aml_quotient_read ( aml_term_list_ctx_t ctx)

Reads a Quotient structure from the AML byte stream.

A Quotient structure is defined as Quotient := Target.

Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 532 of file expression.c.

References AML_DEBUG_ERROR, aml_target_read_and_resolve(), ERR, and NULL.

Referenced by aml_def_divide_read().

◆ aml_reference_type_opcode_read()

◆ aml_remainder_read()

aml_object_t * aml_remainder_read ( aml_term_list_ctx_t ctx)

Reads a Remainder structure from the AML byte stream.

A Remainder structure is defined as Remainder := Target.

Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 520 of file expression.c.

References AML_DEBUG_ERROR, aml_target_read_and_resolve(), ERR, and NULL.

Referenced by aml_def_divide_read().

◆ aml_search_pkg_read()

aml_package_obj_t * aml_search_pkg_read ( aml_term_list_ctx_t ctx)

Reads a SearchPkg structure from the AML byte stream.

A SearchPkg structure is defined as SearchPkg := TermArg => Package.

Parameters
ctxThe TermList context.
Returns
On success, the object pointer storing the result. On failure, NULL and errno is set.

Definition at line 2268 of file expression.c.

References AML_DEBUG_ERROR, aml_term_arg_read_package(), and NULL.

Referenced by aml_def_match_read().

◆ aml_shift_count_read()

uint64_t aml_shift_count_read ( aml_term_list_ctx_t ctx,
aml_integer_t out 
)

Reads a ShiftCount structure from the AML byte stream.

A ShiftCount structure is defined as ShiftCount := TermArg => Integer.

Parameters
ctxThe TermList context.
outOutput pointer where the integer result will be stored.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 931 of file expression.c.

References AML_DEBUG_ERROR, aml_term_arg_read_integer(), and ERR.

Referenced by aml_op_operand_shiftcount_target_read().

◆ aml_start_index_read()

uint64_t aml_start_index_read ( aml_term_list_ctx_t ctx,
aml_integer_t out 
)

Reads a StartIndex structure from the AML byte stream.

A StartIndex structure is defined as StartIndex := TermArg => Integer.

Parameters
ctxThe TermList context.
outOutput pointer where the integer result will be stored.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 2300 of file expression.c.

References AML_DEBUG_ERROR, aml_term_arg_read_integer(), and ERR.

Referenced by aml_def_match_read().

◆ aml_term_arg_list_read()

uint64_t aml_term_arg_list_read ( aml_term_list_ctx_t ctx,
uint64_t  argCount,
aml_term_arg_list_t out 
)

Reads a TermArgList structure from the AML byte stream.

A TermArgList structure is defined as TermArgList := Nothing | <termarg termarglist>.

The number of arguments to read is determined by knowing ahead of time what object the arguments will be passed to.

Parameters
ctxThe TermList context.
argCountThe number of arguments to read.
outPointer to the buffer where the TermArgList will be stored.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 333 of file expression.c.

References AML_DATA_REF_OBJECTS, AML_MAX_ARGS, aml_term_arg_read(), aml_term_arg_list_t::args, DEREF, EILSEQ, ERR, errno, and NULL.

Referenced by aml_method_invocation_read().

◆ aml_timeout_read()

uint64_t aml_timeout_read ( aml_term_list_ctx_t ctx,
uint16_t out 
)

Reads a Timeout structure from the AML byte stream.

A Timeout structure is defined as Timeout := WordData.

Parameters
ctxThe TermList context.
outOutput pointer where the integer result will be stored.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 1568 of file expression.c.

References AML_DEBUG_ERROR, aml_word_data_read(), and ERR.

Referenced by aml_def_acquire_read().