Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/acpica/dist -------------------------------...
details: https://anonhg.NetBSD.org/src/rev/8e721b983857
branches: trunk
changeset: 464639:8e721b983857
user: christos <christos%NetBSD.org@localhost>
date: Tue Oct 15 16:07:21 2019 +0000
description:
----------------------------------------
16 August 2019. Summary of changes for version 20190816:
This release is available at https://acpica.org/downloads
1) ACPICA kernel-resident subsystem:
Modified the OwnerId mechanism to allow for more Owner Ids. The previous
limit was 256 Ids, now it is 4096 Ids. This prevents OWNER_ID_LIMIT
exceptions on machines with a large number of initialization threads,
many CPU cores and nested initialization control methods.
Introduced acpi_dispatch_gpe() as a wrapper around AcpiEvDetectGpe() for
checking if the given GPE (as represented by a GPE device handle and a
GPE number) is currently active and dispatching it (if that's the case)
outside of interrupt context.
Table load: exit the interpreter before initializing objects within the
new table This prevents re-acquiring the interpreter lock when loading
tables
Added the "Windows 2019" string to the _OSI support (version 1903). Jung-
uk Kim
Macros: removed pointer math on a null pointer. Causes warnings on some
compilers and/or tools. Changed ACPI_TO_POINTER to use ACPI_CAST_PTR
instead of using arithmetic.
Fully deployed the ACPI_PRINTF_LIKE macro. This macro was not being used
across all "printf-like" internal functions. Also, cleanup all calls to
such functions (both in 32-bit mode and 64-bit mode) now that they are
analyzed by the gcc compiler via ACPI_PRINTF_LIKE.
2) iASL Compiler/Disassembler and ACPICA tools:
iASL: implemented a new data table compiler flex/bison front-end. This
change is internal and is not intended to result in changes to the
compiled code. This new compiler front-end can be invoked using the -tp
option for now, until the old mechanism is removed.
ASLTS: Implemented a new data table compiler test suite. This test suite
generates all table templates and compile/disassemble/re-compile/binary-
compare each file.
iASL: return -1 if AML files were not generated due to compiler errors
iASL: added a warning on use of the now-legacy ASL Processor () keyword.
iASL: added an error on _UID object declaration that returns a String
within a Processor () declaration. A _UID for a processor must be an
Integer.
iASL: added a null terminator to name strings that consist only of
multiple parent prefixes (^)
iASL: added support to compile both ASL and data table files in a single
command.
Updated the tool generation project files that were recently migrated to
MSVC 2017 to eliminate all new warnings. The new project files appear in
the directory \acpica\generate\msvc2017. This change effectively
deprecates the older project files in \acpica\generate\msvc9.
diffstat:
sys/external/bsd/acpica/dist/changes.txt | 202 +++++++++++++
sys/external/bsd/acpica/dist/common/adwalk.c | 21 +-
sys/external/bsd/acpica/dist/common/dmrestag.c | 6 +-
sys/external/bsd/acpica/dist/common/dmtables.c | 4 +-
sys/external/bsd/acpica/dist/common/dmtbdump2.c | 2 +-
sys/external/bsd/acpica/dist/compiler/aslcache.c | 6 +-
sys/external/bsd/acpica/dist/compiler/aslcodegen.c | 7 +-
sys/external/bsd/acpica/dist/compiler/asldebug.c | 2 +-
sys/external/bsd/acpica/dist/compiler/asldefine.h | 18 +-
sys/external/bsd/acpica/dist/compiler/aslglobal.h | 15 +
sys/external/bsd/acpica/dist/compiler/aslhelp.c | 1 +
sys/external/bsd/acpica/dist/compiler/asllength.c | 9 +-
sys/external/bsd/acpica/dist/compiler/asllistsup.c | 2 +-
sys/external/bsd/acpica/dist/compiler/aslmain.c | 29 +-
sys/external/bsd/acpica/dist/compiler/aslmessages.c | 10 +-
sys/external/bsd/acpica/dist/compiler/aslmessages.h | 6 +-
sys/external/bsd/acpica/dist/compiler/aslnamesp.c | 9 +-
sys/external/bsd/acpica/dist/compiler/asloperands.c | 2 +
sys/external/bsd/acpica/dist/compiler/aslparseop.c | 18 +-
sys/external/bsd/acpica/dist/compiler/aslstartup.c | 7 +-
sys/external/bsd/acpica/dist/compiler/aslstubs.c | 6 -
sys/external/bsd/acpica/dist/compiler/asltransform.c | 6 +
sys/external/bsd/acpica/dist/compiler/asltypes.h | 3 +
sys/external/bsd/acpica/dist/compiler/aslxrefout.c | 2 +-
sys/external/bsd/acpica/dist/compiler/dtcompiler.h | 27 +-
sys/external/bsd/acpica/dist/compiler/dtcompilerparser.l | 180 +++++++++++
sys/external/bsd/acpica/dist/compiler/dtcompilerparser.y | 179 +++++++++++
sys/external/bsd/acpica/dist/compiler/dtio.c | 59 +++-
sys/external/bsd/acpica/dist/compiler/dtparser.l | 2 -
sys/external/bsd/acpica/dist/compiler/dttemplate.c | 2 +-
sys/external/bsd/acpica/dist/compiler/prmacros.c | 2 +-
sys/external/bsd/acpica/dist/compiler/prscan.c | 6 +-
sys/external/bsd/acpica/dist/debugger/dbhistry.c | 2 +-
sys/external/bsd/acpica/dist/debugger/dbobject.c | 1 -
sys/external/bsd/acpica/dist/debugger/dbstats.c | 92 ++---
sys/external/bsd/acpica/dist/dispatcher/dsinit.c | 2 +-
sys/external/bsd/acpica/dist/events/evgpe.c | 26 +-
sys/external/bsd/acpica/dist/events/evgpeblk.c | 2 +-
sys/external/bsd/acpica/dist/events/evxfgpe.c | 29 +-
sys/external/bsd/acpica/dist/generate/unix/Makefile.config | 9 +
sys/external/bsd/acpica/dist/generate/unix/iasl/Makefile | 24 +-
sys/external/bsd/acpica/dist/include/acconfig.h | 4 +-
sys/external/bsd/acpica/dist/include/acevents.h | 3 +-
sys/external/bsd/acpica/dist/include/acobject.h | 2 +-
sys/external/bsd/acpica/dist/include/acstruct.h | 2 +-
sys/external/bsd/acpica/dist/include/platform/aclinux.h | 10 +-
sys/external/bsd/acpica/dist/include/platform/acmsvc.h | 14 +
sys/external/bsd/acpica/dist/include/platform/acwin.h | 31 +-
sys/external/bsd/acpica/dist/include/platform/acwin64.h | 22 +
sys/external/bsd/acpica/dist/namespace/nsalloc.c | 2 +-
sys/external/bsd/acpica/dist/namespace/nsload.c | 12 -
sys/external/bsd/acpica/dist/namespace/nsutils.c | 13 -
sys/external/bsd/acpica/dist/tests/templates/Makefile | 29 +-
sys/external/bsd/acpica/dist/tools/acpiexec/aeexec.c | 2 +-
sys/external/bsd/acpica/dist/tools/acpiexec/aetests.c | 8 +-
sys/external/bsd/acpica/dist/tools/acpinames/anstubs.c | 7 -
sys/external/bsd/acpica/dist/tools/acpixtract/axmain.c | 2 +-
sys/external/bsd/acpica/dist/tools/examples/examples.c | 2 +-
sys/external/bsd/acpica/dist/utilities/uterror.c | 6 +-
sys/external/bsd/acpica/dist/utilities/utinit.c | 1 -
sys/external/bsd/acpica/dist/utilities/utownerid.c | 12 +-
sys/external/bsd/acpica/dist/utilities/utxfinit.c | 18 +-
62 files changed, 1029 insertions(+), 210 deletions(-)
diffs (truncated from 2309 to 300 lines):
diff -r e27e3e1de922 -r 8e721b983857 sys/external/bsd/acpica/dist/changes.txt
--- a/sys/external/bsd/acpica/dist/changes.txt Tue Oct 15 15:59:26 2019 +0000
+++ b/sys/external/bsd/acpica/dist/changes.txt Tue Oct 15 16:07:21 2019 +0000
@@ -1,4 +1,206 @@
----------------------------------------
+16 August 2019. Summary of changes for version 20190816:
+
+This release is available at https://acpica.org/downloads
+
+
+1) ACPICA kernel-resident subsystem:
+
+Modified the OwnerId mechanism to allow for more Owner Ids. The previous
+limit was 256 Ids, now it is 4096 Ids. This prevents OWNER_ID_LIMIT
+exceptions on machines with a large number of initialization threads,
+many CPU cores and nested initialization control methods.
+
+Introduced acpi_dispatch_gpe() as a wrapper around AcpiEvDetectGpe() for
+checking if the given GPE (as represented by a GPE device handle and a
+GPE number) is currently active and dispatching it (if that's the case)
+outside of interrupt context.
+
+Table load: exit the interpreter before initializing objects within the
+new table This prevents re-acquiring the interpreter lock when loading
+tables
+
+Added the "Windows 2019" string to the _OSI support (version 1903). Jung-
+uk Kim
+
+Macros: removed pointer math on a null pointer. Causes warnings on some
+compilers and/or tools. Changed ACPI_TO_POINTER to use ACPI_CAST_PTR
+instead of using arithmetic.
+
+Fully deployed the ACPI_PRINTF_LIKE macro. This macro was not being used
+across all "printf-like" internal functions. Also, cleanup all calls to
+such functions (both in 32-bit mode and 64-bit mode) now that they are
+analyzed by the gcc compiler via ACPI_PRINTF_LIKE.
+
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+iASL: implemented a new data table compiler flex/bison front-end. This
+change is internal and is not intended to result in changes to the
+compiled code. This new compiler front-end can be invoked using the -tp
+option for now, until the old mechanism is removed.
+
+ASLTS: Implemented a new data table compiler test suite. This test suite
+generates all table templates and compile/disassemble/re-compile/binary-
+compare each file.
+
+iASL: return -1 if AML files were not generated due to compiler errors
+
+iASL: added a warning on use of the now-legacy ASL Processor () keyword.
+
+iASL: added an error on _UID object declaration that returns a String
+within a Processor () declaration. A _UID for a processor must be an
+Integer.
+
+iASL: added a null terminator to name strings that consist only of
+multiple parent prefixes (^)
+
+iASL: added support to compile both ASL and data table files in a single
+command.
+
+Updated the tool generation project files that were recently migrated to
+MSVC 2017 to eliminate all new warnings. The new project files appear in
+the directory \acpica\generate\msvc2017. This change effectively
+deprecates the older project files in \acpica\generate\msvc9.
+
+
+----------------------------------------
+03 July 2019. Summary of changes for version 20190703:
+
+
+1) ACPICA kernel-resident subsystem:
+
+Remove legacy module-level support code. There were still some remnants
+of the legacy module-level code executions. Since we no longer support
+this option, this is essentially dead code and has been removed from the
+ACPICA source.
+
+iASL: ensure that _WAK, _PTS, _TTS, and _Sx are declared only at the root
+scope. If these named objects are declared outside the root scope, they
+will not be invoked by any host Operating System.
+
+Clear status of GPEs on first direct enable. ACPI GPEs (other than the EC
+one) can be enabled in two situations. First, the GPEs with existing _Lxx
+and _Exx methods are enabled implicitly by ACPICA during system
+initialization. Second, the GPEs without these methods (like GPEs listed
+by _PRW objects for wakeup devices) need to be enabled directly by the
+code that is going to use them (e.g. ACPI power management or device
+drivers).
+
+In the former case, if the status of a given GPE is set to start with,
+its handler method (either _Lxx or _Exx) needs to be invoked to take care
+of the events (possibly) signaled before the GPE was enabled. In the
+latter case, however, the first caller of AcpiEnableGpe() for a given GPE
+should not be expected to care about any events that might be signaled
+through it earlier. In that case, it is better to clear the status of
+the GPE before enabling it, to prevent stale events from triggering
+unwanted actions (like spurious system resume, for example).
+
+For this reason, modify AcpiEvAddGpeReference() to take an additional
+boolean argument indicating whether or not the GPE status needs to be
+cleared when its reference counter changes from zero to one and make
+AcpiEnableGpe() pass TRUE to it through that new argument.
+
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+The tool generation process has been migrated to MSVC 2017, and all
+project files have been upgraded. The new project files appear in the
+directory \acpica\generate\msvc2017. This change effectively deprecates
+the older project files in \acpica\generate\msvc9.
+
+iASL: ensure that _WAK, _PTS, _TTS, and _Sx are declared only at the root
+scope. If these named objects are declared outside the root scope, they
+will not be invoked by any host Operating System
+
+----------------------------------------
+09 May 2019. Summary of changes for version 20190509:
+
+
+1) ACPICA kernel-resident subsystem:
+
+Revert commit 6c43e1a ("ACPICA: Clear status of GPEs before enabling
+them") that causes problems with Thunderbolt controllers to occur if a
+dock device is connected at init time (the xhci_hcd and thunderbolt
+modules crash which prevents peripherals connected through them from
+working). Commit 6c43e1a effectively causes commit ecc1165b8b74 ("ACPICA:
+Dispatch active GPEs at init time") to get undone, so the problem
+addressed by commit ecc1165b8b74 appears again as a result of it.
+
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+Reverted iASL: Additional forward reference detection. This change
+reverts forward reference detection for field declarations. The feature
+unintentionally emitted AML bytecode with incorrect package lengths for
+some ASL code related to Fields and OperationRegions. This malformed AML
+can cause systems to crash
+during boot. The malformed AML bytecode is emitted in iASL version
+20190329 and 20190405.
+
+iASL: improve forward reference detection. This change improves forward
+reference detection for named objects inside of scopes. If a parse object
+has the OP_NOT_FOUND_DURING_LOAD set, it means that Op is a reference to
+a named object that is declared later in the AML bytecode. This is
+allowed if the reference is inside of a method and the declaration is
+outside of a method like so:
+
+DefinitionBlock(...)
+{
+ Method (TEST)
+ {
+ Return (NUM0)
+ }
+ Name (NUM0,0)
+}
+
+However, if the declaration and reference are both in the same method or
+outside any methods, this is a forward reference and should be marked as
+an error because it would result in runtime errors.
+
+DefinitionBlock(...)
+{
+ Name (BUFF, Buffer (NUM0) {}) // Forward reference
+ Name (NUM0, 0x0)
+
+ Method (TEST)
+ {
+ Local0 = NUM1
+ Name (NUM1, 0x1) // Forward reference
+ return (Local0)
+ }
+}
+
+iASL: Implemented additional buffer overflow analysis for BufferField
+declarations. Check if a buffer index argument to a create buffer field
+operation is beyond the end of the target buffer.
+
+This affects these AML operators:
+
+ AML_CREATE_FIELD_OP
+ AML_CREATE_BIT_FIELD_OP
+ AML_CREATE_BYTE_FIELD_OP
+ AML_CREATE_WORD_FIELD_OP
+ AML_CREATE_DWORD_FIELD_OP
+ AML_CREATE_QWORD_FIELD_OP
+
+ There are three conditions that must be satisfied in order to allow this
+validation at compile time:
+
+ 1) The length of the target buffer must be an integer constant
+ 2) The index specified in the create* must be an integer constant
+ 3) For CreateField, the bit length argument must be non-zero.
+
+Example:
+ Name (BUF1, Buffer() {1,2})
+ CreateField (BUF1, 7, 9, CF03) // 3: ERR
+
+dsdt.asl 14: CreateField (BUF1, 7, 9, CF03) // 3: ERR
+Error 6165 - ^ Buffer index beyond end of
+target buffer
+
+
+----------------------------------------
05 April 2019. Summary of changes for version 20190405:
diff -r e27e3e1de922 -r 8e721b983857 sys/external/bsd/acpica/dist/common/adwalk.c
--- a/sys/external/bsd/acpica/dist/common/adwalk.c Tue Oct 15 15:59:26 2019 +0000
+++ b/sys/external/bsd/acpica/dist/common/adwalk.c Tue Oct 15 16:07:21 2019 +0000
@@ -372,6 +372,7 @@
{
ACPI_OP_WALK_INFO *Info = Context;
char *Path;
+ ACPI_STATUS Status;
if (!Op)
@@ -414,10 +415,18 @@
if (Op->Common.Value.String)
{
- AcpiNsExternalizeName (ACPI_UINT32_MAX, Op->Common.Value.String,
+ Status = AcpiNsExternalizeName (ACPI_UINT32_MAX, Op->Common.Value.String,
NULL, &Path);
- AcpiOsPrintf ("%s %p", Path, Op->Common.Node);
- ACPI_FREE (Path);
+ if (ACPI_SUCCESS (Status))
+ {
+ AcpiOsPrintf ("%s %p", Path, Op->Common.Node);
+ ACPI_FREE (Path);
+ }
+ else
+ {
+ AcpiOsPrintf ("Could not externalize pathname for node [%4.4s]",
+ Op->Common.Node->Name.Ascii);
+ }
}
else
{
@@ -722,9 +731,9 @@
* 2) Not the root node
* 3) Not a node created by Scope
*/
-
- if (!PreDefined && Node != AcpiGbl_RootNode &&
- Op->Common.AmlOpcode != AML_SCOPE_OP)
+ if (!PreDefined &&
+ (Node != AcpiGbl_RootNode) &&
+ (Op->Common.AmlOpcode != AML_SCOPE_OP))
{
Node->OwnerId = WalkState->OwnerId;
}
diff -r e27e3e1de922 -r 8e721b983857 sys/external/bsd/acpica/dist/common/dmrestag.c
--- a/sys/external/bsd/acpica/dist/common/dmrestag.c Tue Oct 15 15:59:26 2019 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmrestag.c Tue Oct 15 16:07:21 2019 +0000
@@ -725,8 +725,12 @@
/* Internalize the namepath to AML format */
- AcpiNsInternalizeName (Pathname, &InternalPath);
+ Status = AcpiNsInternalizeName (Pathname, &InternalPath);
ACPI_FREE (Pathname);
+ if (ACPI_FAILURE (Status))
+ {
+ return (NULL);
+ }
/* Update the Op with the symbol */
diff -r e27e3e1de922 -r 8e721b983857 sys/external/bsd/acpica/dist/common/dmtables.c
--- a/sys/external/bsd/acpica/dist/common/dmtables.c Tue Oct 15 15:59:26 2019 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtables.c Tue Oct 15 16:07:21 2019 +0000
@@ -335,8 +335,8 @@
/* Get the DSDT via table override */
ACPI_MOVE_32_TO_32 (TableHeader.Signature, ACPI_SIG_DSDT);
- AcpiOsTableOverride (&TableHeader, &NewTable);
- if (!NewTable)
+ Status = AcpiOsTableOverride (&TableHeader, &NewTable);
+ if (ACPI_FAILURE (Status) || !NewTable)
{
fprintf (stderr, "Could not obtain DSDT\n");
return (AE_NO_ACPI_TABLES);
diff -r e27e3e1de922 -r 8e721b983857 sys/external/bsd/acpica/dist/common/dmtbdump2.c
--- a/sys/external/bsd/acpica/dist/common/dmtbdump2.c Tue Oct 15 15:59:26 2019 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtbdump2.c Tue Oct 15 16:07:21 2019 +0000
@@ -763,7 +763,7 @@
if (Offset + sizeof (ACPI_MCFG_ALLOCATION) > Table->Length)
{
AcpiOsPrintf ("Warning: there are %u invalid trailing bytes\n",
- sizeof (ACPI_MCFG_ALLOCATION) - (Offset - Table->Length));
+ (UINT32) sizeof (ACPI_MCFG_ALLOCATION) - (Offset - Table->Length));
return;
}
diff -r e27e3e1de922 -r 8e721b983857 sys/external/bsd/acpica/dist/compiler/aslcache.c
Home |
Main Index |
Thread Index |
Old Index