PatchworkOS  a7b3d61
A non-POSIX operating system.
Loading...
Searching...
No Matches
Statement Opcodes

Statement Opcodes Encoding. More...

Collaboration diagram for Statement Opcodes:

Detailed Description

Statement Opcodes Encoding.

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

Functions

uint64_t aml_predicate_read (aml_term_list_ctx_t *ctx, aml_uint_t *out)
 Reads a Predicate structure from the AML byte stream.
 
uint64_t aml_def_else_read (aml_term_list_ctx_t *ctx, bool shouldExecute)
 Reads a DefElse structure from the AML byte stream.
 
uint64_t aml_def_if_else_read (aml_term_list_ctx_t *ctx)
 Reads an DefIfElse structure from the AML byte stream.
 
uint64_t aml_def_noop_read (aml_term_list_ctx_t *ctx)
 Reads a DefNoop structure from the AML byte stream.
 
aml_object_taml_arg_object_read (aml_term_list_ctx_t *ctx)
 Reads an ArgObject structure from the AML byte stream.
 
uint64_t aml_def_return_read (aml_term_list_ctx_t *ctx)
 Reads a DefReturn structure from the AML byte stream.
 
uint64_t aml_def_break_read (aml_term_list_ctx_t *ctx)
 Reads a DefBreak structure from the AML byte stream.
 
uint64_t aml_def_continue_read (aml_term_list_ctx_t *ctx)
 Reads a DefContinue structure from the AML byte stream.
 
uint64_t aml_def_release_read (aml_term_list_ctx_t *ctx)
 Reads a DefRelease structure from the AML byte stream.
 
uint64_t aml_def_while_read (aml_term_list_ctx_t *ctx)
 Reads a DefWhile 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.
 

Function Documentation

◆ aml_predicate_read()

uint64_t aml_predicate_read ( aml_term_list_ctx_t ctx,
aml_uint_t out 
)

Reads a Predicate structure from the AML byte stream.

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

Parameters
ctxThe context of the TermList that this structure is part of.
outThe destination buffer to store the integer value of the Predicate.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 12 of file statement.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aml_def_else_read()

uint64_t aml_def_else_read ( aml_term_list_ctx_t ctx,
bool  shouldExecute 
)

Reads a DefElse structure from the AML byte stream.

A DefElse structure is defined as DefElse := Nothing | <elseop pkglength termlist>.

See also
Section 19.6.39 of the ACPI specification for more details.
Parameters
ctxThe context of the TermList that this structure is part of.
shouldExecuteWhether the TermList should be executed or skipped.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 22 of file statement.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aml_def_if_else_read()

uint64_t aml_def_if_else_read ( aml_term_list_ctx_t ctx)

Reads an DefIfElse structure from the AML byte stream.

A DefIfElse structure is defined as DefIfElse := IfOp PkgLength Predicate TermList DefElse.

Note that the the DefIfElse structure is also used for normal If statements, just without a "Else" part, this is because the DefElse part is optional.

See also
Section 19.6.60 of the ACPI specification for more details.
Parameters
ctxThe context of the TermList that this structure is part of.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 56 of file statement.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aml_def_noop_read()

uint64_t aml_def_noop_read ( aml_term_list_ctx_t ctx)

Reads a DefNoop structure from the AML byte stream.

A DefNoop structure is defined as DefNoop := NoopOp.

A Noop does nothing.

Parameters
statePointer to the current AML state.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 117 of file statement.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aml_arg_object_read()

aml_object_t * aml_arg_object_read ( aml_term_list_ctx_t ctx)

Reads an ArgObject structure from the AML byte stream.

An ArgObject structure is defined as ArgObject := TermArg => DataRefObject.

See also
Section 19.6.119 of the ACPI specification for more details.
Parameters
ctxThe context of the TermList that this structure is part of.
Returns
On success, the ArgObject. On failure, NULL and errno is set.

Definition at line 128 of file statement.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aml_def_return_read()

uint64_t aml_def_return_read ( aml_term_list_ctx_t ctx)

Reads a DefReturn structure from the AML byte stream.

A DefReturn structure is defined as DefReturn := ReturnOp ArgObject.

See also
Section 19.6.120 of the ACPI specification for more details.
Parameters
ctxThe context of the TermList that this structure is part of.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 140 of file statement.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aml_def_break_read()

uint64_t aml_def_break_read ( aml_term_list_ctx_t ctx)

Reads a DefBreak structure from the AML byte stream.

A DefBreak structure is defined as DefBreak := BreakOp.

See also
Section 19.6.8 of the ACPI specification for more details.
Parameters
statePointer to the current AML state.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 189 of file statement.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aml_def_continue_read()

uint64_t aml_def_continue_read ( aml_term_list_ctx_t ctx)

Reads a DefContinue structure from the AML byte stream.

A DefContinue structure is defined as DefContinue := ContinueOp.

See also
Section 19.6.16 of the ACPI specification for more details.
Parameters
statePointer to the current AML state.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 201 of file statement.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aml_def_release_read()

uint64_t aml_def_release_read ( aml_term_list_ctx_t ctx)

Reads a DefRelease structure from the AML byte stream.

A DefRelease structure is defined as DefRelease := ReleaseOp MutexObject.

See also
Section 19.6.117 of the ACPI specification for more details.
Parameters
ctxThe context of the TermList that this structure is part of.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 162 of file statement.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aml_def_while_read()

uint64_t aml_def_while_read ( aml_term_list_ctx_t ctx)

Reads a DefWhile structure from the AML byte stream.

A DefWhile structure is defined as DefWhile := WhileOp PkgLength Predicate TermList.

The While statement works by evaluating the Predicate, if it is a non-zero integer, the TermList following the Predicate is executed, then the Predicate is evaluated again, this continues until the Predicate evaluates to zero.

See also
Section 19.6.158 of the ACPI specification for more details.
Parameters
ctxThe context of the TermList that this structure is part of.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 213 of file statement.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ aml_statement_opcode_read()

uint64_t aml_statement_opcode_read ( aml_term_list_ctx_t ctx)

Reads an StatementOpcode structure from the AML byte stream.

A StatementOpcode structure is defined as StatementOpcode := DefBreak | DefBreakPoint | DefContinue | DefFatal | DefIfElse | DefNoop | DefNotify | DefRelease | DefReset | DefReturn | DefSignal | DefSleep | DefStall | DefWhile.

Currently unimplemented Opcodes are:

  • DefBreakPoint
  • DefFatal
  • DefNotify
  • DefReset
  • DefSignal
  • DefSleep
  • DefStall
Parameters
ctxThe context of the TermList that this structure is part of.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 285 of file statement.c.

Here is the call graph for this function:
Here is the caller graph for this function: