|
PatchworkOS
a7b3d61
A non-POSIX operating system.
|
Term Objects Encoding. More...
Term Objects Encoding.
Data Structures | |
| struct | aml_term_list_ctx_t |
| Context for reading a TermList. More... | |
Enumerations | |
| enum | aml_stop_reason_t { AML_STOP_REASON_NONE , AML_STOP_REASON_RETURN , AML_STOP_REASON_BREAK , AML_STOP_REASON_CONTINUE } |
| Stop reason. More... | |
Functions | |
| 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_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_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_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. | |
| enum aml_stop_reason_t |
| 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.
A TermArg is defined as TermArg := ExpressionOpcode | DataObject | ArgObj | LocalObj.
| ctx | The context of the TermList that this structure is part of. |
| allowedTypes | Bitmask of allowed types for the TermArg, the will be evaluated to one of these types. |
NULL and errno is set. Definition at line 19 of file term.c.
| 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.
| ctx | The context of the TermList that this structure is part of. |
| out | The output buffer to store the integer value of the TermArg. |
0. On failure, ERR and errno is set. Definition at line 70 of file term.c.
| 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.
| ctx | The context of the TermList that this structure is part of. |
NULL and errno is set. Definition at line 86 of file term.c.
| 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.
| ctx | The context of the TermList that this structure is part of. |
NULL and errno is set. Definition at line 100 of file term.c.
| 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.
| ctx | The context of the TermList that this structure is part of. |
NULL and errno is set. Definition at line 114 of file term.c.
| uint64_t aml_object_read | ( | aml_term_list_ctx_t * | ctx | ) |
Reads an Object structure from the AML byte stream.
An Object is defined as Object := NameSpaceModifierObj | NamedObj.
| ctx | The context of the TermList that this structure is part of. |
0. On failure, ERR and errno is set. Definition at line 128 of file term.c.
| uint64_t aml_term_obj_read | ( | aml_term_list_ctx_t * | ctx | ) |
Reads a TermObj structure from the AML byte stream.
A TermObj is defined as TermObj := Object | StatementOpcode | ExpressionOpcode.
| ctx | The context of the TermList that this structure is part of. |
0. On failure, ERR and errno is set. Definition at line 146 of file term.c.
| 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.
A TermList structure is defined as TermList := Nothing | <termobj termlist>.
This is the biggest "structure" in AML, and the entry point for AML execution.
Will not advance the parent TermLists current pointer.
| state | Pointer to the current AML state. |
| scope | The location in the namespace from which names will be resolved. |
| start | Pointer to the start of the TermList in the AML byte stream. |
| end | Pointer to the end of the TermList in the AML byte stream. |
| parentCtx | The previous TermList context, or NULL if this is the top-level TermList, used to propagate stop reasons. |
0. On failure, ERR and errno is set. Definition at line 189 of file term.c.