aslmain.c revision 1.1.1.5.2.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.5.2.3 skrll * Copyright (C) 2000 - 2016, 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.5.2.3 skrll ACPI_OPTION ("-T <sig list>|ALL", "Create ACPI table template/example files");
101 1.1.1.5.2.3 skrll ACPI_OPTION ("-T <count>", "Emit DSDT and <count> SSDTs to same file");
102 1.1.1.4 christos ACPI_OPTION ("-p <prefix>", "Specify path/filename prefix for all output files");
103 1.1.1.4 christos ACPI_OPTION ("-v", "Display compiler version");
104 1.1.1.4 christos ACPI_OPTION ("-vo", "Enable optimization comments");
105 1.1.1.4 christos ACPI_OPTION ("-vs", "Disable signon");
106 1.1 jruoho
107 1.1 jruoho printf ("\nHelp:\n");
108 1.1.1.4 christos ACPI_OPTION ("-h", "This message");
109 1.1.1.4 christos ACPI_OPTION ("-hc", "Display operators allowed in constant expressions");
110 1.1.1.4 christos ACPI_OPTION ("-hf", "Display help for output filename generation");
111 1.1.1.4 christos ACPI_OPTION ("-hr", "Display ACPI reserved method names");
112 1.1.1.4 christos ACPI_OPTION ("-ht", "Display currently supported ACPI table names");
113 1.1.1.4 christos
114 1.1.1.4 christos printf ("\nPreprocessor:\n");
115 1.1.1.4 christos ACPI_OPTION ("-D <symbol>", "Define symbol for preprocessor use");
116 1.1.1.4 christos ACPI_OPTION ("-li", "Create preprocessed output file (*.i)");
117 1.1.1.4 christos ACPI_OPTION ("-P", "Preprocess only and create preprocessor output file (*.i)");
118 1.1.1.4 christos ACPI_OPTION ("-Pn", "Disable preprocessor");
119 1.1.1.4 christos
120 1.1.1.4 christos printf ("\nErrors, Warnings, and Remarks:\n");
121 1.1.1.4 christos ACPI_OPTION ("-va", "Disable all errors/warnings/remarks");
122 1.1.1.4 christos ACPI_OPTION ("-ve", "Report only errors (ignore warnings and remarks)");
123 1.1.1.4 christos ACPI_OPTION ("-vi", "Less verbose errors and warnings for use with IDEs");
124 1.1.1.4 christos ACPI_OPTION ("-vr", "Disable remarks");
125 1.1.1.4 christos ACPI_OPTION ("-vw <messageid>", "Disable specific warning or remark");
126 1.1.1.4 christos ACPI_OPTION ("-w1 -w2 -w3", "Set warning reporting level");
127 1.1.1.4 christos ACPI_OPTION ("-we", "Report warnings as errors");
128 1.1.1.4 christos
129 1.1.1.4 christos printf ("\nAML Code Generation (*.aml):\n");
130 1.1.1.4 christos ACPI_OPTION ("-oa", "Disable all optimizations (compatibility mode)");
131 1.1.1.4 christos ACPI_OPTION ("-of", "Disable constant folding");
132 1.1.1.4 christos ACPI_OPTION ("-oi", "Disable integer optimization to Zero/One/Ones");
133 1.1.1.4 christos ACPI_OPTION ("-on", "Disable named reference string optimization");
134 1.1.1.5.2.3 skrll ACPI_OPTION ("-ot", "Disable typechecking");
135 1.1.1.4 christos ACPI_OPTION ("-cr", "Disable Resource Descriptor error checking");
136 1.1.1.4 christos ACPI_OPTION ("-in", "Ignore NoOp operators");
137 1.1.1.4 christos ACPI_OPTION ("-r <revision>", "Override table header Revision (1-255)");
138 1.1.1.4 christos
139 1.1.1.4 christos printf ("\nOptional Source Code Output Files:\n");
140 1.1.1.4 christos ACPI_OPTION ("-sc -sa", "Create source file in C or assembler (*.c or *.asm)");
141 1.1.1.4 christos ACPI_OPTION ("-ic -ia", "Create include file in C or assembler (*.h or *.inc)");
142 1.1.1.4 christos ACPI_OPTION ("-tc -ta -ts", "Create hex AML table in C, assembler, or ASL (*.hex)");
143 1.1.1.4 christos ACPI_OPTION ("-so", "Create offset table in C (*.offset.h)");
144 1.1.1.4 christos
145 1.1.1.4 christos printf ("\nOptional Listing Files:\n");
146 1.1.1.4 christos ACPI_OPTION ("-l", "Create mixed listing file (ASL source and AML) (*.lst)");
147 1.1.1.5 christos ACPI_OPTION ("-lm", "Create hardware summary map file (*.map)");
148 1.1.1.4 christos ACPI_OPTION ("-ln", "Create namespace file (*.nsp)");
149 1.1.1.4 christos ACPI_OPTION ("-ls", "Create combined source file (expanded includes) (*.src)");
150 1.1.1.5.2.4 skrll ACPI_OPTION ("-lx", "Create cross-reference file (*.xrf)");
151 1.1.1.4 christos
152 1.1.1.4 christos printf ("\nData Table Compiler:\n");
153 1.1.1.4 christos ACPI_OPTION ("-G", "Compile custom table that contains generic operators");
154 1.1.1.4 christos ACPI_OPTION ("-vt", "Create verbose template files (full disassembly)");
155 1.1.1.4 christos
156 1.1.1.4 christos printf ("\nAML Disassembler:\n");
157 1.1.1.4 christos ACPI_OPTION ("-d <f1 f2 ...>", "Disassemble or decode binary ACPI tables to file (*.dsl)");
158 1.1.1.4 christos ACPI_OPTION ("", " (Optional, file type is automatically detected)");
159 1.1.1.4 christos ACPI_OPTION ("-da <f1 f2 ...>", "Disassemble multiple tables from single namespace");
160 1.1.1.4 christos ACPI_OPTION ("-db", "Do not translate Buffers to Resource Templates");
161 1.1.1.4 christos ACPI_OPTION ("-dc <f1 f2 ...>", "Disassemble AML and immediately compile it");
162 1.1.1.4 christos ACPI_OPTION ("", " (Obtain DSDT from current system if no input file)");
163 1.1.1.5.2.1 skrll ACPI_OPTION ("-df", "Force disassembler to assume table contains valid AML");
164 1.1.1.5.2.1 skrll ACPI_OPTION ("-dl", "Emit legacy ASL code only (no C-style operators)");
165 1.1.1.4 christos ACPI_OPTION ("-e <f1 f2 ...>", "Include ACPI table(s) for external symbol resolution");
166 1.1.1.4 christos ACPI_OPTION ("-fe <file>", "Specify external symbol declaration file");
167 1.1.1.4 christos ACPI_OPTION ("-in", "Ignore NoOp opcodes");
168 1.1.1.5.2.3 skrll ACPI_OPTION ("-l", "Disassemble to mixed ASL and AML code");
169 1.1.1.4 christos ACPI_OPTION ("-vt", "Dump binary table data in hex format within output file");
170 1.1.1.4 christos
171 1.1.1.4 christos printf ("\nDebug Options:\n");
172 1.1.1.5.2.1 skrll ACPI_OPTION ("-bf", "Create debug file (full output) (*.txt)");
173 1.1.1.5.2.1 skrll ACPI_OPTION ("-bs", "Create debug file (parse tree only) (*.txt)");
174 1.1.1.5.2.1 skrll ACPI_OPTION ("-bp <depth>", "Prune ASL parse tree");
175 1.1.1.5.2.1 skrll ACPI_OPTION ("-bt <type>", "Object type to be pruned from the parse tree");
176 1.1.1.4 christos ACPI_OPTION ("-f", "Ignore errors, force creation of AML output file(s)");
177 1.1.1.4 christos ACPI_OPTION ("-m <size>", "Set internal line buffer size (in Kbytes)");
178 1.1.1.4 christos ACPI_OPTION ("-n", "Parse only, no output generation");
179 1.1.1.5.2.3 skrll ACPI_OPTION ("-oc", "Display compile times and statistics");
180 1.1.1.4 christos ACPI_OPTION ("-x <level>", "Set debug level for trace output");
181 1.1.1.4 christos ACPI_OPTION ("-z", "Do not insert new compiler ID for DataTables");
182 1.1 jruoho }
183 1.1 jruoho
184 1.1 jruoho
185 1.1 jruoho /*******************************************************************************
186 1.1 jruoho *
187 1.1.1.4 christos * FUNCTION: FilenameHelp
188 1.1 jruoho *
189 1.1 jruoho * PARAMETERS: None
190 1.1 jruoho *
191 1.1 jruoho * RETURN: None
192 1.1 jruoho *
193 1.1.1.4 christos * DESCRIPTION: Display help message for output filename generation
194 1.1 jruoho *
195 1.1 jruoho ******************************************************************************/
196 1.1 jruoho
197 1.1.1.4 christos void
198 1.1.1.4 christos AslFilenameHelp (
199 1.1 jruoho void)
200 1.1 jruoho {
201 1.1 jruoho
202 1.1.1.4 christos printf ("\nAML output filename generation:\n");
203 1.1 jruoho printf (" Output filenames are generated by appending an extension to a common\n");
204 1.1.1.4 christos printf (" filename prefix. The filename prefix is obtained via one of the\n");
205 1.1 jruoho printf (" following methods (in priority order):\n");
206 1.1 jruoho printf (" 1) The -p option specifies the prefix\n");
207 1.1 jruoho printf (" 2) The prefix of the AMLFileName in the ASL Definition Block\n");
208 1.1 jruoho printf (" 3) The prefix of the input filename\n");
209 1.1 jruoho printf ("\n");
210 1.1 jruoho }
211 1.1 jruoho
212 1.1 jruoho
213 1.1.1.4 christos /******************************************************************************
214 1.1 jruoho *
215 1.1.1.4 christos * FUNCTION: AslSignalHandler
216 1.1 jruoho *
217 1.1.1.4 christos * PARAMETERS: Sig - Signal that invoked this handler
218 1.1 jruoho *
219 1.1 jruoho * RETURN: None
220 1.1 jruoho *
221 1.1.1.4 christos * DESCRIPTION: Control-C handler. Delete any intermediate files and any
222 1.1.1.4 christos * output files that may be left in an indeterminate state.
223 1.1 jruoho *
224 1.1.1.4 christos *****************************************************************************/
225 1.1 jruoho
226 1.1.1.4 christos static void ACPI_SYSTEM_XFACE
227 1.1.1.4 christos AslSignalHandler (
228 1.1.1.4 christos int Sig)
229 1.1 jruoho {
230 1.1.1.4 christos UINT32 i;
231 1.1.1.4 christos
232 1.1.1.4 christos
233 1.1.1.4 christos signal (Sig, SIG_IGN);
234 1.1.1.4 christos printf ("Aborting\n\n");
235 1.1.1.4 christos
236 1.1.1.4 christos /* Close all open files */
237 1.1.1.4 christos
238 1.1.1.5.2.2 skrll Gbl_Files[ASL_FILE_PREPROCESSOR].Handle = NULL; /* the .pre file is same as source file */
239 1.1.1.4 christos
240 1.1.1.4 christos for (i = ASL_FILE_INPUT; i < ASL_MAX_FILE_TYPE; i++)
241 1.1.1.4 christos {
242 1.1.1.4 christos FlCloseFile (i);
243 1.1.1.4 christos }
244 1.1.1.4 christos
245 1.1.1.4 christos /* Delete any output files */
246 1.1 jruoho
247 1.1.1.4 christos for (i = ASL_FILE_AML_OUTPUT; i < ASL_MAX_FILE_TYPE; i++)
248 1.1.1.4 christos {
249 1.1.1.4 christos FlDeleteFile (i);
250 1.1.1.4 christos }
251 1.1.1.4 christos
252 1.1.1.4 christos exit (0);
253 1.1 jruoho }
254 1.1 jruoho
255 1.1 jruoho
256 1.1 jruoho /*******************************************************************************
257 1.1 jruoho *
258 1.1 jruoho * FUNCTION: AslInitialize
259 1.1 jruoho *
260 1.1 jruoho * PARAMETERS: None
261 1.1 jruoho *
262 1.1 jruoho * RETURN: None
263 1.1 jruoho *
264 1.1 jruoho * DESCRIPTION: Initialize compiler globals
265 1.1 jruoho *
266 1.1 jruoho ******************************************************************************/
267 1.1 jruoho
268 1.1 jruoho static void
269 1.1 jruoho AslInitialize (
270 1.1 jruoho void)
271 1.1 jruoho {
272 1.1 jruoho UINT32 i;
273 1.1 jruoho
274 1.1 jruoho
275 1.1.1.5.2.3 skrll AcpiGbl_DmOpt_Verbose = FALSE;
276 1.1.1.5.2.3 skrll
277 1.1.1.5.2.4 skrll /* Default integer width is 64 bits */
278 1.1.1.5.2.4 skrll
279 1.1.1.5.2.4 skrll AcpiGbl_IntegerBitWidth = 64;
280 1.1.1.5.2.4 skrll AcpiGbl_IntegerNybbleWidth = 16;
281 1.1.1.5.2.4 skrll AcpiGbl_IntegerByteWidth = 8;
282 1.1.1.5.2.4 skrll
283 1.1 jruoho for (i = 0; i < ASL_NUM_FILES; i++)
284 1.1 jruoho {
285 1.1 jruoho Gbl_Files[i].Handle = NULL;
286 1.1 jruoho Gbl_Files[i].Filename = NULL;
287 1.1 jruoho }
288 1.1 jruoho
289 1.1 jruoho Gbl_Files[ASL_FILE_STDOUT].Handle = stdout;
290 1.1 jruoho Gbl_Files[ASL_FILE_STDOUT].Filename = "STDOUT";
291 1.1 jruoho
292 1.1 jruoho Gbl_Files[ASL_FILE_STDERR].Handle = stderr;
293 1.1 jruoho Gbl_Files[ASL_FILE_STDERR].Filename = "STDERR";
294 1.1 jruoho }
295 1.1 jruoho
296 1.1 jruoho
297 1.1 jruoho /*******************************************************************************
298 1.1 jruoho *
299 1.1 jruoho * FUNCTION: main
300 1.1 jruoho *
301 1.1 jruoho * PARAMETERS: Standard argc/argv
302 1.1 jruoho *
303 1.1 jruoho * RETURN: Program termination code
304 1.1 jruoho *
305 1.1 jruoho * DESCRIPTION: C main routine for the Asl Compiler. Handle command line
306 1.1 jruoho * options and begin the compile for each file on the command line
307 1.1 jruoho *
308 1.1 jruoho ******************************************************************************/
309 1.1 jruoho
310 1.1 jruoho int ACPI_SYSTEM_XFACE
311 1.1 jruoho main (
312 1.1 jruoho int argc,
313 1.1 jruoho char **argv)
314 1.1 jruoho {
315 1.1 jruoho ACPI_STATUS Status;
316 1.1.1.2 jruoho int Index1;
317 1.1.1.2 jruoho int Index2;
318 1.1.1.5 christos int ReturnStatus = 0;
319 1.1.1.2 jruoho
320 1.1 jruoho
321 1.1.1.5 christos /*
322 1.1.1.5 christos * Big-endian machines are not currently supported. ACPI tables must
323 1.1.1.5 christos * be little-endian, and support for big-endian machines needs to
324 1.1.1.5 christos * be implemented.
325 1.1.1.5 christos */
326 1.1.1.5.2.4 skrll if (UtIsBigEndianMachine ())
327 1.1.1.5 christos {
328 1.1.1.5 christos fprintf (stderr,
329 1.1.1.5 christos "iASL is not currently supported on big-endian machines.\n");
330 1.1.1.5 christos return (-1);
331 1.1.1.5 christos }
332 1.1.1.5 christos
333 1.1.1.5 christos AcpiOsInitialize ();
334 1.1.1.4 christos ACPI_DEBUG_INITIALIZE (); /* For debug version only */
335 1.1 jruoho
336 1.1.1.4 christos /* Initialize preprocessor and compiler before command line processing */
337 1.1 jruoho
338 1.1.1.4 christos signal (SIGINT, AslSignalHandler);
339 1.1.1.4 christos AcpiGbl_ExternalFileList = NULL;
340 1.1.1.4 christos AcpiDbgLevel = 0;
341 1.1.1.4 christos PrInitializePreprocessor ();
342 1.1 jruoho AslInitialize ();
343 1.1.1.4 christos
344 1.1.1.2 jruoho Index1 = Index2 = AslCommandLine (argc, argv);
345 1.1 jruoho
346 1.1.1.4 christos /* Allocate the line buffer(s), must be after command line */
347 1.1.1.4 christos
348 1.1.1.4 christos Gbl_LineBufferSize /= 2;
349 1.1.1.4 christos UtExpandLineBuffers ();
350 1.1.1.4 christos
351 1.1.1.4 christos /* Perform global actions first/only */
352 1.1 jruoho
353 1.1.1.2 jruoho if (Gbl_DisassembleAll)
354 1.1.1.2 jruoho {
355 1.1.1.2 jruoho while (argv[Index1])
356 1.1.1.2 jruoho {
357 1.1.1.4 christos Status = AcpiDmAddToExternalFileList (argv[Index1]);
358 1.1.1.2 jruoho if (ACPI_FAILURE (Status))
359 1.1.1.2 jruoho {
360 1.1.1.2 jruoho return (-1);
361 1.1.1.2 jruoho }
362 1.1.1.2 jruoho
363 1.1.1.2 jruoho Index1++;
364 1.1.1.2 jruoho }
365 1.1.1.2 jruoho }
366 1.1.1.2 jruoho
367 1.1 jruoho /* Process each pathname/filename in the list, with possible wildcards */
368 1.1 jruoho
369 1.1.1.2 jruoho while (argv[Index2])
370 1.1 jruoho {
371 1.1.1.4 christos /*
372 1.1.1.4 christos * If -p not specified, we will use the input filename as the
373 1.1.1.4 christos * output filename prefix
374 1.1.1.4 christos */
375 1.1.1.4 christos if (Gbl_UseDefaultAmlFilename)
376 1.1.1.4 christos {
377 1.1.1.4 christos Gbl_OutputFilenamePrefix = argv[Index2];
378 1.1.1.4 christos UtConvertBackslashes (Gbl_OutputFilenamePrefix);
379 1.1.1.4 christos }
380 1.1.1.4 christos
381 1.1.1.4 christos Status = AslDoOneFile (argv[Index2]);
382 1.1 jruoho if (ACPI_FAILURE (Status))
383 1.1 jruoho {
384 1.1.1.5 christos ReturnStatus = -1;
385 1.1.1.5 christos goto CleanupAndExit;
386 1.1 jruoho }
387 1.1 jruoho
388 1.1.1.2 jruoho Index2++;
389 1.1.1.2 jruoho }
390 1.1.1.2 jruoho
391 1.1.1.5 christos
392 1.1.1.5 christos CleanupAndExit:
393 1.1.1.5 christos
394 1.1.1.5 christos UtFreeLineBuffers ();
395 1.1.1.5 christos AslParserCleanup ();
396 1.1.1.5 christos
397 1.1.1.2 jruoho if (AcpiGbl_ExternalFileList)
398 1.1.1.2 jruoho {
399 1.1.1.2 jruoho AcpiDmClearExternalFileList();
400 1.1 jruoho }
401 1.1 jruoho
402 1.1.1.5 christos return (ReturnStatus);
403 1.1 jruoho }
404