Home | History | Annotate | Line # | Download | only in compiler
aslmain.c revision 1.1.1.4
      1      1.1    jruoho /******************************************************************************
      2      1.1    jruoho  *
      3      1.1    jruoho  * Module Name: aslmain - compiler main and utilities
      4      1.1    jruoho  *
      5      1.1    jruoho  *****************************************************************************/
      6      1.1    jruoho 
      7  1.1.1.2    jruoho /*
      8  1.1.1.4  christos  * Copyright (C) 2000 - 2013, Intel Corp.
      9      1.1    jruoho  * All rights reserved.
     10      1.1    jruoho  *
     11  1.1.1.2    jruoho  * Redistribution and use in source and binary forms, with or without
     12  1.1.1.2    jruoho  * modification, are permitted provided that the following conditions
     13  1.1.1.2    jruoho  * are met:
     14  1.1.1.2    jruoho  * 1. Redistributions of source code must retain the above copyright
     15  1.1.1.2    jruoho  *    notice, this list of conditions, and the following disclaimer,
     16  1.1.1.2    jruoho  *    without modification.
     17  1.1.1.2    jruoho  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
     18  1.1.1.2    jruoho  *    substantially similar to the "NO WARRANTY" disclaimer below
     19  1.1.1.2    jruoho  *    ("Disclaimer") and any redistribution must be conditioned upon
     20  1.1.1.2    jruoho  *    including a substantially similar Disclaimer requirement for further
     21  1.1.1.2    jruoho  *    binary redistribution.
     22  1.1.1.2    jruoho  * 3. Neither the names of the above-listed copyright holders nor the names
     23  1.1.1.2    jruoho  *    of any contributors may be used to endorse or promote products derived
     24  1.1.1.2    jruoho  *    from this software without specific prior written permission.
     25  1.1.1.2    jruoho  *
     26  1.1.1.2    jruoho  * Alternatively, this software may be distributed under the terms of the
     27  1.1.1.2    jruoho  * GNU General Public License ("GPL") version 2 as published by the Free
     28  1.1.1.2    jruoho  * Software Foundation.
     29  1.1.1.2    jruoho  *
     30  1.1.1.2    jruoho  * NO WARRANTY
     31  1.1.1.2    jruoho  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     32  1.1.1.2    jruoho  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     33  1.1.1.2    jruoho  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
     34  1.1.1.2    jruoho  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     35  1.1.1.2    jruoho  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     36  1.1.1.2    jruoho  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     37  1.1.1.2    jruoho  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     38  1.1.1.2    jruoho  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
     39  1.1.1.2    jruoho  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
     40  1.1.1.2    jruoho  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     41  1.1.1.2    jruoho  * POSSIBILITY OF SUCH DAMAGES.
     42  1.1.1.2    jruoho  */
     43      1.1    jruoho 
     44      1.1    jruoho #define _DECLARE_GLOBALS
     45      1.1    jruoho 
     46      1.1    jruoho #include "aslcompiler.h"
     47      1.1    jruoho #include "acapps.h"
     48  1.1.1.2    jruoho #include "acdisasm.h"
     49  1.1.1.4  christos #include <signal.h>
     50      1.1    jruoho 
     51      1.1    jruoho #define _COMPONENT          ACPI_COMPILER
     52      1.1    jruoho         ACPI_MODULE_NAME    ("aslmain")
     53      1.1    jruoho 
     54  1.1.1.4  christos /*
     55  1.1.1.4  christos  * Main routine for the iASL compiler.
     56  1.1.1.4  christos  *
     57  1.1.1.4  christos  * Portability note: The compiler depends upon the host for command-line
     58  1.1.1.4  christos  * wildcard support - it is not implemented locally. For example:
     59  1.1.1.4  christos  *
     60  1.1.1.4  christos  * Linux/Unix systems: Shell expands wildcards automatically.
     61  1.1.1.4  christos  *
     62  1.1.1.4  christos  * Windows: The setargv.obj module must be linked in to automatically
     63  1.1.1.4  christos  * expand wildcards.
     64  1.1.1.4  christos  */
     65      1.1    jruoho 
     66  1.1.1.4  christos /* Local prototypes */
     67      1.1    jruoho 
     68  1.1.1.4  christos static void ACPI_SYSTEM_XFACE
     69  1.1.1.4  christos AslSignalHandler (
     70  1.1.1.4  christos     int                     Sig);
     71      1.1    jruoho 
     72      1.1    jruoho static void
     73      1.1    jruoho AslInitialize (
     74      1.1    jruoho     void);
     75      1.1    jruoho 
     76      1.1    jruoho 
     77      1.1    jruoho /*******************************************************************************
     78      1.1    jruoho  *
     79  1.1.1.4  christos  * FUNCTION:    Usage
     80      1.1    jruoho  *
     81      1.1    jruoho  * PARAMETERS:  None
     82      1.1    jruoho  *
     83      1.1    jruoho  * RETURN:      None
     84      1.1    jruoho  *
     85  1.1.1.4  christos  * DESCRIPTION: Display option help message.
     86  1.1.1.4  christos  *              Optional items in square brackets.
     87      1.1    jruoho  *
     88      1.1    jruoho  ******************************************************************************/
     89      1.1    jruoho 
     90  1.1.1.4  christos void
     91  1.1.1.4  christos Usage (
     92      1.1    jruoho     void)
     93      1.1    jruoho {
     94  1.1.1.4  christos     printf ("%s\n\n", ASL_COMPLIANCE);
     95  1.1.1.4  christos     ACPI_USAGE_HEADER ("iasl [Options] [Files]");
     96      1.1    jruoho 
     97  1.1.1.4  christos     printf ("\nGeneral:\n");
     98  1.1.1.4  christos     ACPI_OPTION ("-@ <file>",       "Specify command file");
     99  1.1.1.4  christos     ACPI_OPTION ("-I <dir>",        "Specify additional include directory");
    100  1.1.1.4  christos     ACPI_OPTION ("-T <sig>|ALL|*",  "Create table template file for ACPI <Sig>");
    101  1.1.1.4  christos     ACPI_OPTION ("-p <prefix>",     "Specify path/filename prefix for all output files");
    102  1.1.1.4  christos     ACPI_OPTION ("-v",              "Display compiler version");
    103  1.1.1.4  christos     ACPI_OPTION ("-vo",             "Enable optimization comments");
    104  1.1.1.4  christos     ACPI_OPTION ("-vs",             "Disable signon");
    105      1.1    jruoho 
    106      1.1    jruoho     printf ("\nHelp:\n");
    107  1.1.1.4  christos     ACPI_OPTION ("-h",              "This message");
    108  1.1.1.4  christos     ACPI_OPTION ("-hc",             "Display operators allowed in constant expressions");
    109  1.1.1.4  christos     ACPI_OPTION ("-hf",             "Display help for output filename generation");
    110  1.1.1.4  christos     ACPI_OPTION ("-hr",             "Display ACPI reserved method names");
    111  1.1.1.4  christos     ACPI_OPTION ("-ht",             "Display currently supported ACPI table names");
    112  1.1.1.4  christos 
    113  1.1.1.4  christos     printf ("\nPreprocessor:\n");
    114  1.1.1.4  christos     ACPI_OPTION ("-D <symbol>",     "Define symbol for preprocessor use");
    115  1.1.1.4  christos     ACPI_OPTION ("-li",             "Create preprocessed output file (*.i)");
    116  1.1.1.4  christos     ACPI_OPTION ("-P",              "Preprocess only and create preprocessor output file (*.i)");
    117  1.1.1.4  christos     ACPI_OPTION ("-Pn",             "Disable preprocessor");
    118  1.1.1.4  christos 
    119  1.1.1.4  christos     printf ("\nErrors, Warnings, and Remarks:\n");
    120  1.1.1.4  christos     ACPI_OPTION ("-va",             "Disable all errors/warnings/remarks");
    121  1.1.1.4  christos     ACPI_OPTION ("-ve",             "Report only errors (ignore warnings and remarks)");
    122  1.1.1.4  christos     ACPI_OPTION ("-vi",             "Less verbose errors and warnings for use with IDEs");
    123  1.1.1.4  christos     ACPI_OPTION ("-vr",             "Disable remarks");
    124  1.1.1.4  christos     ACPI_OPTION ("-vw <messageid>", "Disable specific warning or remark");
    125  1.1.1.4  christos     ACPI_OPTION ("-w1 -w2 -w3",     "Set warning reporting level");
    126  1.1.1.4  christos     ACPI_OPTION ("-we",             "Report warnings as errors");
    127  1.1.1.4  christos 
    128  1.1.1.4  christos     printf ("\nAML Code Generation (*.aml):\n");
    129  1.1.1.4  christos     ACPI_OPTION ("-oa",             "Disable all optimizations (compatibility mode)");
    130  1.1.1.4  christos     ACPI_OPTION ("-of",             "Disable constant folding");
    131  1.1.1.4  christos     ACPI_OPTION ("-oi",             "Disable integer optimization to Zero/One/Ones");
    132  1.1.1.4  christos     ACPI_OPTION ("-on",             "Disable named reference string optimization");
    133  1.1.1.4  christos     ACPI_OPTION ("-cr",             "Disable Resource Descriptor error checking");
    134  1.1.1.4  christos     ACPI_OPTION ("-in",             "Ignore NoOp operators");
    135  1.1.1.4  christos     ACPI_OPTION ("-r <revision>",   "Override table header Revision (1-255)");
    136  1.1.1.4  christos 
    137  1.1.1.4  christos     printf ("\nOptional Source Code Output Files:\n");
    138  1.1.1.4  christos     ACPI_OPTION ("-sc -sa",         "Create source file in C or assembler (*.c or *.asm)");
    139  1.1.1.4  christos     ACPI_OPTION ("-ic -ia",         "Create include file in C or assembler (*.h or *.inc)");
    140  1.1.1.4  christos     ACPI_OPTION ("-tc -ta -ts",     "Create hex AML table in C, assembler, or ASL (*.hex)");
    141  1.1.1.4  christos     ACPI_OPTION ("-so",             "Create offset table in C (*.offset.h)");
    142  1.1.1.4  christos 
    143  1.1.1.4  christos     printf ("\nOptional Listing Files:\n");
    144  1.1.1.4  christos     ACPI_OPTION ("-l",              "Create mixed listing file (ASL source and AML) (*.lst)");
    145  1.1.1.4  christos     ACPI_OPTION ("-ln",             "Create namespace file (*.nsp)");
    146  1.1.1.4  christos     ACPI_OPTION ("-ls",             "Create combined source file (expanded includes) (*.src)");
    147  1.1.1.4  christos 
    148  1.1.1.4  christos     printf ("\nData Table Compiler:\n");
    149  1.1.1.4  christos     ACPI_OPTION ("-G",              "Compile custom table that contains generic operators");
    150  1.1.1.4  christos     ACPI_OPTION ("-vt",             "Create verbose template files (full disassembly)");
    151  1.1.1.4  christos 
    152  1.1.1.4  christos     printf ("\nAML Disassembler:\n");
    153  1.1.1.4  christos     ACPI_OPTION ("-d  <f1 f2 ...>", "Disassemble or decode binary ACPI tables to file (*.dsl)");
    154  1.1.1.4  christos     ACPI_OPTION ("",                "  (Optional, file type is automatically detected)");
    155  1.1.1.4  christos     ACPI_OPTION ("-da <f1 f2 ...>", "Disassemble multiple tables from single namespace");
    156  1.1.1.4  christos     ACPI_OPTION ("-db",             "Do not translate Buffers to Resource Templates");
    157  1.1.1.4  christos     ACPI_OPTION ("-dc <f1 f2 ...>", "Disassemble AML and immediately compile it");
    158  1.1.1.4  christos     ACPI_OPTION ("",                "  (Obtain DSDT from current system if no input file)");
    159  1.1.1.4  christos     ACPI_OPTION ("-e  <f1 f2 ...>", "Include ACPI table(s) for external symbol resolution");
    160  1.1.1.4  christos     ACPI_OPTION ("-fe <file>",      "Specify external symbol declaration file");
    161  1.1.1.4  christos     ACPI_OPTION ("-g",              "Get ACPI tables and write to files (*.dat)");
    162  1.1.1.4  christos     ACPI_OPTION ("-in",             "Ignore NoOp opcodes");
    163  1.1.1.4  christos     ACPI_OPTION ("-vt",             "Dump binary table data in hex format within output file");
    164  1.1.1.4  christos 
    165  1.1.1.4  christos     printf ("\nDebug Options:\n");
    166  1.1.1.4  christos     ACPI_OPTION ("-bf -bt",         "Create debug file (full or parse tree only) (*.txt)");
    167  1.1.1.4  christos     ACPI_OPTION ("-f",              "Ignore errors, force creation of AML output file(s)");
    168  1.1.1.4  christos     ACPI_OPTION ("-m <size>",       "Set internal line buffer size (in Kbytes)");
    169  1.1.1.4  christos     ACPI_OPTION ("-n",              "Parse only, no output generation");
    170  1.1.1.4  christos     ACPI_OPTION ("-ot",             "Display compile times and statistics");
    171  1.1.1.4  christos     ACPI_OPTION ("-x <level>",      "Set debug level for trace output");
    172  1.1.1.4  christos     ACPI_OPTION ("-z",              "Do not insert new compiler ID for DataTables");
    173      1.1    jruoho }
    174      1.1    jruoho 
    175      1.1    jruoho 
    176      1.1    jruoho /*******************************************************************************
    177      1.1    jruoho  *
    178  1.1.1.4  christos  * FUNCTION:    FilenameHelp
    179      1.1    jruoho  *
    180      1.1    jruoho  * PARAMETERS:  None
    181      1.1    jruoho  *
    182      1.1    jruoho  * RETURN:      None
    183      1.1    jruoho  *
    184  1.1.1.4  christos  * DESCRIPTION: Display help message for output filename generation
    185      1.1    jruoho  *
    186      1.1    jruoho  ******************************************************************************/
    187      1.1    jruoho 
    188  1.1.1.4  christos void
    189  1.1.1.4  christos AslFilenameHelp (
    190      1.1    jruoho     void)
    191      1.1    jruoho {
    192      1.1    jruoho 
    193  1.1.1.4  christos     printf ("\nAML output filename generation:\n");
    194      1.1    jruoho     printf ("  Output filenames are generated by appending an extension to a common\n");
    195  1.1.1.4  christos     printf ("  filename prefix. The filename prefix is obtained via one of the\n");
    196      1.1    jruoho     printf ("  following methods (in priority order):\n");
    197      1.1    jruoho     printf ("    1) The -p option specifies the prefix\n");
    198      1.1    jruoho     printf ("    2) The prefix of the AMLFileName in the ASL Definition Block\n");
    199      1.1    jruoho     printf ("    3) The prefix of the input filename\n");
    200      1.1    jruoho     printf ("\n");
    201      1.1    jruoho }
    202      1.1    jruoho 
    203      1.1    jruoho 
    204  1.1.1.4  christos /******************************************************************************
    205      1.1    jruoho  *
    206  1.1.1.4  christos  * FUNCTION:    AslSignalHandler
    207      1.1    jruoho  *
    208  1.1.1.4  christos  * PARAMETERS:  Sig                 - Signal that invoked this handler
    209      1.1    jruoho  *
    210      1.1    jruoho  * RETURN:      None
    211      1.1    jruoho  *
    212  1.1.1.4  christos  * DESCRIPTION: Control-C handler. Delete any intermediate files and any
    213  1.1.1.4  christos  *              output files that may be left in an indeterminate state.
    214      1.1    jruoho  *
    215  1.1.1.4  christos  *****************************************************************************/
    216      1.1    jruoho 
    217  1.1.1.4  christos static void ACPI_SYSTEM_XFACE
    218  1.1.1.4  christos AslSignalHandler (
    219  1.1.1.4  christos     int                     Sig)
    220      1.1    jruoho {
    221  1.1.1.4  christos     UINT32                  i;
    222  1.1.1.4  christos 
    223  1.1.1.4  christos 
    224  1.1.1.4  christos     signal (Sig, SIG_IGN);
    225  1.1.1.4  christos     printf ("Aborting\n\n");
    226  1.1.1.4  christos 
    227  1.1.1.4  christos     /* Close all open files */
    228  1.1.1.4  christos 
    229  1.1.1.4  christos     Gbl_Files[ASL_FILE_PREPROCESSOR].Handle = NULL; /* the .i file is same as source file */
    230  1.1.1.4  christos 
    231  1.1.1.4  christos     for (i = ASL_FILE_INPUT; i < ASL_MAX_FILE_TYPE; i++)
    232  1.1.1.4  christos     {
    233  1.1.1.4  christos         FlCloseFile (i);
    234  1.1.1.4  christos     }
    235  1.1.1.4  christos 
    236  1.1.1.4  christos     /* Delete any output files */
    237      1.1    jruoho 
    238  1.1.1.4  christos     for (i = ASL_FILE_AML_OUTPUT; i < ASL_MAX_FILE_TYPE; i++)
    239  1.1.1.4  christos     {
    240  1.1.1.4  christos         FlDeleteFile (i);
    241  1.1.1.4  christos     }
    242  1.1.1.4  christos 
    243  1.1.1.4  christos     exit (0);
    244      1.1    jruoho }
    245      1.1    jruoho 
    246      1.1    jruoho 
    247      1.1    jruoho /*******************************************************************************
    248      1.1    jruoho  *
    249      1.1    jruoho  * FUNCTION:    AslInitialize
    250      1.1    jruoho  *
    251      1.1    jruoho  * PARAMETERS:  None
    252      1.1    jruoho  *
    253      1.1    jruoho  * RETURN:      None
    254      1.1    jruoho  *
    255      1.1    jruoho  * DESCRIPTION: Initialize compiler globals
    256      1.1    jruoho  *
    257      1.1    jruoho  ******************************************************************************/
    258      1.1    jruoho 
    259      1.1    jruoho static void
    260      1.1    jruoho AslInitialize (
    261      1.1    jruoho     void)
    262      1.1    jruoho {
    263      1.1    jruoho     UINT32                  i;
    264      1.1    jruoho 
    265      1.1    jruoho 
    266      1.1    jruoho     for (i = 0; i < ASL_NUM_FILES; i++)
    267      1.1    jruoho     {
    268      1.1    jruoho         Gbl_Files[i].Handle = NULL;
    269      1.1    jruoho         Gbl_Files[i].Filename = NULL;
    270      1.1    jruoho     }
    271      1.1    jruoho 
    272      1.1    jruoho     Gbl_Files[ASL_FILE_STDOUT].Handle   = stdout;
    273      1.1    jruoho     Gbl_Files[ASL_FILE_STDOUT].Filename = "STDOUT";
    274      1.1    jruoho 
    275      1.1    jruoho     Gbl_Files[ASL_FILE_STDERR].Handle   = stderr;
    276      1.1    jruoho     Gbl_Files[ASL_FILE_STDERR].Filename = "STDERR";
    277      1.1    jruoho }
    278      1.1    jruoho 
    279      1.1    jruoho 
    280      1.1    jruoho /*******************************************************************************
    281      1.1    jruoho  *
    282      1.1    jruoho  * FUNCTION:    main
    283      1.1    jruoho  *
    284      1.1    jruoho  * PARAMETERS:  Standard argc/argv
    285      1.1    jruoho  *
    286      1.1    jruoho  * RETURN:      Program termination code
    287      1.1    jruoho  *
    288      1.1    jruoho  * DESCRIPTION: C main routine for the Asl Compiler. Handle command line
    289      1.1    jruoho  *              options and begin the compile for each file on the command line
    290      1.1    jruoho  *
    291      1.1    jruoho  ******************************************************************************/
    292      1.1    jruoho 
    293      1.1    jruoho int ACPI_SYSTEM_XFACE
    294      1.1    jruoho main (
    295      1.1    jruoho     int                     argc,
    296      1.1    jruoho     char                    **argv)
    297      1.1    jruoho {
    298      1.1    jruoho     ACPI_STATUS             Status;
    299  1.1.1.2    jruoho     int                     Index1;
    300  1.1.1.2    jruoho     int                     Index2;
    301  1.1.1.2    jruoho 
    302      1.1    jruoho 
    303  1.1.1.4  christos     ACPI_DEBUG_INITIALIZE (); /* For debug version only */
    304      1.1    jruoho 
    305  1.1.1.4  christos     /* Initialize preprocessor and compiler before command line processing */
    306      1.1    jruoho 
    307  1.1.1.4  christos     signal (SIGINT, AslSignalHandler);
    308  1.1.1.4  christos     AcpiGbl_ExternalFileList = NULL;
    309  1.1.1.4  christos     AcpiDbgLevel = 0;
    310  1.1.1.4  christos     PrInitializePreprocessor ();
    311      1.1    jruoho     AslInitialize ();
    312  1.1.1.4  christos 
    313  1.1.1.2    jruoho     Index1 = Index2 = AslCommandLine (argc, argv);
    314      1.1    jruoho 
    315  1.1.1.4  christos     /* Allocate the line buffer(s), must be after command line */
    316  1.1.1.4  christos 
    317  1.1.1.4  christos     Gbl_LineBufferSize /= 2;
    318  1.1.1.4  christos     UtExpandLineBuffers ();
    319  1.1.1.4  christos 
    320  1.1.1.4  christos     /* Perform global actions first/only */
    321      1.1    jruoho 
    322      1.1    jruoho     if (Gbl_GetAllTables)
    323      1.1    jruoho     {
    324      1.1    jruoho         Status = AslDoOneFile (NULL);
    325      1.1    jruoho         if (ACPI_FAILURE (Status))
    326      1.1    jruoho         {
    327      1.1    jruoho             return (-1);
    328      1.1    jruoho         }
    329      1.1    jruoho         return (0);
    330      1.1    jruoho     }
    331      1.1    jruoho 
    332  1.1.1.2    jruoho     if (Gbl_DisassembleAll)
    333  1.1.1.2    jruoho     {
    334  1.1.1.2    jruoho         while (argv[Index1])
    335  1.1.1.2    jruoho         {
    336  1.1.1.4  christos             Status = AcpiDmAddToExternalFileList (argv[Index1]);
    337  1.1.1.2    jruoho             if (ACPI_FAILURE (Status))
    338  1.1.1.2    jruoho             {
    339  1.1.1.2    jruoho                 return (-1);
    340  1.1.1.2    jruoho             }
    341  1.1.1.2    jruoho 
    342  1.1.1.2    jruoho             Index1++;
    343  1.1.1.2    jruoho         }
    344  1.1.1.2    jruoho     }
    345  1.1.1.2    jruoho 
    346      1.1    jruoho     /* Process each pathname/filename in the list, with possible wildcards */
    347      1.1    jruoho 
    348  1.1.1.2    jruoho     while (argv[Index2])
    349      1.1    jruoho     {
    350  1.1.1.4  christos         /*
    351  1.1.1.4  christos          * If -p not specified, we will use the input filename as the
    352  1.1.1.4  christos          * output filename prefix
    353  1.1.1.4  christos          */
    354  1.1.1.4  christos         if (Gbl_UseDefaultAmlFilename)
    355  1.1.1.4  christos         {
    356  1.1.1.4  christos             Gbl_OutputFilenamePrefix = argv[Index2];
    357  1.1.1.4  christos             UtConvertBackslashes (Gbl_OutputFilenamePrefix);
    358  1.1.1.4  christos         }
    359  1.1.1.4  christos 
    360  1.1.1.4  christos         Status = AslDoOneFile (argv[Index2]);
    361      1.1    jruoho         if (ACPI_FAILURE (Status))
    362      1.1    jruoho         {
    363      1.1    jruoho             return (-1);
    364      1.1    jruoho         }
    365      1.1    jruoho 
    366  1.1.1.2    jruoho         Index2++;
    367  1.1.1.2    jruoho     }
    368  1.1.1.2    jruoho 
    369  1.1.1.2    jruoho     if (AcpiGbl_ExternalFileList)
    370  1.1.1.2    jruoho     {
    371  1.1.1.2    jruoho         AcpiDmClearExternalFileList();
    372      1.1    jruoho     }
    373      1.1    jruoho 
    374      1.1    jruoho     return (0);
    375      1.1    jruoho }
    376