Update ACPICA to 20150818.
[haiku.git] / src / add-ons / kernel / bus_managers / acpi / acpica / components / parser / psobject.c
blob77e94345a862fc4cd6f84d664824f4315e43188e
1 /******************************************************************************
3 * Module Name: psobject - Support for parse objects
5 *****************************************************************************/
7 /******************************************************************************
9 * 1. Copyright Notice
11 * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
12 * All rights reserved.
14 * 2. License
16 * 2.1. This is your license from Intel Corp. under its intellectual property
17 * rights. You may have additional license terms from the party that provided
18 * you this software, covering your right to use that party's intellectual
19 * property rights.
21 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22 * copy of the source code appearing in this file ("Covered Code") an
23 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24 * base code distributed originally by Intel ("Original Intel Code") to copy,
25 * make derivatives, distribute, use and display any portion of the Covered
26 * Code in any form, with the right to sublicense such rights; and
28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29 * license (with the right to sublicense), under only those claims of Intel
30 * patents that are infringed by the Original Intel Code, to make, use, sell,
31 * offer to sell, and import the Covered Code and derivative works thereof
32 * solely to the minimum extent necessary to exercise the above copyright
33 * license, and in no event shall the patent license extend to any additions
34 * to or modifications of the Original Intel Code. No other license or right
35 * is granted directly or by implication, estoppel or otherwise;
37 * The above copyright and patent license is granted only if the following
38 * conditions are met:
40 * 3. Conditions
42 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43 * Redistribution of source code of any substantial portion of the Covered
44 * Code or modification with rights to further distribute source must include
45 * the above Copyright Notice, the above License, this list of Conditions,
46 * and the following Disclaimer and Export Compliance provision. In addition,
47 * Licensee must cause all Covered Code to which Licensee contributes to
48 * contain a file documenting the changes Licensee made to create that Covered
49 * Code and the date of any change. Licensee must include in that file the
50 * documentation of any changes made by any predecessor Licensee. Licensee
51 * must include a prominent statement that the modification is derived,
52 * directly or indirectly, from Original Intel Code.
54 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55 * Redistribution of source code of any substantial portion of the Covered
56 * Code or modification without rights to further distribute source must
57 * include the following Disclaimer and Export Compliance provision in the
58 * documentation and/or other materials provided with distribution. In
59 * addition, Licensee may not authorize further sublicense of source of any
60 * portion of the Covered Code, and must include terms to the effect that the
61 * license from Licensee to its licensee is limited to the intellectual
62 * property embodied in the software Licensee provides to its licensee, and
63 * not to intellectual property embodied in modifications its licensee may
64 * make.
66 * 3.3. Redistribution of Executable. Redistribution in executable form of any
67 * substantial portion of the Covered Code or modification must reproduce the
68 * above Copyright Notice, and the following Disclaimer and Export Compliance
69 * provision in the documentation and/or other materials provided with the
70 * distribution.
72 * 3.4. Intel retains all right, title, and interest in and to the Original
73 * Intel Code.
75 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76 * Intel shall be used in advertising or otherwise to promote the sale, use or
77 * other dealings in products derived from or relating to the Covered Code
78 * without prior written authorization from Intel.
80 * 4. Disclaimer and Export Compliance
82 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
86 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
87 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
88 * PARTICULAR PURPOSE.
90 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
96 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
97 * LIMITED REMEDY.
99 * 4.3. Licensee shall not export, either directly or indirectly, any of this
100 * software or system incorporating such software without first obtaining any
101 * required license or other approval from the U. S. Department of Commerce or
102 * any other agency or department of the United States Government. In the
103 * event Licensee exports any such software from the United States or
104 * re-exports any such software from a foreign destination, Licensee shall
105 * ensure that the distribution and export/re-export of the software is in
106 * compliance with all laws, regulations, orders, or other restrictions of the
107 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108 * any of its subsidiaries will export/re-export any technical data, process,
109 * software, or service, directly or indirectly, to any country for which the
110 * United States government or any agency thereof requires an export license,
111 * other governmental approval, or letter of assurance, without first obtaining
112 * such license, approval or letter.
114 *****************************************************************************/
116 #include "acpi.h"
117 #include "accommon.h"
118 #include "acparser.h"
119 #include "amlcode.h"
121 #define _COMPONENT ACPI_PARSER
122 ACPI_MODULE_NAME ("psobject")
125 /* Local prototypes */
127 static ACPI_STATUS
128 AcpiPsGetAmlOpcode (
129 ACPI_WALK_STATE *WalkState);
132 /*******************************************************************************
134 * FUNCTION: AcpiPsGetAmlOpcode
136 * PARAMETERS: WalkState - Current state
138 * RETURN: Status
140 * DESCRIPTION: Extract the next AML opcode from the input stream.
142 ******************************************************************************/
144 static ACPI_STATUS
145 AcpiPsGetAmlOpcode (
146 ACPI_WALK_STATE *WalkState)
148 UINT32 AmlOffset;
151 ACPI_FUNCTION_TRACE_PTR (PsGetAmlOpcode, WalkState);
154 WalkState->Aml = WalkState->ParserState.Aml;
155 WalkState->Opcode = AcpiPsPeekOpcode (&(WalkState->ParserState));
158 * First cut to determine what we have found:
159 * 1) A valid AML opcode
160 * 2) A name string
161 * 3) An unknown/invalid opcode
163 WalkState->OpInfo = AcpiPsGetOpcodeInfo (WalkState->Opcode);
165 switch (WalkState->OpInfo->Class)
167 case AML_CLASS_ASCII:
168 case AML_CLASS_PREFIX:
170 * Starts with a valid prefix or ASCII char, this is a name
171 * string. Convert the bare name string to a namepath.
173 WalkState->Opcode = AML_INT_NAMEPATH_OP;
174 WalkState->ArgTypes = ARGP_NAMESTRING;
175 break;
177 case AML_CLASS_UNKNOWN:
179 /* The opcode is unrecognized. Complain and skip unknown opcodes */
181 if (WalkState->PassNumber == 2)
183 AmlOffset = (UINT32) ACPI_PTR_DIFF (WalkState->Aml,
184 WalkState->ParserState.AmlStart);
186 ACPI_ERROR ((AE_INFO,
187 "Unknown opcode 0x%.2X at table offset 0x%.4X, ignoring",
188 WalkState->Opcode,
189 (UINT32) (AmlOffset + sizeof (ACPI_TABLE_HEADER))));
191 ACPI_DUMP_BUFFER ((WalkState->ParserState.Aml - 16), 48);
193 #ifdef ACPI_ASL_COMPILER
195 * This is executed for the disassembler only. Output goes
196 * to the disassembled ASL output file.
198 AcpiOsPrintf (
199 "/*\nError: Unknown opcode 0x%.2X at table offset 0x%.4X, context:\n",
200 WalkState->Opcode,
201 (UINT32) (AmlOffset + sizeof (ACPI_TABLE_HEADER)));
203 /* Dump the context surrounding the invalid opcode */
205 AcpiUtDumpBuffer (((UINT8 *) WalkState->ParserState.Aml - 16),
206 48, DB_BYTE_DISPLAY,
207 (AmlOffset + sizeof (ACPI_TABLE_HEADER) - 16));
208 AcpiOsPrintf (" */\n");
209 #endif
212 /* Increment past one-byte or two-byte opcode */
214 WalkState->ParserState.Aml++;
215 if (WalkState->Opcode > 0xFF) /* Can only happen if first byte is 0x5B */
217 WalkState->ParserState.Aml++;
220 return_ACPI_STATUS (AE_CTRL_PARSE_CONTINUE);
222 default:
224 /* Found opcode info, this is a normal opcode */
226 WalkState->ParserState.Aml += AcpiPsGetOpcodeSize (WalkState->Opcode);
227 WalkState->ArgTypes = WalkState->OpInfo->ParseArgs;
228 break;
231 return_ACPI_STATUS (AE_OK);
235 /*******************************************************************************
237 * FUNCTION: AcpiPsBuildNamedOp
239 * PARAMETERS: WalkState - Current state
240 * AmlOpStart - Begin of named Op in AML
241 * UnnamedOp - Early Op (not a named Op)
242 * Op - Returned Op
244 * RETURN: Status
246 * DESCRIPTION: Parse a named Op
248 ******************************************************************************/
250 ACPI_STATUS
251 AcpiPsBuildNamedOp (
252 ACPI_WALK_STATE *WalkState,
253 UINT8 *AmlOpStart,
254 ACPI_PARSE_OBJECT *UnnamedOp,
255 ACPI_PARSE_OBJECT **Op)
257 ACPI_STATUS Status = AE_OK;
258 ACPI_PARSE_OBJECT *Arg = NULL;
261 ACPI_FUNCTION_TRACE_PTR (PsBuildNamedOp, WalkState);
264 UnnamedOp->Common.Value.Arg = NULL;
265 UnnamedOp->Common.ArgListLength = 0;
266 UnnamedOp->Common.AmlOpcode = WalkState->Opcode;
269 * Get and append arguments until we find the node that contains
270 * the name (the type ARGP_NAME).
272 while (GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) &&
273 (GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) != ARGP_NAME))
275 Status = AcpiPsGetNextArg (WalkState, &(WalkState->ParserState),
276 GET_CURRENT_ARG_TYPE (WalkState->ArgTypes), &Arg);
277 if (ACPI_FAILURE (Status))
279 return_ACPI_STATUS (Status);
282 AcpiPsAppendArg (UnnamedOp, Arg);
283 INCREMENT_ARG_LIST (WalkState->ArgTypes);
287 * Make sure that we found a NAME and didn't run out of arguments
289 if (!GET_CURRENT_ARG_TYPE (WalkState->ArgTypes))
291 return_ACPI_STATUS (AE_AML_NO_OPERAND);
294 /* We know that this arg is a name, move to next arg */
296 INCREMENT_ARG_LIST (WalkState->ArgTypes);
299 * Find the object. This will either insert the object into
300 * the namespace or simply look it up
302 WalkState->Op = NULL;
304 Status = WalkState->DescendingCallback (WalkState, Op);
305 if (ACPI_FAILURE (Status))
307 if (Status != AE_CTRL_TERMINATE)
309 ACPI_EXCEPTION ((AE_INFO, Status, "During name lookup/catalog"));
311 return_ACPI_STATUS (Status);
314 if (!*Op)
316 return_ACPI_STATUS (AE_CTRL_PARSE_CONTINUE);
319 Status = AcpiPsNextParseState (WalkState, *Op, Status);
320 if (ACPI_FAILURE (Status))
322 if (Status == AE_CTRL_PENDING)
324 Status = AE_CTRL_PARSE_PENDING;
326 return_ACPI_STATUS (Status);
329 AcpiPsAppendArg (*Op, UnnamedOp->Common.Value.Arg);
331 if ((*Op)->Common.AmlOpcode == AML_REGION_OP ||
332 (*Op)->Common.AmlOpcode == AML_DATA_REGION_OP)
335 * Defer final parsing of an OperationRegion body, because we don't
336 * have enough info in the first pass to parse it correctly (i.e.,
337 * there may be method calls within the TermArg elements of the body.)
339 * However, we must continue parsing because the opregion is not a
340 * standalone package -- we don't know where the end is at this point.
342 * (Length is unknown until parse of the body complete)
344 (*Op)->Named.Data = AmlOpStart;
345 (*Op)->Named.Length = 0;
348 return_ACPI_STATUS (AE_OK);
352 /*******************************************************************************
354 * FUNCTION: AcpiPsCreateOp
356 * PARAMETERS: WalkState - Current state
357 * AmlOpStart - Op start in AML
358 * NewOp - Returned Op
360 * RETURN: Status
362 * DESCRIPTION: Get Op from AML
364 ******************************************************************************/
366 ACPI_STATUS
367 AcpiPsCreateOp (
368 ACPI_WALK_STATE *WalkState,
369 UINT8 *AmlOpStart,
370 ACPI_PARSE_OBJECT **NewOp)
372 ACPI_STATUS Status = AE_OK;
373 ACPI_PARSE_OBJECT *Op;
374 ACPI_PARSE_OBJECT *NamedOp = NULL;
375 ACPI_PARSE_OBJECT *ParentScope;
376 UINT8 ArgumentCount;
377 const ACPI_OPCODE_INFO *OpInfo;
380 ACPI_FUNCTION_TRACE_PTR (PsCreateOp, WalkState);
383 Status = AcpiPsGetAmlOpcode (WalkState);
384 if (Status == AE_CTRL_PARSE_CONTINUE)
386 return_ACPI_STATUS (AE_CTRL_PARSE_CONTINUE);
389 /* Create Op structure and append to parent's argument list */
391 WalkState->OpInfo = AcpiPsGetOpcodeInfo (WalkState->Opcode);
392 Op = AcpiPsAllocOp (WalkState->Opcode, AmlOpStart);
393 if (!Op)
395 return_ACPI_STATUS (AE_NO_MEMORY);
398 if (WalkState->OpInfo->Flags & AML_NAMED)
400 Status = AcpiPsBuildNamedOp (WalkState, AmlOpStart, Op, &NamedOp);
401 AcpiPsFreeOp (Op);
402 if (ACPI_FAILURE (Status))
404 return_ACPI_STATUS (Status);
407 *NewOp = NamedOp;
408 return_ACPI_STATUS (AE_OK);
411 /* Not a named opcode, just allocate Op and append to parent */
413 if (WalkState->OpInfo->Flags & AML_CREATE)
416 * Backup to beginning of CreateXXXfield declaration
417 * BodyLength is unknown until we parse the body
419 Op->Named.Data = AmlOpStart;
420 Op->Named.Length = 0;
423 if (WalkState->Opcode == AML_BANK_FIELD_OP)
426 * Backup to beginning of BankField declaration
427 * BodyLength is unknown until we parse the body
429 Op->Named.Data = AmlOpStart;
430 Op->Named.Length = 0;
433 ParentScope = AcpiPsGetParentScope (&(WalkState->ParserState));
434 AcpiPsAppendArg (ParentScope, Op);
436 if (ParentScope)
438 OpInfo = AcpiPsGetOpcodeInfo (ParentScope->Common.AmlOpcode);
439 if (OpInfo->Flags & AML_HAS_TARGET)
441 ArgumentCount = AcpiPsGetArgumentCount (OpInfo->Type);
442 if (ParentScope->Common.ArgListLength > ArgumentCount)
444 Op->Common.Flags |= ACPI_PARSEOP_TARGET;
447 else if (ParentScope->Common.AmlOpcode == AML_INCREMENT_OP)
449 Op->Common.Flags |= ACPI_PARSEOP_TARGET;
453 if (WalkState->DescendingCallback != NULL)
456 * Find the object. This will either insert the object into
457 * the namespace or simply look it up
459 WalkState->Op = *NewOp = Op;
461 Status = WalkState->DescendingCallback (WalkState, &Op);
462 Status = AcpiPsNextParseState (WalkState, Op, Status);
463 if (Status == AE_CTRL_PENDING)
465 Status = AE_CTRL_PARSE_PENDING;
469 return_ACPI_STATUS (Status);
473 /*******************************************************************************
475 * FUNCTION: AcpiPsCompleteOp
477 * PARAMETERS: WalkState - Current state
478 * Op - Returned Op
479 * Status - Parse status before complete Op
481 * RETURN: Status
483 * DESCRIPTION: Complete Op
485 ******************************************************************************/
487 ACPI_STATUS
488 AcpiPsCompleteOp (
489 ACPI_WALK_STATE *WalkState,
490 ACPI_PARSE_OBJECT **Op,
491 ACPI_STATUS Status)
493 ACPI_STATUS Status2;
496 ACPI_FUNCTION_TRACE_PTR (PsCompleteOp, WalkState);
500 * Finished one argument of the containing scope
502 WalkState->ParserState.Scope->ParseScope.ArgCount--;
504 /* Close this Op (will result in parse subtree deletion) */
506 Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
507 if (ACPI_FAILURE (Status2))
509 return_ACPI_STATUS (Status2);
512 *Op = NULL;
514 switch (Status)
516 case AE_OK:
518 break;
520 case AE_CTRL_TRANSFER:
522 /* We are about to transfer to a called method */
524 WalkState->PrevOp = NULL;
525 WalkState->PrevArgTypes = WalkState->ArgTypes;
526 return_ACPI_STATUS (Status);
528 case AE_CTRL_END:
530 AcpiPsPopScope (&(WalkState->ParserState), Op,
531 &WalkState->ArgTypes, &WalkState->ArgCount);
533 if (*Op)
535 WalkState->Op = *Op;
536 WalkState->OpInfo = AcpiPsGetOpcodeInfo ((*Op)->Common.AmlOpcode);
537 WalkState->Opcode = (*Op)->Common.AmlOpcode;
539 Status = WalkState->AscendingCallback (WalkState);
540 Status = AcpiPsNextParseState (WalkState, *Op, Status);
542 Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
543 if (ACPI_FAILURE (Status2))
545 return_ACPI_STATUS (Status2);
549 Status = AE_OK;
550 break;
552 case AE_CTRL_BREAK:
553 case AE_CTRL_CONTINUE:
555 /* Pop off scopes until we find the While */
557 while (!(*Op) || ((*Op)->Common.AmlOpcode != AML_WHILE_OP))
559 AcpiPsPopScope (&(WalkState->ParserState), Op,
560 &WalkState->ArgTypes, &WalkState->ArgCount);
563 /* Close this iteration of the While loop */
565 WalkState->Op = *Op;
566 WalkState->OpInfo = AcpiPsGetOpcodeInfo ((*Op)->Common.AmlOpcode);
567 WalkState->Opcode = (*Op)->Common.AmlOpcode;
569 Status = WalkState->AscendingCallback (WalkState);
570 Status = AcpiPsNextParseState (WalkState, *Op, Status);
572 Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
573 if (ACPI_FAILURE (Status2))
575 return_ACPI_STATUS (Status2);
578 Status = AE_OK;
579 break;
581 case AE_CTRL_TERMINATE:
583 /* Clean up */
586 if (*Op)
588 Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
589 if (ACPI_FAILURE (Status2))
591 return_ACPI_STATUS (Status2);
594 AcpiUtDeleteGenericState (
595 AcpiUtPopGenericState (&WalkState->ControlState));
598 AcpiPsPopScope (&(WalkState->ParserState), Op,
599 &WalkState->ArgTypes, &WalkState->ArgCount);
601 } while (*Op);
603 return_ACPI_STATUS (AE_OK);
605 default: /* All other non-AE_OK status */
609 if (*Op)
611 Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
612 if (ACPI_FAILURE (Status2))
614 return_ACPI_STATUS (Status2);
618 AcpiPsPopScope (&(WalkState->ParserState), Op,
619 &WalkState->ArgTypes, &WalkState->ArgCount);
621 } while (*Op);
624 #if 0
626 * TBD: Cleanup parse ops on error
628 if (*Op == NULL)
630 AcpiPsPopScope (ParserState, Op,
631 &WalkState->ArgTypes, &WalkState->ArgCount);
633 #endif
634 WalkState->PrevOp = NULL;
635 WalkState->PrevArgTypes = WalkState->ArgTypes;
636 return_ACPI_STATUS (Status);
639 /* This scope complete? */
641 if (AcpiPsHasCompletedScope (&(WalkState->ParserState)))
643 AcpiPsPopScope (&(WalkState->ParserState), Op,
644 &WalkState->ArgTypes, &WalkState->ArgCount);
645 ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Popped scope, Op=%p\n", *Op));
647 else
649 *Op = NULL;
652 return_ACPI_STATUS (AE_OK);
656 /*******************************************************************************
658 * FUNCTION: AcpiPsCompleteFinalOp
660 * PARAMETERS: WalkState - Current state
661 * Op - Current Op
662 * Status - Current parse status before complete last
663 * Op
665 * RETURN: Status
667 * DESCRIPTION: Complete last Op.
669 ******************************************************************************/
671 ACPI_STATUS
672 AcpiPsCompleteFinalOp (
673 ACPI_WALK_STATE *WalkState,
674 ACPI_PARSE_OBJECT *Op,
675 ACPI_STATUS Status)
677 ACPI_STATUS Status2;
680 ACPI_FUNCTION_TRACE_PTR (PsCompleteFinalOp, WalkState);
684 * Complete the last Op (if not completed), and clear the scope stack.
685 * It is easily possible to end an AML "package" with an unbounded number
686 * of open scopes (such as when several ASL blocks are closed with
687 * sequential closing braces). We want to terminate each one cleanly.
689 ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "AML package complete at Op %p\n", Op));
692 if (Op)
694 if (WalkState->AscendingCallback != NULL)
696 WalkState->Op = Op;
697 WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
698 WalkState->Opcode = Op->Common.AmlOpcode;
700 Status = WalkState->AscendingCallback (WalkState);
701 Status = AcpiPsNextParseState (WalkState, Op, Status);
702 if (Status == AE_CTRL_PENDING)
704 Status = AcpiPsCompleteOp (WalkState, &Op, AE_OK);
705 if (ACPI_FAILURE (Status))
707 return_ACPI_STATUS (Status);
711 if (Status == AE_CTRL_TERMINATE)
713 Status = AE_OK;
715 /* Clean up */
718 if (Op)
720 Status2 = AcpiPsCompleteThisOp (WalkState, Op);
721 if (ACPI_FAILURE (Status2))
723 return_ACPI_STATUS (Status2);
727 AcpiPsPopScope (&(WalkState->ParserState), &Op,
728 &WalkState->ArgTypes, &WalkState->ArgCount);
730 } while (Op);
732 return_ACPI_STATUS (Status);
735 else if (ACPI_FAILURE (Status))
737 /* First error is most important */
739 (void) AcpiPsCompleteThisOp (WalkState, Op);
740 return_ACPI_STATUS (Status);
744 Status2 = AcpiPsCompleteThisOp (WalkState, Op);
745 if (ACPI_FAILURE (Status2))
747 return_ACPI_STATUS (Status2);
751 AcpiPsPopScope (&(WalkState->ParserState), &Op, &WalkState->ArgTypes,
752 &WalkState->ArgCount);
754 } while (Op);
756 return_ACPI_STATUS (Status);