xref: /illumos-gate/usr/src/cmd/acpi/iasl/aslmessages.h (revision bc36eafd)
1*bc36eafdSMike Gerdts /******************************************************************************
2*bc36eafdSMike Gerdts  *
3*bc36eafdSMike Gerdts  * Module Name: aslmessages.h - Compiler error/warning messages
4*bc36eafdSMike Gerdts  *
5*bc36eafdSMike Gerdts  *****************************************************************************/
6*bc36eafdSMike Gerdts 
7*bc36eafdSMike Gerdts /*
8*bc36eafdSMike Gerdts  * Copyright (C) 2000 - 2016, Intel Corp.
9*bc36eafdSMike Gerdts  * All rights reserved.
10*bc36eafdSMike Gerdts  *
11*bc36eafdSMike Gerdts  * Redistribution and use in source and binary forms, with or without
12*bc36eafdSMike Gerdts  * modification, are permitted provided that the following conditions
13*bc36eafdSMike Gerdts  * are met:
14*bc36eafdSMike Gerdts  * 1. Redistributions of source code must retain the above copyright
15*bc36eafdSMike Gerdts  *    notice, this list of conditions, and the following disclaimer,
16*bc36eafdSMike Gerdts  *    without modification.
17*bc36eafdSMike Gerdts  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18*bc36eafdSMike Gerdts  *    substantially similar to the "NO WARRANTY" disclaimer below
19*bc36eafdSMike Gerdts  *    ("Disclaimer") and any redistribution must be conditioned upon
20*bc36eafdSMike Gerdts  *    including a substantially similar Disclaimer requirement for further
21*bc36eafdSMike Gerdts  *    binary redistribution.
22*bc36eafdSMike Gerdts  * 3. Neither the names of the above-listed copyright holders nor the names
23*bc36eafdSMike Gerdts  *    of any contributors may be used to endorse or promote products derived
24*bc36eafdSMike Gerdts  *    from this software without specific prior written permission.
25*bc36eafdSMike Gerdts  *
26*bc36eafdSMike Gerdts  * Alternatively, this software may be distributed under the terms of the
27*bc36eafdSMike Gerdts  * GNU General Public License ("GPL") version 2 as published by the Free
28*bc36eafdSMike Gerdts  * Software Foundation.
29*bc36eafdSMike Gerdts  *
30*bc36eafdSMike Gerdts  * NO WARRANTY
31*bc36eafdSMike Gerdts  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32*bc36eafdSMike Gerdts  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33*bc36eafdSMike Gerdts  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34*bc36eafdSMike Gerdts  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35*bc36eafdSMike Gerdts  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36*bc36eafdSMike Gerdts  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37*bc36eafdSMike Gerdts  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38*bc36eafdSMike Gerdts  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39*bc36eafdSMike Gerdts  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40*bc36eafdSMike Gerdts  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41*bc36eafdSMike Gerdts  * POSSIBILITY OF SUCH DAMAGES.
42*bc36eafdSMike Gerdts  */
43*bc36eafdSMike Gerdts 
44*bc36eafdSMike Gerdts #ifndef __ASLMESSAGES_H
45*bc36eafdSMike Gerdts #define __ASLMESSAGES_H
46*bc36eafdSMike Gerdts 
47*bc36eafdSMike Gerdts 
48*bc36eafdSMike Gerdts /* These values must match error type string tables in aslmessages.c */
49*bc36eafdSMike Gerdts 
50*bc36eafdSMike Gerdts typedef enum
51*bc36eafdSMike Gerdts {
52*bc36eafdSMike Gerdts     ASL_OPTIMIZATION = 0,
53*bc36eafdSMike Gerdts     ASL_REMARK,
54*bc36eafdSMike Gerdts     ASL_WARNING,
55*bc36eafdSMike Gerdts     ASL_WARNING2,
56*bc36eafdSMike Gerdts     ASL_WARNING3,
57*bc36eafdSMike Gerdts     ASL_ERROR,
58*bc36eafdSMike Gerdts     ASL_NUM_REPORT_LEVELS
59*bc36eafdSMike Gerdts 
60*bc36eafdSMike Gerdts } ASL_MESSAGE_TYPES;
61*bc36eafdSMike Gerdts 
62*bc36eafdSMike Gerdts 
63*bc36eafdSMike Gerdts #define ASL_ERROR_LEVEL_LENGTH          8 /* Length of strings for types above */
64*bc36eafdSMike Gerdts 
65*bc36eafdSMike Gerdts /*
66*bc36eafdSMike Gerdts  * Exception code blocks, 0 - 999
67*bc36eafdSMike Gerdts  * Available for new exception blocks: 600 - 999
68*bc36eafdSMike Gerdts  */
69*bc36eafdSMike Gerdts #define ASL_MSG_MAIN_COMPILER           0       /* 0 - 299 */
70*bc36eafdSMike Gerdts #define ASL_MSG_MAIN_COMPILER_END       299
71*bc36eafdSMike Gerdts 
72*bc36eafdSMike Gerdts #define ASL_MSG_TABLE_COMPILER          300     /* 300 - 499 */
73*bc36eafdSMike Gerdts #define ASL_MSG_TABLE_COMPILER_END      499
74*bc36eafdSMike Gerdts 
75*bc36eafdSMike Gerdts #define ASL_MSG_PREPROCESSOR            500     /* 500 - 599 */
76*bc36eafdSMike Gerdts #define ASL_MSG_PREPROCESSOR_END        599
77*bc36eafdSMike Gerdts 
78*bc36eafdSMike Gerdts 
79*bc36eafdSMike Gerdts /*
80*bc36eafdSMike Gerdts  * Values (message IDs) for all compiler messages. There are currently
81*bc36eafdSMike Gerdts  * three distinct blocks of error messages (so that they can be expanded
82*bc36eafdSMike Gerdts  * individually):
83*bc36eafdSMike Gerdts  *      Main ASL compiler
84*bc36eafdSMike Gerdts  *      Data Table compiler
85*bc36eafdSMike Gerdts  *      Preprocessor
86*bc36eafdSMike Gerdts  *
87*bc36eafdSMike Gerdts  * NOTE1: This list must match the tables of message strings in the file
88*bc36eafdSMike Gerdts  * aslmessages.c exactly.
89*bc36eafdSMike Gerdts  *
90*bc36eafdSMike Gerdts  * NOTE2: With the introduction of the -vw option to disable specific
91*bc36eafdSMike Gerdts  * messages, new messages should only be added to the end of these
92*bc36eafdSMike Gerdts  * lists, so that values for existing messages are not disturbed.
93*bc36eafdSMike Gerdts  */
94*bc36eafdSMike Gerdts typedef enum
95*bc36eafdSMike Gerdts {
96*bc36eafdSMike Gerdts     ASL_MSG_RESERVED = ASL_MSG_MAIN_COMPILER,
97*bc36eafdSMike Gerdts 
98*bc36eafdSMike Gerdts     ASL_MSG_ALIGNMENT,
99*bc36eafdSMike Gerdts     ASL_MSG_ALPHANUMERIC_STRING,
100*bc36eafdSMike Gerdts     ASL_MSG_AML_NOT_IMPLEMENTED,
101*bc36eafdSMike Gerdts     ASL_MSG_ARG_COUNT_HI,
102*bc36eafdSMike Gerdts     ASL_MSG_ARG_COUNT_LO,
103*bc36eafdSMike Gerdts     ASL_MSG_ARG_INIT,
104*bc36eafdSMike Gerdts     ASL_MSG_BACKWARDS_OFFSET,
105*bc36eafdSMike Gerdts     ASL_MSG_BUFFER_LENGTH,
106*bc36eafdSMike Gerdts     ASL_MSG_CLOSE,
107*bc36eafdSMike Gerdts     ASL_MSG_COMPILER_INTERNAL,
108*bc36eafdSMike Gerdts     ASL_MSG_COMPILER_RESERVED,
109*bc36eafdSMike Gerdts     ASL_MSG_CONNECTION_MISSING,
110*bc36eafdSMike Gerdts     ASL_MSG_CONNECTION_INVALID,
111*bc36eafdSMike Gerdts     ASL_MSG_CONSTANT_EVALUATION,
112*bc36eafdSMike Gerdts     ASL_MSG_CONSTANT_FOLDED,
113*bc36eafdSMike Gerdts     ASL_MSG_CORE_EXCEPTION,
114*bc36eafdSMike Gerdts     ASL_MSG_DEBUG_FILE_OPEN,
115*bc36eafdSMike Gerdts     ASL_MSG_DEBUG_FILENAME,
116*bc36eafdSMike Gerdts     ASL_MSG_DEPENDENT_NESTING,
117*bc36eafdSMike Gerdts     ASL_MSG_DMA_CHANNEL,
118*bc36eafdSMike Gerdts     ASL_MSG_DMA_LIST,
119*bc36eafdSMike Gerdts     ASL_MSG_DUPLICATE_CASE,
120*bc36eafdSMike Gerdts     ASL_MSG_DUPLICATE_ITEM,
121*bc36eafdSMike Gerdts     ASL_MSG_EARLY_EOF,
122*bc36eafdSMike Gerdts     ASL_MSG_ENCODING_LENGTH,
123*bc36eafdSMike Gerdts     ASL_MSG_EX_INTERRUPT_LIST,
124*bc36eafdSMike Gerdts     ASL_MSG_EX_INTERRUPT_LIST_MIN,
125*bc36eafdSMike Gerdts     ASL_MSG_EX_INTERRUPT_NUMBER,
126*bc36eafdSMike Gerdts     ASL_MSG_FIELD_ACCESS_WIDTH,
127*bc36eafdSMike Gerdts     ASL_MSG_FIELD_UNIT_ACCESS_WIDTH,
128*bc36eafdSMike Gerdts     ASL_MSG_FIELD_UNIT_OFFSET,
129*bc36eafdSMike Gerdts     ASL_MSG_GPE_NAME_CONFLICT,
130*bc36eafdSMike Gerdts     ASL_MSG_HID_LENGTH,
131*bc36eafdSMike Gerdts     ASL_MSG_HID_PREFIX,
132*bc36eafdSMike Gerdts     ASL_MSG_HID_SUFFIX,
133*bc36eafdSMike Gerdts     ASL_MSG_INCLUDE_FILE_OPEN,
134*bc36eafdSMike Gerdts     ASL_MSG_INPUT_FILE_OPEN,
135*bc36eafdSMike Gerdts     ASL_MSG_INTEGER_LENGTH,
136*bc36eafdSMike Gerdts     ASL_MSG_INTEGER_OPTIMIZATION,
137*bc36eafdSMike Gerdts     ASL_MSG_INTERRUPT_LIST,
138*bc36eafdSMike Gerdts     ASL_MSG_INTERRUPT_NUMBER,
139*bc36eafdSMike Gerdts     ASL_MSG_INVALID_ACCESS_SIZE,
140*bc36eafdSMike Gerdts     ASL_MSG_INVALID_ADDR_FLAGS,
141*bc36eafdSMike Gerdts     ASL_MSG_INVALID_CONSTANT_OP,
142*bc36eafdSMike Gerdts     ASL_MSG_INVALID_EISAID,
143*bc36eafdSMike Gerdts     ASL_MSG_INVALID_ESCAPE,
144*bc36eafdSMike Gerdts     ASL_MSG_INVALID_GRAN_FIXED,
145*bc36eafdSMike Gerdts     ASL_MSG_INVALID_GRANULARITY,
146*bc36eafdSMike Gerdts     ASL_MSG_INVALID_LENGTH,
147*bc36eafdSMike Gerdts     ASL_MSG_INVALID_LENGTH_FIXED,
148*bc36eafdSMike Gerdts     ASL_MSG_INVALID_MIN_MAX,
149*bc36eafdSMike Gerdts     ASL_MSG_INVALID_OPERAND,
150*bc36eafdSMike Gerdts     ASL_MSG_INVALID_PERFORMANCE,
151*bc36eafdSMike Gerdts     ASL_MSG_INVALID_PRIORITY,
152*bc36eafdSMike Gerdts     ASL_MSG_INVALID_STRING,
153*bc36eafdSMike Gerdts     ASL_MSG_INVALID_TARGET,
154*bc36eafdSMike Gerdts     ASL_MSG_INVALID_TIME,
155*bc36eafdSMike Gerdts     ASL_MSG_INVALID_TYPE,
156*bc36eafdSMike Gerdts     ASL_MSG_INVALID_UUID,
157*bc36eafdSMike Gerdts     ASL_MSG_ISA_ADDRESS,
158*bc36eafdSMike Gerdts     ASL_MSG_LEADING_ASTERISK,
159*bc36eafdSMike Gerdts     ASL_MSG_LIST_LENGTH_LONG,
160*bc36eafdSMike Gerdts     ASL_MSG_LIST_LENGTH_SHORT,
161*bc36eafdSMike Gerdts     ASL_MSG_LISTING_FILE_OPEN,
162*bc36eafdSMike Gerdts     ASL_MSG_LISTING_FILENAME,
163*bc36eafdSMike Gerdts     ASL_MSG_LOCAL_INIT,
164*bc36eafdSMike Gerdts     ASL_MSG_LOCAL_OUTSIDE_METHOD,
165*bc36eafdSMike Gerdts     ASL_MSG_LONG_LINE,
166*bc36eafdSMike Gerdts     ASL_MSG_MEMORY_ALLOCATION,
167*bc36eafdSMike Gerdts     ASL_MSG_MISSING_ENDDEPENDENT,
168*bc36eafdSMike Gerdts     ASL_MSG_MISSING_STARTDEPENDENT,
169*bc36eafdSMike Gerdts     ASL_MSG_MULTIPLE_DEFAULT,
170*bc36eafdSMike Gerdts     ASL_MSG_MULTIPLE_TYPES,
171*bc36eafdSMike Gerdts     ASL_MSG_NAME_EXISTS,
172*bc36eafdSMike Gerdts     ASL_MSG_NAME_OPTIMIZATION,
173*bc36eafdSMike Gerdts     ASL_MSG_NAMED_OBJECT_IN_WHILE,
174*bc36eafdSMike Gerdts     ASL_MSG_NESTED_COMMENT,
175*bc36eafdSMike Gerdts     ASL_MSG_NO_CASES,
176*bc36eafdSMike Gerdts     ASL_MSG_NO_REGION,
177*bc36eafdSMike Gerdts     ASL_MSG_NO_RETVAL,
178*bc36eafdSMike Gerdts     ASL_MSG_NO_WHILE,
179*bc36eafdSMike Gerdts     ASL_MSG_NON_ASCII,
180*bc36eafdSMike Gerdts     ASL_MSG_NON_ZERO,
181*bc36eafdSMike Gerdts     ASL_MSG_NOT_EXIST,
182*bc36eafdSMike Gerdts     ASL_MSG_NOT_FOUND,
183*bc36eafdSMike Gerdts     ASL_MSG_NOT_METHOD,
184*bc36eafdSMike Gerdts     ASL_MSG_NOT_PARAMETER,
185*bc36eafdSMike Gerdts     ASL_MSG_NOT_REACHABLE,
186*bc36eafdSMike Gerdts     ASL_MSG_NOT_REFERENCED,
187*bc36eafdSMike Gerdts     ASL_MSG_NULL_DESCRIPTOR,
188*bc36eafdSMike Gerdts     ASL_MSG_NULL_STRING,
189*bc36eafdSMike Gerdts     ASL_MSG_OPEN,
190*bc36eafdSMike Gerdts     ASL_MSG_OUTPUT_FILE_OPEN,
191*bc36eafdSMike Gerdts     ASL_MSG_OUTPUT_FILENAME,
192*bc36eafdSMike Gerdts     ASL_MSG_PACKAGE_LENGTH,
193*bc36eafdSMike Gerdts     ASL_MSG_PREPROCESSOR_FILENAME,
194*bc36eafdSMike Gerdts     ASL_MSG_READ,
195*bc36eafdSMike Gerdts     ASL_MSG_RECURSION,
196*bc36eafdSMike Gerdts     ASL_MSG_REGION_BUFFER_ACCESS,
197*bc36eafdSMike Gerdts     ASL_MSG_REGION_BYTE_ACCESS,
198*bc36eafdSMike Gerdts     ASL_MSG_RESERVED_ARG_COUNT_HI,
199*bc36eafdSMike Gerdts     ASL_MSG_RESERVED_ARG_COUNT_LO,
200*bc36eafdSMike Gerdts     ASL_MSG_RESERVED_METHOD,
201*bc36eafdSMike Gerdts     ASL_MSG_RESERVED_NO_RETURN_VAL,
202*bc36eafdSMike Gerdts     ASL_MSG_RESERVED_OPERAND_TYPE,
203*bc36eafdSMike Gerdts     ASL_MSG_RESERVED_PACKAGE_LENGTH,
204*bc36eafdSMike Gerdts     ASL_MSG_RESERVED_RETURN_VALUE,
205*bc36eafdSMike Gerdts     ASL_MSG_RESERVED_USE,
206*bc36eafdSMike Gerdts     ASL_MSG_RESERVED_WORD,
207*bc36eafdSMike Gerdts     ASL_MSG_RESOURCE_FIELD,
208*bc36eafdSMike Gerdts     ASL_MSG_RESOURCE_INDEX,
209*bc36eafdSMike Gerdts     ASL_MSG_RESOURCE_LIST,
210*bc36eafdSMike Gerdts     ASL_MSG_RESOURCE_SOURCE,
211*bc36eafdSMike Gerdts     ASL_MSG_RESULT_NOT_USED,
212*bc36eafdSMike Gerdts     ASL_MSG_RETURN_TYPES,
213*bc36eafdSMike Gerdts     ASL_MSG_SCOPE_FWD_REF,
214*bc36eafdSMike Gerdts     ASL_MSG_SCOPE_TYPE,
215*bc36eafdSMike Gerdts     ASL_MSG_SEEK,
216*bc36eafdSMike Gerdts     ASL_MSG_SERIALIZED,
217*bc36eafdSMike Gerdts     ASL_MSG_SERIALIZED_REQUIRED,
218*bc36eafdSMike Gerdts     ASL_MSG_SINGLE_NAME_OPTIMIZATION,
219*bc36eafdSMike Gerdts     ASL_MSG_SOME_NO_RETVAL,
220*bc36eafdSMike Gerdts     ASL_MSG_STRING_LENGTH,
221*bc36eafdSMike Gerdts     ASL_MSG_SWITCH_TYPE,
222*bc36eafdSMike Gerdts     ASL_MSG_SYNC_LEVEL,
223*bc36eafdSMike Gerdts     ASL_MSG_SYNTAX,
224*bc36eafdSMike Gerdts     ASL_MSG_TABLE_SIGNATURE,
225*bc36eafdSMike Gerdts     ASL_MSG_TAG_LARGER,
226*bc36eafdSMike Gerdts     ASL_MSG_TAG_SMALLER,
227*bc36eafdSMike Gerdts     ASL_MSG_TIMEOUT,
228*bc36eafdSMike Gerdts     ASL_MSG_TOO_MANY_TEMPS,
229*bc36eafdSMike Gerdts     ASL_MSG_TRUNCATION,
230*bc36eafdSMike Gerdts     ASL_MSG_UNKNOWN_RESERVED_NAME,
231*bc36eafdSMike Gerdts     ASL_MSG_UNREACHABLE_CODE,
232*bc36eafdSMike Gerdts     ASL_MSG_UNSUPPORTED,
233*bc36eafdSMike Gerdts     ASL_MSG_UPPER_CASE,
234*bc36eafdSMike Gerdts     ASL_MSG_VENDOR_LIST,
235*bc36eafdSMike Gerdts     ASL_MSG_WRITE,
236*bc36eafdSMike Gerdts     ASL_MSG_RANGE,
237*bc36eafdSMike Gerdts     ASL_MSG_BUFFER_ALLOCATION,
238*bc36eafdSMike Gerdts     ASL_MSG_MISSING_DEPENDENCY,
239*bc36eafdSMike Gerdts     ASL_MSG_ILLEGAL_FORWARD_REF,
240*bc36eafdSMike Gerdts     ASL_MSG_ILLEGAL_METHOD_REF,
241*bc36eafdSMike Gerdts     ASL_MSG_LOCAL_NOT_USED,
242*bc36eafdSMike Gerdts     ASL_MSG_ARG_AS_LOCAL_NOT_USED,
243*bc36eafdSMike Gerdts     ASL_MSG_ARG_NOT_USED,
244*bc36eafdSMike Gerdts     ASL_MSG_CONSTANT_REQUIRED,
245*bc36eafdSMike Gerdts     ASL_MSG_CROSS_TABLE_SCOPE,
246*bc36eafdSMike Gerdts 
247*bc36eafdSMike Gerdts     /* These messages are used by the Data Table compiler only */
248*bc36eafdSMike Gerdts 
249*bc36eafdSMike Gerdts     ASL_MSG_BUFFER_ELEMENT = ASL_MSG_TABLE_COMPILER,
250*bc36eafdSMike Gerdts     ASL_MSG_DIVIDE_BY_ZERO,
251*bc36eafdSMike Gerdts     ASL_MSG_FLAG_VALUE,
252*bc36eafdSMike Gerdts     ASL_MSG_INTEGER_SIZE,
253*bc36eafdSMike Gerdts     ASL_MSG_INVALID_EXPRESSION,
254*bc36eafdSMike Gerdts     ASL_MSG_INVALID_FIELD_NAME,
255*bc36eafdSMike Gerdts     ASL_MSG_INVALID_HEX_INTEGER,
256*bc36eafdSMike Gerdts     ASL_MSG_OEM_TABLE,
257*bc36eafdSMike Gerdts     ASL_MSG_RESERVED_VALUE,
258*bc36eafdSMike Gerdts     ASL_MSG_UNKNOWN_LABEL,
259*bc36eafdSMike Gerdts     ASL_MSG_UNKNOWN_SUBTABLE,
260*bc36eafdSMike Gerdts     ASL_MSG_UNKNOWN_TABLE,
261*bc36eafdSMike Gerdts     ASL_MSG_ZERO_VALUE,
262*bc36eafdSMike Gerdts 
263*bc36eafdSMike Gerdts     /* These messages are used by the Preprocessor only */
264*bc36eafdSMike Gerdts 
265*bc36eafdSMike Gerdts     ASL_MSG_DIRECTIVE_SYNTAX = ASL_MSG_PREPROCESSOR,
266*bc36eafdSMike Gerdts     ASL_MSG_ENDIF_MISMATCH,
267*bc36eafdSMike Gerdts     ASL_MSG_ERROR_DIRECTIVE,
268*bc36eafdSMike Gerdts     ASL_MSG_EXISTING_NAME,
269*bc36eafdSMike Gerdts     ASL_MSG_INVALID_INVOCATION,
270*bc36eafdSMike Gerdts     ASL_MSG_MACRO_SYNTAX,
271*bc36eafdSMike Gerdts     ASL_MSG_TOO_MANY_ARGUMENTS,
272*bc36eafdSMike Gerdts     ASL_MSG_UNKNOWN_DIRECTIVE,
273*bc36eafdSMike Gerdts     ASL_MSG_UNKNOWN_PRAGMA,
274*bc36eafdSMike Gerdts     ASL_MSG_WARNING_DIRECTIVE,
275*bc36eafdSMike Gerdts     ASL_MSG_INCLUDE_FILE
276*bc36eafdSMike Gerdts 
277*bc36eafdSMike Gerdts } ASL_MESSAGE_IDS;
278*bc36eafdSMike Gerdts 
279*bc36eafdSMike Gerdts 
280*bc36eafdSMike Gerdts #endif  /* __ASLMESSAGES_H */
281