|
PatchworkOS
|
Package Length Encoding. More...
Data Structures | |
| struct | aml_pkg_lead_byte_t |
| PkgLeadByte structure. More... | |
Typedefs | |
| typedef uint32_t | aml_pkg_length_t |
| PkgLength structure. | |
Functions | |
| uint64_t | aml_pkg_lead_byte_read (aml_term_list_ctx_t *ctx, aml_pkg_lead_byte_t *out) |
| Reads a PkgLeadByte structure from the AML byte stream. | |
| 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. | |
Package Length Encoding.
| typedef uint32_t aml_pkg_length_t |
PkgLength structure.
Definition at line 21 of file package_length.h.
| uint64_t aml_pkg_lead_byte_read | ( | aml_term_list_ctx_t * | ctx, |
| aml_pkg_lead_byte_t * | out | ||
| ) |
Reads a PkgLeadByte structure from the AML byte stream.
The PkgLeadByte structure is defined as:
| ctx | The context of the TermList that this structure is part of. |
| out | The output buffer to store the lead byte. |
0. On failure, ERR and errno is set. Definition at line 10 of file package_length.c.
References aml_byte_data_read(), AML_DEBUG_ERROR, aml_pkg_lead_byte_t::byteDataCount, EILSEQ, ERR, errno, aml_pkg_lead_byte_t::leastSignificantNybble, and aml_pkg_lead_byte_t::smallLengthBits.
Referenced by aml_pkg_length_read().
| 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.
The PkgLength structure is defined as PkgLength := PkgLeadByte | <pkgleadbyte bytedata> | <pkgleadbyte bytedata bytedata> | <pkgleadbyte bytedata bytedata bytedata>.
A PkgLength structure specifies the length from its own start to the end of the data for the operation/structure it is part of, as such the PkgLength includes the length of the PkgLength structure itself.
| ctx | The context of the TermList that this structure is part of. |
| out | The output buffer to store the package length. |
0. On failure, ERR and errno is set. Definition at line 34 of file package_length.c.
References aml_byte_data_read(), AML_DEBUG_ERROR, aml_pkg_lead_byte_read(), aml_pkg_lead_byte_t::byteDataCount, aml_term_list_ctx_t::current, ERANGE, ERR, errno, aml_pkg_lead_byte_t::leastSignificantNybble, aml_pkg_lead_byte_t::smallLengthBits, and start().
Referenced by aml_def_bank_field_read(), aml_def_buffer_read(), aml_def_device_read(), aml_def_else_read(), aml_def_field_read(), aml_def_if_else_read(), aml_def_index_field_read(), aml_def_method_read(), aml_def_package_read(), aml_def_power_res_read(), aml_def_processor_read(), aml_def_scope_read(), aml_def_thermal_zone_read(), aml_def_var_package_read(), aml_def_while_read(), aml_name_field_read(), and aml_reserved_field_read().