|
PatchworkOS
2ca1c69
A non-POSIX operating system.
|
Data Objects Encoding. More...
Data Objects Encoding.
Typedefs | |
| typedef uint64_t | aml_bit_size_t |
| Represents a size in bits within an opregion. | |
Functions | |
| uint64_t | aml_byte_data_read (aml_term_list_ctx_t *ctx, uint8_t *out) |
| Read a ByteData structure from the AML stream. | |
| uint64_t | aml_word_data_read (aml_term_list_ctx_t *ctx, uint16_t *out) |
| Read a WordData structure from the AML stream. | |
| uint64_t | aml_dword_data_read (aml_term_list_ctx_t *ctx, uint32_t *out) |
| Read a DWordData structure from the AML stream. | |
| uint64_t | aml_qword_data_read (aml_term_list_ctx_t *ctx, uint64_t *out) |
| Read a QWordData structure from the AML stream. | |
| uint64_t | aml_byte_const_read (aml_term_list_ctx_t *ctx, uint8_t *out) |
| Read a ByteConst structure from the AML stream. | |
| uint64_t | aml_word_const_read (aml_term_list_ctx_t *ctx, uint16_t *out) |
| Read a WordConst structure from the AML stream. | |
| uint64_t | aml_dword_const_read (aml_term_list_ctx_t *ctx, uint32_t *out) |
| Read a DWordConst structure from the AML stream. | |
| uint64_t | aml_qword_const_read (aml_term_list_ctx_t *ctx, uint64_t *out) |
| Read a QWordConst structure from the AML stream. | |
| uint64_t | aml_const_obj_read (aml_term_list_ctx_t *ctx, aml_object_t *out) |
| Read a ConstObj structure from the AML stream. | |
| uint64_t | aml_string_read (aml_term_list_ctx_t *ctx, aml_object_t *out) |
| Read a String structure from the AML stream. | |
| uint64_t | aml_revision_op_read (aml_term_list_ctx_t *ctx, aml_object_t *out) |
| Read a RevisionOp structure from the AML stream. | |
| uint64_t | aml_computational_data_read (aml_term_list_ctx_t *ctx, aml_object_t *out) |
| Read a ComputationalData structure from the AML stream. | |
| uint64_t | aml_num_elements_read (aml_term_list_ctx_t *ctx, uint8_t *out) |
| Read a NumElements structure from the AML stream. | |
| uint64_t | aml_package_element_read (aml_term_list_ctx_t *ctx, aml_object_t *out) |
| Read a PackageElement structure from the AML stream. | |
| uint64_t | aml_package_element_list_read (aml_term_list_ctx_t *ctx, aml_package_t *package, const uint8_t *end) |
| Read a PackageElementList structure from the AML stream. | |
| uint64_t | aml_def_package_read (aml_term_list_ctx_t *ctx, aml_object_t *out) |
| Reads a DefPackage structure from the AML byte stream. | |
| uint64_t | aml_def_var_num_elements_read (aml_term_list_ctx_t *ctx, aml_uint_t *out) |
| Read a VarNumElements structure from the AML stream. | |
| uint64_t | aml_def_var_package_read (aml_term_list_ctx_t *ctx, aml_object_t *out) |
| Reads a DefVarPackage 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. | |
| uint64_t | aml_data_ref_object_read (aml_term_list_ctx_t *ctx, aml_object_t *out) |
| Read a DataRefObject structure from the AML stream. | |
| typedef uint64_t aml_bit_size_t |
Represents a size in bits within an opregion.
Definition at line 14 of file data_integers.h.
| uint64_t aml_byte_data_read | ( | aml_term_list_ctx_t * | ctx, |
| uint8_t * | out | ||
| ) |
Read a ByteData structure from the AML stream.
A ByteData structure is defined as ByteData := 0x00 - 0xFF.
| ctx | The context of the TermList that this structure is part of. |
| out | Output pointer where the byte value will be stored. |
0. On failure, ERR and errno is set. Definition at line 16 of file data.c.
| uint64_t aml_word_data_read | ( | aml_term_list_ctx_t * | ctx, |
| uint16_t * | out | ||
| ) |
Read a WordData structure from the AML stream.
A WordData structure is defined as WordData := ByteData[0:7] ByteData[8:15].
| ctx | The context of the TermList that this structure is part of. |
| out | Output pointer where the word value will be stored. |
0. On failure, ERR and errno is set. Definition at line 30 of file data.c.
| uint64_t aml_dword_data_read | ( | aml_term_list_ctx_t * | ctx, |
| uint32_t * | out | ||
| ) |
Read a DWordData structure from the AML stream.
A DWordData structure is defined as DWordData := WordData[0:15] WordData[16:31].
| ctx | The context of the TermList that this structure is part of. |
| out | Output pointer where the dword value will be stored. |
0. On failure, ERR and errno is set. Definition at line 42 of file data.c.
| uint64_t aml_qword_data_read | ( | aml_term_list_ctx_t * | ctx, |
| uint64_t * | out | ||
| ) |
Read a QWordData structure from the AML stream.
A QWordData structure is defined as QWordData := DWordData[0:31] DWordData[32:63].
| ctx | The context of the TermList that this structure is part of. |
| out | Output pointer to the qword value will be stored. |
0. On failure, ERR and errno is set. Definition at line 54 of file data.c.
| uint64_t aml_byte_const_read | ( | aml_term_list_ctx_t * | ctx, |
| uint8_t * | out | ||
| ) |
Read a ByteConst structure from the AML stream.
A ByteConst structure is defined as ByteConst := BytePrefix ByteData.
| ctx | The context of the TermList that this structure is part of. |
| out | Output pointer to the byte value will be stored. |
0. On failure, ERR and errno is set. Definition at line 66 of file data.c.
| uint64_t aml_word_const_read | ( | aml_term_list_ctx_t * | ctx, |
| uint16_t * | out | ||
| ) |
Read a WordConst structure from the AML stream.
A WordConst structure is defined as WordConst := WordPrefix WordData.
| ctx | The context of the TermList that this structure is part of. |
| out | Output pointer to the word value will be stored. |
0. On failure, ERR and errno is set. Definition at line 77 of file data.c.
| uint64_t aml_dword_const_read | ( | aml_term_list_ctx_t * | ctx, |
| uint32_t * | out | ||
| ) |
Read a DWordConst structure from the AML stream.
A DWordConst structure is defined as DwordConst := DWordPrefix DWordData.
| ctx | The context of the TermList that this structure is part of. |
| out | Output pointer to the dword value will be stored. |
0. On failure, ERR and errno is set. Definition at line 88 of file data.c.
| uint64_t aml_qword_const_read | ( | aml_term_list_ctx_t * | ctx, |
| uint64_t * | out | ||
| ) |
Read a QWordConst structure from the AML stream.
A QWordConst structure is defined as QWordConst := QWordPrefix QWordData.
| ctx | The context of the TermList that this structure is part of. |
| out | Output pointer to the qword value will be stored. |
0. On failure, ERR and errno is set. Definition at line 99 of file data.c.
| uint64_t aml_const_obj_read | ( | aml_term_list_ctx_t * | ctx, |
| aml_object_t * | out | ||
| ) |
Read a ConstObj structure from the AML stream.
A ConstObj structure is defined as ConstObj := ZeroOp | OneOp | OnesOp.
| ctx | The context of the TermList that this structure is part of. |
| out | Output pointer to the object to store the result. |
0. On failure, ERR and errno is set. Definition at line 110 of file data.c.
| uint64_t aml_string_read | ( | aml_term_list_ctx_t * | ctx, |
| aml_object_t * | out | ||
| ) |
Read a String structure from the AML stream.
A String structure is defined as String := StringPrefix AsciiCharList NullChar.
AsciiCharList is defined as a sequence of ASCII characters in the range 0x01 to 0x7F, and NullChar is defined as 0x00.
| ctx | The context of the TermList that this structure is part of. |
| out | Output pointer to the object to store the result. |
0. On failure, ERR and errno is set. Definition at line 144 of file data.c.
| uint64_t aml_revision_op_read | ( | aml_term_list_ctx_t * | ctx, |
| aml_object_t * | out | ||
| ) |
Read a RevisionOp structure from the AML stream.
A RevisionOp structure is defined as RevisionOp := RevisionOp.
| ctx | The context of the TermList that this structure is part of. |
| out | Output pointer to the object to store the result. |
0. On failure, ERR and errno is set. Definition at line 183 of file data.c.
| uint64_t aml_computational_data_read | ( | aml_term_list_ctx_t * | ctx, |
| aml_object_t * | out | ||
| ) |
Read a ComputationalData structure from the AML stream.
A ComputationalData structure is defined as ComputationalData := ByteConst | WordConst | DWordConst | QWordConst | String | ConstObj | RevisionOp | DefBuffer.
| ctx | The context of the TermList that this structure is part of. |
| out | Output pointer to the object to store the result. |
0. On failure, ERR and errno is set. Definition at line 199 of file data.c.
| uint64_t aml_num_elements_read | ( | aml_term_list_ctx_t * | ctx, |
| uint8_t * | out | ||
| ) |
Read a NumElements structure from the AML stream.
A NumElements structure is defined as NumElements := ByteData.
| ctx | The context of the TermList that this structure is part of. |
| out | Output pointer to the integer to be filled with the number of elements. |
0. On failure, ERR and errno is set. Definition at line 304 of file data.c.
| uint64_t aml_package_element_read | ( | aml_term_list_ctx_t * | ctx, |
| aml_object_t * | out | ||
| ) |
Read a PackageElement structure from the AML stream.
A PackageElement structure is defined as PackageElement := DataRefObject | NameString.
| ctx | The context of the TermList that this structure is part of. |
| out | Pointer to the object to initialize with the read element. |
0. On failure, ERR and errno is set. Definition at line 345 of file data.c.
| uint64_t aml_package_element_list_read | ( | aml_term_list_ctx_t * | ctx, |
| aml_package_t * | package, | ||
| const uint8_t * | end | ||
| ) |
Read a PackageElementList structure from the AML stream.
A PackageElementList structure is defined as PackageElementList := Nothing | <packageelement packageelementlist>`.
| ctx | The context of the TermList that this structure is part of. |
| package | Pointer to the package to fill with the read elements. |
| end | Pointer to the end of the PackageElementList. |
0. On failure, ERR and errno is set. Definition at line 387 of file data.c.
| uint64_t aml_def_package_read | ( | aml_term_list_ctx_t * | ctx, |
| aml_object_t * | out | ||
| ) |
Reads a DefPackage structure from the AML byte stream.
A DefPackage structure is defined as DefPackage := PackageOp PkgLength NumElements PackageElementList.
| ctx | The context of the TermList that this structure is part of. |
| out | Output pointer to the object to store the result. |
0. On failure, ERR and errno is set. Definition at line 407 of file data.c.
| uint64_t aml_def_var_num_elements_read | ( | aml_term_list_ctx_t * | ctx, |
| aml_uint_t * | out | ||
| ) |
Read a VarNumElements structure from the AML stream.
A VarNumElements structure is defined as VarNumElements := TermArg => Integer.
| ctx | The context of the TermList that this structure is part of. |
| out | Output pointer to the integer to be filled with the number of elements. |
0. On failure, ERR and errno is set. Definition at line 449 of file data.c.
| uint64_t aml_def_var_package_read | ( | aml_term_list_ctx_t * | ctx, |
| aml_object_t * | out | ||
| ) |
Reads a DefVarPackage structure from the AML byte stream.
A DefVarPackage structure is defined as DefVarPackage := VarPackageOp PkgLength VarNumElements PackageElementList.
| ctx | The context of the TermList that this structure is part of. |
| out | Output pointer to the object to store the result. |
0. On failure, ERR and errno is set. Definition at line 460 of file data.c.
| uint64_t aml_data_object_read | ( | aml_term_list_ctx_t * | ctx, |
| aml_object_t * | out | ||
| ) |
Read a DataObject structure from the AML stream.
A DataObject structure is defined as DataObject := ComputationalData | DefPackage | DefVarPackage.
| ctx | The context of the TermList that this structure is part of. |
| out | Output pointer to the object to store the result. |
0. On failure, ERR and errno is set. Definition at line 501 of file data.c.
| uint64_t aml_data_ref_object_read | ( | aml_term_list_ctx_t * | ctx, |
| aml_object_t * | out | ||
| ) |
Read a DataRefObject structure from the AML stream.
A DataRefObject structure is defined as DataRefObject := DataObject | ObjectReference.
| ctx | The context of the TermList that this structure is part of. |
| out | Output pointer to the object to store the result. |
0. On failure, ERR and errno is set. Definition at line 529 of file data.c.