|
ReactOS 0.4.17-dev-684-ga6524ef
|
#include <uacpi/types.h>#include <uacpi/status.h>#include <uacpi/kernel_api.h>#include <uacpi/namespace.h>

Go to the source code of this file.
Macros | |
| #define | UACPI_MAJOR 6 |
| #define | UACPI_MINOR 0 |
| #define | UACPI_PATCH 1 |
| #define | UACPI_STUB_IF_REDUCED_HARDWARE(fn) fn; |
| #define | UACPI_ALWAYS_ERROR_FOR_REDUCED_HARDWARE(fn) fn; |
| #define | UACPI_ALWAYS_OK_FOR_REDUCED_HARDWARE(fn) fn; |
| #define | UACPI_FLAG_BAD_CSUM_FATAL (1ull << 0) |
| #define | UACPI_FLAG_BAD_TBL_SIGNATURE_FATAL (1ull << 1) |
| #define | UACPI_FLAG_BAD_XSDT (1ull << 2) |
| #define | UACPI_FLAG_NO_ACPI_MODE (1ull << 3) |
| #define | UACPI_FLAG_NO_OSI (1ull << 4) |
| #define | UACPI_FLAG_PROACTIVE_TBL_CSUM (1ull << 5) |
Variables | |
| uacpi_u32 * | out_seq |
| #define UACPI_FLAG_BAD_CSUM_FATAL (1ull << 0) |
| #define UACPI_FLAG_BAD_TBL_SIGNATURE_FATAL (1ull << 1) |
| #define UACPI_FLAG_BAD_XSDT (1ull << 2) |
| #define UACPI_FLAG_NO_ACPI_MODE (1ull << 3) |
If this is set, ACPI mode is not entered during the call to uacpi_initialize. The caller is expected to enter it later at their own discretion by using uacpi_enter_acpi_mode().
| #define UACPI_FLAG_NO_OSI (1ull << 4) |
| #define UACPI_FLAG_PROACTIVE_TBL_CSUM (1ull << 5) |
| UACPI_ALWAYS_OK_FOR_REDUCED_HARDWARE | ( | uacpi_status | uacpi_enter_acpi_modevoid | ) |
Helpers for entering & leaving ACPI mode. Note that ACPI mode is entered automatically during the call to uacpi_initialize(). Attempt to acquire the global lock for 'timeout' milliseconds. 0xFFFF implies infinite wait.
On success, 'out_seq' is set to a unique sequence number for the current acquire transaction. This number is used for validation during release.
| uacpi_status uacpi_eval | ( | uacpi_namespace_node * | parent, |
| const uacpi_char * | path, | ||
| const uacpi_object_array * | args, | ||
| uacpi_object ** | ret | ||
| ) |
Evaluate an object within the namespace and get back its value. Either root or path must be valid. A value of NULL for 'parent' implies uacpi_namespace_root() relative lookups, unless 'path' is already absolute.
Definition at line 709 of file uacpi.c.
Referenced by eval_sleep_helper(), ini_eval(), uacpi_eval_simple(), uacpi_eval_typed(), uacpi_execute(), uacpi_execute_simple(), uacpi_set_interrupt_model(), and uacpi_set_resources().
| uacpi_status uacpi_eval_buffer | ( | uacpi_namespace_node * | parent, |
| const uacpi_char * | path, | ||
| const uacpi_object_array * | args, | ||
| uacpi_object ** | ret | ||
| ) |
A shorthand for uacpi_eval_typed with UACPI_OBJECT_BUFFER_BIT.
Use uacpi_object_get_buffer to retrieve the resulting buffer data.
Definition at line 961 of file uacpi.c.
| uacpi_status uacpi_eval_integer | ( | uacpi_namespace_node * | parent, |
| const uacpi_char * | path, | ||
| const uacpi_object_array * | args, | ||
| uacpi_u64 * | out_value | ||
| ) |
A shorthand for uacpi_eval_typed with UACPI_OBJECT_INTEGER_BIT.
Definition at line 892 of file uacpi.c.
Referenced by uacpi_eval_adr(), uacpi_eval_simple_integer(), and uacpi_eval_sta().
| uacpi_status uacpi_eval_package | ( | uacpi_namespace_node * | parent, |
| const uacpi_char * | path, | ||
| const uacpi_object_array * | args, | ||
| uacpi_object ** | ret | ||
| ) |
| uacpi_status uacpi_eval_simple | ( | uacpi_namespace_node * | parent, |
| const uacpi_char * | path, | ||
| uacpi_object ** | ret | ||
| ) |
Definition at line 787 of file uacpi.c.
| uacpi_status uacpi_eval_simple_buffer | ( | uacpi_namespace_node * | parent, |
| const uacpi_char * | path, | ||
| uacpi_object ** | ret | ||
| ) |
| uacpi_status uacpi_eval_simple_integer | ( | uacpi_namespace_node * | parent, |
| const uacpi_char * | path, | ||
| uacpi_u64 * | out_value | ||
| ) |
Definition at line 912 of file uacpi.c.
Referenced by pci_region_attach().
| uacpi_status uacpi_eval_simple_package | ( | uacpi_namespace_node * | parent, |
| const uacpi_char * | path, | ||
| uacpi_object ** | ret | ||
| ) |
| uacpi_status uacpi_eval_simple_string | ( | uacpi_namespace_node * | parent, |
| const uacpi_char * | path, | ||
| uacpi_object ** | ret | ||
| ) |
| uacpi_status uacpi_eval_simple_string_or_buffer | ( | uacpi_namespace_node * | parent, |
| const uacpi_char * | path, | ||
| uacpi_object ** | ret | ||
| ) |
| uacpi_status uacpi_eval_simple_typed | ( | uacpi_namespace_node * | parent, |
| const uacpi_char * | path, | ||
| uacpi_object_type_bits | ret_mask, | ||
| uacpi_object ** | ret | ||
| ) |
| uacpi_status uacpi_eval_string | ( | uacpi_namespace_node * | parent, |
| const uacpi_char * | path, | ||
| const uacpi_object_array * | args, | ||
| uacpi_object ** | ret | ||
| ) |
A shorthand for uacpi_eval_typed with UACPI_OBJECT_STRING_BIT.
Use uacpi_object_get_string to retrieve the resulting buffer data.
| uacpi_status uacpi_eval_string_or_buffer | ( | uacpi_namespace_node * | parent, |
| const uacpi_char * | path, | ||
| const uacpi_object_array * | args, | ||
| uacpi_object ** | ret | ||
| ) |
| uacpi_status uacpi_eval_typed | ( | uacpi_namespace_node * | parent, |
| const uacpi_char * | path, | ||
| const uacpi_object_array * | args, | ||
| uacpi_object_type_bits | ret_mask, | ||
| uacpi_object ** | ret | ||
| ) |
Same as uacpi_eval, but the return value type is validated against the 'ret_mask'. UACPI_STATUS_TYPE_MISMATCH is returned on error.
Definition at line 854 of file uacpi.c.
Referenced by get_slp_type_for_state(), uacpi_eval_buffer(), uacpi_eval_cid(), uacpi_eval_cls(), uacpi_eval_dstate_method_template(), uacpi_eval_hid(), uacpi_eval_integer(), uacpi_eval_package(), uacpi_eval_simple_buffer(), uacpi_eval_simple_package(), uacpi_eval_simple_string(), uacpi_eval_simple_string_or_buffer(), uacpi_eval_simple_typed(), uacpi_eval_string(), uacpi_eval_string_or_buffer(), uacpi_eval_uid(), and uacpi_get_pci_routing_table().
| uacpi_status uacpi_execute | ( | uacpi_namespace_node * | parent, |
| const uacpi_char * | path, | ||
| const uacpi_object_array * | args | ||
| ) |
Same as uacpi_eval() but without a return value.
| uacpi_status uacpi_execute_simple | ( | uacpi_namespace_node * | parent, |
| const uacpi_char * | path | ||
| ) |
| uacpi_status uacpi_get_aml_bitness | ( | uacpi_u8 * | out_bitness | ) |
Get the bitness of the currently loaded AML code according to the DSDT.
Returns either 32 or 64.
Definition at line 999 of file uacpi.c.
Referenced by uacpi_object_create_integer_safe().
| uacpi_init_level uacpi_get_current_init_level | ( | void | ) |
Definition at line 310 of file uacpi.c.
Referenced by uacpi_initialize_opregion_node().
| uacpi_status uacpi_initialize | ( | uacpi_u64 | flags | ) |
Initializes the uACPI subsystem, iterates & records all relevant RSDT/XSDT tables. Enters ACPI mode.
'flags' is any combination of UACPI_FLAG_* above
Definition at line 315 of file uacpi.c.
Referenced by ACPIInitUACPI().
| uacpi_status uacpi_is_platform_reduced_hardware | ( | uacpi_bool * | out_value | ) |
Returns UACPI_TRUE via 'out_value' if the current platform is reduced ACPI hardware, UACPI_FALSE otherwise.
This getter becomes available along with the table subsystem, use uacpi_table_subsystem_available() to check.
Definition at line 19 of file uacpi.c.
| uacpi_status uacpi_namespace_initialize | ( | void | ) |
Initializes all the necessary objects in the namespaces by calling _STA/_INI etc.
Definition at line 620 of file uacpi.c.
| uacpi_status uacpi_namespace_load | ( | void | ) |
Parses & executes all of the DSDT/SSDT tables. Initializes the event subsystem.
Definition at line 437 of file uacpi.c.
| uacpi_status uacpi_release_global_lock | ( | uacpi_u32 | seq | ) |
Definition at line 179 of file mutex.c.
| uacpi_status uacpi_setup_early_table_access | ( | void * | temporary_buffer, |
| uacpi_size | buffer_size | ||
| ) |
Set up early access to the table subsystem. What this means is:
The 'temporary_buffer' is expected to be aligned on the native pointer size boundary (4 on a 32-bit system, 8 on a 64-bit system), although any misalignment is handled gracefully and does not result in an error.
The approximate overhead per table is 56 bytes, so a buffer of 4096 bytes yields about 73 tables in terms of capacity. uACPI also has an internal static buffer for tables, "UACPI_STATIC_TABLE_ARRAY_LEN", which is configured as 16 descriptors in length by default.
This function is used to initialize the barebones mode, see UACPI_BAREBONES_MODE in config.h for more information.
Definition at line 216 of file tables.c.
Reset the global uACPI state by freeing all internally allocated data structures & resetting any global variables. After this call, uACPI must be re-initialized from scratch to be used again.
This is called by uACPI automatically if a fatal error occurs during a call to uacpi_initialize/uacpi_namespace_load etc. in order to prevent accidental use of partially uninitialized subsystems.
Definition at line 133 of file uacpi.c.
Referenced by uacpi_initialize(), uacpi_namespace_initialize(), and uacpi_namespace_load().
| uacpi_bool uacpi_table_subsystem_available | ( | void | ) |
Returns UACPI_TRUE if the table subsystem is available for use by the kernel. This happens after a successful call to either uacpi_initialize(...) or uacpi_setup_early_table_access(...).
Referenced by uacpi_is_platform_reduced_hardware().
| uacpi_u32* out_seq |
Definition at line 271 of file uacpi.h.
Referenced by uacpi_acquire_global_lock().