2 /******************************************************************************
4 * Module Name: aslmessages.h - Compiler error/warning messages
6 *****************************************************************************/
9 * Copyright (C) 2000 - 2011, Intel Corp.
10 * All rights reserved.
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions, and the following disclaimer,
17 * without modification.
18 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
19 * substantially similar to the "NO WARRANTY" disclaimer below
20 * ("Disclaimer") and any redistribution must be conditioned upon
21 * including a substantially similar Disclaimer requirement for further
22 * binary redistribution.
23 * 3. Neither the names of the above-listed copyright holders nor the names
24 * of any contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
27 * Alternatively, this software may be distributed under the terms of the
28 * GNU General Public License ("GPL") version 2 as published by the Free
29 * Software Foundation.
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
35 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
40 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
41 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42 * POSSIBILITY OF SUCH DAMAGES.
46 #ifndef __ASLMESSAGES_H
47 #define __ASLMESSAGES_H
51 #define ASL_WARNING2 1
52 #define ASL_WARNING3 2
55 #define ASL_OPTIMIZATION 5
56 #define ASL_NUM_REPORT_LEVELS 6
59 /* Values for all compiler messages */
64 ASL_MSG_ALPHANUMERIC_STRING,
65 ASL_MSG_AML_NOT_IMPLEMENTED,
69 ASL_MSG_BACKWARDS_OFFSET,
70 ASL_MSG_BITS_TO_BYTES,
71 ASL_MSG_BUFFER_LENGTH,
72 ASL_MSG_BYTES_TO_BITS,
74 ASL_MSG_COMPILER_INTERNAL,
75 ASL_MSG_CONSTANT_EVALUATION,
76 ASL_MSG_CONSTANT_FOLDED,
77 ASL_MSG_CORE_EXCEPTION,
78 ASL_MSG_DEBUG_FILE_OPEN,
79 ASL_MSG_DEBUG_FILENAME,
80 ASL_MSG_DEPENDENT_NESTING,
83 ASL_MSG_DUPLICATE_CASE,
84 ASL_MSG_DUPLICATE_ITEM,
86 ASL_MSG_ENCODING_LENGTH,
87 ASL_MSG_EX_INTERRUPT_LIST,
88 ASL_MSG_EX_INTERRUPT_LIST_MIN,
89 ASL_MSG_EX_INTERRUPT_NUMBER,
90 ASL_MSG_FIELD_ACCESS_WIDTH,
91 ASL_MSG_FIELD_UNIT_ACCESS_WIDTH,
92 ASL_MSG_FIELD_UNIT_OFFSET,
93 ASL_MSG_INCLUDE_FILE_OPEN,
94 ASL_MSG_INPUT_FILE_OPEN,
95 ASL_MSG_INTEGER_LENGTH,
96 ASL_MSG_INTEGER_OPTIMIZATION,
97 ASL_MSG_INTERRUPT_LIST,
98 ASL_MSG_INTERRUPT_NUMBER,
99 ASL_MSG_INVALID_CONSTANT_OP,
100 ASL_MSG_INVALID_EISAID,
101 ASL_MSG_INVALID_ESCAPE,
102 ASL_MSG_INVALID_OPERAND,
103 ASL_MSG_INVALID_PERFORMANCE,
104 ASL_MSG_INVALID_PRIORITY,
105 ASL_MSG_INVALID_STRING,
106 ASL_MSG_INVALID_TARGET,
107 ASL_MSG_INVALID_TIME,
108 ASL_MSG_INVALID_TYPE,
109 ASL_MSG_INVALID_UUID,
110 ASL_MSG_LIST_LENGTH_LONG,
111 ASL_MSG_LIST_LENGTH_SHORT,
112 ASL_MSG_LISTING_FILE_OPEN,
113 ASL_MSG_LISTING_FILENAME,
116 ASL_MSG_MEMORY_ALLOCATION,
117 ASL_MSG_MISSING_ENDDEPENDENT,
118 ASL_MSG_MISSING_STARTDEPENDENT,
119 ASL_MSG_MULTIPLE_TYPES,
121 ASL_MSG_NAME_OPTIMIZATION,
122 ASL_MSG_NESTED_COMMENT,
130 ASL_MSG_NOT_PARAMETER,
131 ASL_MSG_NOT_REACHABLE,
133 ASL_MSG_OUTPUT_FILE_OPEN,
134 ASL_MSG_OUTPUT_FILENAME,
135 ASL_MSG_PACKAGE_LENGTH,
138 ASL_MSG_REGION_BUFFER_ACCESS,
139 ASL_MSG_REGION_BYTE_ACCESS,
140 ASL_MSG_RESERVED_ARG_COUNT_HI,
141 ASL_MSG_RESERVED_ARG_COUNT_LO,
142 ASL_MSG_RESERVED_METHOD,
143 ASL_MSG_RESERVED_OPERAND_TYPE,
144 ASL_MSG_RESERVED_RETURN_VALUE,
145 ASL_MSG_RESERVED_USE,
146 ASL_MSG_RESERVED_WORD,
147 ASL_MSG_RESOURCE_FIELD,
148 ASL_MSG_RESOURCE_INDEX,
149 ASL_MSG_RESOURCE_LIST,
150 ASL_MSG_RESOURCE_SOURCE,
151 ASL_MSG_RETURN_TYPES,
152 ASL_MSG_SCOPE_FWD_REF,
155 ASL_MSG_SINGLE_NAME_OPTIMIZATION,
156 ASL_MSG_SOME_NO_RETVAL,
160 ASL_MSG_TABLE_SIGNATURE,
161 ASL_MSG_TOO_MANY_TEMPS,
162 ASL_MSG_UNKNOWN_RESERVED_NAME,
163 ASL_MSG_UNREACHABLE_CODE,
167 ASL_MSG_MULTIPLE_DEFAULT,
169 ASL_MSG_RESULT_NOT_USED,
170 ASL_MSG_NOT_REFERENCED,
172 ASL_MSG_STRING_LENGTH,
174 ASL_MSG_COMPILER_RESERVED,
175 ASL_MSG_NAMED_OBJECT_IN_WHILE,
176 ASL_MSG_LOCAL_OUTSIDE_METHOD,
179 ASL_MSG_INVALID_MIN_MAX,
180 ASL_MSG_INVALID_LENGTH,
181 ASL_MSG_INVALID_LENGTH_FIXED,
182 ASL_MSG_INVALID_GRANULARITY,
183 ASL_MSG_INVALID_GRAN_FIXED,
184 ASL_MSG_INVALID_ACCESS_SIZE,
185 ASL_MSG_INVALID_ADDR_FLAGS,
186 ASL_MSG_NULL_DESCRIPTOR,
190 ASL_MSG_LEADING_ASTERISK,
192 ASL_MSG_INVALID_FIELD_NAME,
193 ASL_MSG_INTEGER_SIZE,
194 ASL_MSG_INVALID_HEX_INTEGER,
195 ASL_MSG_BUFFER_ELEMENT,
196 ASL_MSG_RESERVED_VALUE,
199 ASL_MSG_UNKNOWN_TABLE,
200 ASL_MSG_UNKNOWN_SUBTABLE,
206 #ifdef ASL_EXCEPTIONS
208 /* Actual message strings for each compiler message */
210 char *AslMessages [] = {
211 /* The zeroth message is reserved */ "",
212 /* ASL_MSG_ALPHANUMERIC_STRING */ "String must be entirely alphanumeric",
213 /* ASL_MSG_AML_NOT_IMPLEMENTED */ "Opcode is not implemented in compiler AML code generator",
214 /* ASL_MSG_ARG_COUNT_HI */ "Too many arguments",
215 /* ASL_MSG_ARG_COUNT_LO */ "Too few arguments",
216 /* ASL_MSG_ARG_INIT */ "Method argument is not initialized",
217 /* ASL_MSG_BACKWARDS_OFFSET */ "Invalid backwards offset",
218 /* ASL_MSG_BITS_TO_BYTES */ "Field offset is in bits, but a byte offset is required",
219 /* ASL_MSG_BUFFER_LENGTH */ "Effective AML buffer length is zero",
220 /* ASL_MSG_BYTES_TO_BITS */ "Field offset is in bytes, but a bit offset is required",
221 /* ASL_MSG_CLOSE */ "Could not close file",
222 /* ASL_MSG_COMPILER_INTERNAL */ "Internal compiler error",
223 /* ASL_MSG_CONSTANT_EVALUATION */ "Could not evaluate constant expression",
224 /* ASL_MSG_CONSTANT_FOLDED */ "Constant expression evaluated and reduced",
225 /* ASL_MSG_CORE_EXCEPTION */ "From ACPI CA Subsystem",
226 /* ASL_MSG_DEBUG_FILE_OPEN */ "Could not open debug file",
227 /* ASL_MSG_DEBUG_FILENAME */ "Could not create debug filename",
228 /* ASL_MSG_DEPENDENT_NESTING */ "Dependent function macros cannot be nested",\
229 /* ASL_MSG_DMA_CHANNEL */ "Invalid DMA channel (must be 0-7)",
230 /* ASL_MSG_DMA_LIST */ "Too many DMA channels (8 max)",
231 /* ASL_MSG_DUPLICATE_CASE */ "Case value already specified",
232 /* ASL_MSG_DUPLICATE_ITEM */ "Duplicate value in list",
233 /* ASL_MSG_EARLY_EOF */ "Premature end-of-file reached",
234 /* ASL_MSG_ENCODING_LENGTH */ "Package length too long to encode",
235 /* ASL_MSG_EX_INTERRUPT_LIST */ "Too many interrupts (255 max)",
236 /* ASL_MSG_EX_INTERRUPT_LIST_MIN */ "Too few interrupts (1 minimum required)",
237 /* ASL_MSG_EX_INTERRUPT_NUMBER */ "Invalid interrupt number (must be 32 bits)",
238 /* ASL_MSG_FIELD_ACCESS_WIDTH */ "Access width is greater than region size",
239 /* ASL_MSG_FIELD_UNIT_ACCESS_WIDTH */ "Access width of Field Unit extends beyond region limit",
240 /* ASL_MSG_FIELD_UNIT_OFFSET */ "Field Unit extends beyond region limit",
241 /* ASL_MSG_INCLUDE_FILE_OPEN */ "Could not open include file",
242 /* ASL_MSG_INPUT_FILE_OPEN */ "Could not open input file",
243 /* ASL_MSG_INTEGER_LENGTH */ "64-bit integer in 32-bit table, truncating",
244 /* ASL_MSG_INTEGER_OPTIMIZATION */ "Integer optimized to single-byte AML opcode",
245 /* ASL_MSG_INTERRUPT_LIST */ "Too many interrupts (16 max)",
246 /* ASL_MSG_INTERRUPT_NUMBER */ "Invalid interrupt number (must be 0-15)",
247 /* ASL_MSG_INVALID_CONSTANT_OP */ "Invalid operator in constant expression (not type 3/4/5)",
248 /* ASL_MSG_INVALID_EISAID */ "EISAID string must be of the form \"UUUXXXX\" (3 uppercase, 4 hex digits)",
249 /* ASL_MSG_INVALID_ESCAPE */ "Invalid or unknown escape sequence",
250 /* ASL_MSG_INVALID_OPERAND */ "Invalid operand",
251 /* ASL_MSG_INVALID_PERFORMANCE */ "Invalid performance/robustness value",
252 /* ASL_MSG_INVALID_PRIORITY */ "Invalid priority value",
253 /* ASL_MSG_INVALID_STRING */ "Invalid Hex/Octal Escape - Non-ASCII or NULL",
254 /* ASL_MSG_INVALID_TARGET */ "Target operand not allowed in constant expression",
255 /* ASL_MSG_INVALID_TIME */ "Time parameter too long (255 max)",
256 /* ASL_MSG_INVALID_TYPE */ "Invalid type",
257 /* ASL_MSG_INVALID_UUID */ "UUID string must be of the form \"aabbccdd-eeff-gghh-iijj-kkllmmnnoopp\"",
258 /* ASL_MSG_LIST_LENGTH_LONG */ "Initializer list longer than declared package length",
259 /* ASL_MSG_LIST_LENGTH_SHORT */ "Initializer list shorter than declared package length",
260 /* ASL_MSG_LISTING_FILE_OPEN */ "Could not open listing file",
261 /* ASL_MSG_LISTING_FILENAME */ "Could not create listing filename",
262 /* ASL_MSG_LOCAL_INIT */ "Method local variable is not initialized",
263 /* ASL_MSG_LONG_LINE */ "Splitting long input line",
264 /* ASL_MSG_MEMORY_ALLOCATION */ "Memory allocation failure",
265 /* ASL_MSG_MISSING_ENDDEPENDENT */ "Missing EndDependentFn() macro in dependent resource list",
266 /* ASL_MSG_MISSING_STARTDEPENDENT */ "Missing StartDependentFn() macro in dependent resource list",
267 /* ASL_MSG_MULTIPLE_TYPES */ "Multiple types",
268 /* ASL_MSG_NAME_EXISTS */ "Name already exists in scope",
269 /* ASL_MSG_NAME_OPTIMIZATION */ "NamePath optimized",
270 /* ASL_MSG_NESTED_COMMENT */ "Nested comment found",
271 /* ASL_MSG_NO_CASES */ "No Case statements under Switch",
272 /* ASL_MSG_NO_RETVAL */ "Called method returns no value",
273 /* ASL_MSG_NO_WHILE */ "No enclosing While statement",
274 /* ASL_MSG_NON_ASCII */ "Invalid characters found in file",
275 /* ASL_MSG_NOT_EXIST */ "Object does not exist",
276 /* ASL_MSG_NOT_FOUND */ "Object not found or not accessible from scope",
277 /* ASL_MSG_NOT_METHOD */ "Not a control method, cannot invoke",
278 /* ASL_MSG_NOT_PARAMETER */ "Not a parameter, used as local only",
279 /* ASL_MSG_NOT_REACHABLE */ "Object is not accessible from this scope",
280 /* ASL_MSG_OPEN */ "Could not open file",
281 /* ASL_MSG_OUTPUT_FILE_OPEN */ "Could not open output AML file",
282 /* ASL_MSG_OUTPUT_FILENAME */ "Could not create output filename",
283 /* ASL_MSG_PACKAGE_LENGTH */ "Effective AML package length is zero",
284 /* ASL_MSG_READ */ "Could not read file",
285 /* ASL_MSG_RECURSION */ "Recursive method call",
286 /* ASL_MSG_REGION_BUFFER_ACCESS */ "Host Operation Region requires BufferAcc access",
287 /* ASL_MSG_REGION_BYTE_ACCESS */ "Host Operation Region requires ByteAcc access",
288 /* ASL_MSG_RESERVED_ARG_COUNT_HI */ "Reserved method has too many arguments",
289 /* ASL_MSG_RESERVED_ARG_COUNT_LO */ "Reserved method has too few arguments",
290 /* ASL_MSG_RESERVED_METHOD */ "Reserved name must be a control method",
291 /* ASL_MSG_RESERVED_OPERAND_TYPE */ "Invalid object type for reserved name",
292 /* ASL_MSG_RESERVED_RETURN_VALUE */ "Reserved method must return a value",
293 /* ASL_MSG_RESERVED_USE */ "Invalid use of reserved name",
294 /* ASL_MSG_RESERVED_WORD */ "Use of reserved name",
295 /* ASL_MSG_RESOURCE_FIELD */ "Resource field name cannot be used as a target",
296 /* ASL_MSG_RESOURCE_INDEX */ "Missing ResourceSourceIndex (required)",
297 /* ASL_MSG_RESOURCE_LIST */ "Too many resource items (internal error)",
298 /* ASL_MSG_RESOURCE_SOURCE */ "Missing ResourceSource string (required)",
299 /* ASL_MSG_RETURN_TYPES */ "Not all control paths return a value",
300 /* ASL_MSG_SCOPE_FWD_REF */ "Forward references from Scope operator not allowed",
301 /* ASL_MSG_SCOPE_TYPE */ "Existing object has invalid type for Scope operator",
302 /* ASL_MSG_SEEK */ "Could not seek file",
303 /* ASL_MSG_SINGLE_NAME_OPTIMIZATION */ "NamePath optimized to NameSeg (uses run-time search path)",
304 /* ASL_MSG_SOME_NO_RETVAL */ "Called method may not always return a value",
305 /* ASL_MSG_SWITCH_TYPE */ "Switch expression is not a static Integer/Buffer/String data type, defaulting to Integer",
306 /* ASL_MSG_SYNC_LEVEL */ "SyncLevel must be in the range 0-15",
307 /* ASL_MSG_SYNTAX */ "",
308 /* ASL_MSG_TABLE_SIGNATURE */ "Invalid Table Signature",
309 /* ASL_MSG_TOO_MANY_TEMPS */ "Method requires too many temporary variables (_T_x)",
310 /* ASL_MSG_UNKNOWN_RESERVED_NAME */ "Unknown reserved name",
311 /* ASL_MSG_UNREACHABLE_CODE */ "Statement is unreachable",
312 /* ASL_MSG_UNSUPPORTED */ "Unsupported feature",
313 /* ASL_MSG_VENDOR_LIST */ "Too many vendor data bytes (7 max)",
314 /* ASL_MSG_WRITE */ "Could not write file",
315 /* ASL_MSG_MULTIPLE_DEFAULT */ "More than one Default statement within Switch construct",
316 /* ASL_MSG_TIMEOUT */ "Result is not used, possible operator timeout will be missed",
317 /* ASL_MSG_RESULT_NOT_USED */ "Result is not used, operator has no effect",
318 /* ASL_MSG_NOT_REFERENCED */ "Namespace object is not referenced",
319 /* ASL_MSG_NON_ZERO */ "Operand evaluates to zero",
320 /* ASL_MSG_STRING_LENGTH */ "String literal too long",
321 /* ASL_MSG_SERIALIZED */ "Control Method marked Serialized",
322 /* ASL_MSG_COMPILER_RESERVED */ "Use of compiler reserved name",
323 /* ASL_MSG_NAMED_OBJECT_IN_WHILE */ "Creating a named object in a While loop",
324 /* ASL_MSG_LOCAL_OUTSIDE_METHOD */ "Local or Arg used outside a control method",
325 /* ASL_MSG_ALIGNMENT */ "Must be a multiple of alignment/granularity value",
326 /* ASL_MSG_ISA_ADDRESS */ "Maximum 10-bit ISA address (0x3FF)",
327 /* ASL_MSG_INVALID_MIN_MAX */ "Address Min is greater than Address Max",
328 /* ASL_MSG_INVALID_LENGTH */ "Length is larger than Min/Max window",
329 /* ASL_MSG_INVALID_LENGTH_FIXED */ "Length is not equal to fixed Min/Max window",
330 /* ASL_MSG_INVALID_GRANULARITY */ "Granularity must be zero or a power of two minus one",
331 /* ASL_MSG_INVALID_GRAN_FIXED */ "Granularity must be zero for fixed Min/Max",
332 /* ASL_MSG_INVALID_ACCESS_SIZE */ "Invalid AccessSize (Maximum is 4 - QWord access)",
333 /* ASL_MSG_INVALID_ADDR_FLAGS */ "Invalid combination of Length and Min/Max fixed flags",
334 /* ASL_MSG_NULL_DESCRIPTOR */ "Min/Max/Length/Gran are all zero, but no resource tag",
335 /* ASL_MSG_UPPER_CASE */ "Non-hex letters must be upper case",
336 /* ASL_MSG_HID_LENGTH */ "_HID string must be exactly 7 or 8 characters",
337 /* ASL_MSG_NULL_STRING */ "Invalid zero-length (null) string",
338 /* ASL_MSG_LEADING_ASTERISK */ "Invalid leading asterisk",
340 /* These messages are used by the data table compiler only */
342 /* ASL_MSG_INVALID_FIELD_NAME */ "Invalid Field Name",
343 /* ASL_MSG_INTEGER_SIZE */ "Integer too large for target",
344 /* ASL_MSG_INVALID_HEX_INTEGER */ "Invalid hex integer constant",
345 /* ASL_MSG_BUFFER_ELEMENT */ "Invalid element in buffer initializer list",
346 /* ASL_MSG_RESERVED_VALUE */ "Reserved field must be zero",
347 /* ASL_MSG_FLAG_VALUE */ "Flag value is too large",
348 /* ASL_MSG_ZERO_VALUE */ "Value must be non-zero",
349 /* ASL_MSG_UNKNOWN_TABLE */ "Unknown ACPI table signature",
350 /* ASL_MSG_UNKNOWN_SUBTABLE */ "Unknown subtable type",
351 /* ASL_MSG_OEM_TABLE */ "OEM table - unknown contents"
356 char *AslErrorLevel [ASL_NUM_REPORT_LEVELS] = {
365 #define ASL_ERROR_LEVEL_LENGTH 8 /* Length of strings above */
367 #endif /* ASL_EXCEPTIONS */
369 #endif /* __ASLMESSAGES_H */