Path: blob/main/sys/contrib/dev/acpica/common/adisasm.c
48375 views
/******************************************************************************1*2* Module Name: adisasm - Application-level disassembler routines3*4*****************************************************************************/56/******************************************************************************7*8* 1. Copyright Notice9*10* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.11* All rights reserved.12*13* 2. License14*15* 2.1. This is your license from Intel Corp. under its intellectual property16* rights. You may have additional license terms from the party that provided17* you this software, covering your right to use that party's intellectual18* property rights.19*20* 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a21* copy of the source code appearing in this file ("Covered Code") an22* irrevocable, perpetual, worldwide license under Intel's copyrights in the23* base code distributed originally by Intel ("Original Intel Code") to copy,24* make derivatives, distribute, use and display any portion of the Covered25* Code in any form, with the right to sublicense such rights; and26*27* 2.3. Intel grants Licensee a non-exclusive and non-transferable patent28* license (with the right to sublicense), under only those claims of Intel29* patents that are infringed by the Original Intel Code, to make, use, sell,30* offer to sell, and import the Covered Code and derivative works thereof31* solely to the minimum extent necessary to exercise the above copyright32* license, and in no event shall the patent license extend to any additions33* to or modifications of the Original Intel Code. No other license or right34* is granted directly or by implication, estoppel or otherwise;35*36* The above copyright and patent license is granted only if the following37* conditions are met:38*39* 3. Conditions40*41* 3.1. Redistribution of Source with Rights to Further Distribute Source.42* Redistribution of source code of any substantial portion of the Covered43* Code or modification with rights to further distribute source must include44* the above Copyright Notice, the above License, this list of Conditions,45* and the following Disclaimer and Export Compliance provision. In addition,46* Licensee must cause all Covered Code to which Licensee contributes to47* contain a file documenting the changes Licensee made to create that Covered48* Code and the date of any change. Licensee must include in that file the49* documentation of any changes made by any predecessor Licensee. Licensee50* must include a prominent statement that the modification is derived,51* directly or indirectly, from Original Intel Code.52*53* 3.2. Redistribution of Source with no Rights to Further Distribute Source.54* Redistribution of source code of any substantial portion of the Covered55* Code or modification without rights to further distribute source must56* include the following Disclaimer and Export Compliance provision in the57* documentation and/or other materials provided with distribution. In58* addition, Licensee may not authorize further sublicense of source of any59* portion of the Covered Code, and must include terms to the effect that the60* license from Licensee to its licensee is limited to the intellectual61* property embodied in the software Licensee provides to its licensee, and62* not to intellectual property embodied in modifications its licensee may63* make.64*65* 3.3. Redistribution of Executable. Redistribution in executable form of any66* substantial portion of the Covered Code or modification must reproduce the67* above Copyright Notice, and the following Disclaimer and Export Compliance68* provision in the documentation and/or other materials provided with the69* distribution.70*71* 3.4. Intel retains all right, title, and interest in and to the Original72* Intel Code.73*74* 3.5. Neither the name Intel nor any other trademark owned or controlled by75* Intel shall be used in advertising or otherwise to promote the sale, use or76* other dealings in products derived from or relating to the Covered Code77* without prior written authorization from Intel.78*79* 4. Disclaimer and Export Compliance80*81* 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED82* HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE83* IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,84* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY85* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY86* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A87* PARTICULAR PURPOSE.88*89* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES90* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR91* COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,92* SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY93* CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL94* HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS95* SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY96* LIMITED REMEDY.97*98* 4.3. Licensee shall not export, either directly or indirectly, any of this99* software or system incorporating such software without first obtaining any100* required license or other approval from the U. S. Department of Commerce or101* any other agency or department of the United States Government. In the102* event Licensee exports any such software from the United States or103* re-exports any such software from a foreign destination, Licensee shall104* ensure that the distribution and export/re-export of the software is in105* compliance with all laws, regulations, orders, or other restrictions of the106* U.S. Export Administration Regulations. Licensee agrees that neither it nor107* any of its subsidiaries will export/re-export any technical data, process,108* software, or service, directly or indirectly, to any country for which the109* United States government or any agency thereof requires an export license,110* other governmental approval, or letter of assurance, without first obtaining111* such license, approval or letter.112*113*****************************************************************************114*115* Alternatively, you may choose to be licensed under the terms of the116* following license:117*118* Redistribution and use in source and binary forms, with or without119* modification, are permitted provided that the following conditions120* are met:121* 1. Redistributions of source code must retain the above copyright122* notice, this list of conditions, and the following disclaimer,123* without modification.124* 2. Redistributions in binary form must reproduce at minimum a disclaimer125* substantially similar to the "NO WARRANTY" disclaimer below126* ("Disclaimer") and any redistribution must be conditioned upon127* including a substantially similar Disclaimer requirement for further128* binary redistribution.129* 3. Neither the names of the above-listed copyright holders nor the names130* of any contributors may be used to endorse or promote products derived131* from this software without specific prior written permission.132*133* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS134* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT135* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR136* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT137* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,138* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT139* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,140* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY141* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT142* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE143* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.144*145* Alternatively, you may choose to be licensed under the terms of the146* GNU General Public License ("GPL") version 2 as published by the Free147* Software Foundation.148*149*****************************************************************************/150151#include <contrib/dev/acpica/compiler/aslcompiler.h>152#include <contrib/dev/acpica/include/amlcode.h>153#include <contrib/dev/acpica/include/acdisasm.h>154#include <contrib/dev/acpica/include/acdispat.h>155#include <contrib/dev/acpica/include/acnamesp.h>156#include <contrib/dev/acpica/include/acparser.h>157#include <contrib/dev/acpica/include/acapps.h>158#include <contrib/dev/acpica/include/acconvert.h>159160161#define _COMPONENT ACPI_TOOLS162ACPI_MODULE_NAME ("adisasm")163164/* Local prototypes */165166static ACPI_STATUS167AdDoExternalFileList (168char *Filename);169170static ACPI_STATUS171AdDisassembleOneTable (172ACPI_TABLE_HEADER *Table,173FILE *File,174char *Filename,175char *DisasmFilename);176177static ACPI_STATUS178AdReparseOneTable (179ACPI_TABLE_HEADER *Table,180FILE *File,181ACPI_OWNER_ID OwnerId);182183184ACPI_TABLE_DESC LocalTables[1];185ACPI_PARSE_OBJECT *AcpiGbl_ParseOpRoot;186187188/* Stubs for everything except ASL compiler */189190#ifndef ACPI_ASL_COMPILER191BOOLEAN192AcpiDsIsResultUsed (193ACPI_PARSE_OBJECT *Op,194ACPI_WALK_STATE *WalkState)195{196return (TRUE);197}198199ACPI_STATUS200AcpiDsMethodError (201ACPI_STATUS Status,202ACPI_WALK_STATE *WalkState)203{204return (Status);205}206#endif207208209/*******************************************************************************210*211* FUNCTION: AdInitialize212*213* PARAMETERS: None214*215* RETURN: Status216*217* DESCRIPTION: ACPICA and local initialization218*219******************************************************************************/220221ACPI_STATUS222AdInitialize (223void)224{225ACPI_STATUS Status;226227228/* ACPICA subsystem initialization */229230Status = AcpiOsInitialize ();231if (ACPI_FAILURE (Status))232{233fprintf (stderr, "Could not initialize ACPICA subsystem: %s\n",234AcpiFormatException (Status));235236return (Status);237}238239Status = AcpiUtInitGlobals ();240if (ACPI_FAILURE (Status))241{242fprintf (stderr, "Could not initialize ACPICA globals: %s\n",243AcpiFormatException (Status));244245return (Status);246}247248Status = AcpiUtMutexInitialize ();249if (ACPI_FAILURE (Status))250{251fprintf (stderr, "Could not initialize ACPICA mutex objects: %s\n",252AcpiFormatException (Status));253254return (Status);255}256257Status = AcpiNsRootInitialize ();258if (ACPI_FAILURE (Status))259{260fprintf (stderr, "Could not initialize ACPICA namespace: %s\n",261AcpiFormatException (Status));262263return (Status);264}265266/* Setup the Table Manager (cheat - there is no RSDT) */267268AcpiGbl_RootTableList.MaxTableCount = 1;269AcpiGbl_RootTableList.CurrentTableCount = 0;270AcpiGbl_RootTableList.Tables = LocalTables;271272return (AE_OK);273}274275276/******************************************************************************277*278* FUNCTION: AdAmlDisassemble279*280* PARAMETERS: Filename - AML input filename281* OutToFile - TRUE if output should go to a file282* Prefix - Path prefix for output283* OutFilename - where the filename is returned284*285* RETURN: Status286*287* DESCRIPTION: Disassembler entry point. Disassemble an entire ACPI table.288*289*****************************************************************************/290291ACPI_STATUS292AdAmlDisassemble (293BOOLEAN OutToFile,294char *Filename,295char *Prefix,296char **OutFilename)297{298ACPI_STATUS Status;299char *DisasmFilename = NULL;300FILE *File = NULL;301ACPI_TABLE_HEADER *Table = NULL;302ACPI_NEW_TABLE_DESC *ListHead = NULL;303304305/*306* Input: AML code from either a file or via GetTables (memory or307* registry)308*/309if (Filename)310{311/* Get the list of all AML tables in the file */312313Status = AcGetAllTablesFromFile (Filename,314ACPI_GET_ALL_TABLES, &ListHead);315if (ACPI_FAILURE (Status))316{317AcpiOsPrintf ("Could not get ACPI tables from %s, %s\n",318Filename, AcpiFormatException (Status));319return (Status);320}321322/* Process any user-specified files for external objects */323324Status = AdDoExternalFileList (Filename);325if (ACPI_FAILURE (Status))326{327return (Status);328}329}330else331{332Status = AdGetLocalTables ();333if (ACPI_FAILURE (Status))334{335AcpiOsPrintf ("Could not get ACPI tables, %s\n",336AcpiFormatException (Status));337return (Status);338}339340if (!AcpiGbl_DmOpt_Disasm)341{342return (AE_OK);343}344345/* Obtained the local tables, just disassemble the DSDT */346347Status = AcpiGetTable (ACPI_SIG_DSDT, 0, &Table);348if (ACPI_FAILURE (Status))349{350AcpiOsPrintf ("Could not get DSDT, %s\n",351AcpiFormatException (Status));352return (Status);353}354355AcpiOsPrintf ("\nDisassembly of DSDT\n");356Prefix = AdGenerateFilename ("dsdt", Table->OemTableId);357}358359/*360* Output: ASL code. Redirect to a file if requested361*/362if (OutToFile)363{364/* Create/Open a disassembly output file */365366DisasmFilename = FlGenerateFilename (Prefix, FILE_SUFFIX_DISASSEMBLY);367if (!DisasmFilename)368{369fprintf (stderr, "Could not generate output filename\n");370Status = AE_ERROR;371goto Cleanup;372}373374File = fopen (DisasmFilename, "w+");375if (!File)376{377fprintf (stderr, "Could not open output file %s\n",378DisasmFilename);379Status = AE_ERROR;380goto Cleanup;381}382}383384*OutFilename = DisasmFilename;385386/* Disassemble all AML tables within the file */387388while (ListHead)389{390Status = AdDisassembleOneTable (ListHead->Table,391File, Filename, DisasmFilename);392if (ACPI_FAILURE (Status))393{394break;395}396397ListHead = ListHead->Next;398}399400Cleanup:401402if (Table &&403!AcpiGbl_ForceAmlDisassembly &&404!AcpiUtIsAmlTable (Table))405{406ACPI_FREE (Table);407}408409AcDeleteTableList (ListHead);410411if (File)412{413fclose (File);414AcpiOsRedirectOutput (stdout);415}416417AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot);418AcpiGbl_ParseOpRoot = NULL;419return (Status);420}421422423/******************************************************************************424*425* FUNCTION: AdDisassembleOneTable426*427* PARAMETERS: Table - Raw AML table428* File - Pointer for the input file429* Filename - AML input filename430* DisasmFilename - Output filename431*432* RETURN: Status433*434* DESCRIPTION: Disassemble a single ACPI table. AML or data table.435*436*****************************************************************************/437438static ACPI_STATUS439AdDisassembleOneTable (440ACPI_TABLE_HEADER *Table,441FILE *File,442char *Filename,443char *DisasmFilename)444{445ACPI_STATUS Status;446ACPI_OWNER_ID OwnerId;447448449#ifdef ACPI_ASL_COMPILER450451/*452* For ASL-/ASL+ converter: replace the temporary "XXXX"453* table signature with the original. This "XXXX" makes454* it harder for the AML interpreter to run the badaml455* (.xxx) file produced from the converter in case if456* it fails to get deleted.457*/458if (AcpiGbl_CaptureComments)459{460memcpy (Table->Signature, AcpiGbl_TableSig, ACPI_NAMESEG_SIZE);461}462#endif463464/* ForceAmlDisassembly means to assume the table contains valid AML */465466if (!AcpiGbl_ForceAmlDisassembly && !AcpiUtIsAmlTable (Table))467{468if (File)469{470AcpiOsRedirectOutput (File);471}472473AdDisassemblerHeader (Filename, ACPI_IS_DATA_TABLE);474475/* This is a "Data Table" (non-AML table) */476477AcpiOsPrintf (" * ACPI Data Table [%4.4s]\n *\n",478AcpiGbl_CDAT ? (char *) AcpiGbl_CDAT : Table->Signature);479AcpiOsPrintf (" * Format: [HexOffset DecimalOffset ByteLength] "480"FieldName : FieldValue (in hex)\n */\n\n");481482AcpiDmDumpDataTable (Table);483fprintf (stdout, "Acpi Data Table [%4.4s] decoded\n",484AcpiGbl_CDAT ? (char *) AcpiGbl_CDAT : Table->Signature);485486if (File)487{488fprintf (stdout, "Formatted output: %s - %u bytes\n",489DisasmFilename, CmGetFileSize (File));490}491492return (AE_OK);493}494495/* Initialize the converter output file */496497ASL_CV_INIT_FILETREE(Table, File);498499/*500* This is an AML table (DSDT or SSDT).501* Always parse the tables, only option is what to display502*/503Status = AdParseTable (Table, &OwnerId, TRUE, FALSE);504if (ACPI_FAILURE (Status))505{506AcpiOsPrintf ("Could not parse ACPI tables, %s\n",507AcpiFormatException (Status));508return (Status);509}510511/* Redirect output for code generation and debugging output */512513if (File)514{515AcpiOsRedirectOutput (File);516}517518/* Debug output, namespace and parse tree */519520if (AslCompilerdebug && File)521{522AcpiOsPrintf ("/**** Before second load\n");523524NsSetupNamespaceListing (File);525NsDisplayNamespace ();526527AcpiOsPrintf ("*****/\n");528}529530/* Load namespace from names created within control methods */531532AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot,533AcpiGbl_RootNode, OwnerId);534535/*536* Cross reference the namespace here, in order to537* generate External() statements538*/539AcpiDmCrossReferenceNamespace (AcpiGbl_ParseOpRoot,540AcpiGbl_RootNode, OwnerId);541542if (AslCompilerdebug)543{544AcpiDmDumpTree (AcpiGbl_ParseOpRoot);545}546547/* Find possible calls to external control methods */548549AcpiDmFindOrphanMethods (AcpiGbl_ParseOpRoot);550551/*552* If we found any external control methods, we must reparse553* the entire tree with the new information (namely, the554* number of arguments per method)555*/556if (AcpiDmGetUnresolvedExternalMethodCount ())557{558Status = AdReparseOneTable (Table, File, OwnerId);559if (ACPI_FAILURE (Status))560{561return (Status);562}563}564565/*566* Now that the namespace is finalized, we can perform namespace567* transforms.568*569* 1) Convert fixed-offset references to resource descriptors570* to symbolic references (Note: modifies namespace)571*/572AcpiDmConvertParseObjects (AcpiGbl_ParseOpRoot, AcpiGbl_RootNode);573574/* Optional displays */575576if (AcpiGbl_DmOpt_Disasm)577{578/* This is the real disassembly */579580AdDisplayTables (Filename, Table);581582/* Dump hex table if requested (-vt) */583584AcpiDmDumpDataTable (Table);585586fprintf (stdout, "Disassembly completed\n");587if (File)588{589fprintf (stdout, "ASL Output: %s - %u bytes\n",590DisasmFilename, CmGetFileSize (File));591}592593if (AslGbl_MapfileFlag)594{595fprintf (stdout, "%14s %s - %u bytes\n",596AslGbl_FileDescs[ASL_FILE_MAP_OUTPUT].ShortDescription,597AslGbl_Files[ASL_FILE_MAP_OUTPUT].Filename,598FlGetFileSize (ASL_FILE_MAP_OUTPUT));599}600}601602return (AE_OK);603}604605606/******************************************************************************607*608* FUNCTION: AdReparseOneTable609*610* PARAMETERS: Table - Raw AML table611* File - Pointer for the input file612* OwnerId - ID for this table613*614* RETURN: Status615*616* DESCRIPTION: Reparse a table that has already been loaded. Used to617* integrate information about external control methods.618* These methods may have been previously parsed incorrectly.619*620*****************************************************************************/621622static ACPI_STATUS623AdReparseOneTable (624ACPI_TABLE_HEADER *Table,625FILE *File,626ACPI_OWNER_ID OwnerId)627{628ACPI_STATUS Status;629ACPI_COMMENT_ADDR_NODE *AddrListHead;630631632fprintf (stdout,633"\nFound %u external control methods, "634"reparsing with new information\n",635AcpiDmGetUnresolvedExternalMethodCount ());636637/* Reparse, rebuild namespace */638639AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot);640AcpiGbl_ParseOpRoot = NULL;641AcpiNsDeleteNamespaceSubtree (AcpiGbl_RootNode);642643AcpiGbl_RootNode = NULL;644AcpiGbl_RootNodeStruct.Name.Integer = ACPI_ROOT_NAME;645AcpiGbl_RootNodeStruct.DescriptorType = ACPI_DESC_TYPE_NAMED;646AcpiGbl_RootNodeStruct.Type = ACPI_TYPE_DEVICE;647AcpiGbl_RootNodeStruct.Parent = NULL;648AcpiGbl_RootNodeStruct.Child = NULL;649AcpiGbl_RootNodeStruct.Peer = NULL;650AcpiGbl_RootNodeStruct.Object = NULL;651AcpiGbl_RootNodeStruct.Flags = 0;652653Status = AcpiNsRootInitialize ();654if (ACPI_FAILURE (Status))655{656return (Status);657}658659/* New namespace, add the external definitions first */660661AcpiDmAddExternalListToNamespace ();662663/* For -ca option: clear the list of comment addresses. */664665while (AcpiGbl_CommentAddrListHead)666{667AddrListHead= AcpiGbl_CommentAddrListHead;668AcpiGbl_CommentAddrListHead = AcpiGbl_CommentAddrListHead->Next;669AcpiOsFree(AddrListHead);670}671672/* Parse the table again. No need to reload it, however */673674Status = AdParseTable (Table, NULL, FALSE, FALSE);675if (ACPI_FAILURE (Status))676{677AcpiOsPrintf ("Could not parse ACPI tables, %s\n",678AcpiFormatException (Status));679return (Status);680}681682/* Cross reference the namespace again */683684AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot,685AcpiGbl_RootNode, OwnerId);686687AcpiDmCrossReferenceNamespace (AcpiGbl_ParseOpRoot,688AcpiGbl_RootNode, OwnerId);689690/* Debug output - namespace and parse tree */691692if (AslCompilerdebug)693{694AcpiOsPrintf ("/**** After second load and resource conversion\n");695if (File)696{697NsSetupNamespaceListing (File);698NsDisplayNamespace ();699}700701AcpiOsPrintf ("*****/\n");702AcpiDmDumpTree (AcpiGbl_ParseOpRoot);703}704705return (AE_OK);706}707708709/******************************************************************************710*711* FUNCTION: AdDoExternalFileList712*713* PARAMETERS: Filename - Input file for the table714*715* RETURN: Status716*717* DESCRIPTION: Process all tables found in the -e external files list718*719*****************************************************************************/720721static ACPI_STATUS722AdDoExternalFileList (723char *Filename)724{725ACPI_EXTERNAL_FILE *ExternalFileList;726char *ExternalFilename;727ACPI_NEW_TABLE_DESC *ExternalListHead = NULL;728ACPI_STATUS Status;729ACPI_STATUS GlobalStatus = AE_OK;730ACPI_OWNER_ID OwnerId;731732733/*734* External filenames are specified on the command line like this:735* Example: iasl -e file1,file2,file3 -d xxx.aml736*/737ExternalFileList = AcpiGbl_ExternalFileList;738739/* Process each external file */740741while (ExternalFileList)742{743ExternalFilename = ExternalFileList->Path;744if (!strcmp (ExternalFilename, Filename))745{746/* Next external file */747748ExternalFileList = ExternalFileList->Next;749continue;750}751752AcpiOsPrintf ("External object resolution file %16s\n",753ExternalFilename);754755Status = AcGetAllTablesFromFile (756ExternalFilename, ACPI_GET_ONLY_AML_TABLES, &ExternalListHead);757if (ACPI_FAILURE (Status))758{759if (Status == AE_TYPE)760{761ExternalFileList = ExternalFileList->Next;762GlobalStatus = AE_TYPE;763continue;764}765766AcDeleteTableList (ExternalListHead);767return (Status);768}769770/* Load external tables for symbol resolution */771772while (ExternalListHead)773{774Status = AdParseTable (775ExternalListHead->Table, &OwnerId, TRUE, TRUE);776if (ACPI_FAILURE (Status))777{778AcpiOsPrintf ("Could not parse external ACPI tables, %s\n",779AcpiFormatException (Status));780AcDeleteTableList (ExternalListHead);781return (Status);782}783784/*785* Load namespace from names created within control methods786* Set owner id of nodes in external table787*/788AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot,789AcpiGbl_RootNode, OwnerId);790AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot);791AcpiGbl_ParseOpRoot = NULL;792793ExternalListHead = ExternalListHead->Next;794}795796/* Next external file */797798ExternalFileList = ExternalFileList->Next;799}800801AcDeleteTableList (ExternalListHead);802803if (ACPI_FAILURE (GlobalStatus))804{805return (GlobalStatus);806}807808/* Clear external list generated by Scope in external tables */809810if (AcpiGbl_ExternalFileList)811{812AcpiDmClearExternalList ();813}814815/* Load any externals defined in the optional external ref file */816817AcpiDmGetExternalsFromFile ();818return (AE_OK);819}820821822