|
ReactOS 0.4.17-dev-795-gdc6be46
|
#include <uacpi/status.h>#include <uacpi/platform/types.h>#include <uacpi/platform/compiler.h>#include <uacpi/platform/arch_helpers.h>#include <uacpi/platform/config.h>

Go to the source code of this file.
Classes | |
| union | uacpi_object_name |
| struct | uacpi_pci_address |
| struct | uacpi_data_view |
| struct | uacpi_object_array |
| struct | uacpi_processor_info |
| struct | uacpi_power_resource_info |
| struct | uacpi_generic_region_info |
| struct | uacpi_pcc_region_info |
| struct | uacpi_gpio_region_info |
| struct | uacpi_region_attach_data |
| struct | uacpi_region_rw_data |
| struct | uacpi_region_pcc_send_data |
| struct | uacpi_region_gpio_rw_data |
| struct | uacpi_region_ipmi_rw_data |
| struct | uacpi_region_prm_rw_data |
| struct | uacpi_region_serial_rw_data |
| struct | uacpi_region_detach_data |
| struct | uacpi_firmware_request |
Macros | |
| #define | UACPI_INTERRUPT_NOT_HANDLED 0 |
| #define | UACPI_INTERRUPT_HANDLED 1 |
| typedef struct uacpi_data_view uacpi_data_view |
| typedef void* uacpi_handle |
| typedef enum uacpi_init_level uacpi_init_level |
| typedef uacpi_interrupt_ret(* uacpi_interrupt_handler) (uacpi_handle) |
| typedef uacpi_u32 uacpi_interrupt_ret |
| typedef uacpi_u64 uacpi_io_addr |
| typedef uacpi_status(* uacpi_notify_handler) (uacpi_handle context, uacpi_namespace_node *node, uacpi_u64 value) |
| typedef struct uacpi_object uacpi_object |
| typedef union uacpi_object_name uacpi_object_name |
| typedef enum uacpi_object_type uacpi_object_type |
| typedef struct uacpi_pci_address uacpi_pci_address |
| typedef uacpi_u64 uacpi_phys_addr |
| typedef uacpi_status(* uacpi_region_handler) (uacpi_region_op op, uacpi_handle op_data) |
| typedef enum uacpi_region_op uacpi_region_op |
Definition at line 474 of file types.h.
Definition at line 42 of file types.h.
| Enumerator | |
|---|---|
| UACPI_FIRMWARE_REQUEST_TYPE_BREAKPOINT | |
| UACPI_FIRMWARE_REQUEST_TYPE_FATAL | |
Definition at line 516 of file types.h.
| Enumerator | |
|---|---|
| UACPI_INIT_LEVEL_EARLY | |
| UACPI_INIT_LEVEL_SUBSYSTEM_INITIALIZED | State after a successfull call to uacpi_initialize. Table API and other helpers that don't depend on the ACPI namespace may be used. |
| UACPI_INIT_LEVEL_NAMESPACE_LOADED | State after a successfull call to uacpi_namespace_load. Most API may be used, namespace can be iterated, etc. |
| UACPI_INIT_LEVEL_NAMESPACE_INITIALIZED | The final initialization stage, this is entered after the call to uacpi_namespace_initialize. All API is available to use. |
Definition at line 64 of file types.h.
Definition at line 28 of file types.h.
Definition at line 110 of file types.h.
| Enumerator | |
|---|---|
| UACPI_OVERFLOW_ALLOW | |
| UACPI_OVERFLOW_TRUNCATE | |
| UACPI_OVERFLOW_DISALLOW | |
Definition at line 373 of file types.h.
| const uacpi_char * uacpi_address_space_to_string | ( | uacpi_address_space | space | ) |
Definition at line 11 of file types.c.
Referenced by gas_validate(), reg_or_unreg_all_opregions(), trace_region_io(), uacpi_reboot(), and uacpi_trace_region_error().
| uacpi_status uacpi_object_assign_buffer | ( | uacpi_object * | obj, |
| uacpi_data_view | in | ||
| ) |
Definition at line 1142 of file types.c.
| uacpi_status uacpi_object_assign_integer | ( | uacpi_object * | obj, |
| uacpi_u64 | value | ||
| ) |
Definition at line 1031 of file types.c.
| uacpi_status uacpi_object_assign_package | ( | uacpi_object * | obj, |
| uacpi_object_array | in | ||
| ) |
Make the provided object a package and store all of the objects in the array inside. The array is allowed to be empty.
NOTE: the reference count of each object is incremented before being stored in the object. Client code must remove all of the locally created references at its own discretion.
Definition at line 1325 of file types.c.
Referenced by uacpi_object_create_package().
| uacpi_status uacpi_object_assign_reference | ( | uacpi_object * | obj, |
| uacpi_object * | child | ||
| ) |
Make the provided object a reference and make it point to 'child'.
NOTE: child's reference count is incremented by one. Client code must remove all of the locally created references at its own discretion.
Definition at line 1264 of file types.c.
| uacpi_status uacpi_object_assign_string | ( | uacpi_object * | obj, |
| uacpi_data_view | in | ||
| ) |
Make the provided object a string/buffer. Takes in a constant view of the data to be stored in the object.
NOTE: The data is copied to a separately allocated buffer and is not taken ownership of.
| uacpi_object * uacpi_object_create_buffer | ( | uacpi_data_view | view | ) |
Definition at line 1223 of file types.c.
| uacpi_object * uacpi_object_create_cstring | ( | const uacpi_char * | str | ) |
Definition at line 1228 of file types.c.
| uacpi_object * uacpi_object_create_integer | ( | uacpi_u64 | value | ) |
Create an integer object with the value provided.
Definition at line 1186 of file types.c.
Referenced by uacpi_object_create_integer_safe().
| uacpi_status uacpi_object_create_integer_safe | ( | uacpi_u64 | value, |
| uacpi_overflow_behavior | behavior, | ||
| uacpi_object ** | out_obj | ||
| ) |
Same as uacpi_object_create_integer, but introduces additional ways to control what happens if the provided integer is larger than 32-bits, and the AML code expects 32-bit integers.
Definition at line 1152 of file types.c.
| uacpi_object * uacpi_object_create_package | ( | uacpi_object_array | in | ) |
Create a package object and store all of the objects in the array inside. The array is allowed to be empty.
NOTE: the reference count of each object is incremented before being stored in the object. Client code must remove all of the locally created references at its own discretion.
Definition at line 1354 of file types.c.
| uacpi_object * uacpi_object_create_reference | ( | uacpi_object * | child | ) |
| uacpi_object * uacpi_object_create_string | ( | uacpi_data_view | view | ) |
Create a string/buffer object. Takes in a constant view of the data.
NOTE: The data is copied to a separately allocated buffer and is not taken ownership of.
Definition at line 1218 of file types.c.
Referenced by uacpi_object_create_cstring().
| uacpi_object * uacpi_object_create_uninitialized | ( | void | ) |
Create an uninitialized object. The object can be further overwritten via uacpi_object_assign_* to anything.
Definition at line 1147 of file types.c.
Referenced by uacpi_object_create_package().
| uacpi_status uacpi_object_get_buffer | ( | uacpi_object * | obj, |
| uacpi_data_view * | out | ||
| ) |
Definition at line 1075 of file types.c.
| uacpi_status uacpi_object_get_dereferenced | ( | uacpi_object * | obj, |
| uacpi_object ** | out | ||
| ) |
| uacpi_status uacpi_object_get_integer | ( | uacpi_object * | obj, |
| uacpi_u64 * | out | ||
| ) |
| uacpi_status uacpi_object_get_package | ( | uacpi_object * | obj, |
| uacpi_object_array * | out | ||
| ) |
Returns the list of objects stored in a package object.
NOTE: the reference count of the objects stored inside is not incremented, which means destorying/overwriting the object also potentially destroys all of the objects stored inside unless the reference count is incremented by the client via uacpi_object_ref.
Definition at line 1237 of file types.c.
| uacpi_status uacpi_object_get_power_resource_info | ( | uacpi_object * | obj, |
| uacpi_power_resource_info * | out | ||
| ) |
| uacpi_status uacpi_object_get_processor_info | ( | uacpi_object * | obj, |
| uacpi_processor_info * | out | ||
| ) |
| uacpi_status uacpi_object_get_string | ( | uacpi_object * | obj, |
| uacpi_data_view * | out | ||
| ) |
| uacpi_status uacpi_object_get_string_or_buffer | ( | uacpi_object * | obj, |
| uacpi_data_view * | out | ||
| ) |
Returns a writable view of the data stored in the string or buffer type object.
Definition at line 1059 of file types.c.
Referenced by uacpi_dispatch_opregion_io().
| uacpi_object_type uacpi_object_get_type | ( | uacpi_object * | obj | ) |
| uacpi_object_type_bits uacpi_object_get_type_bit | ( | uacpi_object * | obj | ) |
Definition at line 987 of file types.c.
Referenced by uacpi_object_is_one_of().
| uacpi_bool uacpi_object_is | ( | uacpi_object * | obj, |
| uacpi_object_type | type | ||
| ) |
Returns UACPI_TRUE if the provided object's type matches this type.
Definition at line 992 of file types.c.
Referenced by object_mutate_refcount(), and object_replace_child().
| uacpi_bool uacpi_object_is_aml_namepath | ( | uacpi_object * | obj | ) |
Returns UACPI_TRUE if the provided string object is actually an AML namepath.
This can only be the case for package elements. If a package element is specified as a path to an object in AML, it's not resolved by the interpreter right away as it might not have been defined at that point yet, and is instead stored as a special string object to be resolved by client code when needed.
Example usage: uacpi_namespace_node *target_node = UACPI_NULL;
uacpi_object *obj = UACPI_NULL; uacpi_eval(scope, path, UACPI_NULL, &obj);
uacpi_object_array arr; uacpi_object_get_package(obj, &arr);
if (uacpi_object_is_aml_namepath(arr.objects[0])) { uacpi_object_resolve_as_aml_namepath( arr.objects[0], scope, &target_node ); }
Definition at line 1082 of file types.c.
Referenced by uacpi_object_resolve_as_aml_namepath().
| uacpi_bool uacpi_object_is_one_of | ( | uacpi_object * | obj, |
| uacpi_object_type_bits | type_mask | ||
| ) |
Returns UACPI_TRUE if the provided object's type is one of the values specified in the 'type_mask' of UACPI_OBJECT_*_BIT.
Definition at line 997 of file types.c.
Referenced by exec_op(), handle_deref_of(), uacpi_namespace_node_acquire_object_typed(), uacpi_namespace_node_get_object_typed(), and uacpi_namespace_node_is_one_of_unlocked().
| void uacpi_object_ref | ( | uacpi_object * | obj | ) |
Definition at line 734 of file types.c.
Referenced by exec_op(), handle_arg_or_local(), handle_create_alias(), handle_create_field(), handle_deref_of(), handle_index(), handle_load_table(), handle_named_object(), handle_ref_of(), prepare_method_call(), uacpi_dispatch_opregion_io(), uacpi_execute_control_method(), uacpi_namespace_node_acquire_object_typed(), uacpi_namespace_node_reacquire_object(), uacpi_notify_all(), uacpi_object_assign_package(), uacpi_object_attach_child(), and uacpi_opregion_attach().
| uacpi_status uacpi_object_resolve_as_aml_namepath | ( | uacpi_object * | obj, |
| uacpi_namespace_node * | scope, | ||
| uacpi_namespace_node ** | out_node | ||
| ) |
Resolve an AML namepath contained in a string object.
This is only applicable to objects that are package elements. See an explanation of how this works in the comment above the declaration of uacpi_object_is_aml_namepath.
This is a shorthand for: uacpi_data_view view; uacpi_object_get_string(object, &view);
target_node = uacpi_namespace_node_resolve_from_aml_namepath( scope, view.text );
Definition at line 1088 of file types.c.
Referenced by uacpi_get_pci_routing_table().
| const uacpi_char * uacpi_object_type_to_string | ( | uacpi_object_type | type | ) |
Definition at line 51 of file types.c.
Referenced by debug_store_no_recurse(), ensure_is_a_field_unit(), ensure_is_an_op_region(), ensure_valid_idx(), exec_op(), get_slp_type_for_state(), handle_binary_logic(), handle_event_ctl(), handle_inc_dec(), handle_index(), handle_load(), handle_mid(), handle_mutex_ctl(), handle_sizeof(), object_assign_with_implicit_cast(), store_to_target(), typecheck_computational_data(), typecheck_obj(), uacpi_eval_cid(), uacpi_get_pci_routing_table(), and uacpi_osi().
| void uacpi_object_unref | ( | uacpi_object * | obj | ) |
Definition at line 762 of file types.c.
Referenced by call_frame_clear(), copy_object_to_reference(), eval_sleep_helper(), exec_op(), execution_context_release(), extract_native_resources_from_method(), free_field_unit(), get_slp_type_for_state(), handle_arg_or_local(), handle_copy_object_or_store(), handle_create_field(), handle_deref_of(), handle_index(), handle_load_table(), handle_package(), make_object_for_predefined(), namespace_node_detach_object(), pop_item(), region_run_reg(), store_to_reference(), uacpi_deinitialize_namespace(), uacpi_dispatch_opregion_io(), uacpi_eval(), uacpi_eval_cid(), uacpi_eval_cls(), uacpi_eval_dstate_method_template(), uacpi_eval_hid(), uacpi_eval_integer(), uacpi_eval_typed(), uacpi_eval_uid(), uacpi_get_pci_routing_table(), uacpi_initialize_namespace(), uacpi_install_notify_handler(), uacpi_namespace_node_release_object(), uacpi_native_resources_to_aml(), uacpi_object_create_package(), uacpi_object_detach_child(), uacpi_object_do_create_string_or_buffer(), uacpi_opregion_attach(), uacpi_set_interrupt_model(), uacpi_set_resources(), and uacpi_uninstall_notify_handler().