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 30 April 2020. Summary of chang...
details: https://anonhg.NetBSD.org/src/rev/44fc2d1a42f5
branches: trunk
changeset: 933506:44fc2d1a42f5
user: christos <christos%NetBSD.org@localhost>
date: Mon May 25 23:16:29 2020 +0000
description:
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
(AcpiGbl_NextCmdNum and AcpiProtocolLengths) caught by static analyzers.
AcpiProtocolLengths was made static, and the definition of
AcpiGbl_NextCmdNum was moved to acglobal.h.
2) iASL Compiler/Disassembler and ACPICA tools:
iASL DataTable Compiler: Fixed a segfault on errors that aren't directly
associated with a field.
Disassembler: has been made more resilient so that it will continue to
parse AML even if the AML generates ACPI namespace errors. This enables
iASL to disassemble some AML that may have been compiled using older
versions of iASL that no longer compile with newer versions of iASL.
iASL: Fixed the required parameters for _NIH and _NIG. Previously, there
was a mixup where _NIG required one parameter and _NIH required zero
parameters. This change swaps these parameter requirements. Now it is
required that _NIH must be called with one parameter and _NIG requires
zero parameters.
iASL: Allow use of undefined externals as long as they are protected by
an if (CondRefOf (...)) block when compiling multiple definition blocks.
iASL: Fixed the type override behavior of named objects that are declared
as External. External declarations will no longer override the type of
the actual definition if it already exists.
AcpiNames: Added setargv.obj to the MSVC 2017 link sequence to enable
command line wildcard support on Windows. Note: the AcpiNames utility is
essentially redundant with the AcpiExec utility (using the "namespace"
command) and is therefore deprecated. It will be removed in future
releases of ACPICA.
Disassembler: ignore AE_ALREADY_EXISTS status when parsing create*
operators. The disassembler is intended to emit existing ASL code as-is.
Therefore, error messages emitted during disassembly should be ignored or
handled in a way such that the disassembler can continue to parse the
AML. This change ignores AE_ALREADY_EXISTS errors during the deferred Op
parsing for create operators in order to complete parsing ASL termlists.
iASL DataTable Compiler: IVRS table: fix potentially uninitialized
variable warning. Some compilers catch potential uninitialized variables.
This is done by examining branches of if/else statements. This change
replaces an "else if" with an "else" to fix the uninitialized variable
warning.
diffstat:
sys/external/bsd/acpica/dist/changes.txt | 59 +++++++++++++++++++-
sys/external/bsd/acpica/dist/common/acgetline.c | 2 -
sys/external/bsd/acpica/dist/common/dmtbdump2.c | 4 +-
sys/external/bsd/acpica/dist/compiler/aslmessages.c | 1 +
sys/external/bsd/acpica/dist/compiler/aslmessages.h | 1 +
sys/external/bsd/acpica/dist/debugger/dbhistry.c | 1 -
sys/external/bsd/acpica/dist/dispatcher/dsfield.c | 24 ++++++-
sys/external/bsd/acpica/dist/executer/exfield.c | 2 +-
sys/external/bsd/acpica/dist/include/acpredef.h | 4 +-
sys/external/bsd/acpica/dist/tools/acpiexec/aemain.c | 15 ++---
10 files changed, 91 insertions(+), 22 deletions(-)
diffs (258 lines):
diff -r 91109ceeff34 -r 44fc2d1a42f5 sys/external/bsd/acpica/dist/changes.txt
--- a/sys/external/bsd/acpica/dist/changes.txt Mon May 25 22:04:51 2020 +0000
+++ b/sys/external/bsd/acpica/dist/changes.txt Mon May 25 23:16:29 2020 +0000
@@ -1,4 +1,61 @@
----------------------------------------
+
+
+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
+(AcpiGbl_NextCmdNum and AcpiProtocolLengths) caught by static analyzers.
+AcpiProtocolLengths was made static, and the definition of
+AcpiGbl_NextCmdNum was moved to acglobal.h.
+
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+iASL DataTable Compiler: Fixed a segfault on errors that aren't directly
+associated with a field.
+
+Disassembler: has been made more resilient so that it will continue to
+parse AML even if the AML generates ACPI namespace errors. This enables
+iASL to disassemble some AML that may have been compiled using older
+versions of iASL that no longer compile with newer versions of iASL.
+
+iASL: Fixed the required parameters for _NIH and _NIG. Previously, there
+was a mixup where _NIG required one parameter and _NIH required zero
+parameters. This change swaps these parameter requirements. Now it is
+required that _NIH must be called with one parameter and _NIG requires
+zero parameters.
+
+iASL: Allow use of undefined externals as long as they are protected by
+an if (CondRefOf (...)) block when compiling multiple definition blocks.
+
+iASL: Fixed the type override behavior of named objects that are declared
+as External. External declarations will no longer override the type of
+the actual definition if it already exists.
+
+AcpiNames: Added setargv.obj to the MSVC 2017 link sequence to enable
+command line wildcard support on Windows. Note: the AcpiNames utility is
+essentially redundant with the AcpiExec utility (using the "namespace"
+command) and is therefore deprecated. It will be removed in future
+releases of ACPICA.
+
+Disassembler: ignore AE_ALREADY_EXISTS status when parsing create*
+operators. The disassembler is intended to emit existing ASL code as-is.
+Therefore, error messages emitted during disassembly should be ignored or
+handled in a way such that the disassembler can continue to parse the
+AML. This change ignores AE_ALREADY_EXISTS errors during the deferred Op
+parsing for create operators in order to complete parsing ASL termlists.
+
+iASL DataTable Compiler: IVRS table: fix potentially uninitialized
+variable warning. Some compilers catch potential uninitialized variables.
+This is done by examining branches of if/else statements. This change
+replaces an "else if" with an "else" to fix the uninitialized variable
+warning.
+
+
+----------------------------------------
26 March 2020. Summary of changes for version 20200326:
@@ -674,7 +731,7 @@
iASL: Emit error for creation of a zero-length operation region. Such a
region is rather pointless. If encountered, a runtime error is also
-implemented in the interpeter.
+implemented in the interpreter.
Debugger: Fix a possible fault with the "test objects" command.
diff -r 91109ceeff34 -r 44fc2d1a42f5 sys/external/bsd/acpica/dist/common/acgetline.c
--- a/sys/external/bsd/acpica/dist/common/acgetline.c Mon May 25 22:04:51 2020 +0000
+++ b/sys/external/bsd/acpica/dist/common/acgetline.c Mon May 25 23:16:29 2020 +0000
@@ -81,8 +81,6 @@
#define _ASCII_LEFT_ARROW 'D'
#define _ASCII_NEWLINE '\n'
-extern UINT32 AcpiGbl_NextCmdNum;
-
/* Erase a single character on the input command line */
#define ACPI_CLEAR_CHAR() \
diff -r 91109ceeff34 -r 44fc2d1a42f5 sys/external/bsd/acpica/dist/common/dmtbdump2.c
--- a/sys/external/bsd/acpica/dist/common/dmtbdump2.c Mon May 25 22:04:51 2020 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtbdump2.c Mon May 25 23:16:29 2020 +0000
@@ -420,8 +420,10 @@
DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, Subtable,
sizeof (ACPI_IVRS_HARDWARE1));
}
- else if (Subtable->Type == ACPI_IVRS_TYPE_HARDWARE2)
+ else
{
+ /* ACPI_IVRS_TYPE_HARDWARE2 subtable type */
+
EntryOffset = Offset + sizeof (ACPI_IVRS_HARDWARE2);
DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, Subtable,
sizeof (ACPI_IVRS_HARDWARE2));
diff -r 91109ceeff34 -r 44fc2d1a42f5 sys/external/bsd/acpica/dist/compiler/aslmessages.c
--- a/sys/external/bsd/acpica/dist/compiler/aslmessages.c Mon May 25 22:04:51 2020 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslmessages.c Mon May 25 23:16:29 2020 +0000
@@ -272,6 +272,7 @@
/* ASL_MSG_TYPE_MISMATCH_FOUND_HERE */ "Actual object declaration:",
/* ASL_MSG_DUPLICATE_EXTERN_MISMATCH */ "Type mismatch between multiple external declarations detected",
/* ASL_MSG_DUPLICATE_EXTERN_FOUND_HERE */"Duplicate external declaration:",
+/* ASL_MSG_CONDREF_NEEDS_EXTERNAL_DECL */"CondRefOf parameter requires External() declaration",
};
/* Table compiler */
diff -r 91109ceeff34 -r 44fc2d1a42f5 sys/external/bsd/acpica/dist/compiler/aslmessages.h
--- a/sys/external/bsd/acpica/dist/compiler/aslmessages.h Mon May 25 22:04:51 2020 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslmessages.h Mon May 25 23:16:29 2020 +0000
@@ -274,6 +274,7 @@
ASL_MSG_TYPE_MISMATCH_FOUND_HERE,
ASL_MSG_DUPLICATE_EXTERN_MISMATCH,
ASL_MSG_DUPLICATE_EXTERN_FOUND_HERE,
+ ASL_MSG_CONDREF_NEEDS_EXTERNAL_DECL,
/* These messages are used by the Data Table compiler only */
diff -r 91109ceeff34 -r 44fc2d1a42f5 sys/external/bsd/acpica/dist/debugger/dbhistry.c
--- a/sys/external/bsd/acpica/dist/debugger/dbhistry.c Mon May 25 22:04:51 2020 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbhistry.c Mon May 25 23:16:29 2020 +0000
@@ -67,7 +67,6 @@
static UINT16 AcpiGbl_LoHistory = 0;
static UINT16 AcpiGbl_NumHistory = 0;
static UINT16 AcpiGbl_NextHistoryIndex = 0;
-UINT32 AcpiGbl_NextCmdNum = 1;
/*******************************************************************************
diff -r 91109ceeff34 -r 44fc2d1a42f5 sys/external/bsd/acpica/dist/dispatcher/dsfield.c
--- a/sys/external/bsd/acpica/dist/dispatcher/dsfield.c Mon May 25 22:04:51 2020 +0000
+++ b/sys/external/bsd/acpica/dist/dispatcher/dsfield.c Mon May 25 23:16:29 2020 +0000
@@ -233,7 +233,12 @@
Status = AcpiNsLookup (WalkState->ScopeInfo,
Arg->Common.Value.String, ACPI_TYPE_ANY,
ACPI_IMODE_LOAD_PASS1, Flags, WalkState, &Node);
- if (ACPI_FAILURE (Status))
+ if ((WalkState->ParseFlags & ACPI_PARSE_DISASSEMBLE) &&
+ Status == AE_ALREADY_EXISTS)
+ {
+ Status = AE_OK;
+ }
+ else if (ACPI_FAILURE (Status))
{
ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
Arg->Common.Value.String, Status);
@@ -574,12 +579,21 @@
Info.RegionNode = RegionNode;
Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Common.Next);
- if (Info.RegionNode->Object->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_COMM &&
- !(RegionNode->Object->Field.InternalPccBuffer
- = ACPI_ALLOCATE_ZEROED(Info.RegionNode->Object->Region.Length)))
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ if (Info.RegionNode->Object->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_COMM)
{
- return_ACPI_STATUS (AE_NO_MEMORY);
+ RegionNode->Object->Field.InternalPccBuffer =
+ ACPI_ALLOCATE_ZEROED(Info.RegionNode->Object->Region.Length);
+ if (!RegionNode->Object->Field.InternalPccBuffer)
+ {
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
}
+
return_ACPI_STATUS (Status);
}
diff -r 91109ceeff34 -r 44fc2d1a42f5 sys/external/bsd/acpica/dist/executer/exfield.c
--- a/sys/external/bsd/acpica/dist/executer/exfield.c Mon May 25 22:04:51 2020 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exfield.c Mon May 25 23:16:29 2020 +0000
@@ -59,7 +59,7 @@
#define ACPI_INVALID_PROTOCOL_ID 0x80
#define ACPI_MAX_PROTOCOL_ID 0x0F
-const UINT8 AcpiProtocolLengths[] =
+static const UINT8 AcpiProtocolLengths[] =
{
ACPI_INVALID_PROTOCOL_ID, /* 0 - reserved */
ACPI_INVALID_PROTOCOL_ID, /* 1 - reserved */
diff -r 91109ceeff34 -r 44fc2d1a42f5 sys/external/bsd/acpica/dist/include/acpredef.h
--- a/sys/external/bsd/acpica/dist/include/acpredef.h Mon May 25 22:04:51 2020 +0000
+++ b/sys/external/bsd/acpica/dist/include/acpredef.h Mon May 25 23:16:29 2020 +0000
@@ -661,10 +661,10 @@
{{"_NIC", METHOD_0ARGS, /* ACPI 6.3 */
METHOD_RETURNS (ACPI_RTYPE_BUFFER)}},
- {{"_NIG", METHOD_1ARGS (ACPI_TYPE_BUFFER), /* ACPI 6.3 */
+ {{"_NIG", METHOD_0ARGS, /* ACPI 6.3 */
METHOD_RETURNS (ACPI_RTYPE_BUFFER)}},
- {{"_NIH", METHOD_0ARGS, /* ACPI 6.3 */
+ {{"_NIH", METHOD_1ARGS (ACPI_TYPE_BUFFER), /* ACPI 6.3 */
METHOD_RETURNS (ACPI_RTYPE_BUFFER)}},
{{"_NTT", METHOD_0ARGS,
diff -r 91109ceeff34 -r 44fc2d1a42f5 sys/external/bsd/acpica/dist/tools/acpiexec/aemain.c
--- a/sys/external/bsd/acpica/dist/tools/acpiexec/aemain.c Mon May 25 22:04:51 2020 +0000
+++ b/sys/external/bsd/acpica/dist/tools/acpiexec/aemain.c Mon May 25 23:16:29 2020 +0000
@@ -525,6 +525,7 @@
ACPI_CHECK_OK (AcpiInitializeSubsystem, Status);
if (ACPI_FAILURE (Status))
{
+ ExitCode = -1;
goto ErrorExit;
}
@@ -538,6 +539,7 @@
ACPI_CHECK_OK (AcpiInitializeDebugger, Status);
if (ACPI_FAILURE (Status))
{
+ ExitCode = -1;
goto ErrorExit;
}
@@ -599,6 +601,7 @@
Status = AeBuildLocalTables (ListHead);
if (ACPI_FAILURE (Status))
{
+ ExitCode = -1;
goto ErrorExit;
}
@@ -635,8 +638,9 @@
Status = AeLoadTables ();
if (ACPI_FAILURE (Status))
{
- ExitCode = -1;
- goto ErrorExit;
+ printf ("**** Could not load ACPI tables, %s\n",
+ AcpiFormatException (Status));
+ goto EnterDebugger;
}
/*
@@ -649,13 +653,6 @@
goto EnterDebugger;
}
- if (ACPI_FAILURE (Status))
- {
- printf ("**** Could not load ACPI tables, %s\n",
- AcpiFormatException (Status));
- goto EnterDebugger;
- }
-
/* Setup initialization flags for ACPICA */
InitFlags = (ACPI_NO_HANDLER_INIT | ACPI_NO_ACPI_ENABLE);
Home |
Main Index |
Thread Index |
Old Index