|
ReactOS 0.4.17-dev-684-ga6524ef
|
#include <uacpi/types.h>#include <uacpi/status.h>#include <uacpi/uacpi.h>#include <uacpi/internal/context.h>#include <uacpi/internal/utilities.h>#include <uacpi/internal/log.h>#include <uacpi/internal/namespace.h>
Go to the source code of this file.
Classes | |
| struct | device_find_ctx |
Macros | |
| #define | PNP_ID_LENGTH 8 |
| #define | CLS_REPR_SIZE 7 |
| #define | NODE_INFO_EVAL_ADD_ID(name) |
| #define | NODE_INFO_COPY_ID(name, flag) |
Enumerations | |
| enum | char_type { CHAR_TYPE_CONTROL = 1 << 0 , CHAR_TYPE_SPACE = 1 << 1 , CHAR_TYPE_BLANK = 1 << 2 , CHAR_TYPE_PUNCTUATION = 1 << 3 , CHAR_TYPE_LOWER = 1 << 4 , CHAR_TYPE_UPPER = 1 << 5 , CHAR_TYPE_DIGIT = 1 << 6 , CHAR_TYPE_HEX_DIGIT = 1 << 7 , CHAR_TYPE_ALPHA = CHAR_TYPE_LOWER | CHAR_TYPE_UPPER , CHAR_TYPE_ALHEX = CHAR_TYPE_ALPHA | CHAR_TYPE_HEX_DIGIT , CHAR_TYPE_ALNUM = CHAR_TYPE_ALPHA | CHAR_TYPE_DIGIT } |
Variables | |
| static const uacpi_u8 | ascii_map [256] |
| #define CLS_REPR_SIZE 7 |
Definition at line 605 of file utilities.c.
Definition at line 786 of file utilities.c.
Definition at line 777 of file utilities.c.
| #define PNP_ID_LENGTH 8 |
Definition at line 369 of file utilities.c.
| Enumerator | |
|---|---|
| CHAR_TYPE_CONTROL | |
| CHAR_TYPE_SPACE | |
| CHAR_TYPE_BLANK | |
| CHAR_TYPE_PUNCTUATION | |
| CHAR_TYPE_LOWER | |
| CHAR_TYPE_UPPER | |
| CHAR_TYPE_DIGIT | |
| CHAR_TYPE_HEX_DIGIT | |
| CHAR_TYPE_ALPHA | |
| CHAR_TYPE_ALHEX | |
| CHAR_TYPE_ALNUM | |
Definition at line 10 of file utilities.c.
|
static |
Definition at line 205 of file utilities.c.
Referenced by uacpi_string_to_integer().
|
static |
Definition at line 219 of file utilities.c.
Referenced by uacpi_string_to_integer().
|
static |
Definition at line 193 of file utilities.c.
Referenced by uacpi_string_to_integer().
|
static |
Definition at line 607 of file utilities.c.
Referenced by uacpi_eval_cls().
|
static |
Definition at line 944 of file utilities.c.
Referenced by uacpi_find_devices_at().
|
static |
|
inlinestatic |
Definition at line 299 of file utilities.c.
Referenced by uacpi_is_valid_nameseg().
|
static |
Definition at line 726 of file utilities.c.
Referenced by uacpi_device_matches_pnp_id().
|
static |
Definition at line 182 of file utilities.c.
Referenced by consume_if(), consume_if_equals(), and consume_one().
|
static |
Definition at line 174 of file utilities.c.
| uacpi_bool uacpi_device_matches_pnp_id | ( | uacpi_namespace_node * | node, |
| const uacpi_char *const * | list | ||
| ) |
Checks whether the device at 'node' matches any of the PNP ids provided in 'list' (terminated by a UACPI_NULL). This is done by first attempting to match the value returned from _HID and then the value(s) from _CID.
Note that the presence of the device (_STA) is not verified here.
Definition at line 905 of file utilities.c.
Referenced by find_one_device(), and find_pci_root().
| void uacpi_eisa_id_to_string | ( | uacpi_u32 | id, |
| uacpi_char * | out_string | ||
| ) |
Definition at line 323 of file utilities.c.
Referenced by uacpi_eval_cid(), and uacpi_eval_hid().
| uacpi_status uacpi_eval_adr | ( | uacpi_namespace_node * | node, |
| uacpi_u64 * | out | ||
| ) |
Evaluate a device's _ADR method and get its value.
Definition at line 600 of file utilities.c.
Referenced by uacpi_get_namespace_node_info().
| uacpi_status uacpi_eval_cid | ( | uacpi_namespace_node * | node, |
| uacpi_pnp_id_list ** | out_list | ||
| ) |
Evaluate a device's _CID method and get its value. The returned structure must be freed using uacpi_free_pnp_id_list.
Definition at line 446 of file utilities.c.
Referenced by uacpi_device_matches_pnp_id().
| uacpi_status uacpi_eval_cls | ( | uacpi_namespace_node * | node, |
| uacpi_id_string ** | out_id | ||
| ) |
Evaluate a device's _CLS method and get its value. The format of returned string is BBSSPP where: BB => Base Class (e.g. 01 => Mass Storage) SS => Sub-Class (e.g. 06 => SATA) PP => Programming Interface (e.g. 01 => AHCI) The returned struture must be freed using uacpi_free_id_string.
Definition at line 621 of file utilities.c.
|
static |
Definition at line 740 of file utilities.c.
Referenced by uacpi_get_namespace_node_info().
| uacpi_status uacpi_eval_hid | ( | uacpi_namespace_node * | node, |
| uacpi_id_string ** | out_id | ||
| ) |
Evaluate a device's _HID method and get its value. The returned struture must be freed using uacpi_free_id_string.
Definition at line 371 of file utilities.c.
Referenced by uacpi_device_matches_pnp_id().
| uacpi_status uacpi_eval_sta | ( | uacpi_namespace_node * | node, |
| uacpi_u32 * | flags | ||
| ) |
Evaluate a device's _STA method and get its value. If this method is not found, the value of 'flags' is set to all ones.
Definition at line 577 of file utilities.c.
Referenced by find_one_device(), and sta_eval().
| uacpi_status uacpi_eval_uid | ( | uacpi_namespace_node * | node, |
| uacpi_id_string ** | out_uid | ||
| ) |
Evaluate a device's _UID method and get its value. The returned struture must be freed using uacpi_free_id_string.
Definition at line 664 of file utilities.c.
| uacpi_status uacpi_find_devices | ( | const uacpi_char * | hid, |
| uacpi_iteration_callback | cb, | ||
| void * | user | ||
| ) |
Same as uacpi_find_devices_at, except this starts at the root and only matches one hid.
Definition at line 986 of file utilities.c.
| uacpi_status uacpi_find_devices_at | ( | uacpi_namespace_node * | parent, |
| const uacpi_char *const * | hids, | ||
| uacpi_iteration_callback | cb, | ||
| void * | user | ||
| ) |
Find all the devices in the namespace starting at 'parent' matching the specified 'hids' (terminated by a UACPI_NULL) against any value from _HID or _CID. Only devices reported as present via _STA are checked. Any matching devices are then passed to the 'cb'.
Definition at line 967 of file utilities.c.
Referenced by uacpi_find_devices().
| void uacpi_free_dynamic_string | ( | const uacpi_char * | str | ) |
Definition at line 1148 of file utilities.c.
Referenced by handle_notify(), trace_invalid_return_type(), trace_method_abort(), trace_named_object_lookup_or_creation_failure(), trace_region_io(), uacpi_deinitialize_interfaces(), uacpi_dispatch_opregion_io(), uacpi_eval_dstate_method_template(), uacpi_free_absolute_path(), uacpi_trace_region_error(), and uacpi_uninstall_interface().
| void uacpi_free_id_string | ( | uacpi_id_string * | id | ) |
Definition at line 438 of file utilities.c.
Referenced by uacpi_device_matches_pnp_id(), and uacpi_get_namespace_node_info().
| void uacpi_free_namespace_node_info | ( | uacpi_namespace_node_info * | info | ) |
Definition at line 897 of file utilities.c.
| void uacpi_free_pci_routing_table | ( | uacpi_pci_routing_table * | table | ) |
Definition at line 1136 of file utilities.c.
Referenced by uacpi_get_pci_routing_table().
| void uacpi_free_pnp_id_list | ( | uacpi_pnp_id_list * | list | ) |
Definition at line 569 of file utilities.c.
Referenced by uacpi_device_matches_pnp_id(), and uacpi_get_namespace_node_info().
| uacpi_status uacpi_get_namespace_node_info | ( | uacpi_namespace_node * | node, |
| uacpi_namespace_node_info ** | out_info | ||
| ) |
Retrieve information about a namespace node. This includes the attached object's type, name, number of parameters (if it's a method), the result of evaluating _ADR, _UID, _CLS, _HID, _CID, as well as _SxD and _SxW.
The returned structure must be freed with uacpi_free_namespace_node_info.
Definition at line 797 of file utilities.c.
| uacpi_status uacpi_get_pci_routing_table | ( | uacpi_namespace_node * | parent, |
| uacpi_pci_routing_table ** | out_table | ||
| ) |
Definition at line 1024 of file utilities.c.
| uacpi_bool uacpi_is_valid_nameseg | ( | uacpi_u8 * | nameseg | ) |
Definition at line 315 of file utilities.c.
Referenced by parse_nameseg().
| uacpi_status uacpi_set_interrupt_model | ( | uacpi_interrupt_model | model | ) |
Definition at line 999 of file utilities.c.
| uacpi_status uacpi_string_to_integer | ( | const uacpi_char * | str, |
| uacpi_size | max_chars, | ||
| enum uacpi_base | base, | ||
| uacpi_u64 * | out_value | ||
| ) |
Definition at line 233 of file utilities.c.
Referenced by do_match_gpe_methods(), object_to_integer(), and parse_number().
Definition at line 24 of file utilities.c.
Referenced by is_char(), is_valid_name_byte(), and uacpi_string_to_integer().