PatchworkOS  da8a090
A non-POSIX operating system.
Loading...
Searching...
No Matches
local.h
Go to the documentation of this file.
1#pragma once
2
3#include <stdint.h>
4
5typedef struct aml_object aml_object_t;
6typedef struct aml_term_list_ctx aml_term_list_ctx_t;
7
8/**
9 * @brief Local Objecs Encoding
10 * @defgroup modules_acpi_aml_encoding_local Locals
11 * @ingroup modules_acpi_aml
12 *
13 * @see Section 20.2.6.2 of the ACPI specification.
14 *
15 * @{
16 */
17
18/**
19 * @brief Maximum number of local variables that can be used in a method.
20 */
21#define AML_MAX_LOCALS 8
22
23/**
24 * @brief Reads a LocalObj structure from the AML byte stream.
25 *
26 * A LocalObj is defined as `LocalObj := Local0Op | Local1Op | Local2Op | Local3Op | Local4Op | Local5Op | Local6Op |
27 * Local7Op` where
28 * - Local0Op := 0x60,
29 * - Local1Op := 0x61,
30 * - Local2Op := 0x62,
31 * - Local3Op := 0x63,
32 * - Local4Op := 0x64,
33 * - Local5Op := 0x65,
34 * - Local6Op := 0x66 and
35 * - Local7Op := 0x67.
36 *
37 * Note that if a LocalObj is storing a ObjectRefernce it will be Automatically dereferenced, so in such a situation
38 * `out` will point to the actual object and not an ObjectReference in the LocalObj.
39 *
40 * @see Section 19.3.5.8.2 of the ACPI specification for more details.
41 *
42 * @param state Pointer to the AML state.
43 * @return On success, the LocalObj. On failure, `NULL` and `errno` is set.
44 */
46
47/** @} */
aml_object_t * aml_local_obj_read(aml_term_list_ctx_t *ctx)
Reads a LocalObj structure from the AML byte stream.
Definition local.c:8
ACPI object.
Definition object.h:447
Context for reading a TermList.
Definition term.h:37