1 /******************************************************************************
3 * Module Name: adisasm - Application-level disassembler routines
6 *****************************************************************************/
8 /******************************************************************************
12 * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
13 * All rights reserved.
17 * 2.1. This is your license from Intel Corp. under its intellectual property
18 * rights. You may have additional license terms from the party that provided
19 * you this software, covering your right to use that party's intellectual
22 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
23 * copy of the source code appearing in this file ("Covered Code") an
24 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
25 * base code distributed originally by Intel ("Original Intel Code") to copy,
26 * make derivatives, distribute, use and display any portion of the Covered
27 * Code in any form, with the right to sublicense such rights; and
29 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
30 * license (with the right to sublicense), under only those claims of Intel
31 * patents that are infringed by the Original Intel Code, to make, use, sell,
32 * offer to sell, and import the Covered Code and derivative works thereof
33 * solely to the minimum extent necessary to exercise the above copyright
34 * license, and in no event shall the patent license extend to any additions
35 * to or modifications of the Original Intel Code. No other license or right
36 * is granted directly or by implication, estoppel or otherwise;
38 * The above copyright and patent license is granted only if the following
43 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
44 * Redistribution of source code of any substantial portion of the Covered
45 * Code or modification with rights to further distribute source must include
46 * the above Copyright Notice, the above License, this list of Conditions,
47 * and the following Disclaimer and Export Compliance provision. In addition,
48 * Licensee must cause all Covered Code to which Licensee contributes to
49 * contain a file documenting the changes Licensee made to create that Covered
50 * Code and the date of any change. Licensee must include in that file the
51 * documentation of any changes made by any predecessor Licensee. Licensee
52 * must include a prominent statement that the modification is derived,
53 * directly or indirectly, from Original Intel Code.
55 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
56 * Redistribution of source code of any substantial portion of the Covered
57 * Code or modification without rights to further distribute source must
58 * include the following Disclaimer and Export Compliance provision in the
59 * documentation and/or other materials provided with distribution. In
60 * addition, Licensee may not authorize further sublicense of source of any
61 * portion of the Covered Code, and must include terms to the effect that the
62 * license from Licensee to its licensee is limited to the intellectual
63 * property embodied in the software Licensee provides to its licensee, and
64 * not to intellectual property embodied in modifications its licensee may
67 * 3.3. Redistribution of Executable. Redistribution in executable form of any
68 * substantial portion of the Covered Code or modification must reproduce the
69 * above Copyright Notice, and the following Disclaimer and Export Compliance
70 * provision in the documentation and/or other materials provided with the
73 * 3.4. Intel retains all right, title, and interest in and to the Original
76 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
77 * Intel shall be used in advertising or otherwise to promote the sale, use or
78 * other dealings in products derived from or relating to the Covered Code
79 * without prior written authorization from Intel.
81 * 4. Disclaimer and Export Compliance
83 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
84 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
85 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
86 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
87 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
88 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
91 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
92 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
93 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
94 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
95 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
96 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
97 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
100 * 4.3. Licensee shall not export, either directly or indirectly, any of this
101 * software or system incorporating such software without first obtaining any
102 * required license or other approval from the U. S. Department of Commerce or
103 * any other agency or department of the United States Government. In the
104 * event Licensee exports any such software from the United States or
105 * re-exports any such software from a foreign destination, Licensee shall
106 * ensure that the distribution and export/re-export of the software is in
107 * compliance with all laws, regulations, orders, or other restrictions of the
108 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
109 * any of its subsidiaries will export/re-export any technical data, process,
110 * software, or service, directly or indirectly, to any country for which the
111 * United States government or any agency thereof requires an export license,
112 * other governmental approval, or letter of assurance, without first obtaining
113 * such license, approval or letter.
115 *****************************************************************************/
119 #include "acparser.h"
122 #include "acdisasm.h"
123 #include "acdispat.h"
124 #include "acnamesp.h"
132 #define _COMPONENT ACPI_TOOLS
133 ACPI_MODULE_NAME ("adisasm")
136 ACPI_PARSE_OBJECT *AcpiGbl_ParsedNamespaceRoot;
139 #ifndef _ACPI_ASL_COMPILER
142 ACPI_PARSE_OBJECT *Op,
143 ACPI_WALK_STATE *WalkState)
150 AcpiDsRestartControlMethod (
151 ACPI_WALK_STATE *WalkState,
152 ACPI_OPERAND_OBJECT *ReturnDesc)
158 AcpiDsTerminateControlMethod (
159 ACPI_WALK_STATE *WalkState)
165 AcpiDsCallControlMethod (
166 ACPI_THREAD_STATE *Thread,
167 ACPI_WALK_STATE *WalkState,
168 ACPI_PARSE_OBJECT *Op)
174 AcpiDsMethodDataInitArgs (
175 ACPI_OPERAND_OBJECT **Params,
176 UINT32 MaxParamCount,
177 ACPI_WALK_STATE *WalkState)
183 #define FILE_SUFFIX_DISASSEMBLY "dsl"
184 #define ACPI_TABLE_FILE_SUFFIX ".dat"
185 char FilenameBuf[20];
187 /******************************************************************************
189 * FUNCTION: AfGenerateFilename
195 * DESCRIPTION: Build an output filename from an ACPI table ID string
197 ******************************************************************************/
208 for (i = 0; Prefix[i]; i++)
210 FilenameBuf[i] = Prefix[i];
213 FilenameBuf[i] = '_';
216 for (j = 0; j < 8 && (TableId[j] != ' ') && (TableId[j] != 0); i++, j++)
218 FilenameBuf[i] = TableId[j];
222 strcat (FilenameBuf, ACPI_TABLE_FILE_SUFFIX);
227 /******************************************************************************
229 * FUNCTION: AfWriteBuffer
235 * DESCRIPTION: Open a file and write out a single buffer
237 ******************************************************************************/
246 ACPI_NATIVE_INT Actual;
249 fp = fopen (Filename, "wb");
252 printf ("Couldn't open %s\n", Filename);
256 Actual = fwrite (Buffer, (size_t) Length, 1, fp);
262 /******************************************************************************
264 * FUNCTION: AfWriteTable
270 * DESCRIPTION: Dump the loaded tables to a file (or files)
272 ******************************************************************************/
276 ACPI_TABLE_HEADER *Table,
284 Filename = AdGenerateFilename (TableName, OemTableId);
285 AdWriteBuffer (Filename, (char *) Table, Length);
287 AcpiOsPrintf ("Table [%s] written to \"%s\"\n", TableName, Filename);
291 /*******************************************************************************
293 * FUNCTION: AdInitialize
299 * DESCRIPTION: CA initialization
301 ******************************************************************************/
310 /* ACPI CA subsystem initialization */
312 AcpiUtInitGlobals ();
313 Status = AcpiUtMutexInitialize ();
314 if (ACPI_FAILURE (Status))
319 Status = AcpiNsRootInitialize ();
324 /*******************************************************************************
326 * FUNCTION: FlGenerateFilename
328 * PARAMETERS: InputFilename - Original ASL source filename
329 * Suffix - New extension.
331 * RETURN: New filename containing the original base + the new suffix
333 * DESCRIPTION: Generate a new filename from the ASL source filename and a new
334 * extension. Used to create the *.LST, *.TXT, etc. files.
336 ******************************************************************************/
347 /* Copy the original filename to a new buffer */
349 NewFilename = ACPI_MEM_CALLOCATE (strlen (InputFilename) + strlen (Suffix));
350 strcpy (NewFilename, InputFilename);
352 /* Try to find the last dot in the filename */
354 Position = strrchr (NewFilename, '.');
357 /* Tack on the new suffix */
361 strcat (Position, Suffix);
365 /* No dot, add one and then the suffix */
367 strcat (NewFilename, ".");
368 strcat (NewFilename, Suffix);
375 /*******************************************************************************
377 * FUNCTION: FlSplitInputPathname
379 * PARAMETERS: InputFilename - The user-specified ASL source file to be
384 * DESCRIPTION: Split the input path into a directory and filename part
385 * 1) Directory part used to open include files
386 * 2) Filename part used to generate output filenames
388 ******************************************************************************/
391 FlSplitInputPathname (
393 char **OutDirectoryPath,
401 *OutDirectoryPath = NULL;
409 /* Get the path to the input filename's directory */
411 DirectoryPath = strdup (InputPath);
414 return (AE_NO_MEMORY);
417 Substring = strrchr (DirectoryPath, '\\');
420 Substring = strrchr (DirectoryPath, '/');
423 Substring = strrchr (DirectoryPath, ':');
429 DirectoryPath[0] = 0;
430 Filename = strdup (InputPath);
434 Filename = strdup (Substring + 1);
440 return (AE_NO_MEMORY);
443 *OutDirectoryPath = DirectoryPath;
444 *OutFilename = Filename;
450 /******************************************************************************
452 * FUNCTION: AdAmlDisassemble
454 * PARAMETERS: OutToFile - TRUE if output should go to a file
455 * Filename - AML input filename
459 * DESCRIPTION: Disassemble an entire ACPI table
461 *****************************************************************************/
469 BOOLEAN GetAllTables)
472 char *DisasmFilename = NULL;
474 ACPI_TABLE_HEADER *Table;
478 * Input: AML Code from either a file,
479 * or via GetTables (memory or registry)
483 Status = AcpiDbGetTableFromFile (Filename, &Table);
484 if (ACPI_FAILURE (Status))
491 Status = AdGetLocalTables (Filename, GetAllTables);
492 if (ACPI_FAILURE (Status))
494 AcpiOsPrintf ("Could not get ACPI tables, %s\n",
495 AcpiFormatException (Status));
499 if (!AcpiGbl_DbOpt_disasm)
504 /* Obtained the local tables, just disassmeble the DSDT */
506 Table = AcpiGbl_DSDT;
507 AcpiOsPrintf ("\nDisassembly of DSDT\n");
508 Prefix = AdGenerateFilename ("dsdt", AcpiGbl_DSDT->OemTableId);
513 * Redirect to a file if requested
517 /* Create/Open a disassembly output file */
519 DisasmFilename = FlGenerateFilename (Prefix, FILE_SUFFIX_DISASSEMBLY);
522 fprintf (stderr, "Could not generate output filename\n");
527 File = fopen (DisasmFilename, "w+");
530 fprintf (stderr, "Could not open output file\n");
535 AcpiOsRedirectOutput (File);
538 *OutFilename = DisasmFilename;
540 /* Always parse the tables, only option is what to display */
542 Status = AdParseTable (Table);
543 if (ACPI_FAILURE (Status))
545 AcpiOsPrintf ("Could not parse ACPI tables, %s\n",
546 AcpiFormatException (Status));
551 * TBD: We want to cross reference the namespace here, in order to
552 * generate External() statements. The problem is that the parse
553 * tree is in run-time (interpreter) format, not compiler format,
554 * so we cannot directly use the function below:
556 * Status = LkCrossReferenceNamespace ();
558 * We need to either convert the parse tree or create a new
559 * cross ref function that can handle interpreter parse trees
562 /* Optional displays */
564 if (AcpiGbl_DbOpt_disasm)
566 AdDisplayTables (Filename, Table);
567 fprintf (stderr, "Disassembly completed, written to \"%s\"\n", DisasmFilename);
574 AcpiOsRedirectOutput (stdout);
577 AcpiPsDeleteParseTree (AcpiGbl_ParsedNamespaceRoot);
582 /******************************************************************************
584 * FUNCTION: AdCreateTableHeader
586 * PARAMETERS: Filename - Input file for the table
587 * Table - Pointer to the raw table
591 * DESCRIPTION: Create the ASL table header, including ACPI CA signon with
592 * current time and date.
594 *****************************************************************************/
597 AdCreateTableHeader (
599 ACPI_TABLE_HEADER *Table)
606 AcpiOsPrintf ("/*\n * Intel ACPI Component Architecture\n");
607 AcpiOsPrintf (" * AML Disassembler version %8.8X\n", ACPI_CA_VERSION);
608 AcpiOsPrintf (" *\n * Disassembly of %s, %s */\n", Filename, ctime (&Timer));
611 "DefinitionBlock (\"%4.4s.aml\", \"%4.4s\", %hd, \"%.6s\", \"%.8s\", %u)\n",
612 Table->Signature, Table->Signature, Table->Revision,
613 Table->OemId, Table->OemTableId, Table->OemRevision);
617 /******************************************************************************
619 * FUNCTION: AdDisplayTables
621 * PARAMETERS: Filename - Input file for the table
625 * DESCRIPTION: Display (disassemble) loaded tables and dump raw tables
627 *****************************************************************************/
632 ACPI_TABLE_HEADER *Table)
636 if (!AcpiGbl_ParsedNamespaceRoot)
641 if (!AcpiGbl_DbOpt_verbose)
643 AdCreateTableHeader (Filename, Table);
646 AcpiDmDisassemble (NULL, AcpiGbl_ParsedNamespaceRoot, ACPI_UINT32_MAX);
648 if (AcpiGbl_DbOpt_verbose)
650 AcpiOsPrintf ("\n\nTable Header:\n");
651 AcpiUtDumpBuffer ((UINT8 *) Table, sizeof (ACPI_TABLE_HEADER),
652 DB_BYTE_DISPLAY, ACPI_UINT32_MAX);
654 AcpiOsPrintf ("Table Body (Length 0x%X)\n", Table->Length);
655 AcpiUtDumpBuffer (((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER)), Table->Length,
656 DB_BYTE_DISPLAY, ACPI_UINT32_MAX);
663 /******************************************************************************
665 * FUNCTION: AdDeferredParse
667 * PARAMETERS: Op - Root Op of the deferred opcode
668 * Aml - Pointer to the raw AML
669 * AmlLength - Length of the AML
673 * DESCRIPTION: Parse one deferred opcode
674 * (Methods, operation regions, etc.)
676 *****************************************************************************/
680 ACPI_PARSE_OBJECT *Op,
684 ACPI_WALK_STATE *WalkState;
686 ACPI_PARSE_OBJECT *SearchOp;
687 ACPI_PARSE_OBJECT *StartOp;
688 UINT32 BaseAmlOffset;
689 ACPI_PARSE_OBJECT *ExtraOp;
692 ACPI_FUNCTION_TRACE ("AdDeferredParse");
695 fprintf (stderr, ".");
697 if (!Aml || !AmlLength)
699 return_ACPI_STATUS (AE_OK);
702 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Parsing %s [%4.4s]\n",
703 Op->Common.AmlOpName, (char *) &Op->Named.Name));
705 WalkState = AcpiDsCreateWalkState (0, Op, NULL, NULL);
708 return_ACPI_STATUS (AE_NO_MEMORY);
711 Status = AcpiDsInitAmlWalk (WalkState, Op, NULL, Aml,
713 if (ACPI_FAILURE (Status))
715 return_ACPI_STATUS (Status);
718 /* Parse the method */
720 WalkState->ParseFlags &= ~ACPI_PARSE_DELETE_TREE;
721 Status = AcpiPsParseAml (WalkState);
724 * We need to update all of the Aml offsets, since the parser thought
725 * that the method began at offset zero. In reality, it began somewhere
726 * within the ACPI table, at the BaseAmlOffset. Walk the entire tree that
727 * was just created and update the AmlOffset in each Op
729 BaseAmlOffset = (Op->Common.Value.Arg)->Common.AmlOffset + 1;
730 StartOp = (Op->Common.Value.Arg)->Common.Next;
733 /* Walk the parse tree */
737 SearchOp->Common.AmlOffset += BaseAmlOffset;
738 SearchOp = AcpiPsGetDepthNext (StartOp, SearchOp);
742 * Link the newly parsed subtree into the main parse tree
744 switch (Op->Common.AmlOpcode)
748 case AML_VAR_PACKAGE_OP:
750 switch (Op->Common.AmlOpcode)
753 case AML_VAR_PACKAGE_OP:
754 ExtraOp = Op->Common.Value.Arg;
755 ExtraOp = ExtraOp->Common.Next;
756 Op->Common.Value.Arg = ExtraOp->Common.Value.Arg;
761 ExtraOp = Op->Common.Value.Arg;
762 Op->Common.Value.Arg = ExtraOp->Common.Value.Arg;
766 /* Must point all parents to the main tree */
772 if (SearchOp->Common.Parent == ExtraOp)
774 SearchOp->Common.Parent = Op;
776 SearchOp = AcpiPsGetDepthNext (StartOp, SearchOp);
784 return_ACPI_STATUS (AE_OK);
788 /******************************************************************************
790 * FUNCTION: AdParseDeferredOps
792 * PARAMETERS: Root - Root of the parse tree
796 * DESCRIPTION: Parse the deferred opcodes (Methods, regions, etc.)
798 *****************************************************************************/
802 ACPI_PARSE_OBJECT *Root)
804 ACPI_PARSE_OBJECT *Op = Root;
805 ACPI_STATUS Status = AE_OK;
806 const ACPI_OPCODE_INFO *OpInfo;
809 ACPI_FUNCTION_NAME ("AdParseDeferredOps");
810 fprintf (stderr, "Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)\n");
814 OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
815 if (!(OpInfo->Flags & AML_DEFER))
817 Op = AcpiPsGetDepthNext (Root, Op);
821 switch (Op->Common.AmlOpcode)
826 case AML_VAR_PACKAGE_OP:
828 Status = AdDeferredParse (Op, Op->Named.Data, Op->Named.Length);
829 if (ACPI_FAILURE (Status))
831 return_ACPI_STATUS (Status);
836 case AML_CREATE_QWORD_FIELD_OP:
837 case AML_CREATE_DWORD_FIELD_OP:
838 case AML_CREATE_WORD_FIELD_OP:
839 case AML_CREATE_BYTE_FIELD_OP:
840 case AML_CREATE_BIT_FIELD_OP:
841 case AML_CREATE_FIELD_OP:
843 /* Nothing to do in these cases */
848 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unhandled deferred opcode [%s]\n",
849 Op->Common.AmlOpName));
853 Op = AcpiPsGetDepthNext (Root, Op);
856 fprintf (stderr, "\n");
861 /******************************************************************************
863 * FUNCTION: AdGetLocalTables
869 * DESCRIPTION: Get the ACPI tables from either memory or a file
871 *****************************************************************************/
876 BOOLEAN GetAllTables)
879 ACPI_TABLE_HEADER TableHeader;
880 ACPI_TABLE_HEADER *NewTable;
883 char *FacsSuffix = "";
888 ACPI_STRNCPY (TableHeader.Signature, RSDT_SIG, 4);
889 AcpiOsTableOverride (&TableHeader, &NewTable);
892 fprintf (stderr, "Could not obtain RSDT\n");
893 return AE_NO_ACPI_TABLES;
896 #if ACPI_MACHINE_WIDTH != 64
898 if (!ACPI_STRNCMP (NewTable->Signature, RSDT_SIG, 4))
900 PointerSize = sizeof (UINT32);
905 PointerSize = sizeof (UINT64);
909 * Determine the number of tables pointed to by the RSDT/XSDT.
910 * This is defined by the ACPI Specification to be the number of
911 * pointers contained within the RSDT/XSDT. The size of the pointers
912 * is architecture-dependent.
914 NumTables = (NewTable->Length - sizeof (ACPI_TABLE_HEADER)) / PointerSize;
915 AcpiOsPrintf ("There are %d tables defined in the %4.4s\n\n",
916 NumTables, NewTable->Signature);
920 ACPI_STRNCPY (TableHeader.Signature, FADT_SIG, 4);
921 AcpiOsTableOverride (&TableHeader, &NewTable);
924 AcpiGbl_FADT = (void *) NewTable;
925 AdWriteTable (NewTable, NewTable->Length,
926 FADT_SIG, NewTable->OemTableId);
928 /* Use the FADT tableID for the FACS, since FACS has no ID */
930 FacsSuffix = AcpiGbl_FADT->OemTableId;
936 ACPI_STRNCPY (TableHeader.Signature, FACS_SIG, 4);
937 AcpiOsTableOverride (&TableHeader, &NewTable);
940 AcpiGbl_FACS = (void *) NewTable;
941 AdWriteTable (NewTable, AcpiGbl_FACS->Length,
942 FACS_SIG, FacsSuffix);
947 /* Always get the DSDT */
949 ACPI_STRNCPY (TableHeader.Signature, DSDT_SIG, 4);
950 AcpiOsTableOverride (&TableHeader, &NewTable);
954 AcpiGbl_DSDT = NewTable;
955 AdWriteTable (AcpiGbl_DSDT, AcpiGbl_DSDT->Length,
956 "DSDT", AcpiGbl_DSDT->OemTableId);
960 fprintf (stderr, "Could not obtain DSDT\n");
961 return AE_NO_ACPI_TABLES;
968 ACPI_STRNCPY (TableHeader.Signature, SSDT_SIG, 4);
969 Status = AcpiOsTableOverride (&TableHeader, &NewTable);
974 Status = AcpiOsTableOverride (&TableHeader, &NewTable);
981 /******************************************************************************
983 * FUNCTION: AdParseTable
989 * DESCRIPTION: Parse the DSDT.
991 *****************************************************************************/
995 ACPI_TABLE_HEADER *Table)
997 ACPI_STATUS Status = AE_OK;
998 ACPI_WALK_STATE *WalkState;
999 ACPI_TABLE_DESC TableDesc;
1006 return AE_NOT_EXIST;
1009 /* Pass 1: Parse everything except control method bodies */
1011 fprintf (stderr, "Pass 1 parse of [%4.4s]\n", (char *) Table->Signature);
1013 AmlLength = Table->Length - sizeof (ACPI_TABLE_HEADER);
1014 AmlStart = ((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER));
1016 /* Create the root object */
1018 AcpiGbl_ParsedNamespaceRoot = AcpiPsCreateScopeOp ();
1019 if (!AcpiGbl_ParsedNamespaceRoot)
1021 return AE_NO_MEMORY;
1024 /* Create and initialize a new walk state */
1026 WalkState = AcpiDsCreateWalkState (0,
1027 AcpiGbl_ParsedNamespaceRoot, NULL, NULL);
1030 return (AE_NO_MEMORY);
1033 Status = AcpiDsInitAmlWalk (WalkState, AcpiGbl_ParsedNamespaceRoot,
1034 NULL, AmlStart, AmlLength, NULL, 1);
1035 if (ACPI_FAILURE (Status))
1040 WalkState->ParseFlags &= ~ACPI_PARSE_DELETE_TREE;
1042 Status = AcpiPsParseAml (WalkState);
1043 if (ACPI_FAILURE (Status))
1050 TableDesc.AmlStart = AmlStart;
1051 TableDesc.AmlLength = AmlLength;
1052 fprintf (stderr, "Pass 2 parse of [%4.4s]\n", (char *) Table->Signature);
1054 Status = AcpiNsOneCompleteParse (2, &TableDesc);
1055 if (ACPI_FAILURE (Status))
1060 /* Pass 3: Parse control methods and link their parse trees into the main parse tree */
1062 Status = AdParseDeferredOps (AcpiGbl_ParsedNamespaceRoot);
1064 fprintf (stderr, "Parsing completed\n");