21#ifndef UACPI_BAREBONES_MODE
74 struct op_context_array *arr
79 size = op_context_array_size(arr);
84 return op_context_array_at(arr,
size - 2);
119 slot = held_mutexes_array_alloc(arr);
134 size = held_mutexes_array_inline_capacity(arr);
139 size = arr->size_including_inline -
size;
143 &arr->dynamic_storage[
i], &arr->dynamic_storage[
i + 1],
144 size *
sizeof(arr->inline_storage[0])
147 held_mutexes_array_pop(arr);
152 arr->size_including_inline);
155 &arr->inline_storage[
i], &arr->inline_storage[
i + 1],
156 size *
sizeof(arr->inline_storage[0])
159 size = held_mutexes_array_size(arr);
160 i = held_mutexes_array_inline_capacity(arr);
168 arr->inline_storage[
i - 1] = arr->dynamic_storage[0];
172 &arr->dynamic_storage[0], &arr->dynamic_storage[1],
173 size *
sizeof(arr->inline_storage[0])
177 held_mutexes_array_pop(arr);
196 item = *held_mutexes_array_last(arr);
201 "ignoring mutex @%p release due to sync level mismatch: %d vs %d",
216 held_mutexes_array_pop(arr);
226 i = held_mutexes_array_size(arr);
228 item = *held_mutexes_array_at(arr, --
i);
259 slot = temp_namespace_node_array_alloc(arr);
312 struct call_frame_array *arr
317 size = call_frame_array_size(arr);
322 return call_frame_array_at(arr,
size - 2);
340#define AML_READ(ptr, offset) (*(((uacpi_u8*)(ptr)) + offset))
372 uacpi_size bytes_left, prefix_bytes, nameseg_bytes = 0, namesegs;
399 if (prev_char !=
'^')
445 nameseg_bytes = namesegs * 4;
448 nameseg_bytes += namesegs - 1;
451 *
out_size = nameseg_bytes + prefix_bytes + 1;
459 base_cursor = *out_string;
460 base_cursor += prefix_bytes;
462 while (namesegs-- > 0) {
468 *base_cursor++ =
'.';
502 if (prev_char ==
'^')
512 cur_node = cur_node->
parent;
531 if (prev_char !=
'^')
580 for (; namesegs;
cursor += 4, namesegs--) {
610 if (just_one_nameseg) {
636 *out_node = cur_node;
649 if (!frame->
method->named_objects_persist)
709 "invalid opcode '%s' (0x%04X) at AML offset %u",
710 ctx->cur_op->name,
op,
ctx->cur_frame->code_offset
729 aml_offset = item_array_at(&op_ctx->
items, 2)->immediate;
730 src =
ctx->cur_frame->method->code;
733 pkg = &item_array_at(&op_ctx->
items, 0)->pkg;
734 init_size = pkg->
end - aml_offset;
740 declared_size = item_array_at(&op_ctx->
items, 1)->obj;
744 "buffer is too large (%"UACPI_PRIu64"), assuming corrupted "
751 uacpi_error(
"attempted to create an empty buffer");
758 "too many buffer initializers: %u (size is %u)",
764 dst = item_array_at(&op_ctx->
items, 3)->obj;
782 obj = item_array_last(&
ctx->cur_op_ctx->items)->obj;
806 uacpi_u32 num_elements, num_defined_elements,
i;
815 package = item_array_last(&op_ctx->items)->obj->package;
818 if (op_ctx->
op->code == UACPI_AML_OP_VarPackageOp) {
821 var_num_elements = item_array_at(&op_ctx->
items, 1)->obj;
829 num_elements = var_num_elements->
integer;
831 num_elements = item_array_at(&op_ctx->
items, 1)->immediate;
834 num_defined_elements = (item_array_size(&op_ctx->
items) - 3) / 2;
837 "too many package initializers: %u, truncating to %u",
838 num_defined_elements, num_elements
841 num_defined_elements = num_elements;
850 for (
i = 0;
i < num_defined_elements; ++
i) {
856 base_pkg_index = (
i * 2) + 2;
857 item = item_array_at(&op_ctx->
items, base_pkg_index + 1);
888 item_array_at(&op_ctx->
items, base_pkg_index)->immediate,
929 if (out_buf->
length && !include_null)
932 out_buf->
text =
obj->buffer->text;
935 if (
obj->buffer->size == 0) {
958 out_cursor += buf_idx->
idx;
1027 "attempted to perform an invalid implicit cast (%s -> %s)",
1070 dst = item_array_last(&
ctx->cur_op_ctx->items);
1083 idx = op_ctx->
op->code - UACPI_AML_OP_Local0Op;
1092 idx = op_ctx->
op->code - UACPI_AML_OP_Arg0Op;
1101 src = item_array_at(&
ctx->cur_op_ctx->items, 0)->node;
1102 dst = item_array_at(&
ctx->cur_op_ctx->items, 1);
1115 src = item_array_at(&
ctx->cur_op_ctx->items, 0)->node;
1116 dst = item_array_at(&
ctx->cur_op_ctx->items, 1)->node;
1118 dst->object =
src->object;
1132 node = item_array_at(&
ctx->cur_op_ctx->items, 0)->node;
1133 obj = item_array_at(&
ctx->cur_op_ctx->items, 4)->obj;
1134 op_region =
obj->op_region;
1136 op_region->
space = item_array_at(&
ctx->cur_op_ctx->items, 1)->immediate;
1137 op_region->
offset = item_array_at(&
ctx->cur_op_ctx->items, 2)->obj->integer;
1138 op_region->
length = item_array_at(&
ctx->cur_op_ctx->items, 3)->obj->integer;
1143 uacpi_warn(
"unusable/empty operation region %.4s",
node->name.text);
1146 "invalid operation region %.4s bounds: offset=0x%"UACPI_PRIX64
1155 "invalid PCC operation region %.4s subspace %"UACPI_PRIX64,
1185 "%s: unable to find table '%.4s' (OEM ID '%.6s', "
1186 "OEM Table ID '%.8s'): %s",
1187 opcode,
id->signature.text,
id->oemid,
id->oem_table_id,
1219 oem_table_id->
size ? oem_table_id->
size - 1 : 0
1228 struct item_array *
items = &
ctx->cur_op_ctx->items;
1238 "DataTableRegion", &table_id,
1239 item_array_at(
items, 1)->
obj->buffer,
1240 item_array_at(
items, 2)->
obj->buffer,
1241 item_array_at(
items, 3)->
obj->buffer
1252 obj = item_array_at(
items, 4)->obj;
1253 op_region =
obj->op_region;
1279 struct acpi_dsdt *dsdt =
ptr;
1288 "host-invoked load of" :
"dynamic load of";
1297 in_method->
code = dsdt->definition_block;
1298 in_method->
size = dsdt->hdr.length -
sizeof(dsdt->hdr);
1329 struct item_array *
items = &
ctx->cur_op_ctx->items;
1330 struct item *root_node_item;
1343 if (item_array_size(
items) == 12) {
1347 idx = item_array_at(
items, 2)->immediate;
1372 "LoadTable", &table_id,
1373 item_array_at(
items, 5)->
obj->buffer,
1374 item_array_at(
items, 6)->
obj->buffer,
1375 item_array_at(
items, 7)->
obj->buffer
1380 root_path = item_array_at(
items, 8)->obj->buffer;
1381 param_path = item_array_at(
items, 9)->obj->buffer;
1382 root_node_item = item_array_at(
items, 0);
1384 if (root_path->
size > 1) {
1400 if (param_path->
size > 1) {
1401 struct item *param_item;
1415 param_item = item_array_at(
items, 3);
1437 item_array_at(
items, 2)->immediate =
table.index;
1439 root_node_item->
node = root_node;
1449 struct item_array *
items = &
ctx->cur_op_ctx->items;
1464 if (item_array_size(
items) == 6) {
1468 idx = item_array_at(
items, 2)->immediate;
1472 if (item_array_at(
items, 5)->
obj->integer != 0)
1477 src = item_array_at(
items, 3)->obj;
1479 switch (
src->type) {
1483 op_region =
src->op_region;
1487 uacpi_error(
"Load: operation region is not SystemMemory");
1504 "Load: failed to map operation region "
1514 declared_size = op_region->
length;
1522 if (
buffer->size <
sizeof(
struct acpi_sdt_hdr)) {
1524 "Load: buffer is too small: %zu",
1532 src_table =
buffer->data;
1533 declared_size =
buffer->size;
1539 "Load: invalid argument '%s', expected "
1540 "Buffer/Field/OperationRegion",
1549 "Load: table size %u is larger than the declared size %zu",
1550 src_table->length, declared_size
1556 if (
uacpi_unlikely(src_table->length <
sizeof(
struct acpi_sdt_hdr))) {
1557 uacpi_error(
"Load: table size %u is too small", src_table->length);
1568 uacpi_memcpy(table_buffer, src_table, src_table->length);
1601 item_array_at(
items, 2)->immediate =
table.index;
1607 if (unmap_src && src_table)
1647 "invalid argument: '%.4s' is not a field unit (%s)",
1653 *out_field =
obj->field_unit;
1665 "invalid argument: '%.4s' is not an operation region (%s)",
1685 uacpi_u8 raw_value, access_type, lock_rule, update_rule;
1686 uacpi_u8 access_attrib = 0, access_length = 0;
1688 switch (op_ctx->
op->code) {
1689 case UACPI_AML_OP_FieldOp:
1690 node = item_array_at(&op_ctx->
items,
i++)->node;
1696 case UACPI_AML_OP_BankFieldOp:
1697 node = item_array_at(&op_ctx->
items,
i++)->node;
1702 node = item_array_at(&op_ctx->
items,
i++)->node;
1707 field_data.
value = item_array_at(&op_ctx->
items,
i++)->obj->integer;
1710 case UACPI_AML_OP_IndexFieldOp:
1711 node = item_array_at(&op_ctx->
items,
i++)->node;
1716 node = item_array_at(&op_ctx->
items,
i++)->node;
1746 raw_value = item_array_at(&op_ctx->
items,
i++)->immediate;
1747 access_type = (raw_value >> 0) & 0xF;
1748 lock_rule = (raw_value >> 4) & 0x1;
1749 update_rule = (raw_value >> 5) & 0x3;
1751 while (
i < item_array_size(&op_ctx->
items)) {
1762 obj = item_array_at(&op_ctx->
items,
i++)->obj;
1765 field->update_rule = update_rule;
1766 field->lock_rule = lock_rule;
1767 field->attributes = access_attrib;
1768 field->access_length = access_length;
1780 switch (access_type) {
1786 field->access_width_bytes = 1;
1789 field->access_width_bytes = 2;
1792 field->access_width_bytes = 4;
1795 field->access_width_bytes = 8;
1798 uacpi_error(
"invalid field '%.4s' access type %d",
1799 node->name.text, access_type);
1804 field->pin_offset = pin_offset;
1809 field->access_width_bytes,
1813 field->bit_offset_within_first_byte =
1814 bit_offset & ((
field->access_width_bytes * 8) - 1);
1816 switch (op_ctx->
op->code) {
1817 case UACPI_AML_OP_FieldOp:
1824 case UACPI_AML_OP_BankFieldOp:
1835 case UACPI_AML_OP_IndexFieldOp:
1849 field->connection = connection_obj;
1850 if (
field->connection)
1884 raw_value = item_array_at(&op_ctx->
items,
i++)->immediate;
1886 access_type = raw_value & 0xF;
1887 access_attrib = (raw_value >> 6) & 0x3;
1889 raw_value = item_array_at(&op_ctx->
items,
i++)->immediate;
1899 if (access_attrib) {
1900 switch (access_attrib) {
1912 access_length = raw_value;
1914 access_attrib = raw_value;
1918 access_length = item_array_at(&op_ctx->
items,
i++)->immediate;
1923 connection_obj = item_array_at(&op_ctx->
items,
i++)->obj;
1940 obj->integer &= 0xFFFFFFFF;
1954 depth = call_frame_array_size(&
ctx->call_stack);
1959 frame = call_frame_array_at(&
ctx->call_stack,
depth - 2);
1976 op_ctx->
op->code == UACPI_AML_OP_LoadTableOp)) {
1981 *out_operand = item_array_last(&op_ctx->
items)->obj;
1995 *out_obj =
ctx->ret;
2012 i = code_block_array_size(
blocks);
2019 *out_idx_plus_one =
i + 1;
2025 *out_idx_plus_one = 0;
2040 pkg = &item_array_at(&op_ctx->
items, 0)->pkg;
2045 switch (op_ctx->
op->code) {
2046 case UACPI_AML_OP_IfOp:
2049 case UACPI_AML_OP_ElseOp:
2052 case UACPI_AML_OP_WhileOp:
2061 uacpi_error(
"loop time out after running for %u seconds",
2074 block->expiration_point +=
2082 case UACPI_AML_OP_ScopeOp:
2083 case UACPI_AML_OP_DeviceOp:
2084 case UACPI_AML_OP_ProcessorOp:
2085 case UACPI_AML_OP_PowerResOp:
2086 case UACPI_AML_OP_ThermalZoneOp:
2088 block->node = item_array_at(&op_ctx->
items, 1)->node;
2141 switch (
src->type) {
2165 "%s Package @%p (%p) (%zu elements)",
2171 "%s Buffer @%p (%p) (%zu bytes)",
2185 "%s Power Resource %d %d",
2186 prefix,
src->power_resource.system_level,
2187 src->power_resource.resource_order
2192 "%s Processor[%d] 0x%08X (%d)",
2193 prefix,
src->processor->id,
src->processor->block_address,
2194 src->processor->block_length
2199 "%s Buffer Index %p[%zu] => 0x%02X",
2200 prefix,
src->buffer_index.buffer->data,
src->buffer_index.idx,
2206 "%s Mutex @%p (%p => %p) sync level %d",
2208 src->mutex->sync_level
2278 if (
node->object == target_object) {
2325 switch (
dst->flags) {
2379 switch (
dst->flags) {
2430 dst->inner_object, src_obj, wtr_response
2439 src = item_array_at(&op_ctx->
items, 0)->obj;
2441 if (op_ctx->
op->code == UACPI_AML_OP_CondRefOfOp)
2442 dst = item_array_at(&op_ctx->
items, 2)->obj;
2444 dst = item_array_at(&op_ctx->
items, 1)->obj;
2462 rhs =
arg1->integer;
2466 case UACPI_AML_OP_AddOp:
2469 case UACPI_AML_OP_SubtractOp:
2472 case UACPI_AML_OP_MultiplyOp:
2475 case UACPI_AML_OP_ShiftLeftOp:
2476 case UACPI_AML_OP_ShiftRightOp:
2478 if (
op == UACPI_AML_OP_ShiftLeftOp)
2486 case UACPI_AML_OP_NandOp:
2489 case UACPI_AML_OP_AndOp:
2492 case UACPI_AML_OP_NorOp:
2495 case UACPI_AML_OP_OrOp:
2498 case UACPI_AML_OP_XorOp:
2501 case UACPI_AML_OP_DivideOp:
2509 case UACPI_AML_OP_ModOp:
2511 uacpi_error(
"attempted to calculate modulo of zero");
2530 struct item_array *
items = &
ctx->cur_op_ctx->items;
2533 arg0 = item_array_at(
items, 0)->obj;
2536 if (
op == UACPI_AML_OP_DivideOp) {
2537 tgt0 = item_array_at(
items, 4)->obj;
2538 tgt1 = item_array_at(
items, 5)->obj;
2540 tgt0 = item_array_at(
items, 3)->obj;
2550 struct item_array *
items = &
ctx->cur_op_ctx->items;
2553 arg = item_array_at(
items, 0)->obj;
2554 tgt = item_array_at(
items, 2)->obj;
2557 case UACPI_AML_OP_NotOp:
2561 case UACPI_AML_OP_FindSetRightBitOp:
2564 case UACPI_AML_OP_FindSetLeftBitOp:
2581 "invalid index %zu, %s@%p has %zu elements",
2595 src = item_array_at(&op_ctx->
items, 0)->obj;
2596 idx = item_array_at(&op_ctx->
items, 1)->obj->integer;
2597 dst = item_array_at(&op_ctx->
items, 3);
2599 switch (
src->type) {
2615 buf_idx = &
dst->obj->buffer_index;
2662 "invalid argument for Index: %s, "
2663 "expected String/Buffer/Package",
2677 switch (
obj->type) {
2709 int_buf,
sizeof(int_buf),
2717 final_size = (
is_hex ? 2 : 0) + repr_len + 1;
2728 str->size = final_size;
2743 final_size = 4 *
buf->size;
2747 for (
i = 0;
i <
buf->size; ++
i) {
2752 else if (
value < 100)
2760 final_size +=
buf->size - 1;
2771 for (
i = 0;
i <
buf->size; ++
i) {
2773 int_buf,
sizeof(int_buf),
2774 is_hex ?
"0x%02X" :
"%d",
2786 if (
i !=
buf->size - 1)
2790 str->size = final_size;
2828 src = item_array_at(&op_ctx->
items, 0)->obj;
2829 dst = item_array_at(&op_ctx->
items, 2)->obj;
2831 switch (op_ctx->
op->code) {
2832 case UACPI_AML_OP_ToIntegerOp:
2836 case UACPI_AML_OP_ToHexStringOp:
2837 case UACPI_AML_OP_ToDecimalStringOp: {
2852 case UACPI_AML_OP_ToBufferOp: {
2868 dst->buffer->data = dst_buf;
2869 dst->buffer->size =
buf.length;
2886 src_buf = item_array_at(&op_ctx->
items, 0)->obj->buffer;
2887 req_len = item_array_at(&op_ctx->
items, 1)->obj->integer;
2888 dst_buf = item_array_at(&op_ctx->
items, 3)->obj->buffer;
2916 src = item_array_at(&op_ctx->
items, 0)->obj;
2920 "invalid argument for Mid: %s, expected String/Buffer",
2926 idx = item_array_at(&op_ctx->
items, 1)->obj->integer;
2927 len = item_array_at(&op_ctx->
items, 2)->obj->integer;
2928 dst = item_array_at(&op_ctx->
items, 4)->obj;
2929 dst_buf =
dst->buffer;
2955 dst_buf->
text[dst_buf->
size++] =
'\0';
2970 arg0 = item_array_at(&op_ctx->
items, 0)->obj;
2971 arg1 = item_array_at(&op_ctx->
items, 1)->obj;
2972 dst = item_array_at(&op_ctx->
items, 3)->obj;
2974 switch (arg0->
type) {
2980 buf_size = int_size * 2;
2989 uacpi_memcpy(dst_buf+ int_size, &arg1_as_int, int_size);
3013 switch (
arg1->type) {
3022 arg1_size =
size + 1;
3026 arg1_ptr =
arg1->buffer->data;
3027 arg1_size =
arg1->buffer->size;
3036 arg1_ptr = tmp_buf.
data;
3037 arg1_size = tmp_buf.
size;
3044 arg0_size = arg0_buf->
size ? arg0_buf->
size - 1 : arg0_buf->
size;
3045 buf_size = arg0_size + arg1_size;
3054 uacpi_memcpy(dst_buf + arg0_size, arg1_ptr, arg1_size);
3067 dst->buffer->data = dst_buf;
3068 dst->buffer->size = buf_size;
3082 arg0 = item_array_at(&op_ctx->
items, 0)->obj;
3083 arg1 = item_array_at(&op_ctx->
items, 1)->obj;
3084 dst = item_array_at(&op_ctx->
items, 3)->obj;
3102 dst->buffer->data = dst_buf;
3103 dst->buffer->size = dst_size;
3112 dst_buf[dst_size - 2] =
3115 dst_buf[dst_size - 1] = 0;
3125 src = item_array_at(&op_ctx->
items, 0)->obj;
3126 dst = item_array_at(&op_ctx->
items, 1)->obj;
3131 switch (
src->type) {
3137 dst->integer =
buf.length;
3142 dst->integer =
src->package->count;
3147 "invalid argument for Sizeof: %s, "
3148 "expected String/Buffer/Package",
3162 src = item_array_at(&op_ctx->
items, 0)->obj;
3163 dst = item_array_at(&op_ctx->
items, 1)->obj;
3180 dst = item_array_at(&op_ctx->
items, 0)->obj;
3191 time = item_array_at(&op_ctx->
items, 0)->obj->integer;
3193 if (op_ctx->
op->code == UACPI_AML_OP_SleepOp) {
3222 dst_obj = item_array_at(&op_ctx->
items, 2)->obj;
3230 if (op_ctx->
op->code == UACPI_AML_OP_FromBCDOp) {
3270 uacpi_warn(
"refusing to unload a table from AML");
3279 src = item_array_at(&op_ctx->
items, 0)->obj;
3280 dst = item_array_at(&op_ctx->
items, 1)->obj;
3325 else if (lhs_buf->
size > rhs_buf->
size)
3329 if (
op == UACPI_AML_OP_LLessOp)
3335 if (
op == UACPI_AML_OP_LLessOp)
3348 lhs = item_array_at(&op_ctx->
items, 0)->obj;
3349 rhs = item_array_at(&op_ctx->
items, 1)->obj;
3350 dst = item_array_at(&op_ctx->
items, 2)->obj;
3353 case UACPI_AML_OP_LEqualOp:
3354 case UACPI_AML_OP_LLessOp:
3355 case UACPI_AML_OP_LGreaterOp:
3359 "don't know how to do a logical comparison of '%s' and '%s'",
3366 if (
op == UACPI_AML_OP_LEqualOp)
3378 if (
op == UACPI_AML_OP_LandOp)
3379 res = lhs_int && rhs_int;
3381 res = lhs_int || rhs_int;
3427 pkg = item_array_at(&op_ctx->
items, 0)->obj->package;
3428 mop0 = item_array_at(&op_ctx->
items, 1)->immediate;
3429 operand0 = item_array_at(&op_ctx->
items, 2)->obj->integer;
3430 mop1 = item_array_at(&op_ctx->
items, 3)->immediate;
3431 operand1 = item_array_at(&op_ctx->
items, 4)->obj->integer;
3432 start_idx = item_array_at(&op_ctx->
items, 5)->obj->integer;
3433 dst = item_array_at(&op_ctx->
items, 6)->obj;
3435 for (
i = start_idx;
i < pkg->
count; ++
i) {
3478 marker_length += *
data >> 6;
3483 switch (marker_length) {
3496 size |= temp_byte << 4;
3506 "PkgLength overflow: start=%u, size=%u", out_pkg->
begin,
size
3524 method->args = flags_byte & 0x7;
3525 method->is_serialized = (flags_byte >> 3) & 1;
3526 method->sync_level = flags_byte >> 4;
3536 uacpi_u32 method_begin_offset, method_size;
3538 this_method =
ctx->cur_frame->method;
3539 pkg = &item_array_at(&op_ctx->
items, 0)->pkg;
3540 node = item_array_at(&op_ctx->
items, 1)->node;
3541 method_begin_offset = item_array_at(&op_ctx->
items, 3)->immediate;
3544 pkg->
end < method_begin_offset ||
3545 pkg->
end > this_method->
size)) {
3547 "invalid method %.4s bounds [%u..%u] (parent size is %u)",
3548 node->name.text, method_begin_offset, pkg->
end, this_method->
size
3553 dst = item_array_at(&op_ctx->
items, 4)->obj;
3556 method_size = pkg->
end - method_begin_offset;
3565 ctx->cur_frame->method->code + method_begin_offset,
3568 method->size = method_size;
3588 node = item_array_at(&op_ctx->
items, 0)->node;
3590 if (op_ctx->
op->code == UACPI_AML_OP_MutexOp) {
3591 dst = item_array_at(&op_ctx->
items, 2)->obj;
3594 dst->mutex->sync_level = item_array_at(&op_ctx->
items, 1)->immediate;
3595 dst->mutex->sync_level &= 0xF;
3597 dst = item_array_at(&op_ctx->
items, 1)->obj;
3616 item_array_at(&op_ctx->
items, 0)->obj
3620 "%s: invalid argument '%s', expected an Event object",
3626 switch (op_ctx->
op->code)
3628 case UACPI_AML_OP_SignalOp:
3631 case UACPI_AML_OP_ResetOp:
3634 case UACPI_AML_OP_WaitOp: {
3638 timeout = item_array_at(&op_ctx->
items, 1)->obj->integer;
3651 item_array_at(&op_ctx->
items, 2)->obj->integer = 0;
3667 item_array_at(&op_ctx->
items, 0)->obj
3671 "%s: invalid argument '%s', expected a Mutex object",
3677 switch (op_ctx->
op->code)
3679 case UACPI_AML_OP_AcquireOp: {
3684 return_value = &item_array_at(&op_ctx->
items, 2)->obj->integer;
3688 "ignoring attempt to acquire mutex @%p with a lower sync level "
3689 "(%d < %d)",
obj->mutex,
obj->mutex->sync_level,
3710 ret = held_mutexes_array_push(&
ctx->held_mutexes,
obj->mutex);
3716 ctx->sync_level =
obj->mutex->sync_level;
3721 case UACPI_AML_OP_ReleaseOp: {
3726 "attempted to release not-previously-acquired mutex object "
3727 "@%p (%p)",
obj->mutex,
obj->mutex->handle
3733 &
ctx->held_mutexes,
obj->mutex,
3739 last_mutex = held_mutexes_array_last(&
ctx->held_mutexes);
3741 ctx->sync_level = 0;
3745 ctx->sync_level = (*last_mutex)->sync_level;
3764 node = item_array_at(&op_ctx->
items, 0)->node;
3765 value = item_array_at(&op_ctx->
items, 1)->obj->integer;
3776 "ignoring firmware Notify(%s, 0x%"UACPI_PRIX64") request, "
3785 uacpi_error(
"Notify() called on an invalid object %.4s",
3798 switch (op_ctx->
op->code) {
3799 case UACPI_AML_OP_BreakPointOp:
3803 case UACPI_AML_OP_FatalOp:
3805 req.
fatal.type = item_array_at(&op_ctx->
items, 0)->immediate;
3806 req.
fatal.code = item_array_at(&op_ctx->
items, 1)->immediate;
3807 req.
fatal.arg = item_array_at(&op_ctx->
items, 2)->obj->integer;
3826 node = item_array_at(&op_ctx->
items, 0)->node;
3827 src = item_array_at(&op_ctx->
items, 1)->obj;
3842 field->force_buffer)
3867 bit_length =
obj->buffer_field.bit_length;
3889 src = item_array_at(&op_ctx->
items, 0)->obj;
3890 dst = item_array_at(&op_ctx->
items, 1)->obj;
3898 sizeof(
dst->integer), 1
3927 "unable to perform a read from field %p: "
3928 "parent opregion gone", unwound_src
3933 switch (read_type) {
3935 new_op = UACPI_AML_OP_InternalOpReadFieldAsBuffer;
3938 new_op = UACPI_AML_OP_InternalOpReadFieldAsInteger;
3948 item_array_at(&op_ctx->
items, 0)->obj = unwound_src;
3956 item_array_pop(&op_ctx->
items);
3971 struct item *src_item;
3977 src_item = item_array_at(&op_ctx->
items, 0);
3986 node = item_array_at(&op_ctx->
items, 0)->node;
3989 src_obj = src_item->
obj;
3992 dst_obj = item_array_at(&op_ctx->
items, 1)->obj;
3994 if (op_ctx->
op->code == UACPI_AML_OP_InternalOpReadFieldAsBuffer) {
4001 if (dst_size != 0) {
4009 buf->size = dst_size;
4054 src_buf = item_array_at(&op_ctx->
items, 0)->obj->buffer;
4056 if (op_ctx->
op->code == UACPI_AML_OP_CreateFieldOp) {
4059 idx_obj = item_array_at(&op_ctx->
items, 1)->obj;
4060 len_obj = item_array_at(&op_ctx->
items, 2)->obj;
4061 node = item_array_at(&op_ctx->
items, 3)->node;
4062 field_obj = item_array_at(&op_ctx->
items, 4)->obj;
4068 len_obj->
integer > 0xFFFFFFFF)) {
4078 idx_obj = item_array_at(&op_ctx->
items, 1)->obj;
4079 node = item_array_at(&op_ctx->
items, 2)->node;
4080 field_obj = item_array_at(&op_ctx->
items, 3)->obj;
4084 switch (op_ctx->
op->code) {
4085 case UACPI_AML_OP_CreateBitFieldOp:
4086 field->bit_length = 1;
4088 case UACPI_AML_OP_CreateByteFieldOp:
4089 field->bit_length = 8;
4091 case UACPI_AML_OP_CreateWordFieldOp:
4092 field->bit_length = 16;
4094 case UACPI_AML_OP_CreateDWordFieldOp:
4095 field->bit_length = 32;
4097 case UACPI_AML_OP_CreateQWordFieldOp:
4098 field->bit_length = 64;
4104 if (op_ctx->
op->code != UACPI_AML_OP_CreateBitFieldOp)
4105 field->bit_index *= 8;
4109 src_buf->
size * 8)) {
4111 "invalid buffer field: bits [%zu..%zu], buffer size is %zu bytes",
4118 field->backing = src_buf;
4135 "attempting to %s outside of a While block",
4136 op_ctx->
op->code == UACPI_AML_OP_BreakOp ?
"Break" :
"Continue"
4148 if (op_ctx->
op->code == UACPI_AML_OP_BreakOp)
4164 node = item_array_at(&op_ctx->
items, 1)->node;
4165 obj = item_array_last(&op_ctx->
items)->obj;
4167 switch (op_ctx->
op->code) {
4168 case UACPI_AML_OP_ProcessorOp: {
4170 proc->id = item_array_at(&op_ctx->
items, 2)->immediate;
4171 proc->block_address = item_array_at(&op_ctx->
items, 3)->immediate;
4172 proc->block_length = item_array_at(&op_ctx->
items, 4)->immediate;
4176 case UACPI_AML_OP_PowerResOp: {
4199 switch (op_ctx->
op->code) {
4200 case UACPI_AML_OP_ProcessorOp:
4201 case UACPI_AML_OP_PowerResOp:
4202 case UACPI_AML_OP_ThermalZoneOp:
4203 case UACPI_AML_OP_DeviceOp: {
4212 case UACPI_AML_OP_ScopeOp:
4213 case UACPI_AML_OP_IfOp:
4214 case UACPI_AML_OP_ElseOp:
4215 case UACPI_AML_OP_WhileOp: {
4230 ctx->cur_frame->code_offset =
ctx->cur_frame->method->size;
4245 item_array_at(&
ctx->cur_op_ctx->items, 0)->obj,
4262 ctx->prev_op_ctx = op_context_array_one_before_last(&frame->
pending_ops);
4268 return ctx->cur_op_ctx && !
ctx->cur_op_ctx->preempted;
4288 "%s OP '%s' (0x%04X)",
4312 for (
i = 2;
i < item_array_size(&op_ctx->
items) - 1;
i++) {
4315 src = item_array_at(&op_ctx->
items,
i)->obj;
4338 block->node = scope;
4349 struct call_frame_array *call_stack = &
ctx->call_stack;
4352 *out_frame = call_frame_array_calloc(call_stack);
4361 prev_frame = call_frame_array_one_before_last(call_stack);
4362 ctx->cur_frame = prev_frame;
4391 switch (
dst->type) {
4406 if (
dst->integer == 0) {
4412 uacpi_error(
"attempted to store to an invalid target: %s",
4425 src = item_array_at(&op_ctx->
items, 0)->obj;
4426 dst = item_array_at(&op_ctx->
items, 1)->obj;
4428 if (op_ctx->
op->code == UACPI_AML_OP_StoreOp) {
4455 item_array_at(&op_ctx->
items, 0)->obj = wtr_response_obj;
4475 src = item_array_at(&op_ctx->
items, 0)->obj;
4476 dst = item_array_at(&op_ctx->
items, 1)->obj;
4495 switch (true_src_type) {
4497 dst->integer =
src->integer;
4528 if (op_ctx->
op->code == UACPI_AML_OP_IncrementOp)
4536 uacpi_error(
"Increment/Decrement: invalid object type '%s'",
4550 if (!
method->is_serialized)
4555 "cannot invoke method @%p, sync level %d is too low "
4574 ret = held_mutexes_array_push(&
ctx->held_mutexes,
method->mutex);
4591 op_ctx = op_context_array_calloc(&frame->
pending_ops);
4595 op_ctx->
op =
ctx->cur_op;
4604 if (item_array_size(&op_ctx->
items) == 0)
4615 item_array_pop(&op_ctx->
items);
4626 item_array_clear(&cur_op_ctx->
items);
4637 while (temp_namespace_node_array_size(&frame->
temp_nodes) != 0) {
4642 temp_namespace_node_array_pop(&frame->
temp_nodes);
4644 temp_namespace_node_array_clear(&frame->
temp_nodes);
4646 for (
i = 0;
i < 7; ++
i)
4648 for (
i = 0;
i < 8; ++
i)
4719#define EXEC_OP_DO_LVL(lvl, reason, ...) \
4720 uacpi_##lvl("Op 0x%04X ('%s'): "reason, \
4721 op_ctx->op->code, op_ctx->op->name __VA_ARGS__)
4723#define EXEC_OP_DO_ERR(reason, ...) EXEC_OP_DO_LVL(error, reason, __VA_ARGS__)
4724#define EXEC_OP_DO_WARN(reason, ...) EXEC_OP_DO_LVL(warn, reason, __VA_ARGS__)
4726#define EXEC_OP_ERR_3(reason, arg0, arg1, arg2) \
4727 EXEC_OP_DO_ERR(reason, ,arg0, arg1, arg2)
4728#define EXEC_OP_ERR_2(reason, arg0, arg1) EXEC_OP_DO_ERR(reason, ,arg0, arg1)
4729#define EXEC_OP_ERR_1(reason, arg0) EXEC_OP_DO_ERR(reason, ,arg0)
4730#define EXEC_OP_ERR(reason) EXEC_OP_DO_ERR(reason)
4732#define EXEC_OP_WARN(reason) EXEC_OP_DO_WARN(reason)
4734#define SPEC_SIMPLE_NAME "SimpleName := NameString | ArgObj | LocalObj"
4735#define SPEC_SUPER_NAME \
4736 "SuperName := SimpleName | DebugObj | ReferenceTypeOpcode"
4737#define SPEC_TERM_ARG \
4738 "TermArg := ExpressionOpcode | DataObject | ArgObj | LocalObj"
4739#define SPEC_OPERAND "Operand := TermArg => Integer"
4740#define SPEC_STRING "String := TermArg => String"
4741#define SPEC_TARGET "Target := SuperName | NullName"
4743#define SPEC_COMPUTATIONAL_DATA \
4744 "ComputationalData := ByteConst | WordConst | DWordConst | QWordConst " \
4745 "| String | ConstObj | RevisionOp | DefBuffer"
4839 if (!(
props & ok_mask)) {
4841 cur_op_ctx->
op->name, expected_type_str);
4884 switch (
obj->type) {
4891 "invalid argument type: %s, expected a %s",
4909 static const uacpi_char *oom_prefix =
"<...>";
4911 static const uacpi_char *unknown_path =
"<unknown-path>";
4912 static const uacpi_char *invalid_path =
"<invalid-path>";
4936 requested_path_to_print = unknown_path;
4938 requested_path_to_print = invalid_path;
4940 requested_path_to_print = requested_path;
4943 if (requested_path && requested_path[0] !=
'\\') {
4948 prefix_path = oom_prefix;
4950 if (prefix_path[1] !=
'\0')
4953 prefix_path = empty_string;
4957 middle_part = empty_string;
4959 if (
length == 5 && !is_create) {
4962 "unable to %s named object '%s' within (or above) "
4963 "scope '%s': %s",
action, requested_path_to_print,
4969 "unable to %s named object '%s%s%s': %s",
4970 action, prefix_path, middle_part,
4976 if (prefix_path != oom_prefix && prefix_path != empty_string)
5200#define EXT_OP_IDX(op) (op & 0xFF)
5265 goto method_dispatch_error;
5270 arg_count =
args ?
args->count : 0;
5273 "invalid number of arguments %zu to call %.4s, expected %d",
5278 goto method_dispatch_error;
5292 goto method_dispatch_error;
5297 goto method_dispatch_error;
5299 ctx->cur_frame = frame;
5302 ctx->cur_block = code_block_array_last(&
ctx->cur_frame->code_blocks);
5304 if (
method->native_call) {
5309 goto method_dispatch_error;
5316method_dispatch_error:
5318 call_frame_array_pop(&
ctx->call_stack);
5355 if (
ctx->prev_op_ctx)
5362 op_ctx =
ctx->cur_op_ctx;
5363 frame =
ctx->cur_frame;
5365 if (op_ctx->
pc == 0 &&
ctx->prev_op_ctx) {
5381 item = item_array_alloc(&op_ctx->
items);
5420 if (
ctx->cur_op_ctx) {
5422 ctx->cur_op_ctx->pc++;
5476 op_ctx->
pc += src_width;
5543 for (
i = 0;
i < num_types;
i++) {
5548 expected_mask |= 1u <<
type;
5559 "bad object type: expected one of %s/%s, got %s!",
5568 "bad object type: expected one of 0x%08X, got %s!",
5593 pkg = &item_array_at(&op_ctx->
items, pkg_idx)->pkg;
5596 op_ctx->
pc += bytes_skip;
5621 op_ctx->
pc += bytes_skip;
5633 op_ctx->
pc += bytes_skip;
5647 if (is_false == skip_if_false)
5648 op_ctx->
pc += bytes_skip;
5682 is_ok = op_ctx->
op->code == UACPI_AML_OP_ExternalOp;
5694 if (frame->
method->named_objects_persist &&
5699 first_ctx = op_context_array_at(&frame->
pending_ops, 0);
5700 abort_whileif = first_ctx->
op->code == UACPI_AML_OP_WhileOp ||
5701 first_ctx->
op->code == UACPI_AML_OP_IfOp;
5713 if (abort_whileif) {
5714 while (op_context_array_size(&frame->
pending_ops) != 1)
5717 op_ctx = op_context_array_at(&frame->
pending_ops, 0);
5728 !frame->
method->named_objects_persist)
5761 if (!
ctx->prev_op_ctx)
5793 EXEC_OP_ERR_1(
"don't know how to copy/transfer object to %d",
5800 dst = item_array_last(&
ctx->prev_op_ctx->items);
5827 src = item_array_at(&op_ctx->
items,
5848 item_array_pop(&op_ctx->
items);
5869 node = item_array_at(&op_ctx->
items, 0)->node;
5882 node = item_array_at(&op_ctx->
items, 0)->node;
5883 method = item_array_at(&op_ctx->
items, 1)->obj->method;
5892 uacpi_aml_op new_op = UACPI_AML_OP_InternalOpNamedObject;
5903 switch (
obj->type) {
5919 new_op = UACPI_AML_OP_InternalOpMethodCall0Args;
5920 new_op +=
obj->method->args;
5940 "unable to perform a read from field %s: "
5941 "parent opregion gone", field_path
5948 new_op = UACPI_AML_OP_InternalOpReadFieldAsBuffer;
5951 new_op = UACPI_AML_OP_InternalOpReadFieldAsInteger;
5978 if (op_length == 0 || next_op != target_op) {
5999 op_ctx->
pc += skip_bytes;
6015 if (
method->is_serialized) {
6019 ctx->sync_level =
ctx->cur_frame->prev_sync_level;
6023 call_frame_array_pop(&
ctx->call_stack);
6025 ctx->cur_frame = call_frame_array_last(&
ctx->call_stack);
6034 static const uacpi_char *unknown_path =
"<unknown>";
6044 absolute_path = unknown_path;
6048 " #%zu in %s()+%u/%u at %s",
6049 depth, absolute_path, aml_offset, method_size,
op
6052 if (absolute_path != oom_absolute_path && absolute_path != unknown_path)
6065 depth = call_frame_array_size(&
ctx->call_stack);
6075 table_level_code =
ctx->cur_frame->method->named_objects_persist;
6077 if (table_level_code &&
idx != 0)
6086 while (op_context_array_size(&
ctx->cur_frame->pending_ops) != 0) {
6088 op = op_context_array_last(
6089 &
ctx->cur_frame->pending_ops
6115 op_name +=
sizeof(
"InternalOp") - 1;
6117 op_name =
"<unknown>";
6121 code_block_array_at(&
ctx->cur_frame->code_blocks, 0),
idx,
6122 ctx->cur_frame->code_offset,
ctx->cur_frame->method->size,
6126 should_stop =
idx++ == 0 && table_level_code;
6128 }
while (--
depth && !should_stop);
6137 while (held_mutexes_array_size(&
ctx->held_mutexes) != 0) {
6140 *held_mutexes_array_last(&
ctx->held_mutexes),
6145 call_frame_array_clear(&
ctx->call_stack);
6146 held_mutexes_array_clear(&
ctx->held_mutexes);
6189 goto handle_method_abort;
6196 goto handle_method_abort;
6200 handle_method_abort:
6201 uacpi_error(
"aborting %s due to previous error: %s",
6202 ctx->cur_frame->method->named_objects_persist ?
6203 "table load" :
"method invocation",
6212 if (
ctx->cur_frame) {
6215 it = item_array_last(&
ctx->cur_op_ctx->items);
6246 uacpi_error(
"_OSI: invalid argument type %s, expected a String",
6262 uacpi_trace(
"_OSI(%s) => reporting as %ssupported",
6263 arg->buffer->text, is_supported ?
"" :
"un");
static unsigned char bytes[4]
void user(int argc, const char *argv[])
uacpi_status uacpi_acquire_aml_mutex(uacpi_mutex *, uacpi_u16 timeout)
uacpi_status uacpi_release_aml_mutex(uacpi_mutex *)
uacpi_bool uacpi_this_thread_owns_aml_mutex(uacpi_mutex *)
static void cleanup(void)
#define ACPI_SMALL_ITEM_NAME_IDX
struct uacpi_runtime_context g_uacpi_rt_ctx
static uacpi_bool uacpi_should_log(enum uacpi_log_level lvl)
#define UACPI_ARRAY_SIZE(arr)
uacpi_size uacpi_round_up_bits_to_bytes(uacpi_size bit_length)
void uacpi_write_buffer_field(uacpi_buffer_field *field, const void *src, uacpi_size size)
uacpi_status uacpi_field_unit_get_bit_length(struct uacpi_field_unit *field, uacpi_size *out_length)
void uacpi_read_buffer_field(const uacpi_buffer_field *field, void *dst)
uacpi_status uacpi_field_unit_get_read_type(struct uacpi_field_unit *field, uacpi_object_type *out_type)
uacpi_status uacpi_read_field_unit(uacpi_field_unit *field, void *dst, uacpi_size size, uacpi_data_view *wtr_response)
uacpi_status uacpi_write_field_unit(uacpi_field_unit *field, const void *src, uacpi_size size, uacpi_data_view *wtr_response)
#define uacpi_log_lvl(lvl, fmt,...)
void uacpi_namespace_node_unref(uacpi_namespace_node *node)
uacpi_status uacpi_namespace_do_for_each_child(uacpi_namespace_node *parent, uacpi_iteration_callback descending_callback, uacpi_iteration_callback ascending_callback, uacpi_object_type_bits, uacpi_u32 max_depth, enum uacpi_should_lock, enum uacpi_permanent_only, void *user)
uacpi_status uacpi_namespace_write_unlock(void)
#define UACPI_NAMESPACE_NODE_FLAG_TEMPORARY
@ UACPI_PERMANENT_ONLY_NO
uacpi_namespace_node * uacpi_namespace_node_find_sub_node(uacpi_namespace_node *parent, uacpi_object_name name)
#define UACPI_NAMESPACE_NODE_FLAG_ALIAS
uacpi_object * uacpi_namespace_node_get_object(const uacpi_namespace_node *node)
uacpi_namespace_node * uacpi_namespace_node_alloc(uacpi_object_name name)
uacpi_status uacpi_namespace_node_install(uacpi_namespace_node *parent, uacpi_namespace_node *node)
uacpi_status uacpi_namespace_node_uninstall(uacpi_namespace_node *node)
uacpi_status uacpi_namespace_write_lock(void)
@ UACPI_MAY_SEARCH_ABOVE_PARENT_YES
uacpi_status uacpi_namespace_node_resolve(uacpi_namespace_node *scope, const uacpi_char *path, enum uacpi_should_lock, enum uacpi_may_search_above_parent, enum uacpi_permanent_only, uacpi_namespace_node **out_node)
#define UACPI_DUAL_NAME_PREFIX
#define UACPI_MULTI_NAME_PREFIX
const uacpi_char * uacpi_parse_op_to_string(enum uacpi_parse_op op)
@ UACPI_PARSE_OP_COMPUTATIONAL_DATA
@ UACPI_PARSE_OP_OBJECT_CONVERT_TO_DEEP_COPY
@ UACPI_PARSE_OP_EXISTING_NAMESTRING_OR_NULL_IF_LOAD
@ UACPI_PARSE_OP_TYPECHECK_ONE_OF
@ UACPI_PARSE_OP_STORE_TO_TARGET_INDIRECT
@ UACPI_PARSE_OP_TERM_ARG
@ UACPI_PARSE_OP_CREATE_NAMESTRING
@ UACPI_PARSE_OP_TRACKED_PKGLEN
@ UACPI_PARSE_OP_CONVERT_NAMESTRING
@ UACPI_PARSE_OP_INSTALL_NAMESPACE_NODE
@ UACPI_PARSE_OP_IF_LAST_NULL
@ UACPI_PARSE_OP_AML_PC_DECREMENT
@ UACPI_PARSE_OP_OBJECT_COPY_TO_PREV
@ UACPI_PARSE_OP_EXISTING_NAMESTRING_OR_NULL
@ UACPI_PARSE_OP_LOAD_TRUE_OBJECT
@ UACPI_PARSE_OP_EXISTING_NAMESTRING
@ UACPI_PARSE_OP_TERM_ARG_OR_NAMED_OBJECT
@ UACPI_PARSE_OP_IF_LAST_NOT_NULL
@ UACPI_PARSE_OP_INVOKE_HANDLER
@ UACPI_PARSE_OP_IF_HAS_DATA
@ UACPI_PARSE_OP_DISPATCH_TABLE_LOAD
@ UACPI_PARSE_OP_TERM_ARG_UNWRAP_INTERNAL
@ UACPI_PARSE_OP_TYPECHECK
@ UACPI_PARSE_OP_SIMPLE_NAME
@ UACPI_PARSE_OP_IF_LAST_FALSE
@ UACPI_PARSE_OP_ITEM_POP
@ UACPI_PARSE_OP_SWITCH_TO_NEXT_IF_EQUALS
@ UACPI_PARSE_OP_SUPERNAME_OR_UNRESOLVED
@ UACPI_PARSE_OP_RECORD_AML_PC
@ UACPI_PARSE_OP_DISPATCH_METHOD_CALL
@ UACPI_PARSE_OP_SUPERNAME
@ UACPI_PARSE_OP_OBJECT_ALLOC
@ UACPI_PARSE_OP_OBJECT_TRANSFER_TO_PREV
@ UACPI_PARSE_OP_IF_LAST_TRUE
@ UACPI_PARSE_OP_LOAD_INLINE_IMM_AS_OBJECT
@ UACPI_PARSE_OP_LOAD_IMM
@ UACPI_PARSE_OP_STORE_TO_TARGET
@ UACPI_PARSE_OP_SKIP_WITH_WARN_IF_NULL
@ UACPI_PARSE_OP_CREATE_NAMESTRING_OR_NULL_IF_LOAD
@ UACPI_PARSE_OP_EMPTY_OBJECT_ALLOC
@ UACPI_PARSE_OP_LOAD_IMM_AS_OBJECT
@ UACPI_PARSE_OP_OBJECT_CONVERT_TO_SHALLOW_COPY
@ UACPI_PARSE_OP_TERM_ARG_OR_NAMED_OBJECT_OR_UNRESOLVED
@ UACPI_PARSE_OP_IF_LAST_EQUALS
@ UACPI_PARSE_OP_IF_NOT_NULL
@ UACPI_PARSE_OP_LOAD_FALSE_OBJECT
@ UACPI_PARSE_OP_OBJECT_ALLOC_TYPED
@ UACPI_PARSE_OP_EMIT_SKIP_WARN
@ UACPI_PARSE_OP_LOAD_ZERO_IMM
@ UACPI_PARSE_OP_IF_SWITCHED_FROM
@ UACPI_PARSE_OP_TRUNCATE_NUMBER
@ UACPI_PARSE_OP_IMM_DECREMENT
@ UACPI_PARSE_OP_LOAD_INLINE_IMM
const struct uacpi_op_spec * uacpi_get_op_spec(uacpi_aml_op)
@ UACPI_OP_PROPERTY_SIMPLE_NAME
@ UACPI_OP_PROPERTY_TERM_ARG
@ UACPI_OP_PROPERTY_INVALID
@ UACPI_OP_PROPERTY_INTERNAL
@ UACPI_OP_PROPERTY_SUPERNAME
@ UACPI_OP_PROPERTY_OUT_OF_LINE
@ UACPI_OP_PROPERTY_TARGET
uacpi_status uacpi_find_aml_resource_end_tag(uacpi_data_view, uacpi_size *out_offset)
uacpi_u8 uacpi_bit_scan_forward(uacpi_u64)
uacpi_i32 uacpi_snprintf(uacpi_char *buffer, uacpi_size capacity, const uacpi_char *fmt,...)
#define uacpi_memzero(ptr, size)
#define uacpi_kernel_alloc_zeroed
uacpi_size uacpi_strnlen(const uacpi_char *str, uacpi_size max)
#define UACPI_ALIGN_DOWN(x, val, type)
#define uacpi_free(mem, _)
uacpi_u8 uacpi_bit_scan_backward(uacpi_u64)
void uacpi_memcpy_zerout(void *dst, const void *src, uacpi_size dst_size, uacpi_size src_size)
struct uacpi_object * uacpi_create_internal_reference(enum uacpi_reference_kind kind, uacpi_object *child)
@ UACPI_PREALLOC_OBJECTS_YES
uacpi_object * uacpi_create_object(uacpi_object_type type)
void uacpi_object_detach_child(uacpi_object *parent)
uacpi_bool uacpi_package_fill(uacpi_package *pkg, uacpi_size num_elements, enum uacpi_prealloc_objects prealloc_objects)
void uacpi_buffer_to_view(uacpi_buffer *, uacpi_data_view *)
@ UACPI_REFERENCE_KIND_LOCAL
@ UACPI_REFERENCE_KIND_ARG
@ UACPI_REFERENCE_KIND_PKG_INDEX
@ UACPI_REFERENCE_KIND_NAMED
@ UACPI_FIELD_UNIT_KIND_NORMAL
@ UACPI_FIELD_UNIT_KIND_BANK
@ UACPI_FIELD_UNIT_KIND_INDEX
uacpi_mutex * uacpi_create_mutex(void)
void uacpi_object_attach_child(uacpi_object *parent, uacpi_object *child)
uacpi_status uacpi_object_assign(uacpi_object *dst, uacpi_object *src, enum uacpi_assign_behavior)
void uacpi_method_unref(uacpi_control_method *)
@ UACPI_ASSIGN_BEHAVIOR_DEEP_COPY
@ UACPI_ASSIGN_BEHAVIOR_SHALLOW_COPY
void uacpi_mutex_unref(uacpi_mutex *)
uacpi_object * uacpi_unwrap_internal_reference(uacpi_object *object)
void uacpi_free_absolute_path(const uacpi_char *path)
#define UACPI_MAX_DEPTH_ANY
const uacpi_char * uacpi_namespace_node_generate_absolute_path(const uacpi_namespace_node *node)
uacpi_namespace_node * uacpi_namespace_root(void)
#define uacpi_likely_success(expr)
#define uacpi_unlikely_error(expr)
@ UACPI_STATUS_INVALID_ARGUMENT
@ UACPI_STATUS_AML_OBJECT_ALREADY_EXISTS
@ UACPI_STATUS_AML_OUT_OF_BOUNDS_INDEX
@ UACPI_STATUS_UNIMPLEMENTED
@ UACPI_STATUS_OUT_OF_MEMORY
@ UACPI_STATUS_OVERRIDDEN
@ UACPI_STATUS_INVALID_TABLE_LENGTH
@ UACPI_STATUS_AML_INCOMPATIBLE_OBJECT_TYPE
@ UACPI_STATUS_AML_UNDEFINED_REFERENCE
@ UACPI_STATUS_AML_LOOP_TIMEOUT
@ UACPI_STATUS_AML_BAD_ENCODING
@ UACPI_STATUS_AML_INVALID_OPCODE
@ UACPI_STATUS_MAPPING_FAILED
@ UACPI_STATUS_AML_INVALID_NAMESTRING
@ UACPI_STATUS_AML_CALL_STACK_DEPTH_LIMIT
@ UACPI_STATUS_AML_SYNC_LEVEL_TOO_HIGH
@ UACPI_STATUS_NO_HANDLER
const uacpi_char * uacpi_status_to_string(uacpi_status)
void uacpi_object_ref(uacpi_object *obj)
uacpi_bool uacpi_object_is_one_of(uacpi_object *, uacpi_object_type_bits type_mask)
@ UACPI_ITERATION_DECISION_BREAK
@ UACPI_ITERATION_DECISION_CONTINUE
@ UACPI_OBJECT_FIELD_UNIT_BIT
@ UACPI_OBJECT_BUFFER_FIELD_BIT
@ UACPI_OBJECT_OPERATION_REGION_BIT
@ UACPI_ACCESS_ATTRIBUTE_RAW_BYTES
@ UACPI_ACCESS_ATTRIBUTE_RAW_PROCESS_BYTES
@ UACPI_ACCESS_ATTRIBUTE_BYTES
const uacpi_char * uacpi_object_type_to_string(uacpi_object_type)
@ UACPI_OBJECT_POWER_RESOURCE
@ UACPI_OBJECT_UNINITIALIZED
@ UACPI_OBJECT_BUFFER_FIELD
@ UACPI_OBJECT_OPERATION_REGION
@ UACPI_OBJECT_FIELD_UNIT
@ UACPI_OBJECT_BUFFER_INDEX
@ UACPI_FIRMWARE_REQUEST_TYPE_FATAL
@ UACPI_FIRMWARE_REQUEST_TYPE_BREAKPOINT
uacpi_bool uacpi_object_is(uacpi_object *, uacpi_object_type)
@ UACPI_ADDRESS_SPACE_SYSTEM_MEMORY
@ UACPI_ADDRESS_SPACE_TABLE_DATA
@ UACPI_ADDRESS_SPACE_PCC
void uacpi_object_unref(uacpi_object *obj)
void uacpi_events_match_post_dynamic_table_load(void)
static uacpi_status field_byte_size(uacpi_object *obj, uacpi_size *out_size)
static uacpi_status handle_arg(struct execution_context *ctx)
static uacpi_status handle_control_flow(struct execution_context *ctx)
static uacpi_status handle_create_field(struct execution_context *ctx)
static uacpi_status table_id_error(const uacpi_char *opcode, const uacpi_char *arg, uacpi_buffer *str)
static uacpi_status handle_concatenate(struct execution_context *ctx)
static uacpi_status handle_unload(struct execution_context *ctx)
#define AML_READ(ptr, offset)
static const uacpi_char *const op_trace_action_types[3]
static uacpi_status handle_deref_of(struct execution_context *ctx)
static uacpi_status handle_field_read(struct execution_context *ctx)
static uacpi_status frame_setup_base_scope(struct call_frame *frame, uacpi_namespace_node *scope, uacpi_control_method *method)
static uacpi_status typecheck_operand(const struct op_context *op_ctx, const uacpi_object *obj)
#define EXEC_OP_ERR_3(reason, arg0, arg1, arg2)
static uacpi_status prepare_table_load(void *ptr, enum uacpi_table_load_cause cause, uacpi_control_method *in_method)
static uacpi_status do_load_table(uacpi_namespace_node *parent, struct acpi_sdt_hdr *tbl, enum uacpi_table_load_cause cause)
static uacpi_status method_get_ret_target(struct execution_context *ctx, uacpi_object **out_operand)
static uacpi_status store_to_target(uacpi_object *dst, uacpi_object *src, uacpi_data_view *wtr_response)
static void apply_tracked_pkg(struct call_frame *frame, struct op_context *op_ctx)
static uacpi_status prepare_method_call(struct execution_context *ctx, uacpi_namespace_node *node, uacpi_control_method *method, enum method_call_type type, const uacpi_object_array *args)
static uacpi_bool op_allows_unresolved_if_load(enum uacpi_parse_op op)
static uacpi_status handle_code_block(struct execution_context *ctx)
@ RESOLVE_FAIL_IF_DOESNT_EXIST
@ RESOLVE_CREATE_LAST_NAMESEG_FAIL_IF_EXISTS
static void trace_method_abort(struct code_block *block, uacpi_size depth, uacpi_u32 aml_offset, uacpi_u32 method_size, const uacpi_char *op)
static void truncate_number_if_needed(uacpi_object *obj)
static uacpi_status handle_event_ctl(struct execution_context *ctx)
@ OP_HANDLER_CREATE_METHOD
@ OP_HANDLER_STALL_OR_SLEEP
@ OP_HANDLER_CREATE_DATA_REGION
@ OP_HANDLER_BINARY_LOGIC
@ OP_HANDLER_CREATE_MUTEX_OR_EVENT
@ OP_HANDLER_CREATE_FIELD
@ OP_HANDLER_COPY_OBJECT_OR_STORE
@ OP_HANDLER_NAMED_OBJECT
@ OP_HANDLER_CONCATENATE_RES
@ OP_HANDLER_CONTROL_FLOW
@ OP_HANDLER_FIRMWARE_REQUEST
@ OP_HANDLER_CREATE_BUFFER_FIELD
@ OP_HANDLER_CREATE_NAMED
@ OP_HANDLER_CREATE_OP_REGION
static uacpi_status debug_store(uacpi_object *src)
static uacpi_status field_get_read_type(uacpi_object *obj, uacpi_object_type *out_type)
static uacpi_status handle_create_named(struct execution_context *ctx)
static uacpi_status object_assign_with_implicit_cast(uacpi_object *dst, uacpi_object *src, uacpi_data_view *wtr_response)
static uacpi_status ensure_valid_idx(uacpi_object *obj, uacpi_size idx, uacpi_size src_size)
static uacpi_status method_get_ret_object(struct execution_context *ctx, uacpi_object **out_obj)
static uacpi_status handle_to(struct execution_context *ctx)
static uacpi_u8 parse_op_generates_item[0x100]
static uacpi_status handle_return(struct execution_context *ctx)
static uacpi_bool maybe_end_block(struct execution_context *ctx)
static void init_method_flags(uacpi_control_method *method, uacpi_u8 flags_byte)
static uacpi_status handle_create_method(struct execution_context *ctx)
static uacpi_status handle_buffer(struct execution_context *ctx)
static uacpi_status handle_mid(struct execution_context *ctx)
static uacpi_u64 ones(void)
static uacpi_object_type buffer_field_get_read_type(struct uacpi_buffer_field *field)
static void trace_pop(uacpi_u8 pop)
static uacpi_status do_binary_math(uacpi_object *arg0, uacpi_object *arg1, uacpi_object *tgt0, uacpi_object *tgt1, uacpi_aml_op op)
static uacpi_status name_string_to_path(struct call_frame *frame, uacpi_size offset, uacpi_char **out_string, uacpi_size *out_size)
static uacpi_status handle_create_mutex_or_event(struct execution_context *ctx)
static uacpi_status handle_inc_dec(struct execution_context *ctx)
static uacpi_status handle_unary_math(struct execution_context *ctx)
static uacpi_status handle_object_type(struct execution_context *ctx)
static void report_table_id_find_error(const uacpi_char *opcode, struct uacpi_table_identifiers *id, uacpi_status ret)
static uacpi_status handle_bcd(struct execution_context *ctx)
static void pop_op(struct execution_context *ctx)
static void trace_named_object_lookup_or_creation_failure(struct call_frame *frame, uacpi_size offset, enum uacpi_parse_op op, uacpi_status ret, enum uacpi_log_level level)
static uacpi_bool pop_item(struct op_context *op_ctx)
static uacpi_status held_mutexes_array_remove_and_release(struct held_mutexes_array *arr, uacpi_mutex *mutex, enum force_release force)
static uacpi_status handle_create_buffer_field(struct execution_context *ctx)
static uacpi_status build_table_id(const uacpi_char *opcode, struct uacpi_table_identifiers *out_id, uacpi_buffer *signature, uacpi_buffer *oem_id, uacpi_buffer *oem_table_id)
static uacpi_u8 handler_idx_of_ext_op[0x100]
static uacpi_status handle_match(struct execution_context *ctx)
static void emit_op_skip_warn(const struct op_context *op_ctx)
static uacpi_status handle_stall_or_sleep(struct execution_context *ctx)
static uacpi_status handle_notify(struct execution_context *ctx)
static uacpi_bool op_wants_supername(enum uacpi_parse_op op)
static uacpi_status do_make_empty_object(uacpi_buffer *buf, uacpi_bool is_string)
static uacpi_status handle_ref_of(struct execution_context *ctx)
static void write_buffer_index(uacpi_buffer_index *buf_idx, uacpi_data_view *src_buf)
static uacpi_status push_op(struct execution_context *ctx)
static uacpi_status parse_package_length(struct call_frame *frame, struct package_length *out_pkg)
static uacpi_status handle_to_string(struct execution_context *ctx)
static void * call_frame_cursor(struct call_frame *frame)
static uacpi_u8 peek_next_op(struct call_frame *frame, uacpi_aml_op *out_op)
static uacpi_status handle_copy_object_or_store(struct execution_context *ctx)
static uacpi_status handle_string(struct execution_context *ctx)
static uacpi_status handle_arg_or_local(struct execution_context *ctx, uacpi_size idx, enum argx_or_localx type)
static uacpi_status handle_timer(struct execution_context *ctx)
static uacpi_u8 op_decode_byte(struct op_context *ctx)
static void stack_unwind(struct execution_context *ctx)
static uacpi_bool op_wants_term_arg_or_operand(enum uacpi_parse_op op)
static uacpi_status create_named_scope(struct op_context *op_ctx)
static void debug_store_no_recurse(const uacpi_char *prefix, uacpi_object *src)
static uacpi_status exec_op(struct execution_context *ctx)
static uacpi_status begin_block_execution(struct execution_context *ctx)
static uacpi_u8 handler_idx_of_op[0x100]
static uacpi_object * reference_unwind(uacpi_object *obj)
uacpi_status uacpi_execute_table(void *tbl, enum uacpi_table_load_cause cause)
static bool op_is_invalid(const struct uacpi_op_spec *op)
static uacpi_status get_op(struct execution_context *ctx)
static uacpi_iteration_decision opregion_try_detach_from_parent(void *user, uacpi_namespace_node *node, uacpi_u32 node_depth)
static void object_replace_child(uacpi_object *parent, uacpi_object *new_child)
static void execution_context_release(struct execution_context *ctx)
static uacpi_status make_null_string(uacpi_buffer *buf)
static uacpi_bool op_allows_unresolved(enum uacpi_parse_op op)
static uacpi_status copy_object_to_reference(uacpi_object *dst, uacpi_object *src)
static uacpi_status handle_create_alias(struct execution_context *ctx)
static void trace_op(const struct uacpi_op_spec *op, enum op_trace_action_type action)
static uacpi_status typecheck_string(const struct op_context *op_ctx, const uacpi_object *obj)
#define EXEC_OP_ERR(reason)
static uacpi_status handle_load_table(struct execution_context *ctx)
static void frame_reset_post_end_block(struct execution_context *ctx, enum code_block_type type)
static uacpi_size sizeof_int(void)
static uacpi_status handle_local(struct execution_context *ctx)
static struct code_block * find_last_block(struct code_block_array *blocks, enum code_block_type type, uacpi_size *out_idx_plus_one)
static uacpi_status(* op_handlers[])(struct execution_context *ctx)
static uacpi_size call_frame_code_bytes_left(struct call_frame *frame)
static uacpi_aml_op op_decode_aml_op(struct op_context *op_ctx)
static uacpi_status handle_create_op_region(struct execution_context *ctx)
static void call_frame_clear(struct call_frame *frame)
static uacpi_status do_install_node_item(struct call_frame *frame, struct item *item)
static uacpi_status handle_sizeof(struct execution_context *ctx)
static uacpi_status handle_load(struct execution_context *ctx)
#define SPEC_COMPUTATIONAL_DATA
static uacpi_status resolve_name_string(struct call_frame *frame, enum resolve_behavior behavior, struct uacpi_namespace_node **out_node)
static uacpi_status handle_firmware_request(struct execution_context *ctx)
static void held_mutexes_array_remove_idx(struct held_mutexes_array *arr, uacpi_size i)
uacpi_status uacpi_execute_control_method(uacpi_namespace_node *scope, uacpi_control_method *method, const uacpi_object_array *args, uacpi_object **out_obj)
static uacpi_status handle_package(struct execution_context *ctx)
#define EXEC_OP_ERR_1(reason, arg0)
static void refresh_ctx_pointers(struct execution_context *ctx)
static uacpi_bool is_dynamic_table_load(enum uacpi_table_load_cause cause)
#define EXEC_OP_ERR_2(reason, arg0, arg1)
static uacpi_u64 object_to_integer(const uacpi_object *obj, uacpi_size max_buffer_bytes)
static uacpi_status handle_logical_not(struct execution_context *ctx)
static uacpi_status make_null_buffer(uacpi_buffer *buf)
static uacpi_bool call_frame_has_code(struct call_frame *frame)
static uacpi_u8 * buffer_index_cursor(uacpi_buffer_index *buf_idx)
static uacpi_bool match_one(enum match_op op, uacpi_u64 lhs, uacpi_u64 rhs)
static uacpi_status get_object_storage(uacpi_object *obj, uacpi_data_view *out_buf, uacpi_bool include_null)
static uacpi_status enter_method(struct execution_context *ctx, struct call_frame *new_frame, uacpi_control_method *method)
static void ctx_reload_post_ret(struct execution_context *ctx)
static bool op_is_internal(const struct uacpi_op_spec *op)
static uacpi_status ensure_is_a_field_unit(uacpi_namespace_node *node, uacpi_field_unit **out_field)
static uacpi_status handle_mutex_ctl(struct execution_context *ctx)
static uacpi_bool ctx_has_non_preempted_op(struct execution_context *ctx)
static uacpi_status typecheck_computational_data(const struct op_context *op_ctx, const uacpi_object *obj)
static uacpi_u32 get_field_length(struct item *item)
static uacpi_status store_to_reference(uacpi_object *dst, uacpi_object *src, uacpi_data_view *wtr_response)
static uacpi_status push_new_frame(struct execution_context *ctx, struct call_frame **out_frame)
static uacpi_status handle_concatenate_res(struct execution_context *ctx)
static uacpi_bool handle_logical_equality(uacpi_object *lhs, uacpi_object *rhs)
static uacpi_status ensure_is_an_op_region(uacpi_namespace_node *node, uacpi_namespace_node **out_node)
static uacpi_status handle_binary_math(struct execution_context *ctx)
static uacpi_status buffer_to_string(uacpi_buffer *buf, uacpi_buffer *str, uacpi_bool is_hex)
static uacpi_status handle_binary_logic(struct execution_context *ctx)
static uacpi_status handle_named_object(struct execution_context *ctx)
static uacpi_status integer_to_string(uacpi_u64 integer, uacpi_buffer *str, uacpi_bool is_hex)
static uacpi_status frame_push_args(struct call_frame *frame, struct op_context *op_ctx)
static uacpi_status uninstalled_op_handler(struct execution_context *ctx)
static uacpi_status parse_nameseg(uacpi_u8 *cursor, uacpi_object_name *out_name)
static uacpi_status typecheck_obj(const struct op_context *op_ctx, const uacpi_object *obj, enum uacpi_object_type expected_type, const uacpi_char *spec_desc)
static uacpi_bool handle_logical_less_or_greater(uacpi_aml_op op, uacpi_object *lhs, uacpi_object *rhs)
static uacpi_status handle_create_data_region(struct execution_context *ctx)
static uacpi_status op_typecheck(const struct op_context *op_ctx, const struct op_context *cur_op_ctx)
#define EXEC_OP_WARN(reason)
uacpi_status uacpi_osi(uacpi_handle handle, uacpi_object *retval)
static const uacpi_u8 * op_decode_cursor(const struct op_context *ctx)
static uacpi_status handle_index(struct execution_context *ctx)
#define DYNAMIC_ARRAY_WITH_INLINE_STORAGE_IMPL(name, type, prefix)
#define DYNAMIC_ARRAY_WITH_INLINE_STORAGE(name, type, inline_capacity)
GLint GLint GLsizei GLsizei GLsizei depth
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei width
GLuint GLuint GLuint GLuint arg1
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
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
uacpi_status uacpi_notify_all(uacpi_namespace_node *node, uacpi_u64 value)
void uacpi_opregion_uninstall_handler(uacpi_namespace_node *node)
uacpi_status uacpi_initialize_opregion_node(uacpi_namespace_node *node)
uacpi_status uacpi_handle_osi(const uacpi_char *string, uacpi_bool *out_value)
#define UACPI_PRI_TBL_HDR
uacpi_status uacpi_table_install_with_origin(void *virt, enum uacpi_table_origin origin, uacpi_table *out_table)
void uacpi_table_mark_as_loaded(uacpi_size idx)
#define UACPI_FMT_TBL_HDR(hdr)
#define UACPI_NANOSECONDS_PER_SEC
uacpi_status uacpi_string_to_integer(const uacpi_char *str, uacpi_size max_chars, enum uacpi_base base, uacpi_u64 *out_value)
uacpi_bool uacpi_is_valid_nameseg(uacpi_u8 *nameseg)
void uacpi_free_dynamic_string(const uacpi_char *str)
@ UACPI_TABLE_LOAD_CAUSE_HOST
@ UACPI_TABLE_LOAD_CAUSE_INIT
@ UACPI_TABLE_LOAD_CAUSE_LOAD_OP
@ UACPI_TABLE_LOAD_CAUSE_LOAD_TABLE_OP
static BOOL is_null(jsval_t v)
uacpi_bool uacpi_kernel_wait_for_event(uacpi_handle, uacpi_u16)
void * uacpi_kernel_alloc(uacpi_size size)
void uacpi_kernel_reset_event(uacpi_handle)
void uacpi_kernel_stall(uacpi_u8 usec)
void uacpi_kernel_sleep(uacpi_u64 msec)
uacpi_u64 uacpi_kernel_get_nanoseconds_since_boot(void)
uacpi_status uacpi_kernel_handle_firmware_request(uacpi_firmware_request *)
void uacpi_kernel_unmap(void *addr, uacpi_size len)
void * uacpi_kernel_map(uacpi_phys_addr addr, uacpi_size len)
void uacpi_kernel_signal_event(uacpi_handle)
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK ULONG PVOID ULONG PVOID ULONG out_size
static BOOL is_string(parse_buffer *buf)
for(i=0;i< sizeof(testsuite)/sizeof(testsuite[0]);++i) ok(call_test(testsuite[i].func)
static calc_node_t * pop(void)
uacpi_u32 uacpi_shareable_ref(uacpi_handle)
wchar_t const *const size_t const buffer_size
uacpi_u32 prev_while_code_offset
struct uacpi_namespace_node * cur_scope
struct temp_namespace_node_array temp_nodes
struct op_context_array pending_ops
uacpi_size last_while_idx_plus_one
struct uacpi_control_method * method
struct code_block_array code_blocks
uacpi_u64 prev_while_expiration
enum code_block_type type
struct uacpi_namespace_node * node
uacpi_u64 expiration_point
struct op_context * prev_op_ctx
struct code_block * cur_block
struct held_mutexes_array held_mutexes
struct call_frame * cur_frame
struct call_frame_array call_stack
struct op_context * cur_op_ctx
const struct uacpi_op_spec * cur_op
struct uacpi_field_unit * field1
struct uacpi_field_unit * field0
uacpi_namespace_node * region
struct uacpi_namespace_node * node
struct package_length pkg
uacpi_u8 immediate_bytes[8]
const struct uacpi_op_spec * op
uacpi_aml_op switched_from
uacpi_u8 named_objects_persist
struct uacpi_firmware_request::@711::@713 breakpoint
struct uacpi_firmware_request::@711::@714 fatal
struct uacpi_namespace_node * parent
uacpi_control_method * method
uacpi_field_unit * field_unit
uacpi_buffer_field buffer_field
uacpi_object * inner_object
uacpi_u8 * indirect_decode_ops
uacpi_object_name signature
uacpi_status uacpi_table_find(const uacpi_table_identifiers *id, uacpi_table *out_table)
uacpi_status uacpi_table_unref(uacpi_table *)
@ UACPI_TABLE_ORIGIN_FIRMWARE_VIRTUAL
Character const *const prefix
static const WCHAR props[]
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
static unsigned int block