asltypes.h revision 197104
1118611Snjl
2118611Snjl/******************************************************************************
3118611Snjl *
4118611Snjl * Module Name: asltypes.h - compiler data types and struct definitions
5118611Snjl *
6118611Snjl *****************************************************************************/
7118611Snjl
8118611Snjl/******************************************************************************
9118611Snjl *
10118611Snjl * 1. Copyright Notice
11118611Snjl *
12193529Sjkim * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp.
13118611Snjl * All rights reserved.
14118611Snjl *
15118611Snjl * 2. License
16118611Snjl *
17118611Snjl * 2.1. This is your license from Intel Corp. under its intellectual property
18118611Snjl * rights.  You may have additional license terms from the party that provided
19118611Snjl * you this software, covering your right to use that party's intellectual
20118611Snjl * property rights.
21118611Snjl *
22118611Snjl * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
23118611Snjl * copy of the source code appearing in this file ("Covered Code") an
24118611Snjl * irrevocable, perpetual, worldwide license under Intel's copyrights in the
25118611Snjl * base code distributed originally by Intel ("Original Intel Code") to copy,
26118611Snjl * make derivatives, distribute, use and display any portion of the Covered
27118611Snjl * Code in any form, with the right to sublicense such rights; and
28118611Snjl *
29118611Snjl * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
30118611Snjl * license (with the right to sublicense), under only those claims of Intel
31118611Snjl * patents that are infringed by the Original Intel Code, to make, use, sell,
32118611Snjl * offer to sell, and import the Covered Code and derivative works thereof
33118611Snjl * solely to the minimum extent necessary to exercise the above copyright
34118611Snjl * license, and in no event shall the patent license extend to any additions
35118611Snjl * to or modifications of the Original Intel Code.  No other license or right
36118611Snjl * is granted directly or by implication, estoppel or otherwise;
37118611Snjl *
38118611Snjl * The above copyright and patent license is granted only if the following
39118611Snjl * conditions are met:
40118611Snjl *
41118611Snjl * 3. Conditions
42118611Snjl *
43118611Snjl * 3.1. Redistribution of Source with Rights to Further Distribute Source.
44118611Snjl * Redistribution of source code of any substantial portion of the Covered
45118611Snjl * Code or modification with rights to further distribute source must include
46118611Snjl * the above Copyright Notice, the above License, this list of Conditions,
47118611Snjl * and the following Disclaimer and Export Compliance provision.  In addition,
48118611Snjl * Licensee must cause all Covered Code to which Licensee contributes to
49118611Snjl * contain a file documenting the changes Licensee made to create that Covered
50118611Snjl * Code and the date of any change.  Licensee must include in that file the
51118611Snjl * documentation of any changes made by any predecessor Licensee.  Licensee
52118611Snjl * must include a prominent statement that the modification is derived,
53118611Snjl * directly or indirectly, from Original Intel Code.
54118611Snjl *
55118611Snjl * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
56118611Snjl * Redistribution of source code of any substantial portion of the Covered
57118611Snjl * Code or modification without rights to further distribute source must
58118611Snjl * include the following Disclaimer and Export Compliance provision in the
59118611Snjl * documentation and/or other materials provided with distribution.  In
60118611Snjl * addition, Licensee may not authorize further sublicense of source of any
61118611Snjl * portion of the Covered Code, and must include terms to the effect that the
62118611Snjl * license from Licensee to its licensee is limited to the intellectual
63118611Snjl * property embodied in the software Licensee provides to its licensee, and
64118611Snjl * not to intellectual property embodied in modifications its licensee may
65118611Snjl * make.
66118611Snjl *
67118611Snjl * 3.3. Redistribution of Executable. Redistribution in executable form of any
68118611Snjl * substantial portion of the Covered Code or modification must reproduce the
69118611Snjl * above Copyright Notice, and the following Disclaimer and Export Compliance
70118611Snjl * provision in the documentation and/or other materials provided with the
71118611Snjl * distribution.
72118611Snjl *
73118611Snjl * 3.4. Intel retains all right, title, and interest in and to the Original
74118611Snjl * Intel Code.
75118611Snjl *
76118611Snjl * 3.5. Neither the name Intel nor any other trademark owned or controlled by
77118611Snjl * Intel shall be used in advertising or otherwise to promote the sale, use or
78118611Snjl * other dealings in products derived from or relating to the Covered Code
79118611Snjl * without prior written authorization from Intel.
80118611Snjl *
81118611Snjl * 4. Disclaimer and Export Compliance
82118611Snjl *
83118611Snjl * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
84118611Snjl * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
85118611Snjl * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
86118611Snjl * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
87118611Snjl * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
88118611Snjl * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
89118611Snjl * PARTICULAR PURPOSE.
90118611Snjl *
91118611Snjl * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
92118611Snjl * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
93118611Snjl * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
94118611Snjl * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
95118611Snjl * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
96118611Snjl * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
97118611Snjl * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
98118611Snjl * LIMITED REMEDY.
99118611Snjl *
100118611Snjl * 4.3. Licensee shall not export, either directly or indirectly, any of this
101118611Snjl * software or system incorporating such software without first obtaining any
102118611Snjl * required license or other approval from the U. S. Department of Commerce or
103118611Snjl * any other agency or department of the United States Government.  In the
104118611Snjl * event Licensee exports any such software from the United States or
105118611Snjl * re-exports any such software from a foreign destination, Licensee shall
106118611Snjl * ensure that the distribution and export/re-export of the software is in
107118611Snjl * compliance with all laws, regulations, orders, or other restrictions of the
108118611Snjl * U.S. Export Administration Regulations. Licensee agrees that neither it nor
109118611Snjl * any of its subsidiaries will export/re-export any technical data, process,
110118611Snjl * software, or service, directly or indirectly, to any country for which the
111118611Snjl * United States government or any agency thereof requires an export license,
112118611Snjl * other governmental approval, or letter of assurance, without first obtaining
113118611Snjl * such license, approval or letter.
114118611Snjl *
115118611Snjl *****************************************************************************/
116118611Snjl
117118611Snjl
118118611Snjl#ifndef __ASLTYPES_H
119118611Snjl#define __ASLTYPES_H
120118611Snjl
121118611Snjl
122118611Snjl/*******************************************************************************
123118611Snjl *
124118611Snjl * Structure definitions
125118611Snjl *
126118611Snjl ******************************************************************************/
127118611Snjl
128118611Snjl
129118611Snjl/* Op flags for the ACPI_PARSE_OBJECT */
130118611Snjl
131118611Snjl#define NODE_VISITED                0x00000001
132118611Snjl#define NODE_AML_PACKAGE            0x00000002
133118611Snjl#define NODE_IS_TARGET              0x00000004
134118611Snjl#define NODE_IS_RESOURCE_DESC       0x00000008
135118611Snjl#define NODE_IS_RESOURCE_FIELD      0x00000010
136118611Snjl#define NODE_HAS_NO_EXIT            0x00000020
137118611Snjl#define NODE_IF_HAS_NO_EXIT         0x00000040
138118611Snjl#define NODE_NAME_INTERNALIZED      0x00000080
139118611Snjl#define NODE_METHOD_NO_RETVAL       0x00000100
140118611Snjl#define NODE_METHOD_SOME_NO_RETVAL  0x00000200
141118611Snjl#define NODE_RESULT_NOT_USED        0x00000400
142118611Snjl#define NODE_METHOD_TYPED           0x00000800
143118611Snjl#define NODE_IS_BIT_OFFSET          0x00001000
144118611Snjl#define NODE_COMPILE_TIME_CONST     0x00002000
145118611Snjl#define NODE_IS_TERM_ARG            0x00004000
146118611Snjl#define NODE_WAS_ONES_OP            0x00008000
147118611Snjl#define NODE_IS_NAME_DECLARATION    0x00010000
148138287Smarks#define NODE_COMPILER_EMITTED       0x00020000
149151937Sjkim#define NODE_IS_DUPLICATE           0x00040000
150167802Sjkim#define NODE_IS_RESOURCE_DATA       0x00080000
151118611Snjl
152118611Snjl/* Keeps information about individual control methods */
153118611Snjl
154118611Snjltypedef struct asl_method_info
155118611Snjl{
156118611Snjl    UINT8                   NumArguments;
157118611Snjl    UINT8                   LocalInitialized[ACPI_METHOD_NUM_LOCALS];
158118611Snjl    UINT8                   ArgInitialized[ACPI_METHOD_NUM_ARGS];
159138287Smarks    UINT32                  ValidArgTypes[ACPI_METHOD_NUM_ARGS];
160138287Smarks    UINT32                  ValidReturnTypes;
161118611Snjl    UINT32                  NumReturnNoValue;
162118611Snjl    UINT32                  NumReturnWithValue;
163118611Snjl    ACPI_PARSE_OBJECT       *Op;
164118611Snjl    struct asl_method_info  *Next;
165118611Snjl    UINT8                   HasBeenTyped;
166118611Snjl
167118611Snjl} ASL_METHOD_INFO;
168118611Snjl
169118611Snjl
170118611Snjl/* Parse tree walk info for control method analysis */
171118611Snjl
172118611Snjltypedef struct asl_analysis_walk_info
173118611Snjl{
174118611Snjl    ASL_METHOD_INFO         *MethodStack;
175118611Snjl
176118611Snjl} ASL_ANALYSIS_WALK_INFO;
177118611Snjl
178118611Snjl
179118611Snjl/* An entry in the ParseOpcode to AmlOpcode mapping table */
180118611Snjl
181118611Snjltypedef struct asl_mapping_entry
182118611Snjl{
183118611Snjl    UINT32                      Value;
184118611Snjl    UINT32                      AcpiBtype;   /* Object type or return type */
185118611Snjl    UINT16                      AmlOpcode;
186118611Snjl    UINT8                       Flags;
187118611Snjl
188118611Snjl} ASL_MAPPING_ENTRY;
189118611Snjl
190118611Snjl
191118611Snjl/* An entry in the Reserved Name information table */
192118611Snjl
193118611Snjl#define ASL_RSVD_RETURN_VALUE   0x01
194118611Snjl#define ASL_RSVD_RESOURCE_NAME  0x02
195118611Snjl#define ASL_RSVD_SCOPE          0x04
196118611Snjl
197118611Snjltypedef struct asl_reserved_info
198118611Snjl{
199118611Snjl    char                        *Name;
200118611Snjl    UINT8                       NumArguments;
201118611Snjl    UINT8                       Flags;
202118611Snjl
203118611Snjl} ASL_RESERVED_INFO;
204118611Snjl
205118611Snjl
206118611Snjl/* Parse tree walk info structure */
207118611Snjl
208118611Snjltypedef struct asl_walk_info
209118611Snjl{
210118611Snjl    ACPI_PARSE_OBJECT           **NodePtr;
211118611Snjl    UINT32                      *LevelPtr;
212118611Snjl
213118611Snjl} ASL_WALK_INFO;
214118611Snjl
215118611Snjl
216118611Snjl/* File info */
217118611Snjl
218118611Snjltypedef struct asl_file_info
219118611Snjl{
220118611Snjl    FILE                        *Handle;
221118611Snjl    char                        *Filename;
222118611Snjl
223118611Snjl} ASL_FILE_INFO;
224118611Snjl
225167802Sjkimtypedef struct asl_file_status
226167802Sjkim{
227167802Sjkim    UINT32                  Line;
228167802Sjkim    UINT32                  Offset;
229118611Snjl
230167802Sjkim} ASL_FILE_STATUS;
231167802Sjkim
232167802Sjkim
233118611Snjl/* File types */
234118611Snjl
235118611Snjltypedef enum
236118611Snjl{
237118611Snjl    ASL_FILE_STDOUT             = 0,
238118611Snjl    ASL_FILE_STDERR,
239118611Snjl    ASL_FILE_INPUT,
240118611Snjl    ASL_FILE_AML_OUTPUT,
241118611Snjl    ASL_FILE_SOURCE_OUTPUT,
242118611Snjl    ASL_FILE_LISTING_OUTPUT,
243118611Snjl    ASL_FILE_HEX_OUTPUT,
244118611Snjl    ASL_FILE_NAMESPACE_OUTPUT,
245118611Snjl    ASL_FILE_DEBUG_OUTPUT,
246118611Snjl    ASL_FILE_ASM_SOURCE_OUTPUT,
247118611Snjl    ASL_FILE_C_SOURCE_OUTPUT,
248118611Snjl    ASL_FILE_ASM_INCLUDE_OUTPUT,
249118611Snjl    ASL_FILE_C_INCLUDE_OUTPUT
250118611Snjl
251118611Snjl} ASL_FILE_TYPES;
252118611Snjl
253118611Snjl
254118611Snjl#define ASL_MAX_FILE_TYPE       12
255118611Snjl#define ASL_NUM_FILES           (ASL_MAX_FILE_TYPE + 1)
256118611Snjl
257118611Snjl
258197104Sjkimtypedef struct asl_include_dir
259197104Sjkim{
260197104Sjkim    char                        *Dir;
261197104Sjkim    struct asl_include_dir      *Next;
262197104Sjkim
263197104Sjkim} ASL_INCLUDE_DIR;
264197104Sjkim
265197104Sjkim
266118611Snjl/* An entry in the exception list, one for each error/warning */
267118611Snjl
268118611Snjltypedef struct asl_error_msg
269118611Snjl{
270118611Snjl    UINT32                      LineNumber;
271118611Snjl    UINT32                      LogicalLineNumber;
272118611Snjl    UINT32                      LogicalByteOffset;
273118611Snjl    UINT32                      Column;
274118611Snjl    char                        *Message;
275118611Snjl    struct asl_error_msg        *Next;
276118611Snjl    char                        *Filename;
277118611Snjl    UINT32                      FilenameLength;
278118611Snjl    UINT8                       MessageId;
279118611Snjl    UINT8                       Level;
280118611Snjl
281118611Snjl} ASL_ERROR_MSG;
282118611Snjl
283118611Snjl
284118611Snjl/* An entry in the listing file stack (for include files) */
285118611Snjl
286118611Snjltypedef struct asl_listing_node
287118611Snjl{
288118611Snjl    char                        *Filename;
289118611Snjl    UINT32                      LineNumber;
290118611Snjl    struct asl_listing_node     *Next;
291118611Snjl
292118611Snjl} ASL_LISTING_NODE;
293118611Snjl
294118611Snjl
295118611Snjl/* Callback interface for a parse tree walk */
296118611Snjl
297118611Snjltypedef
298118611SnjlACPI_STATUS (*ASL_WALK_CALLBACK) (
299118611Snjl    ACPI_PARSE_OBJECT           *Op,
300118611Snjl    UINT32                      Level,
301118611Snjl    void                        *Context);
302118611Snjl
303118611Snjl
304118611Snjltypedef struct asl_event_info
305118611Snjl{
306151937Sjkim    UINT64                      StartTime;
307151937Sjkim    UINT64                      EndTime;
308118611Snjl    char                        *EventName;
309118611Snjl    BOOLEAN                     Valid;
310118611Snjl
311118611Snjl} ASL_EVENT_INFO;
312118611Snjl
313118611Snjl
314167802Sjkim#define ASL_WARNING             0
315167802Sjkim#define ASL_WARNING2            1
316167802Sjkim#define ASL_WARNING3            2
317167802Sjkim#define ASL_ERROR               3
318167802Sjkim#define ASL_REMARK              4
319167802Sjkim#define ASL_OPTIMIZATION        5
320167802Sjkim#define ASL_NUM_REPORT_LEVELS   6
321118611Snjl
322118611Snjl
323118611Snjltypedef enum
324118611Snjl{
325167802Sjkim    ASL_MSG_RESERVED = 0,
326151937Sjkim    ASL_MSG_ALPHANUMERIC_STRING,
327151937Sjkim    ASL_MSG_AML_NOT_IMPLEMENTED,
328151937Sjkim    ASL_MSG_ARG_COUNT_HI,
329151937Sjkim    ASL_MSG_ARG_COUNT_LO,
330151937Sjkim    ASL_MSG_ARG_INIT,
331151937Sjkim    ASL_MSG_BACKWARDS_OFFSET,
332151937Sjkim    ASL_MSG_BITS_TO_BYTES,
333151937Sjkim    ASL_MSG_BUFFER_LENGTH,
334151937Sjkim    ASL_MSG_BYTES_TO_BITS,
335151937Sjkim    ASL_MSG_CLOSE,
336151937Sjkim    ASL_MSG_COMPILER_INTERNAL,
337151937Sjkim    ASL_MSG_CONSTANT_EVALUATION,
338151937Sjkim    ASL_MSG_CONSTANT_FOLDED,
339151937Sjkim    ASL_MSG_CORE_EXCEPTION,
340151937Sjkim    ASL_MSG_DEBUG_FILE_OPEN,
341118611Snjl    ASL_MSG_DEBUG_FILENAME,
342151937Sjkim    ASL_MSG_DEPENDENT_NESTING,
343151937Sjkim    ASL_MSG_DMA_CHANNEL,
344151937Sjkim    ASL_MSG_DMA_LIST,
345151937Sjkim    ASL_MSG_DUPLICATE_CASE,
346151937Sjkim    ASL_MSG_DUPLICATE_ITEM,
347151937Sjkim    ASL_MSG_EARLY_EOF,
348151937Sjkim    ASL_MSG_ENCODING_LENGTH,
349151937Sjkim    ASL_MSG_EX_INTERRUPT_LIST,
350193529Sjkim    ASL_MSG_EX_INTERRUPT_LIST_MIN,
351151937Sjkim    ASL_MSG_EX_INTERRUPT_NUMBER,
352151937Sjkim    ASL_MSG_FIELD_ACCESS_WIDTH,
353151937Sjkim    ASL_MSG_FIELD_UNIT_ACCESS_WIDTH,
354151937Sjkim    ASL_MSG_FIELD_UNIT_OFFSET,
355118611Snjl    ASL_MSG_INCLUDE_FILE_OPEN,
356151937Sjkim    ASL_MSG_INPUT_FILE_OPEN,
357151937Sjkim    ASL_MSG_INTEGER_LENGTH,
358151937Sjkim    ASL_MSG_INTEGER_OPTIMIZATION,
359151937Sjkim    ASL_MSG_INTERRUPT_LIST,
360151937Sjkim    ASL_MSG_INTERRUPT_NUMBER,
361151937Sjkim    ASL_MSG_INVALID_CONSTANT_OP,
362151937Sjkim    ASL_MSG_INVALID_EISAID,
363151937Sjkim    ASL_MSG_INVALID_ESCAPE,
364151937Sjkim    ASL_MSG_INVALID_OPERAND,
365151937Sjkim    ASL_MSG_INVALID_PERFORMANCE,
366118611Snjl    ASL_MSG_INVALID_PRIORITY,
367151937Sjkim    ASL_MSG_INVALID_STRING,
368151937Sjkim    ASL_MSG_INVALID_TARGET,
369151937Sjkim    ASL_MSG_INVALID_TIME,
370151937Sjkim    ASL_MSG_INVALID_TYPE,
371151937Sjkim    ASL_MSG_INVALID_UUID,
372151937Sjkim    ASL_MSG_LIST_LENGTH,
373151937Sjkim    ASL_MSG_LISTING_FILE_OPEN,
374151937Sjkim    ASL_MSG_LISTING_FILENAME,
375118611Snjl    ASL_MSG_LOCAL_INIT,
376151937Sjkim    ASL_MSG_LONG_LINE,
377151937Sjkim    ASL_MSG_MEMORY_ALLOCATION,
378151937Sjkim    ASL_MSG_MISSING_ENDDEPENDENT,
379151937Sjkim    ASL_MSG_MISSING_STARTDEPENDENT,
380151937Sjkim    ASL_MSG_MULTIPLE_TYPES,
381151937Sjkim    ASL_MSG_NAME_EXISTS,
382151937Sjkim    ASL_MSG_NAME_OPTIMIZATION,
383118611Snjl    ASL_MSG_NESTED_COMMENT,
384151937Sjkim    ASL_MSG_NO_CASES,
385118611Snjl    ASL_MSG_NO_RETVAL,
386151937Sjkim    ASL_MSG_NO_WHILE,
387151937Sjkim    ASL_MSG_NON_ASCII,
388151937Sjkim    ASL_MSG_NOT_EXIST,
389151937Sjkim    ASL_MSG_NOT_FOUND,
390118611Snjl    ASL_MSG_NOT_METHOD,
391118611Snjl    ASL_MSG_NOT_PARAMETER,
392151937Sjkim    ASL_MSG_NOT_REACHABLE,
393118611Snjl    ASL_MSG_OPEN,
394151937Sjkim    ASL_MSG_OUTPUT_FILE_OPEN,
395151937Sjkim    ASL_MSG_OUTPUT_FILENAME,
396151937Sjkim    ASL_MSG_PACKAGE_LENGTH,
397118611Snjl    ASL_MSG_READ,
398151937Sjkim    ASL_MSG_RECURSION,
399151937Sjkim    ASL_MSG_REGION_BUFFER_ACCESS,
400118611Snjl    ASL_MSG_REGION_BYTE_ACCESS,
401151937Sjkim    ASL_MSG_RESERVED_ARG_COUNT_HI,
402151937Sjkim    ASL_MSG_RESERVED_ARG_COUNT_LO,
403151937Sjkim    ASL_MSG_RESERVED_METHOD,
404151937Sjkim    ASL_MSG_RESERVED_OPERAND_TYPE,
405151937Sjkim    ASL_MSG_RESERVED_RETURN_VALUE,
406151937Sjkim    ASL_MSG_RESERVED_USE,
407151937Sjkim    ASL_MSG_RESERVED_WORD,
408118611Snjl    ASL_MSG_RESOURCE_FIELD,
409151937Sjkim    ASL_MSG_RESOURCE_INDEX,
410118611Snjl    ASL_MSG_RESOURCE_LIST,
411151937Sjkim    ASL_MSG_RESOURCE_SOURCE,
412151937Sjkim    ASL_MSG_RETURN_TYPES,
413151937Sjkim    ASL_MSG_SCOPE_FWD_REF,
414151937Sjkim    ASL_MSG_SCOPE_TYPE,
415151937Sjkim    ASL_MSG_SEEK,
416118611Snjl    ASL_MSG_SINGLE_NAME_OPTIMIZATION,
417151937Sjkim    ASL_MSG_SOME_NO_RETVAL,
418151937Sjkim    ASL_MSG_SWITCH_TYPE,
419151937Sjkim    ASL_MSG_SYNC_LEVEL,
420151937Sjkim    ASL_MSG_SYNTAX,
421151937Sjkim    ASL_MSG_TABLE_SIGNATURE,
422151937Sjkim    ASL_MSG_TOO_MANY_TEMPS,
423151937Sjkim    ASL_MSG_UNKNOWN_RESERVED_NAME,
424118611Snjl    ASL_MSG_UNREACHABLE_CODE,
425151937Sjkim    ASL_MSG_UNSUPPORTED,
426151937Sjkim    ASL_MSG_VENDOR_LIST,
427167802Sjkim    ASL_MSG_WRITE,
428167802Sjkim    ASL_MSG_MULTIPLE_DEFAULT,
429167802Sjkim    ASL_MSG_TIMEOUT,
430167802Sjkim    ASL_MSG_RESULT_NOT_USED,
431167802Sjkim    ASL_MSG_NOT_REFERENCED,
432167802Sjkim    ASL_MSG_NON_ZERO,
433193529Sjkim    ASL_MSG_STRING_LENGTH,
434193529Sjkim    ASL_MSG_SERIALIZED,
435193529Sjkim    ASL_MSG_COMPILER_RESERVED,
436193529Sjkim    ASL_MSG_NAMED_OBJECT_IN_WHILE,
437193529Sjkim    ASL_MSG_LOCAL_OUTSIDE_METHOD
438118611Snjl
439118611Snjl} ASL_MESSAGE_IDS;
440118611Snjl
441118611Snjl#ifdef ASL_EXCEPTIONS
442118611Snjl
443118611Snjlchar                        *AslMessages [] = {
444167802Sjkim/*    The zeroth message is resesrved */    "",
445151937Sjkim/*    ASL_MSG_ALPHANUMERIC_STRING */        "String must be entirely alphanumeric",
446151937Sjkim/*    ASL_MSG_AML_NOT_IMPLEMENTED */        "Opcode is not implemented in compiler AML code generator",
447151937Sjkim/*    ASL_MSG_ARG_COUNT_HI */               "Too many arguments",
448151937Sjkim/*    ASL_MSG_ARG_COUNT_LO */               "Too few arguments",
449151937Sjkim/*    ASL_MSG_ARG_INIT */                   "Method argument is not initialized",
450151937Sjkim/*    ASL_MSG_BACKWARDS_OFFSET */           "Invalid backwards offset",
451151937Sjkim/*    ASL_MSG_BITS_TO_BYTES */              "Field offset is in bits, but a byte offset is required",
452151937Sjkim/*    ASL_MSG_BUFFER_LENGTH */              "Effective AML buffer length is zero",
453151937Sjkim/*    ASL_MSG_BYTES_TO_BITS */              "Field offset is in bytes, but a bit offset is required",
454151937Sjkim/*    ASL_MSG_CLOSE */                      "Could not close file",
455151937Sjkim/*    ASL_MSG_COMPILER_INTERNAL */          "Internal compiler error",
456151937Sjkim/*    ASL_MSG_CONSTANT_EVALUATION */        "Could not evaluate constant expression",
457151937Sjkim/*    ASL_MSG_CONSTANT_FOLDED */            "Constant expression evaluated and reduced",
458151937Sjkim/*    ASL_MSG_CORE_EXCEPTION */             "From ACPI CA Subsystem",
459151937Sjkim/*    ASL_MSG_DEBUG_FILE_OPEN */            "Could not open debug file",
460151937Sjkim/*    ASL_MSG_DEBUG_FILENAME */             "Could not create debug filename",
461151937Sjkim/*    ASL_MSG_DEPENDENT_NESTING */          "Dependent function macros cannot be nested",\
462151937Sjkim/*    ASL_MSG_DMA_CHANNEL */                "Invalid DMA channel (must be 0-7)",
463151937Sjkim/*    ASL_MSG_DMA_LIST */                   "Too many DMA channels (8 max)",
464151937Sjkim/*    ASL_MSG_DUPLICATE_CASE */             "Case value already specified",
465151937Sjkim/*    ASL_MSG_DUPLICATE_ITEM */             "Duplicate value in list",
466118611Snjl/*    ASL_MSG_EARLY_EOF */                  "Premature end-of-file reached",
467151937Sjkim/*    ASL_MSG_ENCODING_LENGTH */            "Package length too long to encode",
468151937Sjkim/*    ASL_MSG_EX_INTERRUPT_LIST */          "Too many interrupts (255 max)",
469193529Sjkim/*    ASL_MSG_EX_INTERRUPT_LIST_MIN */      "Too few interrupts (1 minimum required)",
470151937Sjkim/*    ASL_MSG_EX_INTERRUPT_NUMBER */        "Invalid interrupt number (must be 32 bits)",
471151937Sjkim/*    ASL_MSG_FIELD_ACCESS_WIDTH */         "Access width is greater than region size",
472151937Sjkim/*    ASL_MSG_FIELD_UNIT_ACCESS_WIDTH */    "Access width of Field Unit extends beyond region limit",
473151937Sjkim/*    ASL_MSG_FIELD_UNIT_OFFSET */          "Field Unit extends beyond region limit",
474151937Sjkim/*    ASL_MSG_INCLUDE_FILE_OPEN */          "Could not open include file",
475151937Sjkim/*    ASL_MSG_INPUT_FILE_OPEN */            "Could not open input file",
476151937Sjkim/*    ASL_MSG_INTEGER_LENGTH */             "64-bit integer in 32-bit table, truncating",
477151937Sjkim/*    ASL_MSG_INTEGER_OPTIMIZATION */       "Integer optimized to single-byte AML opcode",
478151937Sjkim/*    ASL_MSG_INTERRUPT_LIST */             "Too many interrupts (16 max)",
479151937Sjkim/*    ASL_MSG_INTERRUPT_NUMBER */           "Invalid interrupt number (must be 0-15)",
480151937Sjkim/*    ASL_MSG_INVALID_CONSTANT_OP */        "Invalid operator in constant expression (not type 3/4/5)",
481151937Sjkim/*    ASL_MSG_INVALID_EISAID */             "EISAID string must be of the form \"UUUXXXX\" (3 uppercase, 4 hex digits)",
482151937Sjkim/*    ASL_MSG_INVALID_ESCAPE */             "Invalid or unknown escape sequence",
483151937Sjkim/*    ASL_MSG_INVALID_OPERAND */            "Invalid operand",
484151937Sjkim/*    ASL_MSG_INVALID_PERFORMANCE */        "Invalid performance/robustness value",
485151937Sjkim/*    ASL_MSG_INVALID_PRIORITY */           "Invalid priority value",
486151937Sjkim/*    ASL_MSG_INVALID_STRING */             "Invalid Hex/Octal Escape - Non-ASCII or NULL",
487151937Sjkim/*    ASL_MSG_INVALID_TARGET */             "Target operand not allowed in constant expression",
488138287Smarks/*    ASL_MSG_INVALID_TIME */               "Time parameter too long (255 max)",
489151937Sjkim/*    ASL_MSG_INVALID_TYPE */               "Invalid type",
490151937Sjkim/*    ASL_MSG_INVALID_UUID */               "UUID string must be of the form \"aabbccdd-eeff-gghh-iijj-kkllmmnnoopp\"",
491151937Sjkim/*    ASL_MSG_LIST_LENGTH */                "Initializer list too long",
492151937Sjkim/*    ASL_MSG_LISTING_FILE_OPEN */          "Could not open listing file",
493151937Sjkim/*    ASL_MSG_LISTING_FILENAME */           "Could not create listing filename",
494151937Sjkim/*    ASL_MSG_LOCAL_INIT */                 "Method local variable is not initialized",
495151937Sjkim/*    ASL_MSG_LONG_LINE */                  "Splitting long input line",
496151937Sjkim/*    ASL_MSG_MEMORY_ALLOCATION */          "Memory allocation failure",
497151937Sjkim/*    ASL_MSG_MISSING_ENDDEPENDENT */       "Missing EndDependentFn() macro in dependent resource list",
498151937Sjkim/*    ASL_MSG_MISSING_STARTDEPENDENT */     "Missing StartDependentFn() macro in dependent resource list",
499151937Sjkim/*    ASL_MSG_MULTIPLE_TYPES */             "Multiple types",
500151937Sjkim/*    ASL_MSG_NAME_EXISTS */                "Name already exists in scope",
501151937Sjkim/*    ASL_MSG_NAME_OPTIMIZATION */          "NamePath optimized",
502151937Sjkim/*    ASL_MSG_NESTED_COMMENT */             "Nested comment found",
503167802Sjkim/*    ASL_MSG_NO_CASES */                   "No Case statements under Switch",
504151937Sjkim/*    ASL_MSG_NO_RETVAL */                  "Called method returns no value",
505151937Sjkim/*    ASL_MSG_NO_WHILE */                   "No enclosing While statement",
506151937Sjkim/*    ASL_MSG_NON_ASCII */                  "Invalid characters found in file",
507151937Sjkim/*    ASL_MSG_NOT_EXIST */                  "Object does not exist",
508151937Sjkim/*    ASL_MSG_NOT_FOUND */                  "Object not found or not accessible from scope",
509151937Sjkim/*    ASL_MSG_NOT_METHOD */                 "Not a control method, cannot invoke",
510151937Sjkim/*    ASL_MSG_NOT_PARAMETER */              "Not a parameter, used as local only",
511167802Sjkim/*    ASL_MSG_NOT_REACHABLE */              "Object is not accessible from this scope",
512151937Sjkim/*    ASL_MSG_OPEN */                       "Could not open file",
513151937Sjkim/*    ASL_MSG_OUTPUT_FILE_OPEN */           "Could not open output AML file",
514151937Sjkim/*    ASL_MSG_OUTPUT_FILENAME */            "Could not create output filename",
515151937Sjkim/*    ASL_MSG_PACKAGE_LENGTH */             "Effective AML package length is zero",
516151937Sjkim/*    ASL_MSG_READ */                       "Could not read file",
517151937Sjkim/*    ASL_MSG_RECURSION */                  "Recursive method call",
518151937Sjkim/*    ASL_MSG_REGION_BUFFER_ACCESS */       "Host Operation Region requires BufferAcc access",
519151937Sjkim/*    ASL_MSG_REGION_BYTE_ACCESS */         "Host Operation Region requires ByteAcc access",
520151937Sjkim/*    ASL_MSG_RESERVED_ARG_COUNT_HI */      "Reserved method has too many arguments",
521151937Sjkim/*    ASL_MSG_RESERVED_ARG_COUNT_LO */      "Reserved method has too few arguments",
522151937Sjkim/*    ASL_MSG_RESERVED_METHOD */            "Reserved name must be a control method",
523151937Sjkim/*    ASL_MSG_RESERVED_OPERAND_TYPE */      "Invalid operand type for reserved name, must be",
524151937Sjkim/*    ASL_MSG_RESERVED_RETURN_VALUE */      "Reserved method must return a value",
525151937Sjkim/*    ASL_MSG_RESERVED_USE */               "Invalid use of reserved name",
526193529Sjkim/*    ASL_MSG_RESERVED_WORD */              "Use of reserved name",
527151937Sjkim/*    ASL_MSG_RESOURCE_FIELD */             "Resource field name cannot be used as a target",
528151937Sjkim/*    ASL_MSG_RESOURCE_INDEX */             "Missing ResourceSourceIndex (required)",
529151937Sjkim/*    ASL_MSG_RESOURCE_LIST */              "Too many resource items (internal error)",
530151937Sjkim/*    ASL_MSG_RESOURCE_SOURCE */            "Missing ResourceSource string (required)",
531151937Sjkim/*    ASL_MSG_RETURN_TYPES */               "Not all control paths return a value",
532167802Sjkim/*    ASL_MSG_SCOPE_FWD_REF */              "Forward references from Scope operator not allowed",
533151937Sjkim/*    ASL_MSG_SCOPE_TYPE */                 "Existing object has invalid type for Scope operator",
534151937Sjkim/*    ASL_MSG_SEEK */                       "Could not seek file",
535151937Sjkim/*    ASL_MSG_SINGLE_NAME_OPTIMIZATION */   "NamePath optimized to NameSeg (uses run-time search path)",
536151937Sjkim/*    ASL_MSG_SOME_NO_RETVAL */             "Called method may not always return a value",
537151937Sjkim/*    ASL_MSG_SWITCH_TYPE */                "Switch expression is not a static Integer/Buffer/String data type, defaulting to Integer",
538151937Sjkim/*    ASL_MSG_SYNC_LEVEL */                 "SyncLevel must be in the range 0-15",
539151937Sjkim/*    ASL_MSG_SYNTAX */                     "",
540151937Sjkim/*    ASL_MSG_TABLE_SIGNATURE */            "Invalid Table Signature",
541151937Sjkim/*    ASL_MSG_TOO_MANY_TEMPS */             "Method requires too many temporary variables (_T_x)",
542151937Sjkim/*    ASL_MSG_UNKNOWN_RESERVED_NAME */      "Unknown reserved name",
543151937Sjkim/*    ASL_MSG_UNREACHABLE_CODE */           "Statement is unreachable",
544151937Sjkim/*    ASL_MSG_UNSUPPORTED */                "Unsupported feature",
545151937Sjkim/*    ASL_MSG_VENDOR_LIST */                "Too many vendor data bytes (7 max)",
546167802Sjkim/*    ASL_MSG_WRITE */                      "Could not write file",
547167802Sjkim/*    ASL_MSG_MULTIPLE_DEFAULT */           "More than one Default statement within Switch construct",
548167802Sjkim/*    ASL_MSG_TIMEOUT */                    "Possible operator timeout is ignored",
549167802Sjkim/*    ASL_MSG_RESULT_NOT_USED */            "Result is not used, operator has no effect",
550167802Sjkim/*    ASL_MSG_NOT_REFERENCED */             "Namespace object is not referenced",
551167802Sjkim/*    ASL_MSG_NON_ZERO */                   "Operand evaluates to zero",
552193529Sjkim/*    ASL_MSG_STRING_LENGTH */              "String literal too long",
553193529Sjkim/*    ASL_MSG_SERIALIZED */                 "Control Method marked Serialized",
554193529Sjkim/*    ASL_MSG_COMPILER_RESERVED */          "Use of compiler reserved name",
555193529Sjkim/*    ASL_MSG_NAMED_OBJECT_IN_WHILE */      "Creating a named object in a While loop",
556193529Sjkim/*    ASL_MSG_LOCAL_OUTSIDE_METHOD */       "Local or Arg used outside a control method"
557123315Snjl
558118611Snjl};
559118611Snjl
560118611Snjl
561118611Snjlchar                    *AslErrorLevel [ASL_NUM_REPORT_LEVELS] = {
562167802Sjkim    "Warning ",
563167802Sjkim    "Warning ",
564167802Sjkim    "Warning ",
565118611Snjl    "Error   ",
566118611Snjl    "Remark  ",
567118611Snjl    "Optimize"
568118611Snjl};
569118611Snjl
570118611Snjl#define ASL_ERROR_LEVEL_LENGTH          8       /* Length of strings above */
571118611Snjl
572118611Snjl/* Exception counters */
573118611Snjl
574167802SjkimUINT32                  Gbl_ExceptionCount[ASL_NUM_REPORT_LEVELS] = {0,0,0,0,0,0};
575118611Snjl
576118611Snjl#endif
577118611Snjl
578118611Snjl
579118611Snjl#endif  /* __ASLTYPES_H */
580