ReactOS 0.4.17-dev-795-gdc6be46
types.h File Reference
Include dependency graph for types.h:
This graph shows which files directly or indirectly include this file:

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
 

Typedefs

typedef uacpi_u64 uacpi_phys_addr
 
typedef uacpi_u64 uacpi_io_addr
 
typedef voiduacpi_handle
 
typedef union uacpi_object_name uacpi_object_name
 
typedef enum uacpi_iteration_decision uacpi_iteration_decision
 
typedef enum uacpi_address_space uacpi_address_space
 
typedef enum uacpi_init_level uacpi_init_level
 
typedef struct uacpi_pci_address uacpi_pci_address
 
typedef struct uacpi_data_view uacpi_data_view
 
typedef struct uacpi_namespace_node uacpi_namespace_node
 
typedef enum uacpi_object_type uacpi_object_type
 
typedef enum uacpi_object_type_bits uacpi_object_type_bits
 
typedef struct uacpi_object uacpi_object
 
typedef enum uacpi_overflow_behavior uacpi_overflow_behavior
 
typedef struct uacpi_object_array uacpi_object_array
 
typedef struct uacpi_processor_info uacpi_processor_info
 
typedef struct uacpi_power_resource_info uacpi_power_resource_info
 
typedef enum uacpi_region_op uacpi_region_op
 
typedef struct uacpi_generic_region_info uacpi_generic_region_info
 
typedef struct uacpi_pcc_region_info uacpi_pcc_region_info
 
typedef struct uacpi_gpio_region_info uacpi_gpio_region_info
 
typedef struct uacpi_region_attach_data uacpi_region_attach_data
 
typedef struct uacpi_region_rw_data uacpi_region_rw_data
 
typedef struct uacpi_region_pcc_send_data uacpi_region_pcc_send_data
 
typedef struct uacpi_region_gpio_rw_data uacpi_region_gpio_rw_data
 
typedef struct uacpi_region_ipmi_rw_data uacpi_region_ipmi_rw_data
 
typedef uacpi_region_ipmi_rw_data uacpi_region_ffixedhw_rw_data
 
typedef struct uacpi_region_prm_rw_data uacpi_region_prm_rw_data
 
typedef enum uacpi_access_attribute uacpi_access_attribute
 
typedef struct uacpi_region_serial_rw_data uacpi_region_serial_rw_data
 
typedef struct uacpi_region_detach_data uacpi_region_detach_data
 
typedef uacpi_status(* uacpi_region_handler) (uacpi_region_op op, uacpi_handle op_data)
 
typedef uacpi_status(* uacpi_notify_handler) (uacpi_handle context, uacpi_namespace_node *node, uacpi_u64 value)
 
typedef enum uacpi_firmware_request_type uacpi_firmware_request_type
 
typedef struct uacpi_firmware_request uacpi_firmware_request
 
typedef uacpi_u32 uacpi_interrupt_ret
 
typedef uacpi_interrupt_ret(* uacpi_interrupt_handler) (uacpi_handle)
 

Enumerations

enum  uacpi_iteration_decision { UACPI_ITERATION_DECISION_CONTINUE = 0 , UACPI_ITERATION_DECISION_BREAK , UACPI_ITERATION_DECISION_NEXT_PEER }
 
enum  uacpi_address_space {
  UACPI_ADDRESS_SPACE_SYSTEM_MEMORY = 0 , UACPI_ADDRESS_SPACE_SYSTEM_IO = 1 , UACPI_ADDRESS_SPACE_PCI_CONFIG = 2 , UACPI_ADDRESS_SPACE_EMBEDDED_CONTROLLER = 3 ,
  UACPI_ADDRESS_SPACE_SMBUS = 4 , UACPI_ADDRESS_SPACE_SYSTEM_CMOS = 5 , UACPI_ADDRESS_SPACE_PCI_BAR_TARGET = 6 , UACPI_ADDRESS_SPACE_IPMI = 7 ,
  UACPI_ADDRESS_SPACE_GENERAL_PURPOSE_IO = 8 , UACPI_ADDRESS_SPACE_GENERIC_SERIAL_BUS = 9 , UACPI_ADDRESS_SPACE_PCC = 0x0A , UACPI_ADDRESS_SPACE_PRM = 0x0B ,
  UACPI_ADDRESS_SPACE_FFIXEDHW = 0x7F , UACPI_ADDRESS_SPACE_TABLE_DATA = 0xDA1A
}
 
enum  uacpi_init_level { UACPI_INIT_LEVEL_EARLY = 0 , UACPI_INIT_LEVEL_SUBSYSTEM_INITIALIZED = 1 , UACPI_INIT_LEVEL_NAMESPACE_LOADED = 2 , UACPI_INIT_LEVEL_NAMESPACE_INITIALIZED = 3 }
 
enum  uacpi_object_type {
  UACPI_OBJECT_UNINITIALIZED = 0 , UACPI_OBJECT_INTEGER = 1 , UACPI_OBJECT_STRING = 2 , UACPI_OBJECT_BUFFER = 3 ,
  UACPI_OBJECT_PACKAGE = 4 , UACPI_OBJECT_FIELD_UNIT = 5 , UACPI_OBJECT_DEVICE = 6 , UACPI_OBJECT_EVENT = 7 ,
  UACPI_OBJECT_METHOD = 8 , UACPI_OBJECT_MUTEX = 9 , UACPI_OBJECT_OPERATION_REGION = 10 , UACPI_OBJECT_POWER_RESOURCE = 11 ,
  UACPI_OBJECT_PROCESSOR = 12 , UACPI_OBJECT_THERMAL_ZONE = 13 , UACPI_OBJECT_BUFFER_FIELD = 14 , UACPI_OBJECT_DEBUG = 16 ,
  UACPI_OBJECT_REFERENCE = 20 , UACPI_OBJECT_BUFFER_INDEX = 21 , UACPI_OBJECT_MAX_TYPE_VALUE = UACPI_OBJECT_BUFFER_INDEX
}
 
