From owner-svn-src-head@freebsd.org Sat Jul 18 07:35:37 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 47F1036004F; Sat, 18 Jul 2020 07:35:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B80CF1C5pz3gr4; Sat, 18 Jul 2020 07:35:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0CA3F26C43; Sat, 18 Jul 2020 07:35:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06I7ZaoC077534; Sat, 18 Jul 2020 07:35:36 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06I7ZY71077522; Sat, 18 Jul 2020 07:35:34 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202007180735.06I7ZY71077522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 18 Jul 2020 07:35:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363300 - in head/sys/contrib/dev/acpica: . compiler components/executer components/utilities include X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head/sys/contrib/dev/acpica: . compiler components/executer components/utilities include X-SVN-Commit-Revision: 363300 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2020 07:35:37 -0000 Author: jkim Date: Sat Jul 18 07:35:34 2020 New Revision: 363300 URL: https://svnweb.freebsd.org/changeset/base/363300 Log: MFV: r363292 Merge ACPICA 20200717. Modified: head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/compiler/aslerror.c head/sys/contrib/dev/acpica/compiler/aslexternal.c head/sys/contrib/dev/acpica/compiler/aslload.c head/sys/contrib/dev/acpica/compiler/aslmethod.c head/sys/contrib/dev/acpica/compiler/aslxref.c head/sys/contrib/dev/acpica/components/executer/exprep.c head/sys/contrib/dev/acpica/components/utilities/utdelete.c head/sys/contrib/dev/acpica/components/utilities/utids.c head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/actypes.h Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/changes.txt Sat Jul 18 07:35:34 2020 (r363300) @@ -1,6 +1,53 @@ ---------------------------------------- +17 July 2020. Summary of changes for version 20200717: + +This release is available at https://acpica.org/downloads + + +1) ACPICA kernel-resident subsystem: + +Do not increment OperationRegion reference counts for field units. Recent +server firmware has revealed that this reference count can overflow on +large servers that declare many field units (thousands) under the same +OperationRegion. This occurs because each field unit declaration will add +a reference count to the source OperationRegion. This release solves the +reference count overflow for OperationRegion objects by preventing +fieldUnits from incrementing their parent OperationRegion's reference +count. + +Replaced one-element arrays with flexible-arrays, which were introduced +in C99. + +Restored the readme file containing the directions for generation of +ACPICA from source on MSVC 2017. Updated the file for MSVC 2017. File is +located at: generate/msvc2017/readme.txt + +2) iASL Compiler/Disassembler and ACPICA tools: + +iASL: Fixed a regression found in version 20200214. Prevent iASL from +emitting an extra byte of garbage data when control methods declared a +single parameter type without using braces. This extra byte is known to +cause a blue screen on the Windows AML interpreter. + +iASL: Made a change to allow external declarations to specify the type of +a named object even when some name segments are not defined. +This change allows the following ASL code to compile (When DEV0 is not +defined or not defined yet): + + External (\_SB.DEV0.OBJ1, IntObj) + External (\_SB.DEV0, DeviceObj) + +iASL: Fixed a problem where method names in "Alias ()" statement could be +misinterpreted. They are now interpreted correctly as method invocations. + +iASL: capture a method parameter count (Within the Method info segment, +as well as the argument node) when using parameter type lists. + +---------------------------------------- + + 28 May 2020. Summary of changes for version 20200528: Modified: head/sys/contrib/dev/acpica/compiler/aslerror.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslerror.c Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/compiler/aslerror.c Sat Jul 18 07:35:34 2020 (r363300) @@ -1056,7 +1056,7 @@ GetModifiedLevel ( UINT8 Level, UINT16 MessageId) { - UINT16 i; + UINT32 i; UINT16 ExceptionCode; Modified: head/sys/contrib/dev/acpica/compiler/aslexternal.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslexternal.c Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/compiler/aslexternal.c Sat Jul 18 07:35:34 2020 (r363300) @@ -200,6 +200,14 @@ ExDoExternal ( ExternType = AnMapObjTypeToBtype (ExternTypeOp); + if (ExternType != ACPI_BTYPE_METHOD) + { + /* + * If this is not a method, it has zero parameters this local variable + * is used only for methods + */ + ParamCount = 0; + } /* * The parser allows optional parameter return types regardless of the Modified: head/sys/contrib/dev/acpica/compiler/aslload.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslload.c Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/compiler/aslload.c Sat Jul 18 07:35:34 2020 (r363300) @@ -1177,13 +1177,13 @@ LdAnalyzeExternals ( * previously declared External */ Node->Flags &= ~ANOBJ_IS_EXTERNAL; - Node->Type = (UINT8) ExternalOpType; + Node->Type = (UINT8) ActualOpType; /* Just retyped a node, probably will need to open a scope */ - if (AcpiNsOpensScope (ExternalOpType)) + if (AcpiNsOpensScope (ActualOpType)) { - Status = AcpiDsScopeStackPush (Node, ExternalOpType, WalkState); + Status = AcpiDsScopeStackPush (Node, ActualOpType, WalkState); if (ACPI_FAILURE (Status)) { return (Status); @@ -1204,11 +1204,11 @@ LdAnalyzeExternals ( } else if ((Node->Flags & ANOBJ_IS_EXTERNAL) && (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) && - (ExternalOpType == ACPI_TYPE_ANY)) + (ActualOpType == ACPI_TYPE_ANY)) { /* Allow update of externals of unknown type. */ - Node->Type = (UINT8) ExternalOpType; + Node->Type = (UINT8) ActualExternalOpType; Status = AE_OK; } Modified: head/sys/contrib/dev/acpica/compiler/aslmethod.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmethod.c Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/compiler/aslmethod.c Sat Jul 18 07:35:34 2020 (r363300) @@ -306,6 +306,8 @@ MtMethodAnalysisWalkBegin ( { ActualArgs = MtProcessParameterTypeList (NextType, MethodInfo->ValidArgTypes); + MethodInfo->NumArguments = ActualArgs; + ArgNode->Asl.Value.Integer |= ActualArgs; } if ((MethodInfo->NumArguments) && @@ -670,6 +672,16 @@ MtProcessParameterTypeList ( { UINT8 ParameterCount = 0; + + if (ParamTypeOp && ParamTypeOp->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG) + { + /* Special case for a single parameter without braces */ + + TypeList[ParameterCount] = + MtProcessTypeOp (ParamTypeOp); + + return (1); + } while (ParamTypeOp) { Modified: head/sys/contrib/dev/acpica/compiler/aslxref.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslxref.c Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/compiler/aslxref.c Sat Jul 18 07:35:34 2020 (r363300) @@ -994,12 +994,14 @@ XfNamespaceLocateBegin ( * invocation of the method, it is simply a reference to the method. * * September 2016: Removed DeRefOf from this list + * July 2020: Added Alias to this list */ if ((Op->Asl.Parent) && ((Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_REFOF) || (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_PACKAGE) || (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_VAR_PACKAGE)|| - (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_OBJECTTYPE))) + (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_OBJECTTYPE) || + (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_ALIAS))) { return_ACPI_STATUS (AE_OK); } Modified: head/sys/contrib/dev/acpica/components/executer/exprep.c ============================================================================== --- head/sys/contrib/dev/acpica/components/executer/exprep.c Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/components/executer/exprep.c Sat Jul 18 07:35:34 2020 (r363300) @@ -651,10 +651,6 @@ AcpiExPrepFieldValue ( } } - /* An additional reference for the container */ - - AcpiUtAddReference (ObjDesc->Field.RegionObj); - ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "RegionField: BitOff %X, Off %X, Gran %X, Region %p\n", ObjDesc->Field.StartFieldBitOffset, Modified: head/sys/contrib/dev/acpica/components/utilities/utdelete.c ============================================================================== --- head/sys/contrib/dev/acpica/components/utilities/utdelete.c Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/components/utilities/utdelete.c Sat Jul 18 07:35:34 2020 (r363300) @@ -749,11 +749,6 @@ AcpiUtUpdateObjectReference ( NextObject = Object->BufferField.BufferObj; break; - case ACPI_TYPE_LOCAL_REGION_FIELD: - - NextObject = Object->Field.RegionObj; - break; - case ACPI_TYPE_LOCAL_BANK_FIELD: NextObject = Object->BankField.BankObj; @@ -789,6 +784,7 @@ AcpiUtUpdateObjectReference ( } break; + case ACPI_TYPE_LOCAL_REGION_FIELD: case ACPI_TYPE_REGION: default: Modified: head/sys/contrib/dev/acpica/components/utilities/utids.c ============================================================================== --- head/sys/contrib/dev/acpica/components/utilities/utids.c Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/components/utilities/utids.c Sat Jul 18 07:35:34 2020 (r363300) @@ -435,7 +435,7 @@ AcpiUtExecute_CID ( * 3) Size of the actual CID strings */ CidListSize = sizeof (ACPI_PNP_DEVICE_ID_LIST) + - ((Count - 1) * sizeof (ACPI_PNP_DEVICE_ID)) + + (Count * sizeof (ACPI_PNP_DEVICE_ID)) + StringAreaSize; CidList = ACPI_ALLOCATE_ZEROED (CidListSize); Modified: head/sys/contrib/dev/acpica/include/acpixf.h ============================================================================== --- head/sys/contrib/dev/acpica/include/acpixf.h Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/include/acpixf.h Sat Jul 18 07:35:34 2020 (r363300) @@ -154,7 +154,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20200528 +#define ACPI_CA_VERSION 0x20200717 #include #include Modified: head/sys/contrib/dev/acpica/include/actypes.h ============================================================================== --- head/sys/contrib/dev/acpica/include/actypes.h Sat Jul 18 05:20:33 2020 (r363299) +++ head/sys/contrib/dev/acpica/include/actypes.h Sat Jul 18 07:35:34 2020 (r363300) @@ -1379,7 +1379,7 @@ typedef struct acpi_pnp_device_id_list { UINT32 Count; /* Number of IDs in Ids array */ UINT32 ListSize; /* Size of list, including ID strings */ - ACPI_PNP_DEVICE_ID Ids[1]; /* ID array */ + ACPI_PNP_DEVICE_ID Ids[]; /* ID array */ } ACPI_PNP_DEVICE_ID_LIST;