PatchworkOS  966e257
A non-POSIX operating system.
Loading...
Searching...
No Matches
arg.h
Go to the documentation of this file.
1#pragma once
2
3typedef struct aml_object aml_object_t;
4typedef struct aml_term_list_ctx aml_term_list_ctx_t;
5
6/**
7 * @brief Arg Objecs Encoding
8 * @defgroup modules_acpi_aml_encoding_args Args
9 * @ingroup modules_acpi_aml
10 *
11 * @see Section 20.2.6.1 of the ACPI specification.
12 *
13 * @{
14 */
15
16/**
17 * @brief Maximum number of arguments that can be passed to a method.
18 */
19#define AML_MAX_ARGS 7
20
21/**
22 * @brief Reads a ArgObj structure from the AML byte stream.
23 *
24 * A ArgObj is defined as `ArgObj := Arg0Op | Arg1Op | Arg2Op | Arg3Op | Arg4Op | Arg5Op | Arg6Op` where
25 * - Arg0Op := 0x68,
26 * - Arg1Op := 0x69,
27 * - Arg2Op := 0x6A,
28 * - Arg3Op := 0x6B,
29 * - Arg4Op := 0x6C,
30 * - Arg5Op := 0x6D and
31 * - Arg6Op := 0x6E.
32 *
33 * Note that if an ArgObj is storing a ObjectRefernce it will be Automatically dereferenced, so in such a situation
34 * `out` will point to the actual object and not an ObjectReference in the ArgObj.
35 *
36 * @see Section 19.3.5.8.1 of the ACPI specification for more details.
37 *
38 * @param state Pointer to the AML state.
39 * @return On success, the ArbObj. On failure, `NULL` and `errno` is set.
40 */
42
43/** @} */
aml_object_t * aml_arg_obj_read(aml_term_list_ctx_t *ctx)
Reads a ArgObj structure from the AML byte stream.
Definition arg.c:8
ACPI object.
Definition object.h:447
Context for reading a TermList.
Definition term.h:37