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