Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/intel]: src/sys/external/bsd/acpica/dist VERSION 20200717
details: https://anonhg.NetBSD.org/src/rev/2bc17d8be3ce
branches: intel
changeset: 936742:2bc17d8be3ce
user: christos <christos%NetBSD.org@localhost>
date: Sun Aug 02 20:23:09 2020 +0000
description:
VERSION 20200717
Submitted by Bob Moore on 17 July, 2020 - 13:35
17 July 2020. Summary of changes for version 20200717:
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.
VERSION 20200528
Submitted by Bob Moore on 28 May, 2020 - 13:24
28 May 2020. Summary of changes for version 20200528:
1) ACPICA kernel-resident subsystem:
Removed old/obsolete Visual Studio files which were used to build
the Windows versions of the ACPICA tools. Since we have moved to
Visual Studio 2017, we are no longer supporting Visual Studio 2006
and 2009 project files. The new subdirectory and solution file are
located at:
acpica/generate/msvc2017/AcpiComponents.sln
2) iASL Compiler/Disassembler and ACPICA tools:
iASL: added support for a new OperationRegion Address Space (subtype):
PlatformRtMechanism. Support for this new keyword is being released
for early prototyping. It will appear in the next release of the
ACPI specification.
iASL: do not optimize the NameString parameter of the CondRefOf
operator. In the previous iASL compiler release, the NameString
parameter of the CondRefOf was optimized. There is evidence that
some implementations of the AML interpreter do not perform the
recursive search-to-parent search during the execution of the
CondRefOf operator. Therefore, the CondRefOf operator behaves
differently when the NameString parameter is a single name segment
(a NameSeg) as opposed to a full NamePath (starting at the root
scope) or a NameString containing parent prefixes.
iASL: Prevent an inadvertent remark message. This change prevents
a remark if within a control method the following exist:
1) An Operation Region is defined, and
2) A Field operator is defined that refers to the region. This
happens because at the top level, the Field operator does not
actually create a new named object, it simply references the
operation region.
Removed support for the acpinames utility. The acpinames was a
simple utility used to populate and display the ACPI namespace
without executing any AML code. However, ACPICA now supports
executable opcodes outside of control methods. This means that
executable AML opcodes such as If and Store opcodes need to be
executed during table load. Therefore, acpinames would need to be
updated to match the same behavior as the acpiexec utility and
since acpiexec can already dump the entire namespace (via the
'namespace' command), we no longer have the need to maintain
acpinames.
In order to dump the contents of the ACPI namepsace using acpiexec,
execute the following command from the command line:
acpiexec -b "n" [aml files]
diffstat:
sys/external/bsd/acpica/dist/changes.txt | 102 +++++++++-
sys/external/bsd/acpica/dist/compiler/aslcompiler.l | 1 +
sys/external/bsd/acpica/dist/compiler/aslerror.c | 2 +-
sys/external/bsd/acpica/dist/compiler/aslexternal.c | 8 +
sys/external/bsd/acpica/dist/compiler/aslkeywords.y | 1 +
sys/external/bsd/acpica/dist/compiler/aslload.c | 10 +-
sys/external/bsd/acpica/dist/compiler/aslmap.c | 1 +
sys/external/bsd/acpica/dist/compiler/aslmethod.c | 17 +-
sys/external/bsd/acpica/dist/compiler/asltokens.y | 1 +
sys/external/bsd/acpica/dist/compiler/aslxref.c | 25 ++-
sys/external/bsd/acpica/dist/debugger/dbdisply.c | 2 +
sys/external/bsd/acpica/dist/executer/exprep.c | 4 -
sys/external/bsd/acpica/dist/generate/release/build.sh | 13 +-
sys/external/bsd/acpica/dist/generate/unix/Makefile.config | 7 +-
sys/external/bsd/acpica/dist/include/acpixf.h | 2 +-
sys/external/bsd/acpica/dist/include/actypes.h | 5 +-
sys/external/bsd/acpica/dist/include/platform/acmsvc.h | 3 +
sys/external/bsd/acpica/dist/os_specific/service_layers/oslinuxtbl.c | 9 +-
sys/external/bsd/acpica/dist/utilities/utdecode.c | 23 +-
sys/external/bsd/acpica/dist/utilities/utdelete.c | 6 +-
sys/external/bsd/acpica/dist/utilities/utids.c | 2 +-
21 files changed, 192 insertions(+), 52 deletions(-)
diffs (truncated from 589 to 300 lines):
diff -r 35f78096f35b -r 2bc17d8be3ce sys/external/bsd/acpica/dist/changes.txt
--- a/sys/external/bsd/acpica/dist/changes.txt Mon May 25 23:16:29 2020 +0000
+++ b/sys/external/bsd/acpica/dist/changes.txt Sun Aug 02 20:23:09 2020 +0000
@@ -1,9 +1,109 @@
----------------------------------------
+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:
+
+
+1) ACPICA kernel-resident subsystem:
+
+Removed old/obsolete Visual Studio files which were used to build the
+Windows versions of the ACPICA tools. Since we have moved to Visual
+Studio 2017, we are no longer supporting Visual Studio 2006 and 2009
+project files. The new subdirectory and solution file are located at:
+
+ acpica/generate/msvc2017/AcpiComponents.sln
+
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+iASL: added support for a new OperationRegion Address Space (subtype):
+PlatformRtMechanism. Support for this new keyword is being released for
+early prototyping. It will appear in the next release of the ACPI
+specification.
+
+iASL: do not optimize the NameString parameter of the CondRefOf operator.
+In the previous iASL compiler release, the NameString parameter of the
+CondRefOf was optimized. There is evidence that some implementations of
+the AML interpreter do not perform the recursive search-to-parent search
+during the execution of the CondRefOf operator. Therefore, the CondRefOf
+operator behaves differently when the NameString parameter is a single
+name segment (a NameSeg) as opposed to a full NamePath (starting at the
+root scope) or a NameString containing parent prefixes.
+
+iASL: Prevent an inadvertent remark message. This change prevents a
+remark if within a control method the following exist:
+1) An Operation Region is defined, and
+2) A Field operator is defined that refers to the region.
+This happens because at the top level, the Field operator does not
+actually create a new named object, it simply references the operation
+region.
+
+Removed support for the acpinames utility. The acpinames was a simple
+utility used to populate and display the ACPI namespace without executing
+any AML code. However, ACPICA now supports executable opcodes outside of
+control methods. This means that executable AML opcodes such as If and
+Store opcodes need to be executed during table load. Therefore, acpinames
+would need to be updated to match the same behavior as the acpiexec
+utility and since acpiexec can already dump the entire namespace (via the
+'namespace' command), we no longer have the need to maintain acpinames.
+
+ In order to dump the contents of the ACPI namepsace using acpiexec,
+execute the following command from the command line:
+
+ acpiexec -b "n" [aml files]
+
+----------------------------------------
+
+
30 April 2020. Summary of changes for version 20200430:
-
1) ACPICA kernel-resident subsystem:
Cleaned up the coding style of a couple of global variables
diff -r 35f78096f35b -r 2bc17d8be3ce sys/external/bsd/acpica/dist/compiler/aslcompiler.l
--- a/sys/external/bsd/acpica/dist/compiler/aslcompiler.l Mon May 25 23:16:29 2020 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslcompiler.l Sun Aug 02 20:23:09 2020 +0000
@@ -585,6 +585,7 @@
"GeneralPurposeIo" { count (0); return (PARSEOP_REGIONSPACE_GPIO); } /* ACPI 5.0 */
"GenericSerialBus" { count (0); return (PARSEOP_REGIONSPACE_GSBUS); } /* ACPI 5.0 */
"PCC" { count (0); return (PARSEOP_REGIONSPACE_PCC); } /* ACPI 5.0 */
+"PlatformRtMechanism" { count (0); return (PARSEOP_REGIONSPACE_PRM); }
"FFixedHW" { count (0); return (PARSEOP_REGIONSPACE_FFIXEDHW); }
/* ResourceTypeKeyword: Resource Usage - Resource Descriptors */
diff -r 35f78096f35b -r 2bc17d8be3ce sys/external/bsd/acpica/dist/compiler/aslerror.c
--- a/sys/external/bsd/acpica/dist/compiler/aslerror.c Mon May 25 23:16:29 2020 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslerror.c Sun Aug 02 20:23:09 2020 +0000
@@ -948,7 +948,7 @@
UINT8 Level,
UINT16 MessageId)
{
- UINT16 i;
+ UINT32 i;
UINT16 ExceptionCode;
diff -r 35f78096f35b -r 2bc17d8be3ce sys/external/bsd/acpica/dist/compiler/aslexternal.c
--- a/sys/external/bsd/acpica/dist/compiler/aslexternal.c Mon May 25 23:16:29 2020 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslexternal.c Sun Aug 02 20:23:09 2020 +0000
@@ -92,6 +92,14 @@
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
diff -r 35f78096f35b -r 2bc17d8be3ce sys/external/bsd/acpica/dist/compiler/aslkeywords.y
--- a/sys/external/bsd/acpica/dist/compiler/aslkeywords.y Mon May 25 23:16:29 2020 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslkeywords.y Sun Aug 02 20:23:09 2020 +0000
@@ -286,6 +286,7 @@
| PARSEOP_REGIONSPACE_GPIO {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_GPIO);}
| PARSEOP_REGIONSPACE_GSBUS {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_GSBUS);}
| PARSEOP_REGIONSPACE_PCC {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_PCC);}
+ | PARSEOP_REGIONSPACE_PRM {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_PRM);}
| PARSEOP_REGIONSPACE_FFIXEDHW {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_FFIXEDHW);}
;
diff -r 35f78096f35b -r 2bc17d8be3ce sys/external/bsd/acpica/dist/compiler/aslload.c
--- a/sys/external/bsd/acpica/dist/compiler/aslload.c Mon May 25 23:16:29 2020 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslload.c Sun Aug 02 20:23:09 2020 +0000
@@ -1069,13 +1069,13 @@
* 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);
@@ -1096,11 +1096,11 @@
}
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;
}
diff -r 35f78096f35b -r 2bc17d8be3ce sys/external/bsd/acpica/dist/compiler/aslmap.c
--- a/sys/external/bsd/acpica/dist/compiler/aslmap.c Mon May 25 23:16:29 2020 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslmap.c Sun Aug 02 20:23:09 2020 +0000
@@ -377,6 +377,7 @@
/* REGIONSPACE_PCC */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_PLATFORM_COMM, 0, 0),
/* REGIONSPACE_PCI */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_PCI_CONFIG, 0, 0),
/* REGIONSPACE_PCIBAR */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_PCI_BAR_TARGET, 0, 0),
+/* REGIONSPACE_PRM */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_PLATFORM_RT, 0, 0),
/* REGIONSPACE_SMBUS */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_SMBUS, 0, 0),
/* REGISTER */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* RELEASE */ OP_TABLE_ENTRY (AML_RELEASE_OP, 0, 0, 0),
diff -r 35f78096f35b -r 2bc17d8be3ce sys/external/bsd/acpica/dist/compiler/aslmethod.c
--- a/sys/external/bsd/acpica/dist/compiler/aslmethod.c Mon May 25 23:16:29 2020 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslmethod.c Sun Aug 02 20:23:09 2020 +0000
@@ -198,6 +198,8 @@
{
ActualArgs = MtProcessParameterTypeList (NextType,
MethodInfo->ValidArgTypes);
+ MethodInfo->NumArguments = ActualArgs;
+ ArgNode->Asl.Value.Integer |= ActualArgs;
}
if ((MethodInfo->NumArguments) &&
@@ -563,6 +565,16 @@
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)
{
TypeList[ParameterCount] =
@@ -616,7 +628,7 @@
}
OpInfo = AcpiPsGetOpcodeInfo (Op->Asl.AmlOpcode);
- if (OpInfo->Class == AML_CLASS_NAMED_OBJECT)
+ if ((OpInfo->Class == AML_CLASS_NAMED_OBJECT) && (Op->Asl.AmlOpcode != AML_FIELD_OP))
{
/*
* 1) Mark the method as a method that creates named objects.
@@ -631,6 +643,9 @@
* Reason: If a thread blocks within the method for any reason, and
* another thread enters the method, the method will fail because
* an attempt will be made to create the same object twice.
+ *
+ * Note: The Field opcode is disallowed here because Field() does not
+ * create a new named object.
*/
ExternalPath = AcpiNsGetNormalizedPathname (MethodInfo->Op->Asl.Node, TRUE);
diff -r 35f78096f35b -r 2bc17d8be3ce sys/external/bsd/acpica/dist/compiler/asltokens.y
--- a/sys/external/bsd/acpica/dist/compiler/asltokens.y Mon May 25 23:16:29 2020 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asltokens.y Sun Aug 02 20:23:09 2020 +0000
@@ -314,6 +314,7 @@
%token <i> PARSEOP_REGIONSPACE_PCC
%token <i> PARSEOP_REGIONSPACE_PCI
%token <i> PARSEOP_REGIONSPACE_PCIBAR
+%token <i> PARSEOP_REGIONSPACE_PRM
%token <i> PARSEOP_REGIONSPACE_SMBUS
%token <i> PARSEOP_REGISTER
%token <i> PARSEOP_RELEASE
diff -r 35f78096f35b -r 2bc17d8be3ce sys/external/bsd/acpica/dist/compiler/aslxref.c
--- a/sys/external/bsd/acpica/dist/compiler/aslxref.c Mon May 25 23:16:29 2020 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslxref.c Sun Aug 02 20:23:09 2020 +0000
@@ -713,9 +713,24 @@
Node->Flags |= ANOBJ_IS_REFERENCED;
}
- /* Attempt to optimize the NamePath */
-
- OptOptimizeNamePath (Op, OpInfo->Flags, WalkState, Path, Node);
+ /*
+ * Attempt to optimize the NamePath
+ *
+ * One special case: CondRefOf operator - not all AML interpreter
+ * implementations expect optimized namepaths as a parameter to this
+ * operator. They require relative name paths with prefix operators or
+ * namepaths starting with the root scope.
+ *
+ * Other AML interpreter implementations do not perform the namespace
+ * search that starts at the current scope and recursively searching the
+ * parent scope until the root scope. The lack of search is only known to
+ * occur for the namestring parameter for the CondRefOf operator.
+ */
+ if ((Op->Asl.Parent) &&
+ (Op->Asl.Parent->Asl.ParseOpcode != PARSEOP_CONDREFOF))
+ {
+ OptOptimizeNamePath (Op, OpInfo->Flags, WalkState, Path, Node);
+ }
/*
Home |
Main Index |
Thread Index |
Old Index