enum  uacpi_object_type_bits {
  UACPI_OBJECT_INTEGER_BIT = (1 << UACPI_OBJECT_INTEGER) , UACPI_OBJECT_STRING_BIT = (1 << UACPI_OBJECT_STRING) , UACPI_OBJECT_BUFFER_BIT = (1 << UACPI_OBJECT_BUFFER) , UACPI_OBJECT_PACKAGE_BIT = (1 << UACPI_OBJECT_PACKAGE) ,
  UACPI_OBJECT_FIELD_UNIT_BIT = (1 << UACPI_OBJECT_FIELD_UNIT) , UACPI_OBJECT_DEVICE_BIT = (1 << UACPI_OBJECT_DEVICE) , UACPI_OBJECT_EVENT_BIT = (1 << UACPI_OBJECT_EVENT) , UACPI_OBJECT_METHOD_BIT = (1 << UACPI_OBJECT_METHOD) ,
  UACPI_OBJECT_MUTEX_BIT = (1 << UACPI_OBJECT_MUTEX) , UACPI_OBJECT_OPERATION_REGION_BIT = (1 << UACPI_OBJECT_OPERATION_REGION) , UACPI_OBJECT_POWER_RESOURCE_BIT = (1 << UACPI_OBJECT_POWER_RESOURCE) , UACPI_OBJECT_PROCESSOR_BIT = (1 << UACPI_OBJECT_PROCESSOR) ,
  UACPI_OBJECT_THERMAL_ZONE_BIT = (1 << UACPI_OBJECT_THERMAL_ZONE) , UACPI_OBJECT_BUFFER_FIELD_BIT = (1 << UACPI_OBJECT_BUFFER_FIELD) , UACPI_OBJECT_DEBUG_BIT = (1 << UACPI_OBJECT_DEBUG) , UACPI_OBJECT_REFERENCE_BIT = (1 << UACPI_OBJECT_REFERENCE) ,
  UACPI_OBJECT_BUFFER_INDEX_BIT = (1 << UACPI_OBJECT_BUFFER_INDEX) , UACPI_OBJECT_ANY_BIT = 0xFFFFFFFF
}
 
enum  uacpi_overflow_behavior { UACPI_OVERFLOW_ALLOW = 0 , UACPI_OVERFLOW_TRUNCATE , UACPI_OVERFLOW_DISALLOW }
 
enum  uacpi_region_op {
  UACPI_REGION_OP_ATTACH = 0 , UACPI_REGION_OP_DETACH , UACPI_REGION_OP_READ , UACPI_REGION_OP_WRITE ,
  UACPI_REGION_OP_PCC_SEND , UACPI_REGION_OP_GPIO_READ , UACPI_REGION_OP_GPIO_WRITE , UACPI_REGION_OP_IPMI_COMMAND ,
  UACPI_REGION_OP_FFIXEDHW_COMMAND , UACPI_REGION_OP_PRM_COMMAND , UACPI_REGION_OP_SERIAL_READ , UACPI_REGION_OP_SERIAL_WRITE
}
 
enum  uacpi_access_attribute {
  UACPI_ACCESS_ATTRIBUTE_QUICK = 0x02 , UACPI_ACCESS_ATTRIBUTE_SEND_RECEIVE = 0x04 , UACPI_ACCESS_ATTRIBUTE_BYTE = 0x06 , UACPI_ACCESS_ATTRIBUTE_WORD = 0x08 ,
  UACPI_ACCESS_ATTRIBUTE_BLOCK = 0x0A , UACPI_ACCESS_ATTRIBUTE_BYTES = 0x0B , UACPI_ACCESS_ATTRIBUTE_PROCESS_CALL = 0x0C , UACPI_ACCESS_ATTRIBUTE_BLOCK_PROCESS_CALL = 0x0D ,
  UACPI_ACCESS_ATTRIBUTE_RAW_BYTES = 0x0E , UACPI_ACCESS_ATTRIBUTE_RAW_PROCESS_BYTES = 0x0F
}
 
enum  uacpi_firmware_request_type { UACPI_FIRMWARE_REQUEST_TYPE_BREAKPOINT , UACPI_FIRMWARE_REQUEST_TYPE_FATAL }
 

Functions

const uacpi_charuacpi_address_space_to_string (uacpi_address_space space)
 
void uacpi_object_ref (uacpi_object *obj)
 
void uacpi_object_unref (uacpi_object *obj)
 
uacpi_object_type uacpi_object_get_type (uacpi_object *)
 
uacpi_object_type_bits uacpi_object_get_type_bit (uacpi_object *)
 
uacpi_bool uacpi_object_is (uacpi_object *, uacpi_object_type)
 
uacpi_bool uacpi_object_is_one_of (uacpi_object *, uacpi_object_type_bits type_mask)
 
const uacpi_charuacpi_object_type_to_string (uacpi_object_type)
 
uacpi_objectuacpi_object_create_uninitialized (void)
 
uacpi_objectuacpi_object_create_integer (uacpi_u64)
 
uacpi_status uacpi_object_create_integer_safe (uacpi_u64, uacpi_overflow_behavior, uacpi_object **out_obj)
 
