459b81affa99317ea096135ee57ef64aa9e736ee
[reactos.git] / reactos / drivers / bus / acpi / dispatcher / dsopcode.c
1 /******************************************************************************
2 *
3 * Module Name: dsopcode - Dispatcher Op Region support and handling of
4 * "control" opcodes
5 * $Revision: 1.1 $
6 *
7 *****************************************************************************/
8
9 /*
10 * Copyright (C) 2000, 2001 R. Byron Moore
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 */
26
27
28 #include "acpi.h"
29 #include "acparser.h"
30 #include "amlcode.h"
31 #include "acdispat.h"
32 #include "acinterp.h"
33 #include "acnamesp.h"
34 #include "acevents.h"
35 #include "actables.h"
36
37 #define _COMPONENT ACPI_DISPATCHER
38 MODULE_NAME ("dsopcode")
39
40
41 /*****************************************************************************
42 *
43 * FUNCTION: Acpi_ds_get_field_unit_arguments
44 *
45 * PARAMETERS: Obj_desc - A valid Field_unit object
46 *
47 * RETURN: Status.
48 *
49 * DESCRIPTION: Get Field_unit Buffer and Index. This implements the late
50 * evaluation of these field attributes.
51 *
52 ****************************************************************************/
53
54 ACPI_STATUS
55 acpi_ds_get_field_unit_arguments (
56 ACPI_OPERAND_OBJECT *obj_desc)
57 {
58 ACPI_OPERAND_OBJECT *extra_desc;
59 ACPI_NAMESPACE_NODE *node;
60 ACPI_PARSE_OBJECT *op;
61 ACPI_PARSE_OBJECT *field_op;
62 ACPI_STATUS status;
63 ACPI_TABLE_DESC *table_desc;
64
65
66 if (obj_desc->common.flags & AOPOBJ_DATA_VALID) {
67 return (AE_OK);
68 }
69
70
71 /* Get the AML pointer (method object) and Field_unit node */
72
73 extra_desc = obj_desc->field_unit.extra;
74 node = obj_desc->field_unit.node;
75
76 /*
77 * Allocate a new parser op to be the root of the parsed
78 * Op_region tree
79 */
80
81 op = acpi_ps_alloc_op (AML_SCOPE_OP);
82 if (!op) {
83 return (AE_NO_MEMORY);
84 }
85
86 /* Save the Node for use in Acpi_ps_parse_aml */
87
88 op->node = acpi_ns_get_parent_object (node);
89
90 /* Get a handle to the parent ACPI table */
91
92 status = acpi_tb_handle_to_object (node->owner_id, &table_desc);
93 if (ACPI_FAILURE (status)) {
94 return (status);
95 }
96
97 /* Pass1: Parse the entire Field_unit declaration */
98
99 status = acpi_ps_parse_aml (op, extra_desc->extra.pcode,
100 extra_desc->extra.pcode_length, 0,
101 NULL, NULL, NULL, acpi_ds_load1_begin_op, acpi_ds_load1_end_op);
102 if (ACPI_FAILURE (status)) {
103 acpi_ps_delete_parse_tree (op);
104 return (status);
105 }
106
107
108 /* Get and init the actual Fiel_unit_op created above */
109
110 field_op = op->value.arg;
111 op->node = node;
112
113
114 field_op = op->value.arg;
115 field_op->node = node;
116 acpi_ps_delete_parse_tree (op);
117
118 /* Acpi_evaluate the address and length arguments for the Op_region */
119
120 op = acpi_ps_alloc_op (AML_SCOPE_OP);
121 if (!op) {
122 return (AE_NO_MEMORY);
123 }
124
125 op->node = acpi_ns_get_parent_object (node);
126
127 status = acpi_ps_parse_aml (op, extra_desc->extra.pcode,
128 extra_desc->extra.pcode_length,
129 ACPI_PARSE_EXECUTE | ACPI_PARSE_DELETE_TREE,
130 NULL /*Method_desc*/, NULL, NULL,
131 acpi_ds_exec_begin_op, acpi_ds_exec_end_op);
132 /* All done with the parse tree, delete it */
133
134 acpi_ps_delete_parse_tree (op);
135
136
137 /*
138 * The pseudo-method object is no longer needed since the region is
139 * now initialized
140 */
141 acpi_cm_remove_reference (obj_desc->field_unit.extra);
142 obj_desc->field_unit.extra = NULL;
143
144 return (status);
145 }
146
147
148 /*****************************************************************************
149 *
150 * FUNCTION: Acpi_ds_get_region_arguments
151 *
152 * PARAMETERS: Obj_desc - A valid region object
153 *
154 * RETURN: Status.
155 *
156 * DESCRIPTION: Get region address and length. This implements the late
157 * evaluation of these region attributes.
158 *
159 ****************************************************************************/
160
161 ACPI_STATUS
162 acpi_ds_get_region_arguments (
163 ACPI_OPERAND_OBJECT *obj_desc)
164 {
165 ACPI_OPERAND_OBJECT *extra_desc = NULL;
166 ACPI_NAMESPACE_NODE *node;
167 ACPI_PARSE_OBJECT *op;
168 ACPI_PARSE_OBJECT *region_op;
169 ACPI_STATUS status;
170 ACPI_TABLE_DESC *table_desc;
171
172
173 if (obj_desc->region.flags & AOPOBJ_DATA_VALID) {
174 return (AE_OK);
175 }
176
177
178 /* Get the AML pointer (method object) and region node */
179
180 extra_desc = obj_desc->region.extra;
181 node = obj_desc->region.node;
182
183 /*
184 * Allocate a new parser op to be the root of the parsed
185 * Op_region tree
186 */
187
188 op = acpi_ps_alloc_op (AML_SCOPE_OP);
189 if (!op) {
190 return (AE_NO_MEMORY);
191 }
192
193 /* Save the Node for use in Acpi_ps_parse_aml */
194
195 op->node = acpi_ns_get_parent_object (node);
196
197 /* Get a handle to the parent ACPI table */
198
199 status = acpi_tb_handle_to_object (node->owner_id, &table_desc);
200 if (ACPI_FAILURE (status)) {
201 return (status);
202 }
203
204 /* Parse the entire Op_region declaration, creating a parse tree */
205
206 status = acpi_ps_parse_aml (op, extra_desc->extra.pcode,
207 extra_desc->extra.pcode_length, 0,
208 NULL, NULL, NULL, acpi_ds_load1_begin_op, acpi_ds_load1_end_op);
209
210 if (ACPI_FAILURE (status)) {
211 acpi_ps_delete_parse_tree (op);
212 return (status);
213 }
214
215
216 /* Get and init the actual Region_op created above */
217
218 region_op = op->value.arg;
219 op->node = node;
220
221
222 region_op = op->value.arg;
223 region_op->node = node;
224 acpi_ps_delete_parse_tree (op);
225
226 /* Acpi_evaluate the address and length arguments for the Op_region */
227
228 op = acpi_ps_alloc_op (AML_SCOPE_OP);
229 if (!op) {
230 return (AE_NO_MEMORY);
231 }
232
233 op->node = acpi_ns_get_parent_object (node);
234
235 status = acpi_ps_parse_aml (op, extra_desc->extra.pcode,
236 extra_desc->extra.pcode_length,
237 ACPI_PARSE_EXECUTE | ACPI_PARSE_DELETE_TREE,
238 NULL /*Method_desc*/, NULL, NULL,
239 acpi_ds_exec_begin_op, acpi_ds_exec_end_op);
240
241 /* All done with the parse tree, delete it */
242
243 acpi_ps_delete_parse_tree (op);
244
245 return (status);
246 }
247
248
249 /*****************************************************************************
250 *
251 * FUNCTION: Acpi_ds_initialize_region
252 *
253 * PARAMETERS: Op - A valid region Op object
254 *
255 * RETURN: Status
256 *
257 * DESCRIPTION:
258 *
259 ****************************************************************************/
260
261 ACPI_STATUS
262 acpi_ds_initialize_region (
263 ACPI_HANDLE obj_handle)
264 {
265 ACPI_OPERAND_OBJECT *obj_desc;
266 ACPI_STATUS status;
267
268
269 obj_desc = acpi_ns_get_attached_object (obj_handle);
270
271 /* Namespace is NOT locked */
272
273 status = acpi_ev_initialize_region (obj_desc, FALSE);
274
275 return (status);
276 }
277
278
279 /*****************************************************************************
280 *
281 * FUNCTION: Acpi_ds_eval_field_unit_operands
282 *
283 * PARAMETERS: Op - A valid Field_unit Op object
284 *
285 * RETURN: Status
286 *
287 * DESCRIPTION: Get Field_unit Buffer and Index
288 * Called from Acpi_ds_exec_end_op during Field_unit parse tree walk
289 *
290 ****************************************************************************/
291
292 ACPI_STATUS
293 acpi_ds_eval_field_unit_operands (
294 ACPI_WALK_STATE *walk_state,
295 ACPI_PARSE_OBJECT *op)
296 {
297 ACPI_STATUS status;
298 ACPI_OPERAND_OBJECT *field_desc;
299 ACPI_NAMESPACE_NODE *node;
300 ACPI_PARSE_OBJECT *next_op;
301 u32 offset;
302 u32 bit_offset;
303 u16 bit_count;
304
305
306 ACPI_OPERAND_OBJECT *res_desc = NULL;
307 ACPI_OPERAND_OBJECT *cnt_desc = NULL;
308 ACPI_OPERAND_OBJECT *off_desc = NULL;
309 ACPI_OPERAND_OBJECT *src_desc = NULL;
310 u32 num_operands = 3;
311
312
313 /*
314 * This is where we evaluate the address and length fields of the Op_field_unit declaration
315 */
316
317 node = op->node;
318
319 /* Next_op points to the op that holds the Buffer */
320 next_op = op->value.arg;
321
322 /* Acpi_evaluate/create the address and length operands */
323
324 status = acpi_ds_create_operands (walk_state, next_op);
325 if (ACPI_FAILURE (status)) {
326 return (status);
327 }
328
329 field_desc = acpi_ns_get_attached_object (node);
330 if (!field_desc) {
331 return (AE_NOT_EXIST);
332 }
333
334
335 /* Resolve the operands */
336
337 status = acpi_aml_resolve_operands (op->opcode, WALK_OPERANDS, walk_state);
338
339 /* Get the operands */
340
341 status |= acpi_ds_obj_stack_pop_object (&res_desc, walk_state);
342 if (AML_CREATE_FIELD_OP == op->opcode) {
343 num_operands = 4;
344 status |= acpi_ds_obj_stack_pop_object (&cnt_desc, walk_state);
345 }
346
347 status |= acpi_ds_obj_stack_pop_object (&off_desc, walk_state);
348 status |= acpi_ds_obj_stack_pop_object (&src_desc, walk_state);
349
350 if (ACPI_FAILURE (status)) {
351 /* Invalid parameters on object stack */
352
353 goto cleanup;
354 }
355
356
357 offset = (u32) off_desc->integer.value;
358
359
360 /*
361 * If Res_desc is a Name, it will be a direct name pointer after
362 * Acpi_aml_resolve_operands()
363 */
364
365 if (!VALID_DESCRIPTOR_TYPE (res_desc, ACPI_DESC_TYPE_NAMED)) {
366 status = AE_AML_OPERAND_TYPE;
367 goto cleanup;
368 }
369
370
371 /*
372 * Setup the Bit offsets and counts, according to the opcode
373 */
374
375 switch (op->opcode) {
376
377 /* Def_create_bit_field */
378
379 case AML_BIT_FIELD_OP:
380
381 /* Offset is in bits, Field is a bit */
382
383 bit_offset = offset;
384 bit_count = 1;
385 break;
386
387
388 /* Def_create_byte_field */
389
390 case AML_BYTE_FIELD_OP:
391
392 /* Offset is in bytes, field is a byte */
393
394 bit_offset = 8 * offset;
395 bit_count = 8;
396 break;
397
398
399 /* Def_create_word_field */
400
401 case AML_WORD_FIELD_OP:
402
403 /* Offset is in bytes, field is a word */
404
405 bit_offset = 8 * offset;
406 bit_count = 16;
407 break;
408
409
410 /* Def_create_dWord_field */
411
412 case AML_DWORD_FIELD_OP:
413
414 /* Offset is in bytes, field is a dword */
415
416 bit_offset = 8 * offset;
417 bit_count = 32;
418 break;
419
420
421 /* Def_create_field */
422
423 case AML_CREATE_FIELD_OP:
424
425 /* Offset is in bits, count is in bits */
426
427 bit_offset = offset;
428 bit_count = (u16) cnt_desc->integer.value;
429 break;
430
431
432 default:
433
434 status = AE_AML_BAD_OPCODE;
435 goto cleanup;
436 }
437
438
439 /*
440 * Setup field according to the object type
441 */
442
443 switch (src_desc->common.type) {
444
445 /* Source_buff := Term_arg=>Buffer */
446
447 case ACPI_TYPE_BUFFER:
448
449 if (bit_offset + (u32) bit_count >
450 (8 * (u32) src_desc->buffer.length)) {
451 status = AE_AML_BUFFER_LIMIT;
452 goto cleanup;
453 }
454
455
456 /* Construct the remainder of the field object */
457
458 field_desc->field_unit.access = (u8) ACCESS_ANY_ACC;
459 field_desc->field_unit.lock_rule = (u8) GLOCK_NEVER_LOCK;
460 field_desc->field_unit.update_rule = (u8) UPDATE_PRESERVE;
461 field_desc->field_unit.length = bit_count;
462 field_desc->field_unit.bit_offset = (u8) (bit_offset % 8);
463 field_desc->field_unit.offset = DIV_8 (bit_offset);
464 field_desc->field_unit.container = src_desc;
465
466 /* Reference count for Src_desc inherits Field_desc count */
467
468 src_desc->common.reference_count = (u16) (src_desc->common.reference_count +
469 field_desc->common.reference_count);
470
471 break;
472
473
474 /* Improper object type */
475
476 default:
477
478
479
480 status = AE_AML_OPERAND_TYPE;
481 goto cleanup;
482 }
483
484
485 if (AML_CREATE_FIELD_OP == op->opcode) {
486 /* Delete object descriptor unique to Create_field */
487
488 acpi_cm_remove_reference (cnt_desc);
489 cnt_desc = NULL;
490 }
491
492
493 cleanup:
494
495 /* Always delete the operands */
496
497 acpi_cm_remove_reference (off_desc);
498 acpi_cm_remove_reference (src_desc);
499
500 if (AML_CREATE_FIELD_OP == op->opcode) {
501 acpi_cm_remove_reference (cnt_desc);
502 }
503
504 /* On failure, delete the result descriptor */
505
506 if (ACPI_FAILURE (status)) {
507 acpi_cm_remove_reference (res_desc); /* Result descriptor */
508 }
509
510 else {
511 /* Now the address and length are valid for this op_field_unit */
512
513 field_desc->field_unit.flags |= AOPOBJ_DATA_VALID;
514 }
515
516 return (status);
517 }
518
519
520 /*****************************************************************************
521 *
522 * FUNCTION: Acpi_ds_eval_region_operands
523 *
524 * PARAMETERS: Op - A valid region Op object
525 *
526 * RETURN: Status
527 *
528 * DESCRIPTION: Get region address and length
529 * Called from Acpi_ds_exec_end_op during Op_region parse tree walk
530 *
531 ****************************************************************************/
532
533 ACPI_STATUS
534 acpi_ds_eval_region_operands (
535 ACPI_WALK_STATE *walk_state,
536 ACPI_PARSE_OBJECT *op)
537 {
538 ACPI_STATUS status;
539 ACPI_OPERAND_OBJECT *obj_desc;
540 ACPI_OPERAND_OBJECT *operand_desc;
541 ACPI_NAMESPACE_NODE *node;
542 ACPI_PARSE_OBJECT *next_op;
543
544
545 /*
546 * This is where we evaluate the address and length fields of the Op_region declaration
547 */
548
549 node = op->node;
550
551 /* Next_op points to the op that holds the Space_iD */
552 next_op = op->value.arg;
553
554 /* Next_op points to address op */
555 next_op = next_op->next;
556
557 /* Acpi_evaluate/create the address and length operands */
558
559 status = acpi_ds_create_operands (walk_state, next_op);
560 if (ACPI_FAILURE (status)) {
561 return (status);
562 }
563
564 /* Resolve the length and address operands to numbers */
565
566 status = acpi_aml_resolve_operands (op->opcode, WALK_OPERANDS, walk_state);
567 if (ACPI_FAILURE (status)) {
568 return (status);
569 }
570
571
572 obj_desc = acpi_ns_get_attached_object (node);
573 if (!obj_desc) {
574 return (AE_NOT_EXIST);
575 }
576
577 /*
578 * Get the length operand and save it
579 * (at Top of stack)
580 */
581 operand_desc = walk_state->operands[walk_state->num_operands - 1];
582
583 obj_desc->region.length = (u32) operand_desc->integer.value;
584 acpi_cm_remove_reference (operand_desc);
585
586 /*
587 * Get the address and save it
588 * (at top of stack - 1)
589 */
590 operand_desc = walk_state->operands[walk_state->num_operands - 2];
591
592 obj_desc->region.address = (ACPI_PHYSICAL_ADDRESS) operand_desc->integer.value;
593 acpi_cm_remove_reference (operand_desc);
594
595
596 /* Now the address and length are valid for this opregion */
597
598 obj_desc->region.flags |= AOPOBJ_DATA_VALID;
599
600 return (status);
601 }
602
603
604 /*******************************************************************************
605 *
606 * FUNCTION: Acpi_ds_exec_begin_control_op
607 *
608 * PARAMETERS: Walk_list - The list that owns the walk stack
609 * Op - The control Op
610 *
611 * RETURN: Status
612 *
613 * DESCRIPTION: Handles all control ops encountered during control method
614 * execution.
615 *
616 ******************************************************************************/
617
618 ACPI_STATUS
619 acpi_ds_exec_begin_control_op (
620 ACPI_WALK_STATE *walk_state,
621 ACPI_PARSE_OBJECT *op)
622 {
623 ACPI_STATUS status = AE_OK;
624 ACPI_GENERIC_STATE *control_state;
625
626
627 switch (op->opcode) {
628 case AML_IF_OP:
629 case AML_WHILE_OP:
630
631 /*
632 * IF/WHILE: Create a new control state to manage these
633 * constructs. We need to manage these as a stack, in order
634 * to handle nesting.
635 */
636
637 control_state = acpi_cm_create_control_state ();
638 if (!control_state) {
639 status = AE_NO_MEMORY;
640 break;
641 }
642
643 acpi_cm_push_generic_state (&walk_state->control_state, control_state);
644
645 /*
646 * Save a pointer to the predicate for multiple executions
647 * of a loop
648 */
649 walk_state->control_state->control.aml_predicate_start =
650 walk_state->parser_state->aml - 1;
651 /* TBD: can this be removed? */
652 /*Acpi_ps_pkg_length_encoding_size (GET8 (Walk_state->Parser_state->Aml));*/
653 break;
654
655
656 case AML_ELSE_OP:
657
658 /* Predicate is in the state object */
659 /* If predicate is true, the IF was executed, ignore ELSE part */
660
661 if (walk_state->last_predicate) {
662 status = AE_CTRL_TRUE;
663 }
664
665 break;
666
667
668 case AML_RETURN_OP:
669
670 break;
671
672
673 default:
674 break;
675 }
676
677 return (status);
678 }
679
680
681 /*******************************************************************************
682 *
683 * FUNCTION: Acpi_ds_exec_end_control_op
684 *
685 * PARAMETERS: Walk_list - The list that owns the walk stack
686 * Op - The control Op
687 *
688 * RETURN: Status
689 *
690 * DESCRIPTION: Handles all control ops encountered during control method
691 * execution.
692 *
693 *
694 ******************************************************************************/
695
696 ACPI_STATUS
697 acpi_ds_exec_end_control_op (
698 ACPI_WALK_STATE *walk_state,
699 ACPI_PARSE_OBJECT *op)
700 {
701 ACPI_STATUS status = AE_OK;
702 ACPI_GENERIC_STATE *control_state;
703
704
705 switch (op->opcode) {
706 case AML_IF_OP:
707
708 /*
709 * Save the result of the predicate in case there is an
710 * ELSE to come
711 */
712
713 walk_state->last_predicate =
714 (u8) walk_state->control_state->common.value;
715
716 /*
717 * Pop the control state that was created at the start
718 * of the IF and free it
719 */
720
721 control_state =
722 acpi_cm_pop_generic_state (&walk_state->control_state);
723
724 acpi_cm_delete_generic_state (control_state);
725
726 break;
727
728
729 case AML_ELSE_OP:
730
731 break;
732
733
734 case AML_WHILE_OP:
735
736 if (walk_state->control_state->common.value) {
737 /* Predicate was true, go back and evaluate it again! */
738
739 status = AE_CTRL_PENDING;
740 }
741
742
743 /* Pop this control state and free it */
744
745 control_state =
746 acpi_cm_pop_generic_state (&walk_state->control_state);
747
748 walk_state->aml_last_while = control_state->control.aml_predicate_start;
749 acpi_cm_delete_generic_state (control_state);
750
751 break;
752
753
754 case AML_RETURN_OP:
755
756
757 /*
758 * One optional operand -- the return value
759 * It can be either an immediate operand or a result that
760 * has been bubbled up the tree
761 */
762 if (op->value.arg) {
763 /* Return statement has an immediate operand */
764
765 status = acpi_ds_create_operands (walk_state, op->value.arg);
766 if (ACPI_FAILURE (status)) {
767 return (status);
768 }
769
770 /*
771 * If value being returned is a Reference (such as
772 * an arg or local), resolve it now because it may
773 * cease to exist at the end of the method.
774 */
775 status = acpi_aml_resolve_to_value (&walk_state->operands [0], walk_state);
776 if (ACPI_FAILURE (status)) {
777 return (status);
778 }
779
780 /*
781 * Get the return value and save as the last result
782 * value. This is the only place where Walk_state->Return_desc
783 * is set to anything other than zero!
784 */
785
786 walk_state->return_desc = walk_state->operands[0];
787 }
788
789 else if ((walk_state->results) &&
790 (walk_state->results->results.num_results > 0)) {
791 /*
792 * The return value has come from a previous calculation.
793 *
794 * If value being returned is a Reference (such as
795 * an arg or local), resolve it now because it may
796 * cease to exist at the end of the method.
797 *
798 * Allow references created by the Index operator to return unchanged.
799 */
800
801 if (VALID_DESCRIPTOR_TYPE (walk_state->results->results.obj_desc [0], ACPI_DESC_TYPE_INTERNAL) &&
802 ((walk_state->results->results.obj_desc [0])->common.type == INTERNAL_TYPE_REFERENCE) &&
803 ((walk_state->results->results.obj_desc [0])->reference.opcode != AML_INDEX_OP)) {
804 status = acpi_aml_resolve_to_value (&walk_state->results->results.obj_desc [0], walk_state);
805 if (ACPI_FAILURE (status)) {
806 return (status);
807 }
808 }
809
810 walk_state->return_desc = walk_state->results->results.obj_desc [0];
811 }
812
813 else {
814 /* No return operand */
815
816 if (walk_state->num_operands) {
817 acpi_cm_remove_reference (walk_state->operands [0]);
818 }
819
820 walk_state->operands [0] = NULL;
821 walk_state->num_operands = 0;
822 walk_state->return_desc = NULL;
823 }
824
825
826 /* End the control method execution right now */
827 status = AE_CTRL_TERMINATE;
828 break;
829
830
831 case AML_NOOP_OP:
832
833 /* Just do nothing! */
834 break;
835
836
837 case AML_BREAK_POINT_OP:
838
839 /* Call up to the OS dependent layer to handle this */
840
841 acpi_os_breakpoint (NULL);
842
843 /* If it returns, we are done! */
844
845 break;
846
847
848 case AML_BREAK_OP:
849
850 /*
851 * As per the ACPI specification:
852 * "The break operation causes the current package
853 * execution to complete"
854 * "Break -- Stop executing the current code package
855 * at this point"
856 *
857 * Returning AE_FALSE here will cause termination of
858 * the current package, and execution will continue one
859 * level up, starting with the completion of the parent Op.
860 */
861
862 status = AE_CTRL_FALSE;
863 break;
864
865
866 default:
867
868 status = AE_AML_BAD_OPCODE;
869 break;
870 }
871
872
873 return (status);
874 }
875