PatchworkOS  966e257
A non-POSIX operating system.
Loading...
Searching...
No Matches
predefined.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <stdint.h>
6
7/**
8 * @brief Predefined AML names and objects
9 * @defgroup modules_acpi_aml_predefined Predefined
10 * @ingroup modules_acpi_aml
11 *
12 * @{
13 */
14
15/**
16 * @brief Implementation of the _OSI predefined method.
17 *
18 * The _OSI method is used by the ACPI firmware to query the operating system's capabilities. But
19 * for now we just return true for everything.
20 *
21 * @See section 5.7.2 of the ACPI specification.
22 *
23 * @param method The _OSI method object.
24 * @param args The arguments passed to the method.
25 * @param argCount The number of arguments passed to the method.
26 * @return On success, the return value of the method. On failure, `ERR` and `errno` is set.
27 */
29
30/**
31 * @brief Implementation of the _REV predefined method.
32 *
33 * The _REV method returns the the revision of the ACPI Specification implemented by the OS.
34 *
35 * @see `ACPI_REVISION`
36 *
37 * @param method The _REV method object.
38 * @param args The arguments passed to the method.
39 * @param argCount The number of arguments passed to the method.
40 * @return On success, the return value of the method. On failure, `ERR` and `errno` is set.
41 */
43
44/**
45 * @brief Implementation of the _OS predefined method.
46 *
47 * The _OS method evaluates to a string that identifies the operating system.
48 *
49 * @param method The _OS method object.
50 * @param args The arguments passed to the method.
51 * @param argCount The number of arguments passed to the method.
52 * @return On success, the return value of the method. On failure, `ERR` and `errno` is set.
53 */
55
56/**
57 * @brief Get the global AML mutex.
58 *
59 * @return Pointer to the global AML mutex.
60 */
62
63/**
64 * @brief Initialize predefined AML names and objects.
65 *
66 * @return On success, `0`. On failure, `ERR` and `errno` is set.
67 */
69
70/** @} */
aml_object_t * aml_rev_implementation(aml_method_t *method, aml_object_t **args, uint64_t argCount)
Implementation of the _REV predefined method.
Definition predefined.c:43
uint64_t aml_predefined_init(void)
Initialize predefined AML names and objects.
Definition predefined.c:117
aml_mutex_t * aml_gl_get(void)
Get the global AML mutex.
Definition predefined.c:112
aml_object_t * aml_osi_implementation(aml_method_t *method, aml_object_t **args, uint64_t argCount)
Implementation of the _OSI predefined method.
Definition predefined.c:14
aml_object_t * aml_os_implementation(aml_method_t *method, aml_object_t **args, uint64_t argCount)
Implementation of the _OS predefined method.
Definition predefined.c:69
__UINT64_TYPE__ uint64_t
Definition stdint.h:17
Data for a method object.
Definition object.h:306
Data for a mutex object.
Definition object.h:324
ACPI object.
Definition object.h:447