PatchworkOS
Loading...
Searching...
No Matches
Predefined

Predefined AML names and objects. More...

Functions

aml_object_taml_osi_implementation (aml_method_obj_t *method, aml_object_t **args, uint64_t argCount)
 Implementation of the _OSI predefined method.
 
aml_object_taml_rev_implementation (aml_method_obj_t *method, aml_object_t **args, uint64_t argCount)
 Implementation of the _REV predefined method.
 
aml_object_taml_os_implementation (aml_method_obj_t *method, aml_object_t **args, uint64_t argCount)
 Implementation of the _OS predefined method.
 
aml_mutex_obj_taml_gl_get (void)
 Get the global AML mutex.
 
uint64_t aml_predefined_init (void)
 Initialize predefined AML names and objects.
 

Detailed Description

Predefined AML names and objects.

Function Documentation

◆ aml_gl_get()

aml_mutex_obj_t * aml_gl_get ( void  )

Get the global AML mutex.

Returns
Pointer to the global AML mutex.

Definition at line 111 of file predefined.c.

References globalMutex.

Referenced by aml_field_unit_access().

◆ aml_os_implementation()

aml_object_t * aml_os_implementation ( aml_method_obj_t method,
aml_object_t **  args,
uint64_t  argCount 
)

Implementation of the _OS predefined method.

The _OS method evaluates to a string that identifies the operating system.

Parameters
methodThe _OS method object.
argsThe arguments passed to the method.
argCountThe number of arguments passed to the method.
Returns
On success, the return value of the method. On failure, ERR and errno is set.

Definition at line 68 of file predefined.c.

References aml_object_new(), aml_string_set(), DEREF, EINVAL, ERR, errno, and NULL.

Referenced by aml_predefined_init().

◆ aml_osi_implementation()

aml_object_t * aml_osi_implementation ( aml_method_obj_t method,
aml_object_t **  args,
uint64_t  argCount 
)

Implementation of the _OSI predefined method.

The _OSI method is used by the ACPI firmware to query the operating system's capabilities. But for now we just return true for everything.

@See section 5.7.2 of the ACPI specification.

Parameters
methodThe _OSI method object.
argsThe arguments passed to the method.
argCountThe number of arguments passed to the method.
Returns
On success, the return value of the method. On failure, ERR and errno is set.

Definition at line 14 of file predefined.c.

References aml_integer_set(), aml_object_new(), AML_STRING, DEREF, EINVAL, ERR, errno, LOG_DEBUG, NULL, and UINT64_MAX.

Referenced by aml_predefined_init().

◆ aml_predefined_init()

uint64_t aml_predefined_init ( void  )

Initialize predefined AML names and objects.

Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 116 of file predefined.c.

References aml_create_predefined_scope(), aml_method_set(), aml_mutex_set(), AML_NAME, aml_namespace_add_child(), aml_object_new(), aml_os_implementation(), aml_osi_implementation(), aml_rev_implementation(), aml_method_flags_t::argCount, DEREF_DEFER, ERR, globalMutex, aml_object_t::mutex, NULL, and REF.

Referenced by aml_init().

◆ aml_rev_implementation()

aml_object_t * aml_rev_implementation ( aml_method_obj_t method,
aml_object_t **  args,
uint64_t  argCount 
)

Implementation of the _REV predefined method.

The _REV method returns the the revision of the ACPI Specification implemented by the OS.

See also
ACPI_REVISION
Parameters
methodThe _REV method object.
argsThe arguments passed to the method.
argCountThe number of arguments passed to the method.
Returns
On success, the return value of the method. On failure, ERR and errno is set.

Definition at line 42 of file predefined.c.

References aml_integer_set(), aml_object_new(), DEREF, EINVAL, ERR, errno, NULL, and RSDP_CURRENT_REVISION.

Referenced by aml_predefined_init().