5624{
5630
5631
5632
5633
5634
5639 } else {
5641 }
5642
5643 if (
ctx->prev_op_ctx)
5645
5646 for (;;) {
5649
5650 op_ctx =
ctx->cur_op_ctx;
5651 frame =
ctx->cur_frame;
5652
5653 if (op_ctx->
pc == 0 &&
ctx->prev_op_ctx) {
5654
5655
5656
5657
5658
5659
5663 }
5664
5667
5669 item = item_array_alloc(&op_ctx->
items);
5672
5676
5679
5683 } else {
5685 }
5688 }
5689
5694
5697
5700 break;
5701
5703 }
5704
5706
5708 if (
ctx->cur_op_ctx) {
5710 ctx->cur_op_ctx->pc++;
5711 }
5712
5714 }
5715
5718 break;
5719
5722
5723
5724
5725
5726
5728 next_op == UACPI_AML_OP_ZeroOp) {
5730 break;
5731 }
5733 }
5744
5745
5746
5747
5751
5757 break;
5758
5763
5767 src_width = 8;
5768 } else {
5771 }
5772
5776 );
5777 op_ctx->
pc += src_width;
5778 break;
5779 }
5780
5782 break;
5783
5788
5792
5797 } else {
5799 }
5800
5803 break;
5804 }
5805
5811 break;
5812 }
5813
5816 break;
5817
5820 break;
5821
5824
5826
5832 }
5833
5834 break;
5835 }
5836
5842
5844 for (
i = 0;
i < num_types;
i++) {
5848
5849 expected_mask |= 1u <<
type;
5850 }
5851
5854 break;
5855
5857
5860 "bad object type: expected one of %s/%s, got %s!",
5864 );
5865 break;
5866 }
5867
5869 "bad object type: expected one of 0x%08X, got %s!",
5871 );
5872 break;
5873 }
5874
5877 break;
5878
5881 break;
5882
5886 break;
5887
5892
5894 pkg = &item_array_at(&op_ctx->
items, pkg_idx)->pkg;
5895
5897 op_ctx->
pc += bytes_skip;
5898
5899 break;
5900 }
5901
5908
5912 } else {
5915 }
5916
5920
5922 op_ctx->
pc += bytes_skip;
5923
5924 break;
5925 }
5926
5929
5932
5934 op_ctx->
pc += bytes_skip;
5935
5936 break;
5937 }
5938
5943
5947
5948 if (is_false == skip_if_false)
5949 op_ctx->
pc += bytes_skip;
5950
5951 break;
5952 }
5953
5956 break;
5957 }
5958
5966
5970 else
5972
5974
5977
5978 if (prev_op) {
5981 } else {
5982
5983 is_ok = op_ctx->
op->code == UACPI_AML_OP_ExternalOp;
5984 }
5985
5986 if (is_ok)
5988 }
5989
5994
5995 if (frame->
method->named_objects_persist &&
5999
6000 first_ctx = op_context_array_at(&frame->
pending_ops, 0);
6001 abort_whileif = first_ctx->
op->code == UACPI_AML_OP_WhileOp ||
6002 first_ctx->
op->code == UACPI_AML_OP_IfOp;
6003
6007 }
6008 }
6009
6012 );
6013
6014 if (abort_whileif) {
6015 while (op_context_array_size(&frame->
pending_ops) != 1)
6017
6018 op_ctx = op_context_array_at(&frame->
pending_ops, 0);
6021 break;
6022 }
6023
6026 }
6027
6030 !frame->
method->named_objects_persist)
6032
6033 break;
6034 }
6035
6039
6042 else
6044
6046 break;
6047 }
6048
6055 }
6056 break;
6057
6062
6063 if (!
ctx->prev_op_ctx)
6064 break;
6065
6066 switch (prev_op) {
6072
6079
6080 break;
6084 break;
6085
6092 break;
6093
6094 default:
6095 EXEC_OP_ERR_1(
"don't know how to copy/transfer object to %u",
6096 prev_op);
6098 break;
6099 }
6100
6102 dst = item_array_last(&
ctx->prev_op_ctx->items);
6104
6108 } else {
6112 break;
6113 }
6114
6117 }
6118 }
6119 break;
6120 }
6121
6125
6127
6129 src = item_array_at(&op_ctx->
items,
6131 } else {
6133 }
6134
6135
6137 break;
6138
6140 break;
6141 }
6142
6143
6147 break;
6148
6153
6154 item_array_pop(&op_ctx->
items);
6156
6157
6160 break;
6161 }
6162
6165 else
6167
6170 break;
6171
6174 break;
6175 }
6176
6180
6181 node = item_array_at(&op_ctx->
items, 0)->node;
6183
6186 );
6188 }
6189
6193
6194 node = item_array_at(&op_ctx->
items, 0)->node;
6195 method = item_array_at(&op_ctx->
items, 1)->obj->method;
6196
6199 );
6201 }
6202
6204 uacpi_aml_op new_op = UACPI_AML_OP_InternalOpNamedObject;
6206
6210 break;
6211 }
6212
6214
6215 switch (
obj->type) {
6218
6219 switch (prev_op) {
6223 break;
6224 default:
6226 }
6227
6228 if (!should_invoke)
6229 break;
6230
6231 new_op = UACPI_AML_OP_InternalOpMethodCall0Args;
6232 new_op +=
obj->method->args;
6233 break;
6234 }
6235
6236
6237
6238
6239
6243 break;
6244
6249
6250 new_op = UACPI_AML_OP_InternalOpDerefNamedObject;
6251 break;
6252
6256
6258 break;
6259
6263
6266 );
6267
6269 "unable to perform a read from field %s: "
6270 "parent opregion gone", field_path
6271 );
6273 }
6274
6277 new_op = UACPI_AML_OP_InternalOpReadFieldAsBuffer;
6278 break;
6280 new_op = UACPI_AML_OP_InternalOpReadFieldAsInteger;
6281 break;
6282 default:
6284 continue;
6285 }
6286 break;
6287 }
6288 default:
6289 break;
6290 }
6291
6294 break;
6295 }
6296
6301
6305
6307 if (op_length == 0 || next_op != target_op) {
6308
6310 break;
6311 }
6312
6317 break;
6318 }
6319
6323
6326
6328 op_ctx->
pc += skip_bytes;
6329 break;
6330 }
6331
6332 default:
6335 break;
6336 }
6337 }
6338}
#define UACPI_ARRAY_SIZE(arr)
void uacpi_namespace_node_unref(uacpi_namespace_node *node)
#define UACPI_NAMESPACE_NODE_FLAG_TEMPORARY
@ 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)
#define uacpi_memzero(ptr, size)
uacpi_object * uacpi_create_object(uacpi_object_type type)
uacpi_status uacpi_object_assign(uacpi_object *dst, uacpi_object *src, enum uacpi_assign_behavior)
@ UACPI_ASSIGN_BEHAVIOR_DEEP_COPY
@ UACPI_ASSIGN_BEHAVIOR_SHALLOW_COPY
void uacpi_free_absolute_path(const uacpi_char *path)
const uacpi_char * uacpi_namespace_node_generate_absolute_path(const uacpi_namespace_node *node)
@ UACPI_STATUS_AML_OBJECT_ALREADY_EXISTS
@ UACPI_STATUS_UNIMPLEMENTED
@ UACPI_STATUS_AML_UNDEFINED_REFERENCE
void uacpi_object_ref(uacpi_object *obj)
uacpi_bool uacpi_object_is_one_of(uacpi_object *, uacpi_object_type_bits type_mask)
@ UACPI_OBJECT_BUFFER_FIELD
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 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 void truncate_number_if_needed(uacpi_object *obj)
static uacpi_status field_get_read_type(uacpi_object *obj, uacpi_object_type *out_type)
static uacpi_u8 parse_op_generates_item[0x100]
static uacpi_u64 ones(void)
static void trace_pop(uacpi_u8 pop)
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_u8 handler_idx_of_ext_op[0x100]
static void emit_op_skip_warn(const struct op_context *op_ctx)
static uacpi_bool op_wants_supername(enum uacpi_parse_op op)
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 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_u8 op_decode_byte(struct op_context *ctx)
static uacpi_bool op_wants_term_arg_or_operand(enum uacpi_parse_op op)
static uacpi_u8 handler_idx_of_op[0x100]
static uacpi_bool op_allows_unresolved(enum uacpi_parse_op op)
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)
static uacpi_status(* op_handlers[])(struct execution_context *ctx)
static uacpi_aml_op op_decode_aml_op(struct op_context *op_ctx)
static uacpi_status do_install_node_item(struct call_frame *frame, struct item *item)
static uacpi_status resolve_name_string(struct call_frame *frame, enum resolve_behavior behavior, struct uacpi_namespace_node **out_node)
#define EXEC_OP_ERR_1(reason, arg0)
#define EXEC_OP_ERR_2(reason, arg0, arg1)
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_status op_typecheck(const struct op_context *op_ctx, const struct op_context *cur_op_ctx)
static const uacpi_u8 * op_decode_cursor(const struct op_context *ctx)
GLuint GLuint GLsizei GLenum type
GLint GLint GLsizei width
static BOOL is_null(jsval_t v)
uacpi_u8 immediate_bytes[8]
uacpi_aml_op switched_from
uacpi_control_method * method