diff options
author | jkim <jkim@FreeBSD.org> | 2010-10-13 21:37:02 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2010-10-13 21:37:02 +0000 |
commit | 03fb652c81c7b84fa7511e839900c535356cd01e (patch) | |
tree | cfd4d1b6b3782d1d561f3a19a65d5a930c916412 /sys/contrib | |
parent | 1573f9205ec4b8fd0f59078a7b5b9a2f60708c4b (diff) | |
parent | 7af726f5cc604d3fcd32200efde74ce8464d8dbe (diff) | |
download | FreeBSD-src-03fb652c81c7b84fa7511e839900c535356cd01e.zip FreeBSD-src-03fb652c81c7b84fa7511e839900c535356cd01e.tar.gz |
Merge ACPICA 20101013.
Diffstat (limited to 'sys/contrib')
30 files changed, 904 insertions, 502 deletions
diff --git a/sys/contrib/dev/acpica/acpica_prep.sh b/sys/contrib/dev/acpica/acpica_prep.sh index 8109381..a88d281 100755 --- a/sys/contrib/dev/acpica/acpica_prep.sh +++ b/sys/contrib/dev/acpica/acpica_prep.sh @@ -22,8 +22,8 @@ fulldirs="common compiler debugger disassembler dispatcher events \ stripdirs="acpisrc acpixtract examples generate os_specific tests" stripfiles="Makefile README acintel.h aclinux.h acmsvc.h acnetbsd.h \ acos2.h accygwin.h acefi.h acwin.h acwin64.h aeexec.c \ - aehandlers.c aemain.c aetables.c osunixdir.c readme.txt \ - utclib.c" + aehandlers.c aemain.c aetables.c aetables.h osunixdir.c \ + readme.txt utclib.c" # include files to canonify src_headers="acapps.h accommon.h acconfig.h acdebug.h acdisasm.h \ @@ -33,8 +33,8 @@ src_headers="acapps.h accommon.h acconfig.h acdebug.h acdisasm.h \ acresrc.h acrestyp.h acstruct.h actables.h actbl.h actbl1.h \ actbl2.h actypes.h acutils.h amlcode.h amlresrc.h \ platform/acenv.h platform/acfreebsd.h platform/acgcc.h" -comp_headers="aslcompiler.h asldefine.h aslglobal.h asltypes.h \ - dtcompiler.h dttemplate.h" +comp_headers="aslcompiler.h asldefine.h aslglobal.h aslmessages.h \ + asltypes.h dtcompiler.h dttemplate.h" platform_headers="acfreebsd.h acgcc.h" # pre-clean diff --git a/sys/contrib/dev/acpica/changes.txt b/sys/contrib/dev/acpica/changes.txt index 9bb84d4..2153841 100644 --- a/sys/contrib/dev/acpica/changes.txt +++ b/sys/contrib/dev/acpica/changes.txt @@ -1,4 +1,64 @@ ---------------------------------------- +13 October 2010. Summary of changes for version 20101013: + +This release is available at www.acpica.org/downloads + +1) ACPI CA Core Subsystem: + +Added support to clear the PCIEXP_WAKE event. When clearing ACPI events, now +clear the PCIEXP_WAKE_STS bit in the ACPI PM1 Status Register, via +HwClearAcpiStatus. Original change from Colin King. ACPICA BZ 880. + +Changed the type of the predefined namespace object _TZ from ThermalZone to +Device. This was found to be confusing to the host software that processes +the various thermal zones, since _TZ is not really a ThermalZone. However, a +Notify() can still be performed on it. ACPICA BZ 876. Suggestion from Rui +Zhang. + +Added Windows Vista SP2 to the list of supported _OSI strings. The actual +string is "Windows 2006 SP2". + +Eliminated duplicate code in AcpiUtExecute* functions. Now that the nsrepair +code automatically repairs _HID-related strings, this type of code is no +longer needed in Execute_HID, Execute_CID, and Execute_UID. ACPICA BZ 878. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 89.9K Code, 19.0K Data, 108.9K Total + Debug Version: 166.3K Code, 52.1K Data, 218.4K Total + Current Release: + Non-Debug Version: 89.9K Code, 19.0K Data, 108.9K Total + Debug Version: 166.3K Code, 52.1K Data, 218.4K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented additional compile-time validation for _HID strings. The +non-hex prefix (such as "PNP" or "ACPI") must be uppercase, and the length of +the string must be exactly seven or eight characters. For both _HID and _CID +strings, all characters must be alphanumeric. ACPICA BZ 874. + +iASL: Allow certain "null" resource descriptors. Some BIOS code creates +descriptors that are mostly or all zeros, with the expectation that they will +be filled in at runtime. iASL now allows this as long as there is a "resource +tag" (name) associated with the descriptor, which gives the ASL a handle +needed to modify the descriptor. ACPICA BZ 873. + +Added single-thread support to the generic Unix application OSL. Primarily +for iASL support, this change removes the use of semaphores in the single- +threaded ACPICA tools/applications - increasing performance. The +_MULTI_THREADED option was replaced by the (reverse) ACPI_SINGLE_THREADED +option. ACPICA BZ 879. + +AcpiExec: several fixes for the 64-bit version. Adds XSDT support and support +for 64-bit DSDT/FACS addresses in the FADT. Lin Ming. + +iASL: Moved all compiler messages to a new file, aslmessages.h. + +---------------------------------------- 15 September 2010. Summary of changes for version 20100915: This release is available at www.acpica.org/downloads diff --git a/sys/contrib/dev/acpica/common/adisasm.c b/sys/contrib/dev/acpica/common/adisasm.c index 5af7dfc..2ca24d8 100644 --- a/sys/contrib/dev/acpica/common/adisasm.c +++ b/sys/contrib/dev/acpica/common/adisasm.c @@ -612,10 +612,10 @@ AdDisassemblerHeader ( /* Header and input table info */ - AcpiOsPrintf ("/*\n * Intel ACPI Component Architecture\n"); - AcpiOsPrintf (" * AML Disassembler version %8.8X\n", ACPI_CA_VERSION); + AcpiOsPrintf ("/*\n"); + AcpiOsPrintf (ACPI_COMMON_HEADER ("AML Disassembler", " * ")); - AcpiOsPrintf (" *\n * Disassembly of %s, %s", Filename, ctime (&Timer)); + AcpiOsPrintf (" * Disassembly of %s, %s", Filename, ctime (&Timer)); AcpiOsPrintf (" *\n"); } diff --git a/sys/contrib/dev/acpica/compiler/aslanalyze.c b/sys/contrib/dev/acpica/compiler/aslanalyze.c index c29d7e8..20a2e1b 100644 --- a/sys/contrib/dev/acpica/compiler/aslanalyze.c +++ b/sys/contrib/dev/acpica/compiler/aslanalyze.c @@ -658,6 +658,95 @@ AnMapObjTypeToBtype ( /******************************************************************************* * + * FUNCTION: AnCheckId + * + * PARAMETERS: Op - Current parse op + * Type - HID or CID + * + * RETURN: None + * + * DESCRIPTION: Perform various checks on _HID and _CID strings. Only limited + * checks can be performed on _CID strings. + * + ******************************************************************************/ + +#define ASL_TYPE_HID 0 +#define ASL_TYPE_CID 1 +#include <string.h> + +static void +AnCheckId ( + ACPI_PARSE_OBJECT *Op, + ACPI_NAME Type) +{ + UINT32 i; + ACPI_SIZE Length; + UINT32 AlphaPrefixLength; + + + if (Op->Asl.ParseOpcode != PARSEOP_STRING_LITERAL) + { + return; + } + + Length = strlen (Op->Asl.Value.String); + + /* + * If _HID/_CID is a string, all characters must be alphanumeric. + * One of the things we want to catch here is the use of + * a leading asterisk in the string -- an odd construct + * that certain platform manufacturers are fond of. + */ + for (i = 0; Op->Asl.Value.String[i]; i++) + { + if (!isalnum ((int) Op->Asl.Value.String[i])) + { + AslError (ASL_ERROR, ASL_MSG_ALPHANUMERIC_STRING, + Op, Op->Asl.Value.String); + break; + } + } + + if (Type == ASL_TYPE_CID) + { + /* _CID strings are bus-specific, no more checks can be performed */ + + return; + } + + /* _HID String must be of the form "XXX####" or "ACPI####" */ + + if ((Length < 7) || (Length > 8)) + { + AslError (ASL_ERROR, ASL_MSG_HID_LENGTH, + Op, Op->Asl.Value.String); + return; + } + + /* _HID Length is valid, now check for uppercase (first 3 or 4 chars) */ + + AlphaPrefixLength = 3; + if (Length >= 8) + { + AlphaPrefixLength = 4; + } + + /* Ensure the alphabetic prefix is all uppercase */ + + for (i = 0; (i < AlphaPrefixLength) && Op->Asl.Value.String[i]; i++) + { + if (!isupper ((int) Op->Asl.Value.String[i])) + { + AslError (ASL_ERROR, ASL_MSG_UPPER_CASE, + Op, &Op->Asl.Value.String[i]); + break; + } + } +} + + +/******************************************************************************* + * * FUNCTION: AnMethodAnalysisWalkBegin * * PARAMETERS: ASL_WALK_CALLBACK @@ -983,23 +1072,29 @@ AnMethodAnalysisWalkBegin ( if (!ACPI_STRCMP (METHOD_NAME__HID, Op->Asl.NameSeg)) { Next = Op->Asl.Child->Asl.Next; - if (Next->Asl.ParseOpcode == PARSEOP_STRING_LITERAL) + AnCheckId (Next, ASL_TYPE_HID); + } + + /* Special typechecking for _CID */ + + else if (!ACPI_STRCMP (METHOD_NAME__CID, Op->Asl.NameSeg)) + { + Next = Op->Asl.Child->Asl.Next; + + if ((Next->Asl.ParseOpcode == PARSEOP_PACKAGE) || + (Next->Asl.ParseOpcode == PARSEOP_VAR_PACKAGE)) { - /* - * _HID is a string, all characters must be alphanumeric. - * One of the things we want to catch here is the use of - * a leading asterisk in the string. - */ - for (i = 0; Next->Asl.Value.String[i]; i++) + Next = Next->Asl.Child; + while (Next) { - if (!isalnum ((int) Next->Asl.Value.String[i])) - { - AslError (ASL_ERROR, ASL_MSG_ALPHANUMERIC_STRING, - Next, Next->Asl.Value.String); - break; - } + AnCheckId (Next, ASL_TYPE_CID); + Next = Next->Asl.Next; } } + else + { + AnCheckId (Next, ASL_TYPE_CID); + } } break; diff --git a/sys/contrib/dev/acpica/compiler/aslcodegen.c b/sys/contrib/dev/acpica/compiler/aslcodegen.c index 6821a69..98f2b7f 100644 --- a/sys/contrib/dev/acpica/compiler/aslcodegen.c +++ b/sys/contrib/dev/acpica/compiler/aslcodegen.c @@ -513,11 +513,11 @@ CgWriteTableHeader ( /* Compiler ID */ - strncpy (TableHeader.AslCompilerId, CompilerCreatorId, 4); + strncpy (TableHeader.AslCompilerId, ASL_CREATOR_ID, 4); /* Compiler version */ - TableHeader.AslCompilerRevision = CompilerCreatorRevision; + TableHeader.AslCompilerRevision = ASL_REVISION; /* Table length. Checksum zero for now, will rewrite later */ diff --git a/sys/contrib/dev/acpica/compiler/aslcompile.c b/sys/contrib/dev/acpica/compiler/aslcompile.c index ff86970..d9421c0 100644 --- a/sys/contrib/dev/acpica/compiler/aslcompile.c +++ b/sys/contrib/dev/acpica/compiler/aslcompile.c @@ -117,6 +117,7 @@ #include <stdio.h> #include <time.h> #include <contrib/dev/acpica/compiler/aslcompiler.h> +#include <contrib/dev/acpica/include/acapps.h> #define _COMPONENT ACPI_COMPILER ACPI_MODULE_NAME ("aslcompile") @@ -155,6 +156,7 @@ AslCompilerSignon ( UINT32 FileId) { char *Prefix = ""; + char *UtilityName; /* Set line prefix depending on the destination file type */ @@ -192,36 +194,21 @@ AslCompilerSignon ( break; } - /* - * Compiler signon with copyright - */ - FlPrintFile (FileId, - "%s\n%s%s\n%s", - Prefix, - Prefix, IntelAcpiCA, - Prefix); - /* Running compiler or disassembler? */ if (Gbl_DisasmFlag) { - FlPrintFile (FileId, - "%s", DisassemblerId); + UtilityName = AML_DISASSEMBLER_NAME; } else { - FlPrintFile (FileId, - "%s", CompilerId); + UtilityName = ASL_COMPILER_NAME; } - /* Version, copyright, compliance */ + /* Compiler signon with copyright */ - FlPrintFile (FileId, - " version %X\n%s%s\n%s%s\n%s\n", - (UINT32) ACPI_CA_VERSION, - Prefix, CompilerCopyright, - Prefix, CompilerCompliance, - Prefix); + FlPrintFile (FileId, "%s\n", Prefix); + FlPrintFile (FileId, ACPI_COMMON_HEADER (UtilityName, Prefix)); } diff --git a/sys/contrib/dev/acpica/compiler/aslcompiler.h b/sys/contrib/dev/acpica/compiler/aslcompiler.h index 80856be..a0f01a9 100644 --- a/sys/contrib/dev/acpica/compiler/aslcompiler.h +++ b/sys/contrib/dev/acpica/compiler/aslcompiler.h @@ -147,6 +147,7 @@ #include <contrib/dev/acpica/compiler/asldefine.h> #include <contrib/dev/acpica/compiler/asltypes.h> +#include <contrib/dev/acpica/compiler/aslmessages.h> #include <contrib/dev/acpica/compiler/aslglobal.h> @@ -795,7 +796,8 @@ RsSmallAddressCheck ( ACPI_PARSE_OBJECT *MinOp, ACPI_PARSE_OBJECT *MaxOp, ACPI_PARSE_OBJECT *LengthOp, - ACPI_PARSE_OBJECT *AlignOp); + ACPI_PARSE_OBJECT *AlignOp, + ACPI_PARSE_OBJECT *Op); void RsLargeAddressCheck ( @@ -807,7 +809,8 @@ RsLargeAddressCheck ( ACPI_PARSE_OBJECT *MinOp, ACPI_PARSE_OBJECT *MaxOp, ACPI_PARSE_OBJECT *LengthOp, - ACPI_PARSE_OBJECT *GranOp); + ACPI_PARSE_OBJECT *GranOp, + ACPI_PARSE_OBJECT *Op); UINT16 RsGetStringDataLength ( diff --git a/sys/contrib/dev/acpica/compiler/asldefine.h b/sys/contrib/dev/acpica/compiler/asldefine.h index 4cd8130..4105aeb 100644 --- a/sys/contrib/dev/acpica/compiler/asldefine.h +++ b/sys/contrib/dev/acpica/compiler/asldefine.h @@ -122,15 +122,13 @@ /* * Compiler versions and names */ -#define CompilerCreatorRevision ACPI_CA_VERSION - -#define IntelAcpiCA "Intel ACPI Component Architecture" -#define CompilerId "ASL Optimizing Compiler" -#define DisassemblerId "AML Disassembler" -#define CompilerCopyright "Copyright (c) 2000 - 2010 Intel Corporation" -#define CompilerCompliance "Supports ACPI Specification Revision 4.0a" -#define CompilerName "iasl" -#define CompilerCreatorId "INTL" +#define ASL_REVISION ACPI_CA_VERSION +#define ASL_COMPILER_NAME "ASL Optimizing Compiler" +#define AML_DISASSEMBLER_NAME "AML Disassembler" +#define ASL_INVOCATION_NAME "iasl" +#define ASL_CREATOR_ID "INTL" + +#define ASL_COMPLIANCE "Supports ACPI Specification Revision 4.0a" /* Configuration constants */ diff --git a/sys/contrib/dev/acpica/compiler/aslmain.c b/sys/contrib/dev/acpica/compiler/aslmain.c index 2187b13e..5abac74 100644 --- a/sys/contrib/dev/acpica/compiler/aslmain.c +++ b/sys/contrib/dev/acpica/compiler/aslmain.c @@ -296,7 +296,8 @@ Usage ( void) { - printf ("Usage: %s [Options] [Files]\n\n", CompilerName); + printf ("%s\n", ASL_COMPLIANCE); + printf ("Usage: %s [Options] [Files]\n\n", ASL_INVOCATION_NAME); Options (); } @@ -903,7 +904,7 @@ AslCommandLine ( if (argc < 2) { - AslCompilerSignon (ASL_FILE_STDOUT); + printf (ACPI_COMMON_SIGNON (ASL_COMPILER_NAME)); Usage (); exit (1); } @@ -934,7 +935,7 @@ AslCommandLine ( if (Gbl_DoSignon) { - AslCompilerSignon (ASL_FILE_STDOUT); + printf (ACPI_COMMON_SIGNON (ASL_COMPILER_NAME)); } /* Abort if anything went wrong on the command line */ diff --git a/sys/contrib/dev/acpica/compiler/aslmessages.h b/sys/contrib/dev/acpica/compiler/aslmessages.h new file mode 100644 index 0000000..0457800 --- /dev/null +++ b/sys/contrib/dev/acpica/compiler/aslmessages.h @@ -0,0 +1,436 @@ + +/****************************************************************************** + * + * Module Name: aslmessages.h - Compiler error/warning messages + * + *****************************************************************************/ + +/****************************************************************************** + * + * 1. Copyright Notice + * + * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. + * All rights reserved. + * + * 2. License + * + * 2.1. This is your license from Intel Corp. under its intellectual property + * rights. You may have additional license terms from the party that provided + * you this software, covering your right to use that party's intellectual + * property rights. + * + * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a + * copy of the source code appearing in this file ("Covered Code") an + * irrevocable, perpetual, worldwide license under Intel's copyrights in the + * base code distributed originally by Intel ("Original Intel Code") to copy, + * make derivatives, distribute, use and display any portion of the Covered + * Code in any form, with the right to sublicense such rights; and + * + * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent + * license (with the right to sublicense), under only those claims of Intel + * patents that are infringed by the Original Intel Code, to make, use, sell, + * offer to sell, and import the Covered Code and derivative works thereof + * solely to the minimum extent necessary to exercise the above copyright + * license, and in no event shall the patent license extend to any additions + * to or modifications of the Original Intel Code. No other license or right + * is granted directly or by implication, estoppel or otherwise; + * + * The above copyright and patent license is granted only if the following + * conditions are met: + * + * 3. Conditions + * + * 3.1. Redistribution of Source with Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification with rights to further distribute source must include + * the above Copyright Notice, the above License, this list of Conditions, + * and the following Disclaimer and Export Compliance provision. In addition, + * Licensee must cause all Covered Code to which Licensee contributes to + * contain a file documenting the changes Licensee made to create that Covered + * Code and the date of any change. Licensee must include in that file the + * documentation of any changes made by any predecessor Licensee. Licensee + * must include a prominent statement that the modification is derived, + * directly or indirectly, from Original Intel Code. + * + * 3.2. Redistribution of Source with no Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification without rights to further distribute source must + * include the following Disclaimer and Export Compliance provision in the + * documentation and/or other materials provided with distribution. In + * addition, Licensee may not authorize further sublicense of source of any + * portion of the Covered Code, and must include terms to the effect that the + * license from Licensee to its licensee is limited to the intellectual + * property embodied in the software Licensee provides to its licensee, and + * not to intellectual property embodied in modifications its licensee may + * make. + * + * 3.3. Redistribution of Executable. Redistribution in executable form of any + * substantial portion of the Covered Code or modification must reproduce the + * above Copyright Notice, and the following Disclaimer and Export Compliance + * provision in the documentation and/or other materials provided with the + * distribution. + * + * 3.4. Intel retains all right, title, and interest in and to the Original + * Intel Code. + * + * 3.5. Neither the name Intel nor any other trademark owned or controlled by + * Intel shall be used in advertising or otherwise to promote the sale, use or + * other dealings in products derived from or relating to the Covered Code + * without prior written authorization from Intel. + * + * 4. Disclaimer and Export Compliance + * + * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED + * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE + * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, + * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY + * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY + * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A + * PARTICULAR PURPOSE. + * + * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES + * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR + * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, + * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY + * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL + * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS + * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY + * LIMITED REMEDY. + * + * 4.3. Licensee shall not export, either directly or indirectly, any of this + * software or system incorporating such software without first obtaining any + * required license or other approval from the U. S. Department of Commerce or + * any other agency or department of the United States Government. In the + * event Licensee exports any such software from the United States or + * re-exports any such software from a foreign destination, Licensee shall + * ensure that the distribution and export/re-export of the software is in + * compliance with all laws, regulations, orders, or other restrictions of the + * U.S. Export Administration Regulations. Licensee agrees that neither it nor + * any of its subsidiaries will export/re-export any technical data, process, + * software, or service, directly or indirectly, to any country for which the + * United States government or any agency thereof requires an export license, + * other governmental approval, or letter of assurance, without first obtaining + * such license, approval or letter. + * + *****************************************************************************/ + + +#ifndef __ASLMESSAGES_H +#define __ASLMESSAGES_H + + +#define ASL_WARNING 0 +#define ASL_WARNING2 1 +#define ASL_WARNING3 2 +#define ASL_ERROR 3 +#define ASL_REMARK 4 +#define ASL_OPTIMIZATION 5 +#define ASL_NUM_REPORT_LEVELS 6 + + +/* Values for all compiler messages */ + +typedef enum +{ + ASL_MSG_RESERVED = 0, + ASL_MSG_ALPHANUMERIC_STRING, + ASL_MSG_AML_NOT_IMPLEMENTED, + ASL_MSG_ARG_COUNT_HI, + ASL_MSG_ARG_COUNT_LO, + ASL_MSG_ARG_INIT, + ASL_MSG_BACKWARDS_OFFSET, + ASL_MSG_BITS_TO_BYTES, + ASL_MSG_BUFFER_LENGTH, + ASL_MSG_BYTES_TO_BITS, + ASL_MSG_CLOSE, + ASL_MSG_COMPILER_INTERNAL, + ASL_MSG_CONSTANT_EVALUATION, + ASL_MSG_CONSTANT_FOLDED, + ASL_MSG_CORE_EXCEPTION, + ASL_MSG_DEBUG_FILE_OPEN, + ASL_MSG_DEBUG_FILENAME, + ASL_MSG_DEPENDENT_NESTING, + ASL_MSG_DMA_CHANNEL, + ASL_MSG_DMA_LIST, + ASL_MSG_DUPLICATE_CASE, + ASL_MSG_DUPLICATE_ITEM, + ASL_MSG_EARLY_EOF, + ASL_MSG_ENCODING_LENGTH, + ASL_MSG_EX_INTERRUPT_LIST, + ASL_MSG_EX_INTERRUPT_LIST_MIN, + ASL_MSG_EX_INTERRUPT_NUMBER, + ASL_MSG_FIELD_ACCESS_WIDTH, + ASL_MSG_FIELD_UNIT_ACCESS_WIDTH, + ASL_MSG_FIELD_UNIT_OFFSET, + ASL_MSG_INCLUDE_FILE_OPEN, + ASL_MSG_INPUT_FILE_OPEN, + ASL_MSG_INTEGER_LENGTH, + ASL_MSG_INTEGER_OPTIMIZATION, + ASL_MSG_INTERRUPT_LIST, + ASL_MSG_INTERRUPT_NUMBER, + ASL_MSG_INVALID_CONSTANT_OP, + ASL_MSG_INVALID_EISAID, + ASL_MSG_INVALID_ESCAPE, + ASL_MSG_INVALID_OPERAND, + ASL_MSG_INVALID_PERFORMANCE, + ASL_MSG_INVALID_PRIORITY, + ASL_MSG_INVALID_STRING, + ASL_MSG_INVALID_TARGET, + ASL_MSG_INVALID_TIME, + ASL_MSG_INVALID_TYPE, + ASL_MSG_INVALID_UUID, + ASL_MSG_LIST_LENGTH_LONG, + ASL_MSG_LIST_LENGTH_SHORT, + ASL_MSG_LISTING_FILE_OPEN, + ASL_MSG_LISTING_FILENAME, + ASL_MSG_LOCAL_INIT, + ASL_MSG_LONG_LINE, + ASL_MSG_MEMORY_ALLOCATION, + ASL_MSG_MISSING_ENDDEPENDENT, + ASL_MSG_MISSING_STARTDEPENDENT, + ASL_MSG_MULTIPLE_TYPES, + ASL_MSG_NAME_EXISTS, + ASL_MSG_NAME_OPTIMIZATION, + ASL_MSG_NESTED_COMMENT, + ASL_MSG_NO_CASES, + ASL_MSG_NO_RETVAL, + ASL_MSG_NO_WHILE, + ASL_MSG_NON_ASCII, + ASL_MSG_NOT_EXIST, + ASL_MSG_NOT_FOUND, + ASL_MSG_NOT_METHOD, + ASL_MSG_NOT_PARAMETER, + ASL_MSG_NOT_REACHABLE, + ASL_MSG_OPEN, + ASL_MSG_OUTPUT_FILE_OPEN, + ASL_MSG_OUTPUT_FILENAME, + ASL_MSG_PACKAGE_LENGTH, + ASL_MSG_READ, + ASL_MSG_RECURSION, + ASL_MSG_REGION_BUFFER_ACCESS, + ASL_MSG_REGION_BYTE_ACCESS, + ASL_MSG_RESERVED_ARG_COUNT_HI, + ASL_MSG_RESERVED_ARG_COUNT_LO, + ASL_MSG_RESERVED_METHOD, + ASL_MSG_RESERVED_OPERAND_TYPE, + ASL_MSG_RESERVED_RETURN_VALUE, + ASL_MSG_RESERVED_USE, + ASL_MSG_RESERVED_WORD, + ASL_MSG_RESOURCE_FIELD, + ASL_MSG_RESOURCE_INDEX, + ASL_MSG_RESOURCE_LIST, + ASL_MSG_RESOURCE_SOURCE, + ASL_MSG_RETURN_TYPES, + ASL_MSG_SCOPE_FWD_REF, + ASL_MSG_SCOPE_TYPE, + ASL_MSG_SEEK, + ASL_MSG_SINGLE_NAME_OPTIMIZATION, + ASL_MSG_SOME_NO_RETVAL, + ASL_MSG_SWITCH_TYPE, + ASL_MSG_SYNC_LEVEL, + ASL_MSG_SYNTAX, + ASL_MSG_TABLE_SIGNATURE, + ASL_MSG_TOO_MANY_TEMPS, + ASL_MSG_UNKNOWN_RESERVED_NAME, + ASL_MSG_UNREACHABLE_CODE, + ASL_MSG_UNSUPPORTED, + ASL_MSG_VENDOR_LIST, + ASL_MSG_WRITE, + ASL_MSG_MULTIPLE_DEFAULT, + ASL_MSG_TIMEOUT, + ASL_MSG_RESULT_NOT_USED, + ASL_MSG_NOT_REFERENCED, + ASL_MSG_NON_ZERO, + ASL_MSG_STRING_LENGTH, + ASL_MSG_SERIALIZED, + ASL_MSG_COMPILER_RESERVED, + ASL_MSG_NAMED_OBJECT_IN_WHILE, + ASL_MSG_LOCAL_OUTSIDE_METHOD, + ASL_MSG_ALIGNMENT, + ASL_MSG_ISA_ADDRESS, + ASL_MSG_INVALID_MIN_MAX, + ASL_MSG_INVALID_LENGTH, + ASL_MSG_INVALID_LENGTH_FIXED, + ASL_MSG_INVALID_GRANULARITY, + ASL_MSG_INVALID_GRAN_FIXED, + ASL_MSG_INVALID_ACCESS_SIZE, + ASL_MSG_INVALID_ADDR_FLAGS, + ASL_MSG_NULL_DESCRIPTOR, + ASL_MSG_UPPER_CASE, + ASL_MSG_HID_LENGTH, + ASL_MSG_INVALID_FIELD_NAME, + ASL_MSG_INTEGER_SIZE, + ASL_MSG_INVALID_HEX_INTEGER, + ASL_MSG_BUFFER_ELEMENT, + ASL_MSG_RESERVED_VALUE, + ASL_MSG_FLAG_VALUE, + ASL_MSG_ZERO_VALUE, + ASL_MSG_UNKNOWN_TABLE, + ASL_MSG_UNKNOWN_SUBTABLE, + ASL_MSG_OEM_TABLE + +} ASL_MESSAGE_IDS; + + +#ifdef ASL_EXCEPTIONS + +/* Actual message strings for each compiler message */ + +char *AslMessages [] = { +/* The zeroth message is reserved */ "", +/* ASL_MSG_ALPHANUMERIC_STRING */ "String must be entirely alphanumeric", +/* ASL_MSG_AML_NOT_IMPLEMENTED */ "Opcode is not implemented in compiler AML code generator", +/* ASL_MSG_ARG_COUNT_HI */ "Too many arguments", +/* ASL_MSG_ARG_COUNT_LO */ "Too few arguments", +/* ASL_MSG_ARG_INIT */ "Method argument is not initialized", +/* ASL_MSG_BACKWARDS_OFFSET */ "Invalid backwards offset", +/* ASL_MSG_BITS_TO_BYTES */ "Field offset is in bits, but a byte offset is required", +/* ASL_MSG_BUFFER_LENGTH */ "Effective AML buffer length is zero", +/* ASL_MSG_BYTES_TO_BITS */ "Field offset is in bytes, but a bit offset is required", +/* ASL_MSG_CLOSE */ "Could not close file", +/* ASL_MSG_COMPILER_INTERNAL */ "Internal compiler error", +/* ASL_MSG_CONSTANT_EVALUATION */ "Could not evaluate constant expression", +/* ASL_MSG_CONSTANT_FOLDED */ "Constant expression evaluated and reduced", +/* ASL_MSG_CORE_EXCEPTION */ "From ACPI CA Subsystem", +/* ASL_MSG_DEBUG_FILE_OPEN */ "Could not open debug file", +/* ASL_MSG_DEBUG_FILENAME */ "Could not create debug filename", +/* ASL_MSG_DEPENDENT_NESTING */ "Dependent function macros cannot be nested",\ +/* ASL_MSG_DMA_CHANNEL */ "Invalid DMA channel (must be 0-7)", +/* ASL_MSG_DMA_LIST */ "Too many DMA channels (8 max)", +/* ASL_MSG_DUPLICATE_CASE */ "Case value already specified", +/* ASL_MSG_DUPLICATE_ITEM */ "Duplicate value in list", +/* ASL_MSG_EARLY_EOF */ "Premature end-of-file reached", +/* ASL_MSG_ENCODING_LENGTH */ "Package length too long to encode", +/* ASL_MSG_EX_INTERRUPT_LIST */ "Too many interrupts (255 max)", +/* ASL_MSG_EX_INTERRUPT_LIST_MIN */ "Too few interrupts (1 minimum required)", +/* ASL_MSG_EX_INTERRUPT_NUMBER */ "Invalid interrupt number (must be 32 bits)", +/* ASL_MSG_FIELD_ACCESS_WIDTH */ "Access width is greater than region size", +/* ASL_MSG_FIELD_UNIT_ACCESS_WIDTH */ "Access width of Field Unit extends beyond region limit", +/* ASL_MSG_FIELD_UNIT_OFFSET */ "Field Unit extends beyond region limit", +/* ASL_MSG_INCLUDE_FILE_OPEN */ "Could not open include file", +/* ASL_MSG_INPUT_FILE_OPEN */ "Could not open input file", +/* ASL_MSG_INTEGER_LENGTH */ "64-bit integer in 32-bit table, truncating", +/* ASL_MSG_INTEGER_OPTIMIZATION */ "Integer optimized to single-byte AML opcode", +/* ASL_MSG_INTERRUPT_LIST */ "Too many interrupts (16 max)", +/* ASL_MSG_INTERRUPT_NUMBER */ "Invalid interrupt number (must be 0-15)", +/* ASL_MSG_INVALID_CONSTANT_OP */ "Invalid operator in constant expression (not type 3/4/5)", +/* ASL_MSG_INVALID_EISAID */ "EISAID string must be of the form \"UUUXXXX\" (3 uppercase, 4 hex digits)", +/* ASL_MSG_INVALID_ESCAPE */ "Invalid or unknown escape sequence", +/* ASL_MSG_INVALID_OPERAND */ "Invalid operand", +/* ASL_MSG_INVALID_PERFORMANCE */ "Invalid performance/robustness value", +/* ASL_MSG_INVALID_PRIORITY */ "Invalid priority value", +/* ASL_MSG_INVALID_STRING */ "Invalid Hex/Octal Escape - Non-ASCII or NULL", +/* ASL_MSG_INVALID_TARGET */ "Target operand not allowed in constant expression", +/* ASL_MSG_INVALID_TIME */ "Time parameter too long (255 max)", +/* ASL_MSG_INVALID_TYPE */ "Invalid type", +/* ASL_MSG_INVALID_UUID */ "UUID string must be of the form \"aabbccdd-eeff-gghh-iijj-kkllmmnnoopp\"", +/* ASL_MSG_LIST_LENGTH_LONG */ "Initializer list longer than declared package length", +/* ASL_MSG_LIST_LENGTH_SHORT */ "Initializer list shorter than declared package length", +/* ASL_MSG_LISTING_FILE_OPEN */ "Could not open listing file", +/* ASL_MSG_LISTING_FILENAME */ "Could not create listing filename", +/* ASL_MSG_LOCAL_INIT */ "Method local variable is not initialized", +/* ASL_MSG_LONG_LINE */ "Splitting long input line", +/* ASL_MSG_MEMORY_ALLOCATION */ "Memory allocation failure", +/* ASL_MSG_MISSING_ENDDEPENDENT */ "Missing EndDependentFn() macro in dependent resource list", +/* ASL_MSG_MISSING_STARTDEPENDENT */ "Missing StartDependentFn() macro in dependent resource list", +/* ASL_MSG_MULTIPLE_TYPES */ "Multiple types", +/* ASL_MSG_NAME_EXISTS */ "Name already exists in scope", +/* ASL_MSG_NAME_OPTIMIZATION */ "NamePath optimized", +/* ASL_MSG_NESTED_COMMENT */ "Nested comment found", +/* ASL_MSG_NO_CASES */ "No Case statements under Switch", +/* ASL_MSG_NO_RETVAL */ "Called method returns no value", +/* ASL_MSG_NO_WHILE */ "No enclosing While statement", +/* ASL_MSG_NON_ASCII */ "Invalid characters found in file", +/* ASL_MSG_NOT_EXIST */ "Object does not exist", +/* ASL_MSG_NOT_FOUND */ "Object not found or not accessible from scope", +/* ASL_MSG_NOT_METHOD */ "Not a control method, cannot invoke", +/* ASL_MSG_NOT_PARAMETER */ "Not a parameter, used as local only", +/* ASL_MSG_NOT_REACHABLE */ "Object is not accessible from this scope", +/* ASL_MSG_OPEN */ "Could not open file", +/* ASL_MSG_OUTPUT_FILE_OPEN */ "Could not open output AML file", +/* ASL_MSG_OUTPUT_FILENAME */ "Could not create output filename", +/* ASL_MSG_PACKAGE_LENGTH */ "Effective AML package length is zero", +/* ASL_MSG_READ */ "Could not read file", +/* ASL_MSG_RECURSION */ "Recursive method call", +/* ASL_MSG_REGION_BUFFER_ACCESS */ "Host Operation Region requires BufferAcc access", +/* ASL_MSG_REGION_BYTE_ACCESS */ "Host Operation Region requires ByteAcc access", +/* ASL_MSG_RESERVED_ARG_COUNT_HI */ "Reserved method has too many arguments", +/* ASL_MSG_RESERVED_ARG_COUNT_LO */ "Reserved method has too few arguments", +/* ASL_MSG_RESERVED_METHOD */ "Reserved name must be a control method", +/* ASL_MSG_RESERVED_OPERAND_TYPE */ "Invalid object type for reserved name", +/* ASL_MSG_RESERVED_RETURN_VALUE */ "Reserved method must return a value", +/* ASL_MSG_RESERVED_USE */ "Invalid use of reserved name", +/* ASL_MSG_RESERVED_WORD */ "Use of reserved name", +/* ASL_MSG_RESOURCE_FIELD */ "Resource field name cannot be used as a target", +/* ASL_MSG_RESOURCE_INDEX */ "Missing ResourceSourceIndex (required)", +/* ASL_MSG_RESOURCE_LIST */ "Too many resource items (internal error)", +/* ASL_MSG_RESOURCE_SOURCE */ "Missing ResourceSource string (required)", +/* ASL_MSG_RETURN_TYPES */ "Not all control paths return a value", +/* ASL_MSG_SCOPE_FWD_REF */ "Forward references from Scope operator not allowed", +/* ASL_MSG_SCOPE_TYPE */ "Existing object has invalid type for Scope operator", +/* ASL_MSG_SEEK */ "Could not seek file", +/* ASL_MSG_SINGLE_NAME_OPTIMIZATION */ "NamePath optimized to NameSeg (uses run-time search path)", +/* ASL_MSG_SOME_NO_RETVAL */ "Called method may not always return a value", +/* ASL_MSG_SWITCH_TYPE */ "Switch expression is not a static Integer/Buffer/String data type, defaulting to Integer", +/* ASL_MSG_SYNC_LEVEL */ "SyncLevel must be in the range 0-15", +/* ASL_MSG_SYNTAX */ "", +/* ASL_MSG_TABLE_SIGNATURE */ "Invalid Table Signature", +/* ASL_MSG_TOO_MANY_TEMPS */ "Method requires too many temporary variables (_T_x)", +/* ASL_MSG_UNKNOWN_RESERVED_NAME */ "Unknown reserved name", +/* ASL_MSG_UNREACHABLE_CODE */ "Statement is unreachable", +/* ASL_MSG_UNSUPPORTED */ "Unsupported feature", +/* ASL_MSG_VENDOR_LIST */ "Too many vendor data bytes (7 max)", +/* ASL_MSG_WRITE */ "Could not write file", +/* ASL_MSG_MULTIPLE_DEFAULT */ "More than one Default statement within Switch construct", +/* ASL_MSG_TIMEOUT */ "Possible operator timeout is ignored", +/* ASL_MSG_RESULT_NOT_USED */ "Result is not used, operator has no effect", +/* ASL_MSG_NOT_REFERENCED */ "Namespace object is not referenced", +/* ASL_MSG_NON_ZERO */ "Operand evaluates to zero", +/* ASL_MSG_STRING_LENGTH */ "String literal too long", +/* ASL_MSG_SERIALIZED */ "Control Method marked Serialized", +/* ASL_MSG_COMPILER_RESERVED */ "Use of compiler reserved name", +/* ASL_MSG_NAMED_OBJECT_IN_WHILE */ "Creating a named object in a While loop", +/* ASL_MSG_LOCAL_OUTSIDE_METHOD */ "Local or Arg used outside a control method", +/* ASL_MSG_ALIGNMENT */ "Must be a multiple of alignment/granularity value", +/* ASL_MSG_ISA_ADDRESS */ "Maximum 10-bit ISA address (0x3FF)", +/* ASL_MSG_INVALID_MIN_MAX */ "Address Min is greater than Address Max", +/* ASL_MSG_INVALID_LENGTH */ "Length is larger than Min/Max window", +/* ASL_MSG_INVALID_LENGTH_FIXED */ "Length is not equal to fixed Min/Max window", +/* ASL_MSG_INVALID_GRANULARITY */ "Granularity must be zero or a power of two minus one", +/* ASL_MSG_INVALID_GRAN_FIXED */ "Granularity must be zero for fixed Min/Max", +/* ASL_MSG_INVALID_ACCESS_SIZE */ "Invalid AccessSize (Maximum is 4 - QWord access)", +/* ASL_MSG_INVALID_ADDR_FLAGS */ "Invalid combination of Length and Min/Max fixed flags", +/* ASL_MSG_NULL_DESCRIPTOR */ "Min/Max/Length/Gran are all zero, but no resource tag", +/* ASL_MSG_UPPER_CASE */ "Non-hex letters must be upper case", +/* ASL_MSG_HID_LENGTH */ "_HID string must be exactly 7 or 8 characters", + +/* These messages are used by the data table compiler only */ + +/* ASL_MSG_INVALID_FIELD_NAME */ "Invalid Field Name", +/* ASL_MSG_INTEGER_SIZE */ "Integer too large for target", +/* ASL_MSG_INVALID_HEX_INTEGER */ "Invalid hex integer constant", +/* ASL_MSG_BUFFER_ELEMENT */ "Invalid element in buffer initializer list", +/* ASL_MSG_RESERVED_VALUE */ "Reserved field must be zero", +/* ASL_MSG_FLAG_VALUE */ "Flag value is too large", +/* ASL_MSG_ZERO_VALUE */ "Value must be non-zero", +/* ASL_MSG_UNKNOWN_TABLE */ "Unknown ACPI table signature", +/* ASL_MSG_UNKNOWN_SUBTABLE */ "Unknown subtable type", +/* ASL_MSG_OEM_TABLE */ "OEM table - unknown contents" + +}; + + +char *AslErrorLevel [ASL_NUM_REPORT_LEVELS] = { + "Warning ", + "Warning ", + "Warning ", + "Error ", + "Remark ", + "Optimize" +}; + +#define ASL_ERROR_LEVEL_LENGTH 8 /* Length of strings above */ + +#endif /* ASL_EXCEPTIONS */ + +#endif /* __ASLMESSAGES_H */ diff --git a/sys/contrib/dev/acpica/compiler/aslresource.c b/sys/contrib/dev/acpica/compiler/aslresource.c index 25289f5..2cc4ea0 100644 --- a/sys/contrib/dev/acpica/compiler/aslresource.c +++ b/sys/contrib/dev/acpica/compiler/aslresource.c @@ -139,6 +139,7 @@ * NULL, means "zero value for alignment is * OK, and means 64K alignment" (for * Memory24 descriptor) + * Op - Parent Op for entire construct * * RETURN: None. Adds error messages to error log if necessary * @@ -158,7 +159,8 @@ RsSmallAddressCheck ( ACPI_PARSE_OBJECT *MinOp, ACPI_PARSE_OBJECT *MaxOp, ACPI_PARSE_OBJECT *LengthOp, - ACPI_PARSE_OBJECT *AlignOp) + ACPI_PARSE_OBJECT *AlignOp, + ACPI_PARSE_OBJECT *Op) { if (Gbl_NoResourceChecking) @@ -166,6 +168,34 @@ RsSmallAddressCheck ( return; } + /* + * Check for a so-called "null descriptor". These are descriptors that are + * created with most fields set to zero. The intent is that the descriptor + * will be updated/completed at runtime via a BufferField. + * + * If the descriptor does NOT have a resource tag, it cannot be referenced + * by a BufferField and we will flag this as an error. Conversely, if + * the descriptor has a resource tag, we will assume that a BufferField + * will be used to dynamically update it, so no error. + * + * A possible enhancement to this check would be to verify that in fact + * a BufferField is created using the resource tag, and perhaps even + * verify that a Store is performed to the BufferField. + * + * Note: for these descriptors, Alignment is allowed to be zero + */ + if (!Minimum && !Maximum && !Length) + { + if (!Op->Asl.ExternalName) + { + /* No resource tag. Descriptor is fixed and is also illegal */ + + AslError (ASL_ERROR, ASL_MSG_NULL_DESCRIPTOR, Op, NULL); + } + + return; + } + /* Special case for Memory24, values are compressed */ if (Type == ACPI_RESOURCE_NAME_MEMORY24) @@ -230,6 +260,7 @@ RsSmallAddressCheck ( * MaxOp - Original Op for Address Max * LengthOp - Original Op for address range * GranOp - Original Op for address granularity + * Op - Parent Op for entire construct * * RETURN: None. Adds error messages to error log if necessary * @@ -259,7 +290,8 @@ RsLargeAddressCheck ( ACPI_PARSE_OBJECT *MinOp, ACPI_PARSE_OBJECT *MaxOp, ACPI_PARSE_OBJECT *LengthOp, - ACPI_PARSE_OBJECT *GranOp) + ACPI_PARSE_OBJECT *GranOp, + ACPI_PARSE_OBJECT *Op) { if (Gbl_NoResourceChecking) @@ -267,6 +299,32 @@ RsLargeAddressCheck ( return; } + /* + * Check for a so-called "null descriptor". These are descriptors that are + * created with most fields set to zero. The intent is that the descriptor + * will be updated/completed at runtime via a BufferField. + * + * If the descriptor does NOT have a resource tag, it cannot be referenced + * by a BufferField and we will flag this as an error. Conversely, if + * the descriptor has a resource tag, we will assume that a BufferField + * will be used to dynamically update it, so no error. + * + * A possible enhancement to this check would be to verify that in fact + * a BufferField is created using the resource tag, and perhaps even + * verify that a Store is performed to the BufferField. + */ + if (!Minimum && !Maximum && !Length && !Granularity) + { + if (!Op->Asl.ExternalName) + { + /* No resource tag. Descriptor is fixed and is also illegal */ + + AslError (ASL_ERROR, ASL_MSG_NULL_DESCRIPTOR, Op, NULL); + } + + return; + } + /* Basic checks on Min/Max/Length */ if (Minimum > Maximum) diff --git a/sys/contrib/dev/acpica/compiler/aslrestype1.c b/sys/contrib/dev/acpica/compiler/aslrestype1.c index dcd6c36..5f44c28 100644 --- a/sys/contrib/dev/acpica/compiler/aslrestype1.c +++ b/sys/contrib/dev/acpica/compiler/aslrestype1.c @@ -300,7 +300,7 @@ RsDoMemory24Descriptor ( Descriptor->Memory24.Maximum, Descriptor->Memory24.AddressLength, Descriptor->Memory24.Alignment, - MinOp, MaxOp, LengthOp, NULL); + MinOp, MaxOp, LengthOp, NULL, Op); return (Rnode); } @@ -408,7 +408,7 @@ RsDoMemory32Descriptor ( Descriptor->Memory32.Maximum, Descriptor->Memory32.AddressLength, Descriptor->Memory32.Alignment, - MinOp, MaxOp, LengthOp, AlignOp); + MinOp, MaxOp, LengthOp, AlignOp, Op); return (Rnode); } diff --git a/sys/contrib/dev/acpica/compiler/aslrestype1i.c b/sys/contrib/dev/acpica/compiler/aslrestype1i.c index a2b80cb..05614f4 100644 --- a/sys/contrib/dev/acpica/compiler/aslrestype1i.c +++ b/sys/contrib/dev/acpica/compiler/aslrestype1i.c @@ -439,7 +439,7 @@ RsDoIoDescriptor ( Descriptor->Io.Maximum, Descriptor->Io.AddressLength, Descriptor->Io.Alignment, - MinOp, MaxOp, LengthOp, AlignOp); + MinOp, MaxOp, LengthOp, AlignOp, Op); return (Rnode); } diff --git a/sys/contrib/dev/acpica/compiler/aslrestype2d.c b/sys/contrib/dev/acpica/compiler/aslrestype2d.c index 65485b9..5101db6 100644 --- a/sys/contrib/dev/acpica/compiler/aslrestype2d.c +++ b/sys/contrib/dev/acpica/compiler/aslrestype2d.c @@ -352,7 +352,7 @@ RsDoDwordIoDescriptor ( (UINT64) Descriptor->Address32.AddressLength, (UINT64) Descriptor->Address32.Granularity, Descriptor->Address32.Flags, - MinOp, MaxOp, LengthOp, GranOp); + MinOp, MaxOp, LengthOp, GranOp, Op); Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) + OptionIndex + StringLength; @@ -588,7 +588,7 @@ RsDoDwordMemoryDescriptor ( (UINT64) Descriptor->Address32.AddressLength, (UINT64) Descriptor->Address32.Granularity, Descriptor->Address32.Flags, - MinOp, MaxOp, LengthOp, GranOp); + MinOp, MaxOp, LengthOp, GranOp, Op); Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) + OptionIndex + StringLength; @@ -806,7 +806,7 @@ RsDoDwordSpaceDescriptor ( (UINT64) Descriptor->Address32.AddressLength, (UINT64) Descriptor->Address32.Granularity, Descriptor->Address32.Flags, - MinOp, MaxOp, LengthOp, GranOp); + MinOp, MaxOp, LengthOp, GranOp, Op); Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS32) + OptionIndex + StringLength; diff --git a/sys/contrib/dev/acpica/compiler/aslrestype2e.c b/sys/contrib/dev/acpica/compiler/aslrestype2e.c index 01584ff..6051fe3 100644 --- a/sys/contrib/dev/acpica/compiler/aslrestype2e.c +++ b/sys/contrib/dev/acpica/compiler/aslrestype2e.c @@ -294,7 +294,7 @@ RsDoExtendedIoDescriptor ( Descriptor->ExtAddress64.AddressLength, Descriptor->ExtAddress64.Granularity, Descriptor->ExtAddress64.Flags, - MinOp, MaxOp, LengthOp, GranOp); + MinOp, MaxOp, LengthOp, GranOp, Op); Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + StringLength; return (Rnode); @@ -475,7 +475,7 @@ RsDoExtendedMemoryDescriptor ( Descriptor->ExtAddress64.AddressLength, Descriptor->ExtAddress64.Granularity, Descriptor->ExtAddress64.Flags, - MinOp, MaxOp, LengthOp, GranOp); + MinOp, MaxOp, LengthOp, GranOp, Op); Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + StringLength; return (Rnode); @@ -638,7 +638,7 @@ RsDoExtendedSpaceDescriptor ( Descriptor->ExtAddress64.AddressLength, Descriptor->ExtAddress64.Granularity, Descriptor->ExtAddress64.Flags, - MinOp, MaxOp, LengthOp, GranOp); + MinOp, MaxOp, LengthOp, GranOp, Op); Rnode->BufferLength = sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + StringLength; return (Rnode); diff --git a/sys/contrib/dev/acpica/compiler/aslrestype2q.c b/sys/contrib/dev/acpica/compiler/aslrestype2q.c index cea12aa..2daa93f 100644 --- a/sys/contrib/dev/acpica/compiler/aslrestype2q.c +++ b/sys/contrib/dev/acpica/compiler/aslrestype2q.c @@ -343,7 +343,7 @@ RsDoQwordIoDescriptor ( Descriptor->Address64.AddressLength, Descriptor->Address64.Granularity, Descriptor->Address64.Flags, - MinOp, MaxOp, LengthOp, GranOp); + MinOp, MaxOp, LengthOp, GranOp, Op); Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) + OptionIndex + StringLength; @@ -573,7 +573,7 @@ RsDoQwordMemoryDescriptor ( Descriptor->Address64.AddressLength, Descriptor->Address64.Granularity, Descriptor->Address64.Flags, - MinOp, MaxOp, LengthOp, GranOp); + MinOp, MaxOp, LengthOp, GranOp, Op); Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) + OptionIndex + StringLength; @@ -785,7 +785,7 @@ RsDoQwordSpaceDescriptor ( Descriptor->Address64.AddressLength, Descriptor->Address64.Granularity, Descriptor->Address64.Flags, - MinOp, MaxOp, LengthOp, GranOp); + MinOp, MaxOp, LengthOp, GranOp, Op); Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS64) + OptionIndex + StringLength; diff --git a/sys/contrib/dev/acpica/compiler/aslrestype2w.c b/sys/contrib/dev/acpica/compiler/aslrestype2w.c index c35b9b0..1630e25 100644 --- a/sys/contrib/dev/acpica/compiler/aslrestype2w.c +++ b/sys/contrib/dev/acpica/compiler/aslrestype2w.c @@ -343,7 +343,7 @@ RsDoWordIoDescriptor ( (UINT64) Descriptor->Address16.AddressLength, (UINT64) Descriptor->Address16.Granularity, Descriptor->Address16.Flags, - MinOp, MaxOp, LengthOp, GranOp); + MinOp, MaxOp, LengthOp, GranOp, Op); Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) + OptionIndex + StringLength; @@ -549,7 +549,7 @@ RsDoWordBusNumberDescriptor ( (UINT64) Descriptor->Address16.AddressLength, (UINT64) Descriptor->Address16.Granularity, Descriptor->Address16.Flags, - MinOp, MaxOp, LengthOp, GranOp); + MinOp, MaxOp, LengthOp, GranOp, Op); Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) + OptionIndex + StringLength; @@ -766,7 +766,7 @@ RsDoWordSpaceDescriptor ( (UINT64) Descriptor->Address16.AddressLength, (UINT64) Descriptor->Address16.Granularity, Descriptor->Address16.Flags, - MinOp, MaxOp, LengthOp, GranOp); + MinOp, MaxOp, LengthOp, GranOp, Op); Rnode->BufferLength = sizeof (AML_RESOURCE_ADDRESS16) + OptionIndex + StringLength; diff --git a/sys/contrib/dev/acpica/compiler/asltypes.h b/sys/contrib/dev/acpica/compiler/asltypes.h index f4e5f46..ea04210 100644 --- a/sys/contrib/dev/acpica/compiler/asltypes.h +++ b/sys/contrib/dev/acpica/compiler/asltypes.h @@ -302,307 +302,4 @@ typedef struct asl_event_info } ASL_EVENT_INFO; -#define ASL_WARNING 0 -#define ASL_WARNING2 1 -#define ASL_WARNING3 2 -#define ASL_ERROR 3 -#define ASL_REMARK 4 -#define ASL_OPTIMIZATION 5 -#define ASL_NUM_REPORT_LEVELS 6 - - -typedef enum -{ - ASL_MSG_RESERVED = 0, - ASL_MSG_ALPHANUMERIC_STRING, - ASL_MSG_AML_NOT_IMPLEMENTED, - ASL_MSG_ARG_COUNT_HI, - ASL_MSG_ARG_COUNT_LO, - ASL_MSG_ARG_INIT, - ASL_MSG_BACKWARDS_OFFSET, - ASL_MSG_BITS_TO_BYTES, - ASL_MSG_BUFFER_LENGTH, - ASL_MSG_BYTES_TO_BITS, - ASL_MSG_CLOSE, - ASL_MSG_COMPILER_INTERNAL, - ASL_MSG_CONSTANT_EVALUATION, - ASL_MSG_CONSTANT_FOLDED, - ASL_MSG_CORE_EXCEPTION, - ASL_MSG_DEBUG_FILE_OPEN, - ASL_MSG_DEBUG_FILENAME, - ASL_MSG_DEPENDENT_NESTING, - ASL_MSG_DMA_CHANNEL, - ASL_MSG_DMA_LIST, - ASL_MSG_DUPLICATE_CASE, - ASL_MSG_DUPLICATE_ITEM, - ASL_MSG_EARLY_EOF, - ASL_MSG_ENCODING_LENGTH, - ASL_MSG_EX_INTERRUPT_LIST, - ASL_MSG_EX_INTERRUPT_LIST_MIN, - ASL_MSG_EX_INTERRUPT_NUMBER, - ASL_MSG_FIELD_ACCESS_WIDTH, - ASL_MSG_FIELD_UNIT_ACCESS_WIDTH, - ASL_MSG_FIELD_UNIT_OFFSET, - ASL_MSG_INCLUDE_FILE_OPEN, - ASL_MSG_INPUT_FILE_OPEN, - ASL_MSG_INTEGER_LENGTH, - ASL_MSG_INTEGER_OPTIMIZATION, - ASL_MSG_INTERRUPT_LIST, - ASL_MSG_INTERRUPT_NUMBER, - ASL_MSG_INVALID_CONSTANT_OP, - ASL_MSG_INVALID_EISAID, - ASL_MSG_INVALID_ESCAPE, - ASL_MSG_INVALID_OPERAND, - ASL_MSG_INVALID_PERFORMANCE, - ASL_MSG_INVALID_PRIORITY, - ASL_MSG_INVALID_STRING, - ASL_MSG_INVALID_TARGET, - ASL_MSG_INVALID_TIME, - ASL_MSG_INVALID_TYPE, - ASL_MSG_INVALID_UUID, - ASL_MSG_LIST_LENGTH_LONG, - ASL_MSG_LIST_LENGTH_SHORT, - ASL_MSG_LISTING_FILE_OPEN, - ASL_MSG_LISTING_FILENAME, - ASL_MSG_LOCAL_INIT, - ASL_MSG_LONG_LINE, - ASL_MSG_MEMORY_ALLOCATION, - ASL_MSG_MISSING_ENDDEPENDENT, - ASL_MSG_MISSING_STARTDEPENDENT, - ASL_MSG_MULTIPLE_TYPES, - ASL_MSG_NAME_EXISTS, - ASL_MSG_NAME_OPTIMIZATION, - ASL_MSG_NESTED_COMMENT, - ASL_MSG_NO_CASES, - ASL_MSG_NO_RETVAL, - ASL_MSG_NO_WHILE, - ASL_MSG_NON_ASCII, - ASL_MSG_NOT_EXIST, - ASL_MSG_NOT_FOUND, - ASL_MSG_NOT_METHOD, - ASL_MSG_NOT_PARAMETER, - ASL_MSG_NOT_REACHABLE, - ASL_MSG_OPEN, - ASL_MSG_OUTPUT_FILE_OPEN, - ASL_MSG_OUTPUT_FILENAME, - ASL_MSG_PACKAGE_LENGTH, - ASL_MSG_READ, - ASL_MSG_RECURSION, - ASL_MSG_REGION_BUFFER_ACCESS, - ASL_MSG_REGION_BYTE_ACCESS, - ASL_MSG_RESERVED_ARG_COUNT_HI, - ASL_MSG_RESERVED_ARG_COUNT_LO, - ASL_MSG_RESERVED_METHOD, - ASL_MSG_RESERVED_OPERAND_TYPE, - ASL_MSG_RESERVED_RETURN_VALUE, - ASL_MSG_RESERVED_USE, - ASL_MSG_RESERVED_WORD, - ASL_MSG_RESOURCE_FIELD, - ASL_MSG_RESOURCE_INDEX, - ASL_MSG_RESOURCE_LIST, - ASL_MSG_RESOURCE_SOURCE, - ASL_MSG_RETURN_TYPES, - ASL_MSG_SCOPE_FWD_REF, - ASL_MSG_SCOPE_TYPE, - ASL_MSG_SEEK, - ASL_MSG_SINGLE_NAME_OPTIMIZATION, - ASL_MSG_SOME_NO_RETVAL, - ASL_MSG_SWITCH_TYPE, - ASL_MSG_SYNC_LEVEL, - ASL_MSG_SYNTAX, - ASL_MSG_TABLE_SIGNATURE, - ASL_MSG_TOO_MANY_TEMPS, - ASL_MSG_UNKNOWN_RESERVED_NAME, - ASL_MSG_UNREACHABLE_CODE, - ASL_MSG_UNSUPPORTED, - ASL_MSG_VENDOR_LIST, - ASL_MSG_WRITE, - ASL_MSG_MULTIPLE_DEFAULT, - ASL_MSG_TIMEOUT, - ASL_MSG_RESULT_NOT_USED, - ASL_MSG_NOT_REFERENCED, - ASL_MSG_NON_ZERO, - ASL_MSG_STRING_LENGTH, - ASL_MSG_SERIALIZED, - ASL_MSG_COMPILER_RESERVED, - ASL_MSG_NAMED_OBJECT_IN_WHILE, - ASL_MSG_LOCAL_OUTSIDE_METHOD, - ASL_MSG_ALIGNMENT, - ASL_MSG_ISA_ADDRESS, - ASL_MSG_INVALID_MIN_MAX, - ASL_MSG_INVALID_LENGTH, - ASL_MSG_INVALID_LENGTH_FIXED, - ASL_MSG_INVALID_GRANULARITY, - ASL_MSG_INVALID_GRAN_FIXED, - ASL_MSG_INVALID_ACCESS_SIZE, - ASL_MSG_INVALID_ADDR_FLAGS, - ASL_MSG_INVALID_FIELD_NAME, - ASL_MSG_INTEGER_SIZE, - ASL_MSG_INVALID_HEX_INTEGER, - ASL_MSG_BUFFER_ELEMENT, - ASL_MSG_RESERVED_VALUE, - ASL_MSG_FLAG_VALUE, - ASL_MSG_ZERO_VALUE, - ASL_MSG_UNKNOWN_TABLE, - ASL_MSG_UNKNOWN_SUBTABLE, - ASL_MSG_OEM_TABLE - -} ASL_MESSAGE_IDS; - -#ifdef ASL_EXCEPTIONS - -char *AslMessages [] = { -/* The zeroth message is reserved */ "", -/* ASL_MSG_ALPHANUMERIC_STRING */ "String must be entirely alphanumeric", -/* ASL_MSG_AML_NOT_IMPLEMENTED */ "Opcode is not implemented in compiler AML code generator", -/* ASL_MSG_ARG_COUNT_HI */ "Too many arguments", -/* ASL_MSG_ARG_COUNT_LO */ "Too few arguments", -/* ASL_MSG_ARG_INIT */ "Method argument is not initialized", -/* ASL_MSG_BACKWARDS_OFFSET */ "Invalid backwards offset", -/* ASL_MSG_BITS_TO_BYTES */ "Field offset is in bits, but a byte offset is required", -/* ASL_MSG_BUFFER_LENGTH */ "Effective AML buffer length is zero", -/* ASL_MSG_BYTES_TO_BITS */ "Field offset is in bytes, but a bit offset is required", -/* ASL_MSG_CLOSE */ "Could not close file", -/* ASL_MSG_COMPILER_INTERNAL */ "Internal compiler error", -/* ASL_MSG_CONSTANT_EVALUATION */ "Could not evaluate constant expression", -/* ASL_MSG_CONSTANT_FOLDED */ "Constant expression evaluated and reduced", -/* ASL_MSG_CORE_EXCEPTION */ "From ACPI CA Subsystem", -/* ASL_MSG_DEBUG_FILE_OPEN */ "Could not open debug file", -/* ASL_MSG_DEBUG_FILENAME */ "Could not create debug filename", -/* ASL_MSG_DEPENDENT_NESTING */ "Dependent function macros cannot be nested",\ -/* ASL_MSG_DMA_CHANNEL */ "Invalid DMA channel (must be 0-7)", -/* ASL_MSG_DMA_LIST */ "Too many DMA channels (8 max)", -/* ASL_MSG_DUPLICATE_CASE */ "Case value already specified", -/* ASL_MSG_DUPLICATE_ITEM */ "Duplicate value in list", -/* ASL_MSG_EARLY_EOF */ "Premature end-of-file reached", -/* ASL_MSG_ENCODING_LENGTH */ "Package length too long to encode", -/* ASL_MSG_EX_INTERRUPT_LIST */ "Too many interrupts (255 max)", -/* ASL_MSG_EX_INTERRUPT_LIST_MIN */ "Too few interrupts (1 minimum required)", -/* ASL_MSG_EX_INTERRUPT_NUMBER */ "Invalid interrupt number (must be 32 bits)", -/* ASL_MSG_FIELD_ACCESS_WIDTH */ "Access width is greater than region size", -/* ASL_MSG_FIELD_UNIT_ACCESS_WIDTH */ "Access width of Field Unit extends beyond region limit", -/* ASL_MSG_FIELD_UNIT_OFFSET */ "Field Unit extends beyond region limit", -/* ASL_MSG_INCLUDE_FILE_OPEN */ "Could not open include file", -/* ASL_MSG_INPUT_FILE_OPEN */ "Could not open input file", -/* ASL_MSG_INTEGER_LENGTH */ "64-bit integer in 32-bit table, truncating", -/* ASL_MSG_INTEGER_OPTIMIZATION */ "Integer optimized to single-byte AML opcode", -/* ASL_MSG_INTERRUPT_LIST */ "Too many interrupts (16 max)", -/* ASL_MSG_INTERRUPT_NUMBER */ "Invalid interrupt number (must be 0-15)", -/* ASL_MSG_INVALID_CONSTANT_OP */ "Invalid operator in constant expression (not type 3/4/5)", -/* ASL_MSG_INVALID_EISAID */ "EISAID string must be of the form \"UUUXXXX\" (3 uppercase, 4 hex digits)", -/* ASL_MSG_INVALID_ESCAPE */ "Invalid or unknown escape sequence", -/* ASL_MSG_INVALID_OPERAND */ "Invalid operand", -/* ASL_MSG_INVALID_PERFORMANCE */ "Invalid performance/robustness value", -/* ASL_MSG_INVALID_PRIORITY */ "Invalid priority value", -/* ASL_MSG_INVALID_STRING */ "Invalid Hex/Octal Escape - Non-ASCII or NULL", -/* ASL_MSG_INVALID_TARGET */ "Target operand not allowed in constant expression", -/* ASL_MSG_INVALID_TIME */ "Time parameter too long (255 max)", -/* ASL_MSG_INVALID_TYPE */ "Invalid type", -/* ASL_MSG_INVALID_UUID */ "UUID string must be of the form \"aabbccdd-eeff-gghh-iijj-kkllmmnnoopp\"", -/* ASL_MSG_LIST_LENGTH_LONG */ "Initializer list longer than declared package length", -/* ASL_MSG_LIST_LENGTH_SHORT */ "Initializer list shorter than declared package length", -/* ASL_MSG_LISTING_FILE_OPEN */ "Could not open listing file", -/* ASL_MSG_LISTING_FILENAME */ "Could not create listing filename", -/* ASL_MSG_LOCAL_INIT */ "Method local variable is not initialized", -/* ASL_MSG_LONG_LINE */ "Splitting long input line", -/* ASL_MSG_MEMORY_ALLOCATION */ "Memory allocation failure", -/* ASL_MSG_MISSING_ENDDEPENDENT */ "Missing EndDependentFn() macro in dependent resource list", -/* ASL_MSG_MISSING_STARTDEPENDENT */ "Missing StartDependentFn() macro in dependent resource list", -/* ASL_MSG_MULTIPLE_TYPES */ "Multiple types", -/* ASL_MSG_NAME_EXISTS */ "Name already exists in scope", -/* ASL_MSG_NAME_OPTIMIZATION */ "NamePath optimized", -/* ASL_MSG_NESTED_COMMENT */ "Nested comment found", -/* ASL_MSG_NO_CASES */ "No Case statements under Switch", -/* ASL_MSG_NO_RETVAL */ "Called method returns no value", -/* ASL_MSG_NO_WHILE */ "No enclosing While statement", -/* ASL_MSG_NON_ASCII */ "Invalid characters found in file", -/* ASL_MSG_NOT_EXIST */ "Object does not exist", -/* ASL_MSG_NOT_FOUND */ "Object not found or not accessible from scope", -/* ASL_MSG_NOT_METHOD */ "Not a control method, cannot invoke", -/* ASL_MSG_NOT_PARAMETER */ "Not a parameter, used as local only", -/* ASL_MSG_NOT_REACHABLE */ "Object is not accessible from this scope", -/* ASL_MSG_OPEN */ "Could not open file", -/* ASL_MSG_OUTPUT_FILE_OPEN */ "Could not open output AML file", -/* ASL_MSG_OUTPUT_FILENAME */ "Could not create output filename", -/* ASL_MSG_PACKAGE_LENGTH */ "Effective AML package length is zero", -/* ASL_MSG_READ */ "Could not read file", -/* ASL_MSG_RECURSION */ "Recursive method call", -/* ASL_MSG_REGION_BUFFER_ACCESS */ "Host Operation Region requires BufferAcc access", -/* ASL_MSG_REGION_BYTE_ACCESS */ "Host Operation Region requires ByteAcc access", -/* ASL_MSG_RESERVED_ARG_COUNT_HI */ "Reserved method has too many arguments", -/* ASL_MSG_RESERVED_ARG_COUNT_LO */ "Reserved method has too few arguments", -/* ASL_MSG_RESERVED_METHOD */ "Reserved name must be a control method", -/* ASL_MSG_RESERVED_OPERAND_TYPE */ "Invalid object type for reserved name", -/* ASL_MSG_RESERVED_RETURN_VALUE */ "Reserved method must return a value", -/* ASL_MSG_RESERVED_USE */ "Invalid use of reserved name", -/* ASL_MSG_RESERVED_WORD */ "Use of reserved name", -/* ASL_MSG_RESOURCE_FIELD */ "Resource field name cannot be used as a target", -/* ASL_MSG_RESOURCE_INDEX */ "Missing ResourceSourceIndex (required)", -/* ASL_MSG_RESOURCE_LIST */ "Too many resource items (internal error)", -/* ASL_MSG_RESOURCE_SOURCE */ "Missing ResourceSource string (required)", -/* ASL_MSG_RETURN_TYPES */ "Not all control paths return a value", -/* ASL_MSG_SCOPE_FWD_REF */ "Forward references from Scope operator not allowed", -/* ASL_MSG_SCOPE_TYPE */ "Existing object has invalid type for Scope operator", -/* ASL_MSG_SEEK */ "Could not seek file", -/* ASL_MSG_SINGLE_NAME_OPTIMIZATION */ "NamePath optimized to NameSeg (uses run-time search path)", -/* ASL_MSG_SOME_NO_RETVAL */ "Called method may not always return a value", -/* ASL_MSG_SWITCH_TYPE */ "Switch expression is not a static Integer/Buffer/String data type, defaulting to Integer", -/* ASL_MSG_SYNC_LEVEL */ "SyncLevel must be in the range 0-15", -/* ASL_MSG_SYNTAX */ "", -/* ASL_MSG_TABLE_SIGNATURE */ "Invalid Table Signature", -/* ASL_MSG_TOO_MANY_TEMPS */ "Method requires too many temporary variables (_T_x)", -/* ASL_MSG_UNKNOWN_RESERVED_NAME */ "Unknown reserved name", -/* ASL_MSG_UNREACHABLE_CODE */ "Statement is unreachable", -/* ASL_MSG_UNSUPPORTED */ "Unsupported feature", -/* ASL_MSG_VENDOR_LIST */ "Too many vendor data bytes (7 max)", -/* ASL_MSG_WRITE */ "Could not write file", -/* ASL_MSG_MULTIPLE_DEFAULT */ "More than one Default statement within Switch construct", -/* ASL_MSG_TIMEOUT */ "Possible operator timeout is ignored", -/* ASL_MSG_RESULT_NOT_USED */ "Result is not used, operator has no effect", -/* ASL_MSG_NOT_REFERENCED */ "Namespace object is not referenced", -/* ASL_MSG_NON_ZERO */ "Operand evaluates to zero", -/* ASL_MSG_STRING_LENGTH */ "String literal too long", -/* ASL_MSG_SERIALIZED */ "Control Method marked Serialized", -/* ASL_MSG_COMPILER_RESERVED */ "Use of compiler reserved name", -/* ASL_MSG_NAMED_OBJECT_IN_WHILE */ "Creating a named object in a While loop", -/* ASL_MSG_LOCAL_OUTSIDE_METHOD */ "Local or Arg used outside a control method", -/* ASL_MSG_ALIGNMENT */ "Must be a multiple of alignment/granularity value", -/* ASL_MSG_ISA_ADDRESS */ "Maximum 10-bit ISA address (0x3FF)", -/* ASL_MSG_INVALID_MIN_MAX */ "Address Min is greater than Address Max", -/* ASL_MSG_INVALID_LENGTH */ "Length is larger than Min/Max window", -/* ASL_MSG_INVALID_LENGTH_FIXED */ "Length is not equal to fixed Min/Max window", -/* ASL_MSG_INVALID_GRANULARITY */ "Granularity must be zero or a power of two minus one", -/* ASL_MSG_INVALID_GRAN_FIXED */ "Granularity must be zero for fixed Min/Max", -/* ASL_MSG_INVALID_ACCESS_SIZE */ "Invalid AccessSize (Maximum is 4 - QWord access)", -/* ASL_MSG_INVALID_ADDR_FLAGS */ "Invalid combination of Length and Min/Max fixed flags", - -/* These messages are used by the data table compiler only */ - -/* ASL_MSG_INVALID_FIELD_NAME */ "Invalid Field Name", -/* ASL_MSG_INTEGER_SIZE */ "Integer too large for target", -/* ASL_MSG_INVALID_HEX_INTEGER */ "Invalid hex integer constant", -/* ASL_MSG_BUFFER_ELEMENT */ "Invalid element in buffer initializer list", -/* ASL_MSG_RESERVED_VALUE */ "Reserved field must be zero", -/* ASL_MSG_FLAG_VALUE */ "Flag value is too large", -/* ASL_MSG_ZERO_VALUE */ "Value must be non-zero", -/* ASL_MSG_UNKNOWN_TABLE */ "Unknown ACPI table signature", -/* ASL_MSG_UNKNOWN_SUBTABLE */ "Unknown subtable type", -/* ASL_MSG_OEM_TABLE */ "OEM table - unknown contents" - -}; - - -char *AslErrorLevel [ASL_NUM_REPORT_LEVELS] = { - "Warning ", - "Warning ", - "Warning ", - "Error ", - "Remark ", - "Optimize" -}; - -#define ASL_ERROR_LEVEL_LENGTH 8 /* Length of strings above */ - -#endif /* ASL_EXCEPTIONS */ - #endif /* __ASLTYPES_H */ diff --git a/sys/contrib/dev/acpica/compiler/aslutils.c b/sys/contrib/dev/acpica/compiler/aslutils.c index 3fbcc5b..38f3ba2 100644 --- a/sys/contrib/dev/acpica/compiler/aslutils.c +++ b/sys/contrib/dev/acpica/compiler/aslutils.c @@ -120,6 +120,7 @@ #include <contrib/dev/acpica/include/acdisasm.h> #include <contrib/dev/acpica/include/acnamesp.h> #include <contrib/dev/acpica/include/amlcode.h> +#include <contrib/dev/acpica/include/acapps.h> #define _COMPONENT ACPI_COMPILER ACPI_MODULE_NAME ("aslutils") @@ -566,8 +567,8 @@ UtDisplaySummary ( { /* Compiler name and version number */ - FlPrintFile (FileId, "%s version %X\n", - CompilerId, (UINT32) ACPI_CA_VERSION); + FlPrintFile (FileId, "%s version %X%s\n", + ASL_COMPILER_NAME, (UINT32) ACPI_CA_VERSION, ACPI_WIDTH); } if (Gbl_FileType == ASL_INPUT_TYPE_ASCII_DATA) diff --git a/sys/contrib/dev/acpica/compiler/dtcompile.c b/sys/contrib/dev/acpica/compiler/dtcompile.c index d80bb10..908b25f 100644 --- a/sys/contrib/dev/acpica/compiler/dtcompile.c +++ b/sys/contrib/dev/acpica/compiler/dtcompile.c @@ -314,7 +314,7 @@ DtInsertCompilerIds ( Next = Next->Next; } - Next->Value = CompilerCreatorId; + Next->Value = ASL_CREATOR_ID; Next->Flags = DT_FIELD_NOT_ALLOCATED; Next = Next->Next; diff --git a/sys/contrib/dev/acpica/compiler/dttemplate.c b/sys/contrib/dev/acpica/compiler/dttemplate.c index 6bbb548..33c2cea 100644 --- a/sys/contrib/dev/acpica/compiler/dttemplate.c +++ b/sys/contrib/dev/acpica/compiler/dttemplate.c @@ -377,9 +377,9 @@ DtCreateOneTemplate ( AcpiOsRedirectOutput (File); - AcpiOsPrintf ("/*\n * %s\n", IntelAcpiCA); - AcpiOsPrintf (" * iASL Compiler/Disassembler version %8.8X\n *\n", - ACPI_CA_VERSION); + AcpiOsPrintf ("/*\n"); + AcpiOsPrintf (ACPI_COMMON_HEADER ("iASL Compiler/Disassembler", " * ")); + AcpiOsPrintf (" * Template for [%4.4s] ACPI Table\n", Signature); diff --git a/sys/contrib/dev/acpica/events/evxfregn.c b/sys/contrib/dev/acpica/events/evxfregn.c index d06c6f7..c3ac094 100644 --- a/sys/contrib/dev/acpica/events/evxfregn.c +++ b/sys/contrib/dev/acpica/events/evxfregn.c @@ -139,6 +139,12 @@ * * DESCRIPTION: Install a handler for all OpRegions of a given SpaceId. * + * NOTE: This function should only be called after AcpiEnableSubsystem has + * been called. This is because any _REG methods associated with the Space ID + * are executed here, and these methods can only be safely executed after + * the default handlers have been installed and the hardware has been + * initialized (via AcpiEnableSubsystem.) + * ******************************************************************************/ ACPI_STATUS diff --git a/sys/contrib/dev/acpica/include/acapps.h b/sys/contrib/dev/acpica/include/acapps.h index 418e20f..1368c21 100644 --- a/sys/contrib/dev/acpica/include/acapps.h +++ b/sys/contrib/dev/acpica/include/acapps.h @@ -121,6 +121,38 @@ #pragma warning(disable:4100) /* warning C4100: unreferenced formal parameter */ #endif +/* Common info for tool signons */ + +#define ACPICA_NAME "Intel ACPI Component Architecture" +#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2010 Intel Corporation" + +#if ACPI_MACHINE_WIDTH == 64 +#define ACPI_WIDTH "-64" + +#elif ACPI_MACHINE_WIDTH == 32 +#define ACPI_WIDTH "-32" + +#else +#error unknown ACPI_MACHINE_WIDTH +#define ACPI_WIDTH "-??" + +#endif + +/* Macros for signons and file headers */ + +#define ACPI_COMMON_SIGNON(UtilityName) \ + "\n%s\n%s version %8.8X%s\n%s\n\n", \ + ACPICA_NAME, \ + UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, \ + ACPICA_COPYRIGHT + +#define ACPI_COMMON_HEADER(UtilityName, Prefix) \ + "%s%s\n%s%s version %8.8X%s\n%s%s\n%s\n", \ + Prefix, ACPICA_NAME, \ + Prefix, UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, \ + Prefix, ACPICA_COPYRIGHT, \ + Prefix + #define FILE_SUFFIX_DISASSEMBLY "dsl" #define ACPI_TABLE_FILE_SUFFIX ".dat" diff --git a/sys/contrib/dev/acpica/include/aclocal.h b/sys/contrib/dev/acpica/include/aclocal.h index eec3ffc..062972f 100644 --- a/sys/contrib/dev/acpica/include/aclocal.h +++ b/sys/contrib/dev/acpica/include/aclocal.h @@ -1080,6 +1080,7 @@ typedef struct acpi_bit_register_info ACPI_BITMASK_POWER_BUTTON_STATUS | \ ACPI_BITMASK_SLEEP_BUTTON_STATUS | \ ACPI_BITMASK_RT_CLOCK_STATUS | \ + ACPI_BITMASK_PCIEXP_WAKE_STATUS | \ ACPI_BITMASK_WAKE_STATUS) #define ACPI_BITMASK_TIMER_ENABLE 0x0001 @@ -1136,7 +1137,8 @@ typedef struct acpi_bit_register_info #define ACPI_OSI_WIN_VISTA 0x07 #define ACPI_OSI_WINSRV_2008 0x08 #define ACPI_OSI_WIN_VISTA_SP1 0x09 -#define ACPI_OSI_WIN_7 0x0A +#define ACPI_OSI_WIN_VISTA_SP2 0x0A +#define ACPI_OSI_WIN_7 0x0B #define ACPI_ALWAYS_ILLEGAL 0x00 diff --git a/sys/contrib/dev/acpica/include/acpixf.h b/sys/contrib/dev/acpica/include/acpixf.h index ec55398..6d100c0 100644 --- a/sys/contrib/dev/acpica/include/acpixf.h +++ b/sys/contrib/dev/acpica/include/acpixf.h @@ -120,7 +120,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20100915 +#define ACPI_CA_VERSION 0x20101013 #include <contrib/dev/acpica/include/actypes.h> #include <contrib/dev/acpica/include/actbl.h> diff --git a/sys/contrib/dev/acpica/include/platform/acenv.h b/sys/contrib/dev/acpica/include/platform/acenv.h index ebf09d6..f3526c7 100644 --- a/sys/contrib/dev/acpica/include/platform/acenv.h +++ b/sys/contrib/dev/acpica/include/platform/acenv.h @@ -148,9 +148,10 @@ #define ACPI_CONSTANT_EVAL_ONLY #define ACPI_LARGE_NAMESPACE_NODE #define ACPI_DATA_TABLE_DISASSEMBLY +#define ACPI_SINGLE_THREADED #endif -/* AcpiExec configuration */ +/* AcpiExec and AcpiBin configuration */ #ifdef ACPI_EXEC_APP #define ACPI_APPLICATION @@ -159,6 +160,11 @@ #define ACPI_DBG_TRACK_ALLOCATIONS #endif +#ifdef ACPI_BIN_APP +#define ACPI_APPLICATION +#define ACPI_SINGLE_THREADED +#endif + /* Linkable ACPICA library */ #ifdef ACPI_LIBRARY diff --git a/sys/contrib/dev/acpica/osunixxf.c b/sys/contrib/dev/acpica/osunixxf.c index 85f7759..fcb9c00 100644 --- a/sys/contrib/dev/acpica/osunixxf.c +++ b/sys/contrib/dev/acpica/osunixxf.c @@ -115,12 +115,11 @@ /* - * These interfaces are required in order to compile the ASL compiler under - * Linux or other Unix-like system. + * These interfaces are required in order to compile the ASL compiler and the + * various ACPICA tools under Linux or other Unix-like system. * * Note: Use #define __APPLE__ for OS X generation. */ - #include <stdio.h> #include <stdlib.h> #include <stdarg.h> @@ -157,6 +156,12 @@ AeTableOverride ( typedef void* (*PTHREAD_CALLBACK) (void *); +/* Apple-specific */ + +#ifdef __APPLE__ +#define sem_destroy sem_close +#endif + /****************************************************************************** * @@ -166,12 +171,13 @@ typedef void* (*PTHREAD_CALLBACK) (void *); * * RETURN: Status * - * DESCRIPTION: Init and terminate. Nothing to do. + * DESCRIPTION: Init and terminate. Nothing to do. * *****************************************************************************/ ACPI_STATUS -AcpiOsInitialize (void) +AcpiOsInitialize ( + void) { AcpiGbl_OutputFile = stdout; @@ -180,7 +186,8 @@ AcpiOsInitialize (void) ACPI_STATUS -AcpiOsTerminate (void) +AcpiOsTerminate ( + void) { return (AE_OK); @@ -195,7 +202,7 @@ AcpiOsTerminate (void) * * RETURN: RSDP physical address * - * DESCRIPTION: Gets the root pointer (RSDP) + * DESCRIPTION: Gets the ACPI root pointer (RSDP) * *****************************************************************************/ @@ -212,10 +219,10 @@ AcpiOsGetRootPointer ( * * FUNCTION: AcpiOsPredefinedOverride * - * PARAMETERS: InitVal - Initial value of the predefined object - * NewVal - The new value for the object + * PARAMETERS: InitVal - Initial value of the predefined object + * NewVal - The new value for the object * - * RETURN: Status, pointer to value. Null pointer returned if not + * RETURN: Status, pointer to value. Null pointer returned if not * overriding. * * DESCRIPTION: Allow the OS to override predefined names @@ -242,10 +249,11 @@ AcpiOsPredefinedOverride ( * * FUNCTION: AcpiOsTableOverride * - * PARAMETERS: ExistingTable - Header of current table (probably firmware) - * NewTable - Where an entire new table is returned. + * PARAMETERS: ExistingTable - Header of current table (probably + * firmware) + * NewTable - Where an entire new table is returned. * - * RETURN: Status, pointer to new table. Null pointer returned if no + * RETURN: Status, pointer to new table. Null pointer returned if no * table is available to override * * DESCRIPTION: Return a different version of a table if one is available @@ -301,7 +309,7 @@ AcpiOsRedirectOutput ( * * FUNCTION: AcpiOsPrintf * - * PARAMETERS: fmt, ... Standard printf format + * PARAMETERS: fmt, ... - Standard printf format * * RETURN: None * @@ -327,8 +335,8 @@ AcpiOsPrintf ( * * FUNCTION: AcpiOsVprintf * - * PARAMETERS: fmt Standard printf format - * args Argument list + * PARAMETERS: fmt - Standard printf format + * args - Argument list * * RETURN: None * @@ -375,8 +383,8 @@ AcpiOsVprintf ( * * FUNCTION: AcpiOsGetLine * - * PARAMETERS: fmt Standard printf format - * args Argument list + * PARAMETERS: fmt - Standard printf format + * args - Argument list * * RETURN: Actual bytes read * @@ -412,14 +420,15 @@ AcpiOsGetLine ( return (i); } + /****************************************************************************** * * FUNCTION: AcpiOsMapMemory * - * PARAMETERS: where Physical address of memory to be mapped - * length How much memory to map + * PARAMETERS: where - Physical address of memory to be mapped + * length - How much memory to map * - * RETURN: Pointer to mapped memory. Null on error. + * RETURN: Pointer to mapped memory. Null on error. * * DESCRIPTION: Map physical memory into caller's address space * @@ -439,12 +448,12 @@ AcpiOsMapMemory ( * * FUNCTION: AcpiOsUnmapMemory * - * PARAMETERS: where Logical address of memory to be unmapped - * length How much memory to unmap + * PARAMETERS: where - Logical address of memory to be unmapped + * length - How much memory to unmap * * RETURN: None. * - * DESCRIPTION: Delete a previously created mapping. Where and Length must + * DESCRIPTION: Delete a previously created mapping. Where and Length must * correspond to a previous mapping exactly. * *****************************************************************************/ @@ -463,11 +472,11 @@ AcpiOsUnmapMemory ( * * FUNCTION: AcpiOsAllocate * - * PARAMETERS: Size Amount to allocate, in bytes + * PARAMETERS: Size - Amount to allocate, in bytes * - * RETURN: Pointer to the new allocation. Null on error. + * RETURN: Pointer to the new allocation. Null on error. * - * DESCRIPTION: Allocate memory. Algorithm is dependent on the OS. + * DESCRIPTION: Allocate memory. Algorithm is dependent on the OS. * *****************************************************************************/ @@ -487,7 +496,7 @@ AcpiOsAllocate ( * * FUNCTION: AcpiOsFree * - * PARAMETERS: mem Pointer to previously allocated memory + * PARAMETERS: mem - Pointer to previously allocated memory * * RETURN: None. * @@ -504,6 +513,52 @@ AcpiOsFree ( } +#ifdef ACPI_SINGLE_THREADED +/****************************************************************************** + * + * FUNCTION: Semaphore stub functions + * + * DESCRIPTION: Stub functions used for single-thread applications that do + * not require semaphore synchronization. Full implementations + * of these functions appear after the stubs. + * + *****************************************************************************/ + +ACPI_STATUS +AcpiOsCreateSemaphore ( + UINT32 MaxUnits, + UINT32 InitialUnits, + ACPI_HANDLE *OutHandle) +{ + *OutHandle = (ACPI_HANDLE) 1; + return (AE_OK); +} + +ACPI_STATUS +AcpiOsDeleteSemaphore ( + ACPI_HANDLE Handle) +{ + return (AE_OK); +} + +ACPI_STATUS +AcpiOsWaitSemaphore ( + ACPI_HANDLE Handle, + UINT32 Units, + UINT16 Timeout) +{ + return (AE_OK); +} + +ACPI_STATUS +AcpiOsSignalSemaphore ( + ACPI_HANDLE Handle, + UINT32 Units) +{ + return (AE_OK); +} + +#else /****************************************************************************** * * FUNCTION: AcpiOsCreateSemaphore @@ -532,10 +587,15 @@ AcpiOsCreateSemaphore ( } #ifdef __APPLE__ - Sem = sem_open (tmpnam (NULL), O_EXCL|O_CREAT, 0755, InitialUnits); - if (!Sem) { - return (AE_NO_MEMORY); + char *SemaphoreName = tmpnam (NULL); + + Sem = sem_open (SemaphoreName, O_EXCL|O_CREAT, 0755, InitialUnits); + if (!Sem) + { + return (AE_NO_MEMORY); + } + sem_unlink (SemaphoreName); /* This just deletes the name */ } #else @@ -719,6 +779,8 @@ AcpiOsSignalSemaphore ( return (AE_OK); } +#endif /* ACPI_SINGLE_THREADED */ + /****************************************************************************** * @@ -767,13 +829,13 @@ AcpiOsReleaseLock ( * * FUNCTION: AcpiOsInstallInterruptHandler * - * PARAMETERS: InterruptNumber Level handler should respond to. - * Isr Address of the ACPI interrupt handler - * ExceptPtr Where status is returned + * PARAMETERS: InterruptNumber - Level handler should respond to. + * Isr - Address of the ACPI interrupt handler + * ExceptPtr - Where status is returned * * RETURN: Handle to the newly installed handler. * - * DESCRIPTION: Install an interrupt handler. Used to install the ACPI + * DESCRIPTION: Install an interrupt handler. Used to install the ACPI * OS-independent handler. * *****************************************************************************/ @@ -793,7 +855,7 @@ AcpiOsInstallInterruptHandler ( * * FUNCTION: AcpiOsRemoveInterruptHandler * - * PARAMETERS: Handle Returned when handler was installed + * PARAMETERS: Handle - Returned when handler was installed * * RETURN: Status * @@ -815,9 +877,9 @@ AcpiOsRemoveInterruptHandler ( * * FUNCTION: AcpiOsExecute * - * PARAMETERS: Type - Type of execution - * Function - Address of the function to execute - * Context - Passed as a parameter to the function + * PARAMETERS: Type - Type of execution + * Function - Address of the function to execute + * Context - Passed as a parameter to the function * * RETURN: Status. * @@ -848,7 +910,7 @@ AcpiOsExecute ( * * FUNCTION: AcpiOsStall * - * PARAMETERS: microseconds To sleep + * PARAMETERS: microseconds - Time to sleep * * RETURN: Blocks until sleep is completed. * @@ -872,7 +934,7 @@ AcpiOsStall ( * * FUNCTION: AcpiOsSleep * - * PARAMETERS: milliseconds To sleep + * PARAMETERS: milliseconds - Time to sleep * * RETURN: Blocks until sleep is completed. * @@ -893,6 +955,7 @@ AcpiOsSleep ( usleep ((milliseconds % 1000) * 1000); /* Sleep for remaining usecs */ } + /****************************************************************************** * * FUNCTION: AcpiOsGetTimer @@ -906,7 +969,8 @@ AcpiOsSleep ( *****************************************************************************/ UINT64 -AcpiOsGetTimer (void) +AcpiOsGetTimer ( + void) { struct timeval time; @@ -923,10 +987,10 @@ AcpiOsGetTimer (void) * * FUNCTION: AcpiOsReadPciConfiguration * - * PARAMETERS: PciId Seg/Bus/Dev - * Register Device Register - * Value Buffer where value is placed - * Width Number of bits + * PARAMETERS: PciId - Seg/Bus/Dev + * Register - Device Register + * Value - Buffer where value is placed + * Width - Number of bits * * RETURN: Status * @@ -950,10 +1014,10 @@ AcpiOsReadPciConfiguration ( * * FUNCTION: AcpiOsWritePciConfiguration * - * PARAMETERS: PciId Seg/Bus/Dev - * Register Device Register - * Value Value to be written - * Width Number of bits + * PARAMETERS: PciId - Seg/Bus/Dev + * Register - Device Register + * Value - Value to be written + * Width - Number of bits * * RETURN: Status. * @@ -977,9 +1041,9 @@ AcpiOsWritePciConfiguration ( * * FUNCTION: AcpiOsReadPort * - * PARAMETERS: Address Address of I/O port/register to read - * Value Where value is placed - * Width Number of bits + * PARAMETERS: Address - Address of I/O port/register to read + * Value - Where value is placed + * Width - Number of bits * * RETURN: Value read from port * @@ -1020,9 +1084,9 @@ AcpiOsReadPort ( * * FUNCTION: AcpiOsWritePort * - * PARAMETERS: Address Address of I/O port/register to write - * Value Value to write - * Width Number of bits + * PARAMETERS: Address - Address of I/O port/register to write + * Value - Value to write + * Width - Number of bits * * RETURN: None * @@ -1045,9 +1109,9 @@ AcpiOsWritePort ( * * FUNCTION: AcpiOsReadMemory * - * PARAMETERS: Address Physical Memory Address to read - * Value Where value is placed - * Width Number of bits + * PARAMETERS: Address - Physical Memory Address to read + * Value - Where value is placed + * Width - Number of bits * * RETURN: Value read from physical memory address * @@ -1081,9 +1145,9 @@ AcpiOsReadMemory ( * * FUNCTION: AcpiOsWriteMemory * - * PARAMETERS: Address Physical Memory Address to write - * Value Value to write - * Width Number of bits + * PARAMETERS: Address - Physical Memory Address to write + * Value - Value to write + * Width - Number of bits * * RETURN: None * @@ -1156,7 +1220,7 @@ AcpiOsWritable ( * * RETURN: Id of the running thread * - * DESCRIPTION: Get the Id of the current (running) thread + * DESCRIPTION: Get the ID of the current (running) thread * *****************************************************************************/ @@ -1173,8 +1237,8 @@ AcpiOsGetThreadId ( * * FUNCTION: AcpiOsSignal * - * PARAMETERS: Function ACPI CA signal function code - * Info Pointer to function-dependent structure + * PARAMETERS: Function - ACPI CA signal function code + * Info - Pointer to function-dependent structure * * RETURN: Status * @@ -1202,5 +1266,3 @@ AcpiOsSignal ( return (AE_OK); } - - diff --git a/sys/contrib/dev/acpica/utilities/utglobal.c b/sys/contrib/dev/acpica/utilities/utglobal.c index d0bde78..ca2ce7f 100644 --- a/sys/contrib/dev/acpica/utilities/utglobal.c +++ b/sys/contrib/dev/acpica/utilities/utglobal.c @@ -244,7 +244,9 @@ ACPI_EXPORT_SYMBOL (AcpiFormatException) * 1) _SB_ is defined to be a device to allow \_SB_._INI to be run * during the initialization sequence. * 2) _TZ_ is defined to be a thermal zone in order to allow ASL code to - * perform a Notify() operation on it. + * perform a Notify() operation on it. 09/2010: Changed to type Device. + * This still allows notifies, but does not confuse host code that + * searches for valid ThermalZone objects. */ const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] = { @@ -252,7 +254,7 @@ const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] = {"_PR_", ACPI_TYPE_LOCAL_SCOPE, NULL}, {"_SB_", ACPI_TYPE_DEVICE, NULL}, {"_SI_", ACPI_TYPE_LOCAL_SCOPE, NULL}, - {"_TZ_", ACPI_TYPE_THERMAL, NULL}, + {"_TZ_", ACPI_TYPE_DEVICE, NULL}, {"_REV", ACPI_TYPE_INTEGER, (char *) ACPI_CA_SUPPORT_LEVEL}, {"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME}, {"_GL_", ACPI_TYPE_MUTEX, (char *) 1}, diff --git a/sys/contrib/dev/acpica/utilities/utids.c b/sys/contrib/dev/acpica/utilities/utids.c index 6e5f833..a369598 100644 --- a/sys/contrib/dev/acpica/utilities/utids.c +++ b/sys/contrib/dev/acpica/utilities/utids.c @@ -123,51 +123,6 @@ #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME ("utids") -/* Local prototypes */ - -static void -AcpiUtCopyIdString ( - char *Destination, - char *Source); - - -/******************************************************************************* - * - * FUNCTION: AcpiUtCopyIdString - * - * PARAMETERS: Destination - Where to copy the string - * Source - Source string - * - * RETURN: None - * - * DESCRIPTION: Copies an ID string for the _HID, _CID, and _UID methods. - * Performs removal of a leading asterisk if present -- workaround - * for a known issue on a bunch of machines. - * - ******************************************************************************/ - -static void -AcpiUtCopyIdString ( - char *Destination, - char *Source) -{ - - /* - * Workaround for ID strings that have a leading asterisk. This construct - * is not allowed by the ACPI specification (ID strings must be - * alphanumeric), but enough existing machines have this embedded in their - * ID strings that the following code is useful. - */ - if (*Source == '*') - { - Source++; - } - - /* Do the actual copy */ - - ACPI_STRCPY (Destination, Source); -} - /******************************************************************************* * @@ -240,7 +195,7 @@ AcpiUtExecute_HID ( } else { - AcpiUtCopyIdString (Hid->String, ObjDesc->String.Pointer); + ACPI_STRCPY (Hid->String, ObjDesc->String.Pointer); } Hid->Length = Length; @@ -327,7 +282,7 @@ AcpiUtExecute_UID ( } else { - AcpiUtCopyIdString (Uid->String, ObjDesc->String.Pointer); + ACPI_STRCPY (Uid->String, ObjDesc->String.Pointer); } Uid->Length = Length; @@ -471,7 +426,7 @@ AcpiUtExecute_CID ( { /* Copy the String CID from the returned object */ - AcpiUtCopyIdString (NextIdString, CidObjects[i]->String.Pointer); + ACPI_STRCPY (NextIdString, CidObjects[i]->String.Pointer); Length = CidObjects[i]->String.Length + 1; } diff --git a/sys/contrib/dev/acpica/utilities/utosi.c b/sys/contrib/dev/acpica/utilities/utosi.c index 49ff73b..ea37f25 100644 --- a/sys/contrib/dev/acpica/utilities/utosi.c +++ b/sys/contrib/dev/acpica/utilities/utosi.c @@ -147,6 +147,7 @@ static ACPI_INTERFACE_INFO AcpiDefaultSupportedInterfaces[] = {"Windows 2006", NULL, 0, ACPI_OSI_WIN_VISTA}, /* Windows Vista - Added 03/2006 */ {"Windows 2006.1", NULL, 0, ACPI_OSI_WINSRV_2008}, /* Windows Server 2008 - Added 09/2009 */ {"Windows 2006 SP1", NULL, 0, ACPI_OSI_WIN_VISTA_SP1}, /* Windows Vista SP1 - Added 09/2009 */ + {"Windows 2006 SP2", NULL, 0, ACPI_OSI_WIN_VISTA_SP2}, /* Windows Vista SP2 - Added 09/2010 */ {"Windows 2009", NULL, 0, ACPI_OSI_WIN_7}, /* Windows 7 and Server 2008 R2 - Added 09/2009 */ /* Feature Group Strings */ |