uacpi_status uacpi_object_assign_integer (uacpi_object *, uacpi_u64 value)
 
uacpi_status uacpi_object_get_integer (uacpi_object *, uacpi_u64 *out)
 
uacpi_objectuacpi_object_create_string (uacpi_data_view)
 
uacpi_objectuacpi_object_create_cstring (const uacpi_char *)
 
uacpi_objectuacpi_object_create_buffer (uacpi_data_view)
 
uacpi_status uacpi_object_get_string_or_buffer (uacpi_object *, uacpi_data_view *out)
 
uacpi_status uacpi_object_get_string (uacpi_object *, uacpi_data_view *out)
 
uacpi_status uacpi_object_get_buffer (uacpi_object *, uacpi_data_view *out)
 
uacpi_bool uacpi_object_is_aml_namepath (uacpi_object *)
 
uacpi_status uacpi_object_resolve_as_aml_namepath (uacpi_object *, uacpi_namespace_node *scope, uacpi_namespace_node **out_node)
 
uacpi_status uacpi_object_assign_string (uacpi_object *, uacpi_data_view in)
 
uacpi_status uacpi_object_assign_buffer (uacpi_object *, uacpi_data_view in)
 
uacpi_objectuacpi_object_create_package (uacpi_object_array in)
 
uacpi_status uacpi_object_get_package (uacpi_object *, uacpi_object_array *out)
 
uacpi_status uacpi_object_assign_package (uacpi_object *, uacpi_object_array in)
 
uacpi_objectuacpi_object_create_reference (uacpi_object *child)
 
uacpi_status uacpi_object_assign_reference (uacpi_object *, uacpi_object *child)
 
uacpi_status uacpi_object_get_dereferenced (uacpi_object *, uacpi_object **out)
 
uacpi_status uacpi_object_get_processor_info (uacpi_object *, uacpi_processor_info *out)
 
uacpi_status uacpi_object_get_power_resource_info (uacpi_object *, uacpi_power_resource_info *out)
 

Macro Definition Documentation

◆ UACPI_INTERRUPT_HANDLED

#define UACPI_INTERRUPT_HANDLED   1

Definition at line 541 of file types.h.

◆ UACPI_INTERRUPT_NOT_HANDLED

#define UACPI_INTERRUPT_NOT_HANDLED   0

Definition at line 540 of file types.h.

Typedef Documentation

◆ uacpi_access_attribute

◆ uacpi_address_space

◆ uacpi_data_view

◆ uacpi_firmware_request

◆ uacpi_firmware_request_type

◆ uacpi_generic_region_info

◆ uacpi_gpio_region_info

◆ uacpi_handle

typedef void* uacpi_handle

Definition at line 21 of file types.h.

◆ uacpi_init_level

◆ uacpi_interrupt_handler

typedef uacpi_interrupt_ret(* uacpi_interrupt_handler) (uacpi_handle)

Definition at line 544 of file types.h.

◆ uacpi_interrupt_ret

Definition at line 542 of file types.h.

◆ uacpi_io_addr

Definition at line 18 of file types.h.

◆ uacpi_iteration_decision

◆ uacpi_namespace_node

Definition at line 108 of file types.h.

◆ uacpi_notify_handler

Definition at line 513 of file types.h.

◆ uacpi_object

Definition at line 155 of file types.h.

◆ uacpi_object_array

◆ uacpi_object_name

◆ uacpi_object_type

◆ uacpi_object_type_bits

◆ uacpi_overflow_behavior

◆ uacpi_pcc_region_info

◆ uacpi_pci_address

◆ uacpi_phys_addr

Definition at line 17 of file types.h.

◆ uacpi_power_resource_info

◆ uacpi_processor_info

◆ uacpi_region_attach_data

◆ uacpi_region_detach_data

◆ uacpi_region_ffixedhw_rw_data

◆ uacpi_region_gpio_rw_data

◆ uacpi_region_handler

typedef uacpi_status(* uacpi_region_handler) (uacpi_region_op op, uacpi_handle op_data)

Definition at line 510 of file types.h.

◆ uacpi_region_ipmi_rw_data

◆ uacpi_region_op

◆ uacpi_region_pcc_send_data

◆ uacpi_region_prm_rw_data

◆ uacpi_region_rw_data

◆ uacpi_region_serial_rw_data

Enumeration Type Documentation

◆ uacpi_access_attribute

Enumerator
UACPI_ACCESS_ATTRIBUTE_QUICK 
UACPI_ACCESS_ATTRIBUTE_SEND_RECEIVE 
UACPI_ACCESS_ATTRIBUTE_BYTE 
UACPI_ACCESS_ATTRIBUTE_WORD 
UACPI_ACCESS_ATTRIBUTE_BLOCK 
UACPI_ACCESS_ATTRIBUTE_BYTES 
UACPI_ACCESS_ATTRIBUTE_PROCESS_CALL 
UACPI_ACCESS_ATTRIBUTE_BLOCK_PROCESS_CALL 
UACPI_ACCESS_ATTRIBUTE_RAW_BYTES 
UACPI_ACCESS_ATTRIBUTE_RAW_PROCESS_BYTES 

Definition at line 474 of file types.h.

