Path: blob/main/sys/contrib/dev/acpica/compiler/aslmessages.h
48373 views
/******************************************************************************1*2* Module Name: aslmessages.h - Compiler error/warning messages3*4*****************************************************************************/56/******************************************************************************7*8* 1. Copyright Notice9*10* Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.11* All rights reserved.12*13* 2. License14*15* 2.1. This is your license from Intel Corp. under its intellectual property16* rights. You may have additional license terms from the party that provided17* you this software, covering your right to use that party's intellectual18* property rights.19*20* 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a21* copy of the source code appearing in this file ("Covered Code") an22* irrevocable, perpetual, worldwide license under Intel's copyrights in the23* base code distributed originally by Intel ("Original Intel Code") to copy,24* make derivatives, distribute, use and display any portion of the Covered25* Code in any form, with the right to sublicense such rights; and26*27* 2.3. Intel grants Licensee a non-exclusive and non-transferable patent28* license (with the right to sublicense), under only those claims of Intel29* patents that are infringed by the Original Intel Code, to make, use, sell,30* offer to sell, and import the Covered Code and derivative works thereof31* solely to the minimum extent necessary to exercise the above copyright32* license, and in no event shall the patent license extend to any additions33* to or modifications of the Original Intel Code. No other license or right34* is granted directly or by implication, estoppel or otherwise;35*36* The above copyright and patent license is granted only if the following37* conditions are met:38*39* 3. Conditions40*41* 3.1. Redistribution of Source with Rights to Further Distribute Source.42* Redistribution of source code of any substantial portion of the Covered43* Code or modification with rights to further distribute source must include44* the above Copyright Notice, the above License, this list of Conditions,45* and the following Disclaimer and Export Compliance provision. In addition,46* Licensee must cause all Covered Code to which Licensee contributes to47* contain a file documenting the changes Licensee made to create that Covered48* Code and the date of any change. Licensee must include in that file the49* documentation of any changes made by any predecessor Licensee. Licensee50* must include a prominent statement that the modification is derived,51* directly or indirectly, from Original Intel Code.52*53* 3.2. Redistribution of Source with no Rights to Further Distribute Source.54* Redistribution of source code of any substantial portion of the Covered55* Code or modification without rights to further distribute source must56* include the following Disclaimer and Export Compliance provision in the57* documentation and/or other materials provided with distribution. In58* addition, Licensee may not authorize further sublicense of source of any59* portion of the Covered Code, and must include terms to the effect that the60* license from Licensee to its licensee is limited to the intellectual61* property embodied in the software Licensee provides to its licensee, and62* not to intellectual property embodied in modifications its licensee may63* make.64*65* 3.3. Redistribution of Executable. Redistribution in executable form of any66* substantial portion of the Covered Code or modification must reproduce the67* above Copyright Notice, and the following Disclaimer and Export Compliance68* provision in the documentation and/or other materials provided with the69* distribution.70*71* 3.4. Intel retains all right, title, and interest in and to the Original72* Intel Code.73*74* 3.5. Neither the name Intel nor any other trademark owned or controlled by75* Intel shall be used in advertising or otherwise to promote the sale, use or76* other dealings in products derived from or relating to the Covered Code77* without prior written authorization from Intel.78*79* 4. Disclaimer and Export Compliance80*81* 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED82* HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE83* IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,84* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY85* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY86* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A87* PARTICULAR PURPOSE.88*89* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES90* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR91* COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,92* SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY93* CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL94* HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS95* SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY96* LIMITED REMEDY.97*98* 4.3. Licensee shall not export, either directly or indirectly, any of this99* software or system incorporating such software without first obtaining any100* required license or other approval from the U. S. Department of Commerce or101* any other agency or department of the United States Government. In the102* event Licensee exports any such software from the United States or103* re-exports any such software from a foreign destination, Licensee shall104* ensure that the distribution and export/re-export of the software is in105* compliance with all laws, regulations, orders, or other restrictions of the106* U.S. Export Administration Regulations. Licensee agrees that neither it nor107* any of its subsidiaries will export/re-export any technical data, process,108* software, or service, directly or indirectly, to any country for which the109* United States government or any agency thereof requires an export license,110* other governmental approval, or letter of assurance, without first obtaining111* such license, approval or letter.112*113*****************************************************************************114*115* Alternatively, you may choose to be licensed under the terms of the116* following license:117*118* Redistribution and use in source and binary forms, with or without119* modification, are permitted provided that the following conditions120* are met:121* 1. Redistributions of source code must retain the above copyright122* notice, this list of conditions, and the following disclaimer,123* without modification.124* 2. Redistributions in binary form must reproduce at minimum a disclaimer125* substantially similar to the "NO WARRANTY" disclaimer below126* ("Disclaimer") and any redistribution must be conditioned upon127* including a substantially similar Disclaimer requirement for further128* binary redistribution.129* 3. Neither the names of the above-listed copyright holders nor the names130* of any contributors may be used to endorse or promote products derived131* from this software without specific prior written permission.132*133* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS134* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT135* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR136* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT137* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,138* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT139* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,140* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY141* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT142* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE143* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.144*145* Alternatively, you may choose to be licensed under the terms of the146* GNU General Public License ("GPL") version 2 as published by the Free147* Software Foundation.148*149*****************************************************************************/150151#ifndef __ASLMESSAGES_H152#define __ASLMESSAGES_H153154/* These values must match error type string tables in aslmessages.c */155156typedef enum157{158ASL_OPTIMIZATION = 0,159ASL_REMARK,160ASL_WARNING,161ASL_WARNING2,162ASL_WARNING3,163ASL_ERROR,164ASL_NUM_REPORT_LEVELS165166} ASL_MESSAGE_TYPES;167168#define ASL_ERROR_LEVEL_LENGTH 8 /* Length of strings for types above */169170void171AhDecodeAslException (172char *HexString);173174/*175* Exception code blocks, 0 - 999176* Available for new exception blocks: 600 - 999177*/178#define ASL_MSG_MAIN_COMPILER 0 /* 0 - 299 */179#define ASL_MSG_MAIN_COMPILER_END 299180181#define ASL_MSG_TABLE_COMPILER 300 /* 300 - 499 */182#define ASL_MSG_TABLE_COMPILER_END 499183184#define ASL_MSG_PREPROCESSOR 500 /* 500 - 599 */185#define ASL_MSG_PREPROCESSOR_END 599186187188/*189* Values (message IDs) for all compiler messages. There are currently190* three distinct blocks of error messages (so that they can be expanded191* individually):192* Main ASL compiler193* Data Table compiler194* Preprocessor195*196* NOTE1: This list must match the tables of message strings in the file197* aslmessages.c exactly.198*199* NOTE2: With the introduction of the -vw option to disable specific200* messages, new messages should only be added to the end of these201* lists, so that values for existing messages are not disturbed.202*/203typedef enum204{205ASL_MSG_RESERVED = ASL_MSG_MAIN_COMPILER,206207ASL_MSG_ALIGNMENT,208ASL_MSG_ALPHANUMERIC_STRING,209ASL_MSG_AML_NOT_IMPLEMENTED,210ASL_MSG_ARG_COUNT_HI,211ASL_MSG_ARG_COUNT_LO,212ASL_MSG_ARG_INIT,213ASL_MSG_BACKWARDS_OFFSET,214ASL_MSG_BUFFER_LENGTH,215ASL_MSG_CLOSE,216ASL_MSG_COMPILER_INTERNAL,217ASL_MSG_COMPILER_RESERVED,218ASL_MSG_CONNECTION_MISSING,219ASL_MSG_CONNECTION_INVALID,220ASL_MSG_CONSTANT_EVALUATION,221ASL_MSG_CONSTANT_FOLDED,222ASL_MSG_CORE_EXCEPTION,223ASL_MSG_DEBUG_FILE_OPEN,224ASL_MSG_DEBUG_FILENAME,225ASL_MSG_DEPENDENT_NESTING,226ASL_MSG_DMA_CHANNEL,227ASL_MSG_DMA_LIST,228ASL_MSG_DUPLICATE_CASE,229ASL_MSG_DUPLICATE_ITEM,230ASL_MSG_EARLY_EOF,231ASL_MSG_ENCODING_LENGTH,232ASL_MSG_EX_INTERRUPT_LIST,233ASL_MSG_EX_INTERRUPT_LIST_MIN,234ASL_MSG_EX_INTERRUPT_NUMBER,235ASL_MSG_FIELD_ACCESS_WIDTH,236ASL_MSG_FIELD_UNIT_ACCESS_WIDTH,237ASL_MSG_FIELD_UNIT_OFFSET,238ASL_MSG_GPE_NAME_CONFLICT,239ASL_MSG_HID_LENGTH,240ASL_MSG_HID_PREFIX,241ASL_MSG_HID_SUFFIX,242ASL_MSG_INCLUDE_FILE_OPEN,243ASL_MSG_INPUT_FILE_OPEN,244ASL_MSG_INTEGER_LENGTH,245ASL_MSG_INTEGER_OPTIMIZATION,246ASL_MSG_INTERRUPT_LIST,247ASL_MSG_INTERRUPT_NUMBER,248ASL_MSG_INVALID_ACCESS_SIZE,249ASL_MSG_INVALID_ADDR_FLAGS,250ASL_MSG_INVALID_CONSTANT_OP,251ASL_MSG_INVALID_EISAID,252ASL_MSG_INVALID_ESCAPE,253ASL_MSG_INVALID_GRAN_FIXED,254ASL_MSG_INVALID_GRANULARITY,255ASL_MSG_INVALID_LENGTH,256ASL_MSG_INVALID_LENGTH_FIXED,257ASL_MSG_INVALID_MIN_MAX,258ASL_MSG_INVALID_OPERAND,259ASL_MSG_INVALID_PERFORMANCE,260ASL_MSG_INVALID_PRIORITY,261ASL_MSG_INVALID_STRING,262ASL_MSG_INVALID_TARGET,263ASL_MSG_INVALID_TIME,264ASL_MSG_INVALID_TYPE,265ASL_MSG_INVALID_UUID,266ASL_MSG_ISA_ADDRESS,267ASL_MSG_LEADING_ASTERISK,268ASL_MSG_LIST_LENGTH_LONG,269ASL_MSG_LIST_LENGTH_SHORT,270ASL_MSG_LISTING_FILE_OPEN,271ASL_MSG_LISTING_FILENAME,272ASL_MSG_LOCAL_INIT,273ASL_MSG_LOCAL_OUTSIDE_METHOD,274ASL_MSG_LONG_LINE,275ASL_MSG_MEMORY_ALLOCATION,276ASL_MSG_MISSING_ENDDEPENDENT,277ASL_MSG_MISSING_STARTDEPENDENT,278ASL_MSG_MULTIPLE_DEFAULT,279ASL_MSG_MULTIPLE_TYPES,280ASL_MSG_NAME_EXISTS,281ASL_MSG_NAME_OPTIMIZATION,282ASL_MSG_NAMED_OBJECT_IN_WHILE,283ASL_MSG_NESTED_COMMENT,284ASL_MSG_NO_CASES,285ASL_MSG_NO_REGION,286ASL_MSG_NO_RETVAL,287ASL_MSG_NO_WHILE,288ASL_MSG_NON_ASCII,289ASL_MSG_BUFFER_FIELD_LENGTH,290ASL_MSG_NOT_EXIST,291ASL_MSG_NOT_FOUND,292ASL_MSG_NOT_METHOD,293ASL_MSG_NOT_PARAMETER,294ASL_MSG_NOT_REACHABLE,295ASL_MSG_NOT_REFERENCED,296ASL_MSG_NULL_DESCRIPTOR,297ASL_MSG_NULL_STRING,298ASL_MSG_OPEN,299ASL_MSG_OUTPUT_FILE_OPEN,300ASL_MSG_OUTPUT_FILENAME,301ASL_MSG_PACKAGE_LENGTH,302ASL_MSG_PREPROCESSOR_FILENAME,303ASL_MSG_READ,304ASL_MSG_RECURSION,305ASL_MSG_REGION_BUFFER_ACCESS,306ASL_MSG_REGION_BYTE_ACCESS,307ASL_MSG_RESERVED_ARG_COUNT_HI,308ASL_MSG_RESERVED_ARG_COUNT_LO,309ASL_MSG_RESERVED_METHOD,310ASL_MSG_RESERVED_NO_RETURN_VAL,311ASL_MSG_RESERVED_OPERAND_TYPE,312ASL_MSG_RESERVED_PACKAGE_LENGTH,313ASL_MSG_RESERVED_RETURN_VALUE,314ASL_MSG_RESERVED_USE,315ASL_MSG_RESERVED_WORD,316ASL_MSG_RESOURCE_FIELD,317ASL_MSG_RESOURCE_INDEX,318ASL_MSG_RESOURCE_LIST,319ASL_MSG_RESOURCE_SOURCE,320ASL_MSG_RESULT_NOT_USED,321ASL_MSG_RETURN_TYPES,322ASL_MSG_SCOPE_FWD_REF,323ASL_MSG_SCOPE_TYPE,324ASL_MSG_SEEK,325ASL_MSG_SERIALIZED,326ASL_MSG_SERIALIZED_REQUIRED,327ASL_MSG_SINGLE_NAME_OPTIMIZATION,328ASL_MSG_SOME_NO_RETVAL,329ASL_MSG_STRING_LENGTH,330ASL_MSG_SWITCH_TYPE,331ASL_MSG_SYNC_LEVEL,332ASL_MSG_SYNTAX,333ASL_MSG_TABLE_SIGNATURE,334ASL_MSG_TAG_LARGER,335ASL_MSG_TAG_SMALLER,336ASL_MSG_TIMEOUT,337ASL_MSG_TOO_MANY_TEMPS,338ASL_MSG_TRUNCATION,339ASL_MSG_UNKNOWN_RESERVED_NAME,340ASL_MSG_UNREACHABLE_CODE,341ASL_MSG_UNSUPPORTED,342ASL_MSG_UPPER_CASE,343ASL_MSG_VENDOR_LIST,344ASL_MSG_WRITE,345ASL_MSG_RANGE,346ASL_MSG_BUFFER_ALLOCATION,347ASL_MSG_MISSING_DEPENDENCY,348ASL_MSG_ILLEGAL_FORWARD_REF,349ASL_MSG_ILLEGAL_METHOD_REF,350ASL_MSG_LOCAL_NOT_USED,351ASL_MSG_ARG_AS_LOCAL_NOT_USED,352ASL_MSG_ARG_NOT_USED,353ASL_MSG_CONSTANT_REQUIRED,354ASL_MSG_CROSS_TABLE_SCOPE,355ASL_MSG_EXCEPTION_NOT_RECEIVED,356ASL_MSG_NULL_RESOURCE_TEMPLATE,357ASL_MSG_FOUND_HERE,358ASL_MSG_ILLEGAL_RECURSION,359ASL_MSG_DUPLICATE_INPUT_FILE,360ASL_MSG_WARNING_AS_ERROR,361ASL_MSG_OEM_TABLE_ID,362ASL_MSG_OEM_ID,363ASL_MSG_UNLOAD,364ASL_MSG_OFFSET,365ASL_MSG_LONG_SLEEP,366ASL_MSG_PREFIX_NOT_EXIST,367ASL_MSG_NAMEPATH_NOT_EXIST,368ASL_MSG_REGION_LENGTH,369ASL_MSG_TEMPORARY_OBJECT,370ASL_MSG_UNDEFINED_EXTERNAL,371ASL_MSG_BUFFER_FIELD_OVERFLOW,372ASL_MSG_INVALID_SPECIAL_NAME,373ASL_MSG_INVALID_PROCESSOR_UID,374ASL_MSG_LEGACY_PROCESSOR_OP,375ASL_MSG_NAMESTRING_LENGTH,376ASL_MSG_CASE_FOUND_HERE,377ASL_MSG_EXTERN_INVALID_RET_TYPE,378ASL_MSG_EXTERN_INVALID_PARAM_TYPE,379ASL_MSG_NAMED_OBJECT_CREATION,380ASL_MSG_ARG_COUNT_MISMATCH,381ASL_MSG_STATIC_OPREGION_IN_METHOD,382ASL_MSG_DECLARATION_TYPE_MISMATCH,383ASL_MSG_TYPE_MISMATCH_FOUND_HERE,384ASL_MSG_DUPLICATE_EXTERN_MISMATCH,385ASL_MSG_DUPLICATE_EXTERN_FOUND_HERE,386ASL_MSG_CONDREF_NEEDS_EXTERNAL_DECL,387ASL_MSG_EXTERNAL_FOUND_HERE,388ASL_MSG_LOWER_CASE_NAMESEG,389ASL_MSG_LOWER_CASE_NAMEPATH,390ASL_MSG_UUID_NOT_FOUND,391ASL_MSG_LEGACY_DDB_TYPE,392393394/* These messages are used by the Data Table compiler only */395396ASL_MSG_BUFFER_ELEMENT = ASL_MSG_TABLE_COMPILER,397ASL_MSG_DIVIDE_BY_ZERO,398ASL_MSG_FLAG_VALUE,399ASL_MSG_INTEGER_SIZE,400ASL_MSG_INVALID_EXPRESSION,401ASL_MSG_INVALID_FIELD_NAME,402ASL_MSG_INVALID_HEX_INTEGER,403ASL_MSG_OEM_TABLE,404ASL_MSG_RESERVED_FIELD,405ASL_MSG_UNKNOWN_LABEL,406ASL_MSG_UNKNOWN_SUBTABLE,407ASL_MSG_UNKNOWN_TABLE,408ASL_MSG_ZERO_VALUE,409ASL_MSG_INVALID_LABEL,410ASL_MSG_BUFFER_LIST,411ASL_MSG_ENTRY_LIST,412ASL_MSG_UNKNOWN_FORMAT,413ASL_MSG_RESERVED_VALUE,414ASL_MSG_TWO_ZERO_VALUES,415ASL_MSG_BAD_PARSE_TREE,416417/* These messages are used by the Preprocessor only */418419ASL_MSG_DIRECTIVE_SYNTAX = ASL_MSG_PREPROCESSOR,420ASL_MSG_ENDIF_MISMATCH,421ASL_MSG_ERROR_DIRECTIVE,422ASL_MSG_EXISTING_NAME,423ASL_MSG_INVALID_INVOCATION,424ASL_MSG_MACRO_SYNTAX,425ASL_MSG_TOO_MANY_ARGUMENTS,426ASL_MSG_UNKNOWN_DIRECTIVE,427ASL_MSG_UNKNOWN_PRAGMA,428ASL_MSG_WARNING_DIRECTIVE,429ASL_MSG_INCLUDE_FILE430431} ASL_MESSAGE_IDS;432433434#endif /* __ASLMESSAGES_H */435436437