474 {
uacpi_access_attribute
Definition: types.h:474
@ UACPI_ACCESS_ATTRIBUTE_WORD
Definition: types.h:478
@ UACPI_ACCESS_ATTRIBUTE_PROCESS_CALL
Definition: types.h:481
@ UACPI_ACCESS_ATTRIBUTE_BLOCK_PROCESS_CALL
Definition: types.h:482
@ UACPI_ACCESS_ATTRIBUTE_BYTE
Definition: types.h:477
@ UACPI_ACCESS_ATTRIBUTE_QUICK
Definition: types.h:475
@ UACPI_ACCESS_ATTRIBUTE_SEND_RECEIVE
Definition: types.h:476
@ UACPI_ACCESS_ATTRIBUTE_RAW_BYTES
Definition: types.h:483
@ UACPI_ACCESS_ATTRIBUTE_BLOCK
Definition: types.h:479
@ UACPI_ACCESS_ATTRIBUTE_RAW_PROCESS_BYTES
Definition: types.h:484
@ UACPI_ACCESS_ATTRIBUTE_BYTES
Definition: types.h:480

◆ uacpi_address_space

Enumerator
UACPI_ADDRESS_SPACE_SYSTEM_MEMORY 
UACPI_ADDRESS_SPACE_SYSTEM_IO 
UACPI_ADDRESS_SPACE_PCI_CONFIG 
UACPI_ADDRESS_SPACE_EMBEDDED_CONTROLLER 
UACPI_ADDRESS_SPACE_SMBUS 
UACPI_ADDRESS_SPACE_SYSTEM_CMOS 
UACPI_ADDRESS_SPACE_PCI_BAR_TARGET 
UACPI_ADDRESS_SPACE_IPMI 
UACPI_ADDRESS_SPACE_GENERAL_PURPOSE_IO 
UACPI_ADDRESS_SPACE_GENERIC_SERIAL_BUS 
UACPI_ADDRESS_SPACE_PCC 
UACPI_ADDRESS_SPACE_PRM 
UACPI_ADDRESS_SPACE_FFIXEDHW 
UACPI_ADDRESS_SPACE_TABLE_DATA 

Definition at line 42 of file types.h.

42 {
56
57 // Internal type
uacpi_address_space
Definition: types.h:42
@ UACPI_ADDRESS_SPACE_IPMI
Definition: types.h:50
@ UACPI_ADDRESS_SPACE_PRM
Definition: types.h:54
@ UACPI_ADDRESS_SPACE_SYSTEM_MEMORY
Definition: types.h:43
@ UACPI_ADDRESS_SPACE_GENERAL_PURPOSE_IO
Definition: types.h:51
@ UACPI_ADDRESS_SPACE_FFIXEDHW
Definition: types.h:55
@ UACPI_ADDRESS_SPACE_PCI_CONFIG
Definition: types.h:45
@ UACPI_ADDRESS_SPACE_TABLE_DATA
Definition: types.h:58
@ UACPI_ADDRESS_SPACE_EMBEDDED_CONTROLLER
Definition: types.h:46
@ UACPI_ADDRESS_SPACE_SYSTEM_CMOS
Definition: types.h:48
@ UACPI_ADDRESS_SPACE_GENERIC_SERIAL_BUS
Definition: types.h:52
@ UACPI_ADDRESS_SPACE_SYSTEM_IO
Definition: types.h:44
@ UACPI_ADDRESS_SPACE_SMBUS
Definition: types.h:47
@ UACPI_ADDRESS_SPACE_PCC
Definition: types.h:53
@ UACPI_ADDRESS_SPACE_PCI_BAR_TARGET
Definition: types.h:49

◆ uacpi_firmware_request_type

Enumerator
UACPI_FIRMWARE_REQUEST_TYPE_BREAKPOINT 
UACPI_FIRMWARE_REQUEST_TYPE_FATAL 

Definition at line 516 of file types.h.

516 {
uacpi_firmware_request_type
Definition: types.h:516
@ UACPI_FIRMWARE_REQUEST_TYPE_FATAL
Definition: types.h:518
@ UACPI_FIRMWARE_REQUEST_TYPE_BREAKPOINT
Definition: types.h:517

◆ uacpi_init_level

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.

64 {
65 // Reboot state, nothing is available
67
73
79
uacpi_init_level
Definition: types.h:64
@ UACPI_INIT_LEVEL_EARLY
Definition: types.h:66
@ UACPI_INIT_LEVEL_SUBSYSTEM_INITIALIZED
Definition: types.h:72
@ UACPI_INIT_LEVEL_NAMESPACE_INITIALIZED
Definition: types.h:84
@ UACPI_INIT_LEVEL_NAMESPACE_LOADED
Definition: types.h:78

◆ uacpi_iteration_decision

Enumerator
UACPI_ITERATION_DECISION_CONTINUE 
UACPI_ITERATION_DECISION_BREAK 
UACPI_ITERATION_DECISION_NEXT_PEER 

Ignore all of the children of the current node and proceed directly to its peer nodes.

Only applicable for API that interacts with the AML namespace such as uacpi_namespace_for_each_child, uacpi_find_deivces, etc.

Definition at line 28 of file types.h.

28 {
31
uacpi_iteration_decision
Definition: types.h:28
@ UACPI_ITERATION_DECISION_BREAK
Definition: types.h:30
@ UACPI_ITERATION_DECISION_NEXT_PEER
Definition: types.h:39
@ UACPI_ITERATION_DECISION_CONTINUE
Definition: types.h:29

◆ uacpi_object_type

Enumerator
UACPI_OBJECT_UNINITIALIZED 
UACPI_OBJECT_INTEGER 
UACPI_OBJECT_STRING 
UACPI_OBJECT_BUFFER 
UACPI_OBJECT_PACKAGE 
UACPI_OBJECT_FIELD_UNIT 
UACPI_OBJECT_DEVICE 
UACPI_OBJECT_EVENT 
UACPI_OBJECT_METHOD 
UACPI_OBJECT_MUTEX 
UACPI_OBJECT_OPERATION_REGION 
UACPI_OBJECT_POWER_RESOURCE 
UACPI_OBJECT_PROCESSOR 
UACPI_OBJECT_THERMAL_ZONE 
UACPI_OBJECT_BUFFER_FIELD 
UACPI_OBJECT_DEBUG 
UACPI_OBJECT_REFERENCE 
UACPI_OBJECT_BUFFER_INDEX 
UACPI_OBJECT_MAX_TYPE_VALUE 

Definition at line 110 of file types.h.

110 {
127
uacpi_object_type
Definition: types.h:110
@ UACPI_OBJECT_MAX_TYPE_VALUE
Definition: types.h:130
@ UACPI_OBJECT_EVENT
Definition: types.h:118
@ UACPI_OBJECT_METHOD
Definition: types.h:119
@ UACPI_OBJECT_BUFFER
Definition: types.h:114
@ UACPI_OBJECT_STRING
Definition: types.h:113
@ UACPI_OBJECT_PROCESSOR
Definition: types.h:123
@ UACPI_OBJECT_DEVICE
Definition: types.h:117
@ UACPI_OBJECT_PACKAGE
Definition: types.h:115
@ UACPI_OBJECT_POWER_RESOURCE
Definition: types.h:122
@ UACPI_OBJECT_UNINITIALIZED
Definition: types.h:111
@ UACPI_OBJECT_REFERENCE
Definition: types.h:128
@ UACPI_OBJECT_MUTEX
Definition: types.h:120
@ UACPI_OBJECT_DEBUG
Definition: types.h:126
@ UACPI_OBJECT_INTEGER
Definition: types.h:112
@ UACPI_OBJECT_BUFFER_FIELD
Definition: types.h:125
@ UACPI_OBJECT_OPERATION_REGION
Definition: types.h:121
@ UACPI_OBJECT_FIELD_UNIT
Definition: types.h:116
@ UACPI_OBJECT_THERMAL_ZONE
Definition: types.h:124
@ UACPI_OBJECT_BUFFER_INDEX
Definition: types.h:129

◆ uacpi_object_type_bits

Enumerator
UACPI_OBJECT_INTEGER_BIT 
UACPI_OBJECT_STRING_BIT 
UACPI_OBJECT_BUFFER_BIT 
UACPI_OBJECT_PACKAGE_BIT 
UACPI_OBJECT_FIELD_UNIT_BIT 
UACPI_OBJECT_DEVICE_BIT 
UACPI_OBJECT_EVENT_BIT 
UACPI_OBJECT_METHOD_BIT 
UACPI_OBJECT_MUTEX_BIT 
UACPI_OBJECT_OPERATION_REGION_BIT 
UACPI_OBJECT_POWER_RESOURCE_BIT 
UACPI_OBJECT_PROCESSOR_BIT 
UACPI_OBJECT_THERMAL_ZONE_BIT 
UACPI_OBJECT_BUFFER_FIELD_BIT 
UACPI_OBJECT_DEBUG_BIT 
UACPI_OBJECT_REFERENCE_BIT 
UACPI_OBJECT_BUFFER_INDEX_BIT 
UACPI_OBJECT_ANY_BIT 

Definition at line 134 of file types.h.

134 {
152 UACPI_OBJECT_ANY_BIT = 0xFFFFFFFF,
uacpi_object_type_bits
Definition: types.h:134
@ UACPI_OBJECT_STRING_BIT
Definition: types.h:136
@ UACPI_OBJECT_MUTEX_BIT
Definition: types.h:143
@ UACPI_OBJECT_REFERENCE_BIT
Definition: types.h:150
@ UACPI_OBJECT_METHOD_BIT
Definition: types.h:142
@ UACPI_OBJECT_BUFFER_INDEX_BIT
Definition: types.h:151
@ UACPI_OBJECT_FIELD_UNIT_BIT
Definition: types.h:139
@ UACPI_OBJECT_PROCESSOR_BIT
Definition: types.h:146
@ UACPI_OBJECT_BUFFER_BIT
Definition: types.h:137
@ UACPI_OBJECT_POWER_RESOURCE_BIT
Definition: types.h:145
@ UACPI_OBJECT_BUFFER_FIELD_BIT
Definition: types.h:148
@ UACPI_OBJECT_INTEGER_BIT
Definition: types.h:135
@ UACPI_OBJECT_OPERATION_REGION_BIT
Definition: types.h:144
@ UACPI_OBJECT_PACKAGE_BIT
Definition: types.h:138
@ UACPI_OBJECT_EVENT_BIT
Definition: types.h:141
@ UACPI_OBJECT_THERMAL_ZONE_BIT
Definition: types.h:147
@ UACPI_OBJECT_ANY_BIT
Definition: types.h:152
@ UACPI_OBJECT_DEBUG_BIT
Definition: types.h:149
@ UACPI_OBJECT_DEVICE_BIT
Definition: types.h:140

◆ uacpi_overflow_behavior

Enumerator
UACPI_OVERFLOW_ALLOW 
UACPI_OVERFLOW_TRUNCATE 
UACPI_OVERFLOW_DISALLOW 

Definition at line 189 of file types.h.

189 {
uacpi_overflow_behavior
Definition: types.h:189
@ UACPI_OVERFLOW_TRUNCATE
Definition: types.h:191
@ UACPI_OVERFLOW_ALLOW
Definition: types.h:190
@ UACPI_OVERFLOW_DISALLOW
Definition: types.h:192

◆ uacpi_region_op

Enumerator
UACPI_REGION_OP_ATTACH 
UACPI_REGION_OP_DETACH 
UACPI_REGION_OP_READ 
UACPI_REGION_OP_WRITE 
UACPI_REGION_OP_PCC_SEND 
UACPI_REGION_OP_GPIO_READ 
UACPI_REGION_OP_GPIO_WRITE 
UACPI_REGION_OP_IPMI_COMMAND 
UACPI_REGION_OP_FFIXEDHW_COMMAND 
UACPI_REGION_OP_PRM_COMMAND 
UACPI_REGION_OP_SERIAL_READ 
UACPI_REGION_OP_SERIAL_WRITE 

Definition at line 373 of file types.h.

373 {
374 // data => uacpi_region_attach_data
376 // data => uacpi_region_detach_data
378
379 // data => uacpi_region_rw_data
382
383 // data => uacpi_region_pcc_send_data
385
386 // data => uacpi_region_gpio_rw_data
389
390 // data => uacpi_region_ipmi_rw_data
392
393 // data => uacpi_region_ffixedhw_rw_data
395
396 // data => uacpi_region_prm_rw_data
398
399 // data => uacpi_region_serial_rw_data
uacpi_region_op
Definition: types.h:373
@ UACPI_REGION_OP_FFIXEDHW_COMMAND
Definition: types.h:394
@ UACPI_REGION_OP_PCC_SEND
Definition: types.h:384
@ UACPI_REGION_OP_GPIO_READ
Definition: types.h:387
@ UACPI_REGION_OP_SERIAL_WRITE
Definition: types.h:401
@ UACPI_REGION_OP_PRM_COMMAND
Definition: types.h:397
@ UACPI_REGION_OP_DETACH
Definition: types.h:377
@ UACPI_REGION_OP_GPIO_WRITE
Definition: types.h:388
@ UACPI_REGION_OP_SERIAL_READ
Definition: types.h:400
@ UACPI_REGION_OP_WRITE
Definition: types.h:381
@ UACPI_REGION_OP_READ
Definition: types.h:380
@ UACPI_REGION_OP_IPMI_COMMAND
Definition: types.h:391
@ UACPI_REGION_OP_ATTACH
Definition: types.h:375

Function Documentation

◆ uacpi_address_space_to_string()

const uacpi_char * uacpi_address_space_to_string ( uacpi_address_space  space)

Definition at line 11 of file types.c.

14{
15 switch (space) {
17 return "SystemMemory";
19 return "SystemIO";
21 return "PCI_Config";
23 return "EmbeddedControl";
25 return "SMBus";
27 return "SystemCMOS";
29 return "PciBarTarget";
31 return "IPMI";
33 return "GeneralPurposeIO";
35 return "GenericSerialBus";
37 return "PCC";
39 return "PlatformRtMechanism";
41 return "FFixedHW";
43 return "TableData";
44 default:
45 return "<vendor specific>";
46 }
47}

Referenced by gas_validate(), reg_or_unreg_all_opregions(), trace_region_io(), uacpi_reboot(), and uacpi_trace_region_error().

◆ uacpi_object_assign_buffer()

uacpi_status uacpi_object_assign_buffer ( uacpi_object obj,
uacpi_data_view  in 
)

Definition at line 1142 of file types.c.

1143{
1145}
static uacpi_status uacpi_object_do_assign_buffer(uacpi_object *obj, uacpi_data_view in, uacpi_object_type type)
Definition: types.c:1107
GLuint in
Definition: glext.h:9616

◆ uacpi_object_assign_integer()

uacpi_status uacpi_object_assign_integer ( uacpi_object obj,
uacpi_u64  value 
)

Definition at line 1031 of file types.c.

1032{
1033 uacpi_object object = { 0 };
1034
1036
1037 object.type = UACPI_OBJECT_INTEGER;
1038 object.integer = value;
1039
1041}
@ UACPI_ASSIGN_BEHAVIOR_DEEP_COPY
Definition: types.h:276
#define ENSURE_VALID_USER_OBJ(obj)
Definition: types.c:1020
uacpi_status uacpi_object_assign(uacpi_object *dst, uacpi_object *src, enum uacpi_assign_behavior behavior)
Definition: types.c:1372
Definition: pdh_main.c:96

◆ uacpi_object_assign_package()

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.

1328{
1330 uacpi_size i;
1331 uacpi_object tmp_obj = {
1333 };
1334
1336
1337 if (uacpi_unlikely(!package_alloc(&tmp_obj, in.count,
1340
1341 obj->type = UACPI_OBJECT_PACKAGE;
1342
1343 for (i = 0; i < in.count; ++i) {
1344 tmp_obj.package->objects[i] = in.objects[i];
1345 uacpi_object_ref(tmp_obj.package->objects[i]);
1346 }
1347
1350
1351 return ret;
1352}
@ UACPI_PREALLOC_OBJECTS_NO
Definition: types.h:292
@ UACPI_ASSIGN_BEHAVIOR_SHALLOW_COPY
Definition: types.h:277
#define uacpi_unlikely(expr)
Definition: compiler.h:88
size_t uacpi_size
Definition: types.h:37
uacpi_status
Definition: status.h:10
@ UACPI_STATUS_OUT_OF_MEMORY
Definition: status.h:13
return ret
Definition: mutex.c:147
static uacpi_bool package_alloc(uacpi_object *obj, uacpi_size initial_size, enum uacpi_prealloc_objects prealloc)
Definition: types.c:154
void uacpi_object_ref(uacpi_object *obj)
Definition: types.c:734
static void free_package(uacpi_handle handle)
Definition: types.c:452
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
void uacpi_shareable_unref_and_delete_if_last(uacpi_handle, void(*do_free)(uacpi_handle))
Definition: shareable.c:51
uacpi_u8 type
Definition: types.h:249
uacpi_package * package
Definition: types.h:254
uacpi_object ** objects
Definition: types.h:36

Referenced by uacpi_object_create_package().

◆ uacpi_object_assign_reference()

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.

1267{
1269 uacpi_object object = { 0 };
1270
1273
1274 // First clear out the object
1275 object.type = UACPI_OBJECT_UNINITIALIZED;
1277 obj, &object,
1279 );
1281 return ret;
1282
1286
1287 return UACPI_STATUS_OK;
1288}
@ UACPI_REFERENCE_KIND_ARG
Definition: types.h:13
#define uacpi_unlikely_error(expr)
Definition: status.h:49
@ UACPI_STATUS_OK
Definition: status.h:11
void uacpi_object_attach_child(uacpi_object *parent, uacpi_object *child)
Definition: types.c:950
static HWND child
Definition: cursoricon.c:298

◆ uacpi_object_assign_string()

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.

Definition at line 1137 of file types.c.

◆ uacpi_object_create_buffer()

uacpi_object * uacpi_object_create_buffer ( uacpi_data_view  view)

Definition at line 1223 of file types.c.

1224{
1226}
static uacpi_object * uacpi_object_do_create_string_or_buffer(uacpi_data_view view, uacpi_object_type type)
Definition: types.c:1198

◆ uacpi_object_create_cstring()

uacpi_object * uacpi_object_create_cstring ( const uacpi_char str)

Definition at line 1228 of file types.c.

1229{
1230 uacpi_data_view data_view = { 0 };
1231
1232 data_view.const_text = str;
1233 data_view.length = uacpi_strlen(str) + 1;
1234 return uacpi_object_create_string(data_view);
1235}
uacpi_size uacpi_strlen(const uacpi_char *str)
Definition: stdlib.c:72
uacpi_object * uacpi_object_create_string(uacpi_data_view view)
Definition: types.c:1218
const WCHAR * str
uacpi_size length
Definition: types.h:105
const uacpi_char * const_text
Definition: types.h:100

◆ uacpi_object_create_integer()

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.

1187{
1189
1192 return obj;
1193
1194 obj->integer = value;
1195 return obj;
1196}
#define UACPI_NULL
Definition: types.h:33
uacpi_object * uacpi_create_object(uacpi_object_type type)
Definition: types.c:327

Referenced by uacpi_object_create_integer_safe().

◆ 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.

  • UACPI_OVERFLOW_ALLOW -> do nothing, same as the vanilla helper
  • UACPI_OVERFLOW_TRUNCATE -> truncate the integer to 32-bits if it happens to be larger than allowed by the DSDT
  • UACPI_OVERFLOW_DISALLOW -> fail object creation with UACPI_STATUS_INVALID_ARGUMENT if the provided value happens to be too large

Definition at line 1152 of file types.c.

1155{
1157 uacpi_u8 bitness;
1159
1160 ret = uacpi_get_aml_bitness(&bitness);
1162 return ret;
1163
1164 switch (behavior) {
1167 if (bitness == 32 && value > 0xFFFFFFFF) {
1168 if (behavior == UACPI_OVERFLOW_DISALLOW)
1170
1171 value &= 0xFFFFFFFF;
1172 }
1178
1179 *out_obj = obj;
1180 return ret;
1181 default:
1183 }
1184}
#define UACPI_FALLTHROUGH
Definition: compiler.h:100
uint8_t uacpi_u8
Definition: types.h:19
@ UACPI_STATUS_INVALID_ARGUMENT
Definition: status.h:18
uacpi_object * uacpi_object_create_integer(uacpi_u64 value)
Definition: types.c:1186
uacpi_status uacpi_get_aml_bitness(uacpi_u8 *out_bitness)
Definition: uacpi.c:999

◆ uacpi_object_create_package()

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.

1355{
1358
1361 return obj;
1362
1366 return UACPI_NULL;
1367 }
1368
1369 return obj;
1370}
uacpi_status uacpi_object_assign_package(uacpi_object *obj, uacpi_object_array in)
Definition: types.c:1325
uacpi_object * uacpi_object_create_uninitialized(void)
Definition: types.c:1147
void uacpi_object_unref(uacpi_object *obj)
Definition: types.c:762

◆ uacpi_object_create_reference()

uacpi_object * uacpi_object_create_reference ( uacpi_object child)

Create a reference object 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 1248 of file types.c.

1249{
1251
1253
1256 return UACPI_NULL;
1257
1260
1261 return obj;
1262}
#define ENSURE_VALID_USER_OBJ_RET(obj, ret)
Definition: types.c:1014

◆ uacpi_object_create_string()

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_create_uninitialized()

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_object_get_buffer()

uacpi_status uacpi_object_get_buffer ( uacpi_object obj,
uacpi_data_view out 
)

Definition at line 1075 of file types.c.

1076{
1079 );
1080}
static uacpi_status uacpi_object_do_get_string_or_buffer(uacpi_object *obj, uacpi_data_view *out, uacpi_u32 mask)
Definition: types.c:1049
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383

◆ uacpi_object_get_dereferenced()

uacpi_status uacpi_object_get_dereferenced ( uacpi_object obj,
uacpi_object **  out 
)

Retrieve the object pointed to by a reference object.

NOTE: the reference count of the returned object is incremented by one and must be uacpi_object_unref'ed by the client when no longer needed.

Definition at line 1290 of file types.c.

1293{
1295
1296 *out = obj->inner_object;
1298
1299 return UACPI_STATUS_OK;
1300}
#define TYPE_CHECK_USER_OBJ(obj, type_bits)
Definition: types.c:1011
uacpi_u32 uacpi_shareable_ref(uacpi_handle)
Definition: shareable.c:31

◆ uacpi_object_get_integer()

uacpi_status uacpi_object_get_integer ( uacpi_object obj,
uacpi_u64 out 
)

Definition at line 1023 of file types.c.

1024{
1026
1027 *out = obj->integer;
1028 return UACPI_STATUS_OK;
1029}

◆ uacpi_object_get_package()

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.

1240{
1242
1243 out->objects = obj->package->objects;
1244 out->count = obj->package->count;
1245 return UACPI_STATUS_OK;
1246}

◆ uacpi_object_get_power_resource_info()

uacpi_status uacpi_object_get_power_resource_info ( uacpi_object obj,
uacpi_power_resource_info out 
)

Returns the information about the provided power resource object.

Definition at line 1314 of file types.c.

1317{
1319
1320 out->system_level = obj->power_resource.system_level;
1321 out->resource_order = obj->power_resource.resource_order;
1322 return UACPI_STATUS_OK;
1323}

◆ uacpi_object_get_processor_info()

uacpi_status uacpi_object_get_processor_info ( uacpi_object obj,
uacpi_processor_info out 
)

Returns the information about the provided processor object.

Definition at line 1302 of file types.c.

1305{
1307
1308 out->id = obj->processor->id;
1309 out->block_address = obj->processor->block_address;
1310 out->block_length = obj->processor->block_length;
1311 return UACPI_STATUS_OK;
1312}

◆ uacpi_object_get_string()

uacpi_status uacpi_object_get_string ( uacpi_object obj,
uacpi_data_view out 
)

Definition at line 1068 of file types.c.

1069{
1072 );
1073}

◆ uacpi_object_get_string_or_buffer()

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_get_type()

uacpi_object_type uacpi_object_get_type ( uacpi_object obj)

Definition at line 982 of file types.c.

983{
984 return obj->type;
985}

◆ uacpi_object_get_type_bit()

uacpi_object_type_bits uacpi_object_get_type_bit ( uacpi_object obj)

Definition at line 987 of file types.c.

988{
989 return (1u << obj->type);
990}

Referenced by uacpi_object_is_one_of().

◆ uacpi_object_is()

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.

993{
994 return obj->type == type;
995}
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545

Referenced by object_mutate_refcount(), and object_replace_child().

◆ uacpi_object_is_aml_namepath()

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.

1083{
1085 return obj->flags == UACPI_STRING_KIND_PATH;
1086}
@ UACPI_STRING_KIND_PATH
Definition: types.h:21
#define UACPI_FALSE
Definition: types.h:30
#define TYPE_CHECK_USER_OBJ_RET(obj, type_bits, ret)
Definition: types.c:1004

Referenced by uacpi_object_resolve_as_aml_namepath().

◆ uacpi_object_is_one_of()

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.

1000{
1001 return (uacpi_object_get_type_bit(obj) & type_mask) != 0;
1002}
uacpi_object_type_bits uacpi_object_get_type_bit(uacpi_object *obj)
Definition: types.c:987

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().

◆ uacpi_object_ref()

◆ uacpi_object_resolve_as_aml_namepath()

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.

1092{
1095
1098
1100 scope, obj->buffer->text, &node
1101 );
1103 *out_node = node;
1104 return ret;
1105}
uacpi_status uacpi_namespace_node_resolve_from_aml_namepath(uacpi_namespace_node *scope, const uacpi_char *path, uacpi_namespace_node **out_node)
Definition: namespace.c:634
#define uacpi_likely_success(expr)
Definition: status.h:53
uacpi_bool uacpi_object_is_aml_namepath(uacpi_object *obj)
Definition: types.c:1082
Definition: dlist.c:348

Referenced by uacpi_get_pci_routing_table().

◆ uacpi_object_type_to_string()

const uacpi_char * uacpi_object_type_to_string ( uacpi_object_type  type)

Definition at line 51 of file types.c.

52{
53 switch (type) {
55 return "Uninitialized";
57 return "Integer";
59 return "String";
61 return "Buffer";
63 return "Package";
65 return "Field Unit";
67 return "Device";
69 return "Event";
71 return "Reference";
73 return "Buffer Index";
75 return "Method";
77 return "Mutex";
79 return "Operation Region";
81 return "Power Resource";
83 return "Processor";
85 return "Thermal Zone";
87 return "Buffer Field";
89 return "Debug";
90 default:
91 return "<Invalid type>";
92 }
93}

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().

◆ uacpi_object_unref()

void uacpi_object_unref ( uacpi_object obj)

Definition at line 762 of file types.c.

763{
764 uacpi_object *this_obj = obj;
765
766 if (!obj)
767 return;
768
769 while (obj) {
771 return;
772
774
775 if (obj->type == UACPI_OBJECT_REFERENCE) {
776 obj = obj->inner_object;
777 } else {
778 obj = UACPI_NULL;
779 }
780 }
781
782 if (uacpi_shareable_refcount(this_obj) == 0)
783 free_chain(this_obj);
784}
static void free_chain(uacpi_object *obj)
Definition: types.c:746
uacpi_bool uacpi_bugged_shareable(uacpi_handle)
Definition: shareable.c:15
uacpi_u32 uacpi_shareable_refcount(uacpi_handle)
Definition: shareable.c:65
uacpi_u32 uacpi_shareable_unref(uacpi_handle)
Definition: shareable.c:41

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().