svn commit: r359343 - in vendor-sys/acpica/dist: . source/common source/compiler source/components/debugger source/components/dispatcher source/components/hardware source/components/namespace sourc...
Jung-uk Kim
jkim at FreeBSD.org
Thu Mar 26 21:21:32 UTC 2020
Author: jkim
Date: Thu Mar 26 21:13:14 2020
New Revision: 359343
URL: https://svnweb.freebsd.org/changeset/base/359343
Log:
Import ACPICA 20200326.
Modified:
vendor-sys/acpica/dist/changes.txt
vendor-sys/acpica/dist/source/common/ahtable.c
vendor-sys/acpica/dist/source/common/dmtable.c
vendor-sys/acpica/dist/source/common/dmtbdump2.c
vendor-sys/acpica/dist/source/common/dmtbinfo2.c
vendor-sys/acpica/dist/source/common/dmtbinfo3.c
vendor-sys/acpica/dist/source/compiler/aslcompile.c
vendor-sys/acpica/dist/source/compiler/aslcompiler.h
vendor-sys/acpica/dist/source/compiler/aslcompiler.l
vendor-sys/acpica/dist/source/compiler/asldefine.h
vendor-sys/acpica/dist/source/compiler/aslerror.c
vendor-sys/acpica/dist/source/compiler/aslglobal.h
vendor-sys/acpica/dist/source/compiler/aslload.c
vendor-sys/acpica/dist/source/compiler/asloptions.c
vendor-sys/acpica/dist/source/compiler/asltypes.h
vendor-sys/acpica/dist/source/compiler/dtcompiler.h
vendor-sys/acpica/dist/source/compiler/dtcompilerparser.l
vendor-sys/acpica/dist/source/compiler/dtcompilerparser.y
vendor-sys/acpica/dist/source/compiler/dtparser.l
vendor-sys/acpica/dist/source/compiler/dttable1.c
vendor-sys/acpica/dist/source/compiler/dtutils.c
vendor-sys/acpica/dist/source/compiler/prparser.l
vendor-sys/acpica/dist/source/components/debugger/dbinput.c
vendor-sys/acpica/dist/source/components/debugger/dbxface.c
vendor-sys/acpica/dist/source/components/dispatcher/dswexec.c
vendor-sys/acpica/dist/source/components/dispatcher/dswload.c
vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c
vendor-sys/acpica/dist/source/components/hardware/hwsleep.c
vendor-sys/acpica/dist/source/components/namespace/nsnames.c
vendor-sys/acpica/dist/source/components/utilities/utdecode.c
vendor-sys/acpica/dist/source/components/utilities/utdelete.c
vendor-sys/acpica/dist/source/components/utilities/utprint.c
vendor-sys/acpica/dist/source/include/acdisasm.h
vendor-sys/acpica/dist/source/include/acnamesp.h
vendor-sys/acpica/dist/source/include/acpixf.h
vendor-sys/acpica/dist/source/include/actbinfo.h
vendor-sys/acpica/dist/source/include/actbl2.h
vendor-sys/acpica/dist/source/include/actbl3.h
vendor-sys/acpica/dist/source/include/acuuid.h
vendor-sys/acpica/dist/source/os_specific/service_layers/oswintbl.c
vendor-sys/acpica/dist/source/tools/acpibin/abcompare.c
vendor-sys/acpica/dist/source/tools/acpiexec/aecommon.h
vendor-sys/acpica/dist/source/tools/acpiexec/aeinitfile.c
vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c
vendor-sys/acpica/dist/source/tools/acpisrc/astable.c
vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.h
Modified: vendor-sys/acpica/dist/changes.txt
==============================================================================
--- vendor-sys/acpica/dist/changes.txt Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/changes.txt Thu Mar 26 21:13:14 2020 (r359343)
@@ -1,4 +1,99 @@
----------------------------------------
+26 March 2020. Summary of changes for version 20200326:
+
+
+1) ACPICA kernel-resident subsystem:
+
+Performed a code clean-up to prevent build errors on early versions of
+GCC-10.
+
+Added the NHLT table signature. iASL data table compiler/disassembler
+support for this table is coming soon.
+
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+AcpiExec: Fixed several problems with the namespace initialization file
+(-fi<filename> option). Includes fixes to prevent AE_ALREADY_EXISTS
+errors, several seg faults, and enhancements to line parsing within the
+init file. In addition, each object found in the init file and it's new
+value is displayed, as well as any such entries that do not have a
+corresponding name in the namespace. For reference, the syntax for the
+various supported data types are presented below:
+ PCHG 0x777788889999BBBB // Integer
+ \DEV1.STR1 "XYZ" // String
+ BUF1 (88 99 AA) // Buffer
+ PKG1 [0x1111 0x2222] // Package
+ \BF1 0x7980 // BufferField
+ RCRV 0x0123456789ABCDEF // Field Unit
+
+iASL: Added a custom iASL macro __EXPECT__(iASL-Error-Code). This macro
+can be used anywhere in a given ASL file to configure iASL to expect an
+iASL compiler error code on the line where this macro was placed. If the
+error code does not exist, an error is generated. This is intended to be
+used for ACPICA's ASL test suite, but can be used by ASL developers as
+well.
+
+iASL: table compiler: Implemented IVRS IVHD type 11h parsing. The AMD
+IVRS table parsing supported only IVHD type 10h structures. Parsing an
+IVHD type 11h caused the iasl to report unknown subtable type. Add
+necessary structure definition for IVHD type 11h and apply correct
+parsing method based on subtable type. Micha? ?ygowski.
+
+iASL: table compiler: Fixed IVRS table IVHD type 10h reserved field name
+According to AMD IOMMU Specification Revision 3.05 the reserved field
+should be IOMMU Feature Reporting. Change the name of the field to the
+correct one. Micha? ?ygowski.
+
+acpiexec: removed redeclaration of AcpiGbl_DbOpt_NoRegionSupport. Patch
+based on suggestions by David Seifert and Benjamin Berg.
+
+iASL: table compiler: removed an unused variable (DtCompilerParserResult)
+causing linking errors. Patch based on suggestions by David Seifert and
+Benjamin Berg.
+
+iASL: table compiler: make LexBuffer static to avoid linking errors in
+newer compilers. Patch based on suggestions by David Seifert and Benjamin
+Berg.
+
+iASL: fixed type matching between External and Named objects. External
+object types can only be expressed with ACPI object type values that are
+defined in the ACPI spec. However, iASL uses ACPI object type values that
+are local to ACPICA in addition to the values defined in the ACPI spec.
+This change implements type matching to map some object type values
+specific to ACPICA to ones that are defined in the ACPI spec.
+
+iASL: Dropped the type mismatch compiler error that can arise from
+External declarations to a warning. This warning can occur when there is
+a type difference between the external declaration and the actual object
+declaration (when compiling multiple files/modules simultaneously).
+
+iASL: removed an incorrect error message regarding externals. This change
+removes an incorrect error that is emitted when a duplicate external
+declaration does not contain a type that opens a scope. This is incorrect
+because the duplicate external with conflicting types are already caught
+by iASL and it doesn't make any sense to enforce what this conflicting
+type should be.
+
+AcpiXtract: fix AX_IS_TABLE_BLOCK_HEADER macro. This macro needs to be
+surrounded by parens. Otherwise, a logical statement that applies a
+logical not operator to this macro could result in a computation that
+applies the operator to the left side of the logical and but not the
+right. Reported-by: John Levon <john.levon at joyent.com>
+
+Fixed a problem with the local version of sprint(): On 32-bit, the
+provided sprintf() is non-functional: with a size of ACPI_UINT32_MAX,
+String + Size will wrap, meaning End < Start, and
+AcpiUtBoundStringOutput() will never output anything as a result. The
+symptom seen of this was acpixtract failing to output anything -- with a
+custom build that included utprint.c. Signed-off-by: John Levon
+<john.levon at joyent.com>
+
+iASL: Changed the "PlatformCommChannel" ASL keyword to "PCC", as per the
+ACPI specification.
+
+
+----------------------------------------
14 February 2020. Summary of changes for version 20200214:
Modified: vendor-sys/acpica/dist/source/common/ahtable.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/ahtable.c Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/common/ahtable.c Thu Mar 26 21:13:14 2020 (r359343)
@@ -258,7 +258,7 @@ const AH_TABLE AcpiGbl_SupportedTables[] =
{ACPI_SIG_WDDT, "Watchdog Description Table"},
{ACPI_SIG_WDRT, "Watchdog Resource Table"},
{ACPI_SIG_WPBT, "Windows Platform Binary Table"},
- {ACPI_SIG_WSMT, "Windows SMM Security Migrations Table"},
+ {ACPI_SIG_WSMT, "Windows SMM Security Mitigations Table"},
{ACPI_SIG_XENV, "Xen Environment table"},
{ACPI_SIG_XSDT, "Extended System Description Table"},
{NULL, NULL}
Modified: vendor-sys/acpica/dist/source/common/dmtable.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/dmtable.c Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/common/dmtable.c Thu Mar 26 21:13:14 2020 (r359343)
@@ -1676,7 +1676,8 @@ AcpiDmDumpTable (
Temp8 = *Target;
switch (Temp8)
{
- case ACPI_IVRS_TYPE_HARDWARE:
+ case ACPI_IVRS_TYPE_HARDWARE1:
+ case ACPI_IVRS_TYPE_HARDWARE2:
Name = AcpiDmIvrsSubnames[0];
break;
Modified: vendor-sys/acpica/dist/source/common/dmtbdump2.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/dmtbdump2.c Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/common/dmtbdump2.c Thu Mar 26 21:13:14 2020 (r359343)
@@ -475,11 +475,16 @@ AcpiDmDumpIvrs (
switch (Subtable->Type)
{
- case ACPI_IVRS_TYPE_HARDWARE:
+ case ACPI_IVRS_TYPE_HARDWARE1:
InfoTable = AcpiDmTableInfoIvrs0;
break;
+ case ACPI_IVRS_TYPE_HARDWARE2:
+
+ InfoTable = AcpiDmTableInfoIvrs01;
+ break;
+
case ACPI_IVRS_TYPE_MEMORY1:
case ACPI_IVRS_TYPE_MEMORY2:
case ACPI_IVRS_TYPE_MEMORY3:
@@ -514,11 +519,21 @@ AcpiDmDumpIvrs (
/* The hardware subtable can contain multiple device entries */
- if (Subtable->Type == ACPI_IVRS_TYPE_HARDWARE)
+ if (Subtable->Type == ACPI_IVRS_TYPE_HARDWARE1 ||
+ Subtable->Type == ACPI_IVRS_TYPE_HARDWARE2)
{
- EntryOffset = Offset + sizeof (ACPI_IVRS_HARDWARE);
- DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, Subtable,
- sizeof (ACPI_IVRS_HARDWARE));
+ if (Subtable->Type == ACPI_IVRS_TYPE_HARDWARE1)
+ {
+ EntryOffset = Offset + sizeof (ACPI_IVRS_HARDWARE1);
+ DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, Subtable,
+ sizeof (ACPI_IVRS_HARDWARE1));
+ }
+ else if (Subtable->Type == ACPI_IVRS_TYPE_HARDWARE2)
+ {
+ EntryOffset = Offset + sizeof (ACPI_IVRS_HARDWARE2);
+ DeviceEntry = ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER, Subtable,
+ sizeof (ACPI_IVRS_HARDWARE2));
+ }
while (EntryOffset < (Offset + Subtable->Length))
{
Modified: vendor-sys/acpica/dist/source/common/dmtbinfo2.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/dmtbinfo2.c Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/common/dmtbinfo2.c Thu Mar 26 21:13:14 2020 (r359343)
@@ -403,7 +403,21 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs0[] =
{ACPI_DMT_UINT64, ACPI_IVRS0_OFFSET (BaseAddress), "Base Address", 0},
{ACPI_DMT_UINT16, ACPI_IVRS0_OFFSET (PciSegmentGroup), "PCI Segment Group", 0},
{ACPI_DMT_UINT16, ACPI_IVRS0_OFFSET (Info), "Virtualization Info", 0},
- {ACPI_DMT_UINT32, ACPI_IVRS0_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_IVRS0_OFFSET (FeatureReporting), "Feature Reporting", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 0x10: I/O Virtualization Hardware Definition (IVHD) Block */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs01[] =
+{
+ {ACPI_DMT_UINT16, ACPI_IVRS01_OFFSET (CapabilityOffset), "Capability Offset", 0},
+ {ACPI_DMT_UINT64, ACPI_IVRS01_OFFSET (BaseAddress), "Base Address", 0},
+ {ACPI_DMT_UINT16, ACPI_IVRS01_OFFSET (PciSegmentGroup), "PCI Segment Group", 0},
+ {ACPI_DMT_UINT16, ACPI_IVRS01_OFFSET (Info), "Virtualization Info", 0},
+ {ACPI_DMT_UINT32, ACPI_IVRS01_OFFSET (Attributes), "Attributes", 0},
+ {ACPI_DMT_UINT64, ACPI_IVRS01_OFFSET (EfrRegisterImage), "EFR Image", 0},
+ {ACPI_DMT_UINT64, ACPI_IVRS01_OFFSET (Reserved), "Reserved", 0},
ACPI_DMT_TERMINATOR
};
Modified: vendor-sys/acpica/dist/source/common/dmtbinfo3.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/dmtbinfo3.c Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/common/dmtbinfo3.c Thu Mar 26 21:13:14 2020 (r359343)
@@ -691,7 +691,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoWpbt0[] =
/*******************************************************************************
*
- * WSMT - Windows SMM Security Migrations Table
+ * WSMT - Windows SMM Security Mitigations Table
*
******************************************************************************/
Modified: vendor-sys/acpica/dist/source/compiler/aslcompile.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslcompile.c Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/compiler/aslcompile.c Thu Mar 26 21:13:14 2020 (r359343)
@@ -283,6 +283,7 @@ CmDoCompile (
LsDumpParseTree ();
+ UtEndEvent (Event);
UtEndEvent (FullCompile);
return (AE_OK);
Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Thu Mar 26 21:13:14 2020 (r359343)
@@ -488,7 +488,7 @@ AslCheckExpectedExceptions (
void);
ACPI_STATUS
-AslExpectException (
+AslLogExpectedException (
char *MessageIdString);
ACPI_STATUS
@@ -501,8 +501,14 @@ AslDisableException (
BOOLEAN
AslIsExceptionIgnored (
+ char *Filename,
+ UINT32 LineNumber,
UINT8 Level,
UINT16 MessageId);
+
+void
+AslLogExpectedExceptionByLine (
+ char *MessageIdString);
void
AslCoreSubsystemError (
Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.l
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslcompiler.l Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/compiler/aslcompiler.l Thu Mar 26 21:13:14 2020 (r359343)
@@ -156,7 +156,6 @@
#include <stdlib.h>
#include <string.h>
-YYSTYPE AslCompilerlval;
/*
* Generation: Use the following command line:
@@ -195,6 +194,7 @@ count (int type);
LeadNameChar [A-Za-z_]
DigitChar [0-9]
+ErrorCode [(][ ]*[1-9][0-9][0-9][0-9][ ]*[)]
OctalChar [0-7]
HexDigitChar [A-Fa-f0-9]
RootChar [\\]
@@ -692,7 +692,7 @@ NamePathTail [.]{NameSeg}
"IPMI" { count (0); return (PARSEOP_REGIONSPACE_IPMI); }
"GeneralPurposeIo" { count (0); return (PARSEOP_REGIONSPACE_GPIO); } /* ACPI 5.0 */
"GenericSerialBus" { count (0); return (PARSEOP_REGIONSPACE_GSBUS); } /* ACPI 5.0 */
-"PlatformCommChannel" { count (0); return (PARSEOP_REGIONSPACE_PCC); } /* ACPI 5.0 */
+"PCC" { count (0); return (PARSEOP_REGIONSPACE_PCC); } /* ACPI 5.0 */
"FFixedHW" { count (0); return (PARSEOP_REGIONSPACE_FFIXEDHW); }
/* ResourceTypeKeyword: Resource Usage - Resource Descriptors */
@@ -810,6 +810,22 @@ NamePathTail [.]{NameSeg}
"__LINE__" { count (0); return (PARSEOP___LINE__); }
"__PATH__" { count (0); return (PARSEOP___PATH__); }
"__METHOD__" { count (0); return (PARSEOP___METHOD__); }
+"__EXPECT__"{ErrorCode} { char *s;
+ int index = 0;
+ count (0);
+ while (!isdigit (AslCompilertext[index]))
+ {
+ index++;
+ }
+
+ /*
+ * The eror code is contained inside the
+ * {ErrorCode} pattern. Extract it and log it
+ * as the expected error code.
+ */
+ s = UtLocalCacheCalloc (ASL_ERROR_CODE_LENGTH + 1);
+ memcpy (s, AslCompilertext + index, ASL_ERROR_CODE_LENGTH);
+ AslLogExpectedExceptionByLine (s); }
{NameSeg} { char *s;
count (0);
Modified: vendor-sys/acpica/dist/source/compiler/asldefine.h
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/asldefine.h Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/compiler/asldefine.h Thu Mar 26 21:13:14 2020 (r359343)
@@ -227,6 +227,7 @@
#define ASL_NO_ABORT FALSE
#define ASL_EOF ACPI_UINT32_MAX
#define ASL_IGNORE_LINE (ACPI_UINT32_MAX -1)
+#define ASL_ERROR_CODE_LENGTH 4
/* Listings */
Modified: vendor-sys/acpica/dist/source/compiler/aslerror.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslerror.c Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/compiler/aslerror.c Thu Mar 26 21:13:14 2020 (r359343)
@@ -162,6 +162,8 @@ AeAddToErrorLog (
static BOOLEAN
AslIsExceptionExpected (
+ char *Filename,
+ UINT32 LineNumber,
UINT8 Level,
UINT16 MessageId);
@@ -170,7 +172,8 @@ AslIsExceptionDisabled (
UINT8 Level,
UINT16 MessageId);
-static void AslInitEnode (
+static void
+AslInitEnode (
ASL_ERROR_MSG **Enode,
UINT8 Level,
UINT16 MessageId,
@@ -956,7 +959,7 @@ AslCommonError (
{
/* Check if user wants to ignore this exception */
- if (AslIsExceptionIgnored (Level, MessageId))
+ if (AslIsExceptionIgnored (Filename, LogicalLineNumber, Level, MessageId))
{
return;
}
@@ -1087,6 +1090,8 @@ GetModifiedLevel (
BOOLEAN
AslIsExceptionIgnored (
+ char *Filename,
+ UINT32 LineNumber,
UINT8 Level,
UINT16 MessageId)
{
@@ -1096,7 +1101,8 @@ AslIsExceptionIgnored (
/* Note: this allows exception to be disabled and expected */
ExceptionIgnored = AslIsExceptionDisabled (Level, MessageId);
- ExceptionIgnored |= AslIsExceptionExpected (Level, MessageId);
+ ExceptionIgnored |=
+ AslIsExceptionExpected (Filename, LineNumber, Level, MessageId);
return (AslGbl_AllExceptionsDisabled || ExceptionIgnored);
}
@@ -1104,7 +1110,7 @@ AslIsExceptionIgnored (
/*******************************************************************************
*
- * FUNCTION: AslCheckExpectException
+ * FUNCTION: AslCheckExpectedException
*
* PARAMETERS: none
*
@@ -1120,6 +1126,8 @@ AslCheckExpectedExceptions (
void)
{
UINT8 i;
+ ASL_EXPECTED_MSG_NODE *Current = AslGbl_ExpectedErrorCodeList;
+ ASL_LOCATION_NODE *LocationNode;
for (i = 0; i < AslGbl_ExpectedMessagesIndex; ++i)
@@ -1130,12 +1138,32 @@ AslCheckExpectedExceptions (
AslGbl_ExpectedMessages[i].MessageIdStr);
}
}
+
+ while (Current)
+ {
+ LocationNode = Current->LocationList;
+
+ while (LocationNode)
+ {
+ if (!LocationNode->MessageReceived)
+ {
+ AslCommonError (ASL_ERROR, ASL_MSG_EXCEPTION_NOT_RECEIVED,
+ LocationNode->LineNumber, LocationNode->LineNumber,
+ LocationNode->LogicalByteOffset, LocationNode->Column,
+ LocationNode->Filename, Current->MessageIdStr);
+ }
+
+ LocationNode = LocationNode->Next;
+ }
+
+ Current = Current->Next;
+ }
}
/*******************************************************************************
*
- * FUNCTION: AslExpectException
+ * FUNCTION: AslLogExpectedException
*
* PARAMETERS: MessageIdString - ID of excepted exception during compile
*
@@ -1148,7 +1176,7 @@ AslCheckExpectedExceptions (
******************************************************************************/
ACPI_STATUS
-AslExpectException (
+AslLogExpectedException (
char *MessageIdString)
{
UINT32 MessageId;
@@ -1184,6 +1212,61 @@ AslExpectException (
/*******************************************************************************
*
+ * FUNCTION: AslLogExpectedExceptionByLine
+ *
+ * PARAMETERS: MessageIdString - ID of excepted exception during compile
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Enter a message ID into the global expected messages table
+ * based on file and line number. If these messages are not raised
+ * during the compilation, throw an error.
+ *
+ ******************************************************************************/
+
+void
+AslLogExpectedExceptionByLine (
+ char *MessageIdString)
+{
+ ASL_LOCATION_NODE *NewErrorLocationNode;
+ ASL_EXPECTED_MSG_NODE *Current = AslGbl_ExpectedErrorCodeList;
+ UINT32 MessageId;
+
+
+ NewErrorLocationNode = UtLocalCalloc (sizeof (ASL_LOCATION_NODE));
+
+ NewErrorLocationNode->LineNumber = AslGbl_CurrentLineNumber;
+ NewErrorLocationNode->Filename = AslGbl_Files[ASL_FILE_INPUT].Filename;
+ NewErrorLocationNode->LogicalByteOffset = AslGbl_CurrentLineOffset;
+ NewErrorLocationNode->Column = AslGbl_CurrentColumn;
+
+ MessageId = (UINT32) strtoul (MessageIdString, NULL, 0);
+
+ /* search the existing list for a matching message ID */
+
+ while (Current && Current->MessageId != MessageId )
+ {
+ Current = Current->Next;
+ }
+ if (!Current)
+ {
+ /* ID was not found, create a new node for this message ID */
+
+ Current = UtLocalCalloc (sizeof (ASL_EXPECTED_MSG_NODE));
+
+ Current->Next = AslGbl_ExpectedErrorCodeList;
+ Current->MessageIdStr = MessageIdString;
+ Current->MessageId = MessageId;
+ AslGbl_ExpectedErrorCodeList = Current;
+ }
+
+ NewErrorLocationNode->Next = Current->LocationList;
+ Current->LocationList = NewErrorLocationNode;
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AslDisableException
*
* PARAMETERS: MessageIdString - ID to be disabled
@@ -1272,6 +1355,7 @@ AslElevateException (
return (AE_OK);
}
+
/*******************************************************************************
*
* FUNCTION: AslIsExceptionDisabled
@@ -1288,9 +1372,13 @@ AslElevateException (
static BOOLEAN
AslIsExceptionExpected (
+ char *Filename,
+ UINT32 LineNumber,
UINT8 Level,
UINT16 MessageId)
{
+ ASL_EXPECTED_MSG_NODE *Current = AslGbl_ExpectedErrorCodeList;
+ ASL_LOCATION_NODE *CurrentErrorLocation;
UINT32 EncodedMessageId;
UINT32 i;
@@ -1308,6 +1396,28 @@ AslIsExceptionExpected (
}
}
+ while (Current && Current->MessageId != EncodedMessageId)
+ {
+ Current = Current->Next;
+ }
+ if (!Current)
+ {
+ return (FALSE);
+ }
+
+ CurrentErrorLocation = Current->LocationList;
+
+ while (CurrentErrorLocation)
+ {
+ if (!strcmp (CurrentErrorLocation->Filename, Filename) &&
+ CurrentErrorLocation->LineNumber == LineNumber)
+ {
+ return (CurrentErrorLocation->MessageReceived = TRUE);
+ }
+
+ CurrentErrorLocation = CurrentErrorLocation->Next;
+ }
+
return (FALSE);
}
@@ -1410,7 +1520,8 @@ AslDualParseOpError (
/* Check if user wants to ignore this exception */
- if (AslIsExceptionIgnored (Level, MainMsgId) || !MainOp)
+ if (!MainOp || AslIsExceptionIgnored (MainOp->Asl.Filename,
+ MainOp->Asl.LogicalLineNumber, Level, MainMsgId))
{
return;
}
Modified: vendor-sys/acpica/dist/source/compiler/aslglobal.h
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslglobal.h Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/compiler/aslglobal.h Thu Mar 26 21:13:14 2020 (r359343)
@@ -420,6 +420,7 @@ ASL_EXTERN char ASL_INIT_GLOBAL (*
ASL_EXTERN char ASL_INIT_GLOBAL (*AslGbl_TableId, "NO_ID");
ASL_EXTERN ASL_FILE_INFO ASL_INIT_GLOBAL (*AslGbl_Files, NULL);
ASL_EXTERN ASL_GLOBAL_FILE_NODE ASL_INIT_GLOBAL (*AslGbl_FilesList, NULL);
+ASL_EXTERN ASL_EXPECTED_MSG_NODE ASL_INIT_GLOBAL (*AslGbl_ExpectedErrorCodeList, NULL);
/* Specific to the -q option */
Modified: vendor-sys/acpica/dist/source/compiler/aslload.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslload.c Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/compiler/aslload.c Thu Mar 26 21:13:14 2020 (r359343)
@@ -1022,6 +1022,74 @@ FinishNode:
*
* FUNCTION: LdAnalyzeExternals
*
+ * PARAMETERS: Type1
+ * Type2
+ *
+ * RETURN: BOOLEAN
+ *
+ * DESCRIPTION: Match Type1 and Type2 with the assumption that one might be
+ * using external types and another might be using local types.
+ * This should be used to compare the types found in external
+ * declarations with types found in other external declarations or
+ * named object declaration. This should not be used to match two
+ * object type declarations.
+ *
+ ******************************************************************************/
+
+static BOOLEAN
+LdTypesMatchExternType (
+ ACPI_OBJECT_TYPE Type1,
+ ACPI_OBJECT_TYPE Type2)
+{
+ BOOLEAN Type1IsLocal = Type1 > ACPI_TYPE_EXTERNAL_MAX;
+ BOOLEAN Type2IsLocal = Type2 > ACPI_TYPE_EXTERNAL_MAX;
+ ACPI_OBJECT_TYPE ExternalType;
+ ACPI_OBJECT_TYPE LocalType;
+
+
+ /*
+ * The inputs could represent types that are local to ACPICA or types that
+ * are known externally. Some local types, such as the OperationRegion
+ * field units, are defined with more granularity than ACPICA local types.
+ *
+ * Therefore, map the local types to the external types before matching.
+ */
+ if (Type1IsLocal && !Type2IsLocal)
+ {
+ LocalType = Type1;
+ ExternalType = Type2;
+ }
+ else if (!Type1IsLocal && Type2IsLocal)
+ {
+ LocalType = Type2;
+ ExternalType = Type1;
+ }
+ else
+ {
+ return (Type1 == Type2);
+ }
+
+ switch (LocalType)
+ {
+ case ACPI_TYPE_LOCAL_REGION_FIELD:
+ case ACPI_TYPE_LOCAL_BANK_FIELD:
+ case ACPI_TYPE_LOCAL_INDEX_FIELD:
+
+ LocalType = ACPI_TYPE_FIELD_UNIT;
+ break;
+
+ default:
+ break;
+ }
+
+ return (LocalType == ExternalType);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: LdAnalyzeExternals
+ *
* PARAMETERS: Node - Node that represents the named object
* Op - Named object declaring this named object
* ExternalOpType - Type of ExternalOp
@@ -1072,12 +1140,12 @@ LdAnalyzeExternals (
if ((ActualOpType != ACPI_TYPE_ANY) &&
(ActualExternalOpType != ACPI_TYPE_ANY) &&
- (ActualExternalOpType != ActualOpType))
+ !LdTypesMatchExternType (ActualExternalOpType, ActualOpType))
{
if (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL &&
Node->Op->Asl.ParseOpcode == PARSEOP_EXTERNAL)
{
- AslDualParseOpError (ASL_ERROR,
+ AslDualParseOpError (ASL_WARNING,
ASL_MSG_DUPLICATE_EXTERN_MISMATCH, Op, NULL,
ASL_MSG_DUPLICATE_EXTERN_FOUND_HERE, Node->Op, NULL);
}
@@ -1094,7 +1162,7 @@ LdAnalyzeExternals (
ExternalOp = Node->Op;
ActualOp = Op;
}
- AslDualParseOpError (ASL_ERROR,
+ AslDualParseOpError (ASL_WARNING,
ASL_MSG_DECLARATION_TYPE_MISMATCH, ExternalOp, NULL,
ASL_MSG_TYPE_MISMATCH_FOUND_HERE, ActualOp, NULL);
}
@@ -1139,18 +1207,8 @@ LdAnalyzeExternals (
{
/* Allow update of externals of unknown type. */
- if (AcpiNsOpensScope (ExternalOpType))
- {
- Node->Type = (UINT8) ExternalOpType;
- Status = AE_OK;
- }
- else
- {
- sprintf (AslGbl_MsgBuffer, "%s [%s]", Op->Asl.ExternalName,
- AcpiUtGetTypeName (Node->Type));
- AslError (ASL_ERROR, ASL_MSG_SCOPE_TYPE, Op, AslGbl_MsgBuffer);
- Status = AE_ERROR;
- }
+ Node->Type = (UINT8) ExternalOpType;
+ Status = AE_OK;
}
return (Status);
Modified: vendor-sys/acpica/dist/source/compiler/asloptions.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/asloptions.c Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/compiler/asloptions.c Thu Mar 26 21:13:14 2020 (r359343)
@@ -948,7 +948,7 @@ AslDoOptions (
return (-1);
}
- Status = AslExpectException (AcpiGbl_Optarg);
+ Status = AslLogExpectedException (AcpiGbl_Optarg);
if (ACPI_FAILURE (Status))
{
return (-1);
Modified: vendor-sys/acpica/dist/source/compiler/asltypes.h
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/asltypes.h Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/compiler/asltypes.h Thu Mar 26 21:13:14 2020 (r359343)
@@ -381,11 +381,36 @@ typedef struct asl_error_msg
typedef struct asl_expected_message
{
- UINT32 MessageId;
- char *MessageIdStr;
- BOOLEAN MessageReceived;
+ UINT32 MessageId;
+ char *MessageIdStr;
+ BOOLEAN MessageReceived;
} ASL_EXPECTED_MESSAGE;
+
+/*
+ * An entry in the line-based expected messages list
+ *
+ * TBD: might be possible to merge this with ASL_EXPECTED_MESSAGE
+ */
+typedef struct asl_expected_msg_node
+{
+ struct asl_expected_msg_node *Next;
+ UINT32 MessageId;
+ char *MessageIdStr;
+ struct asl_location_node *LocationList;
+
+} ASL_EXPECTED_MSG_NODE;
+
+typedef struct asl_location_node
+{
+ struct asl_location_node *Next;
+ char *Filename;
+ UINT32 LineNumber;
+ UINT32 Column;
+ UINT32 LogicalByteOffset;
+ BOOLEAN MessageReceived;
+
+} ASL_LOCATION_NODE;
/* An entry in the listing file stack (for include files) */
Modified: vendor-sys/acpica/dist/source/compiler/dtcompiler.h
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/dtcompiler.h Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/compiler/dtcompiler.h Thu Mar 26 21:13:14 2020 (r359343)
@@ -461,7 +461,6 @@ DtCreateTableUnit (
/* dtparser - lex/yacc files */
-UINT64 DtCompilerParserResult; /* Expression return value */
int
DtCompilerParserparse (
void);
Modified: vendor-sys/acpica/dist/source/compiler/dtcompilerparser.l
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/dtcompilerparser.l Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/compiler/dtcompilerparser.l Thu Mar 26 21:13:14 2020 (r359343)
@@ -153,7 +153,6 @@
#include "aslcompiler.h"
#include "dtcompilerparser.y.h"
-YYSTYPE DtCompilerlval;
#define _COMPONENT ACPI_COMPILER
ACPI_MODULE_NAME ("dtcompilerscanner")
Modified: vendor-sys/acpica/dist/source/compiler/dtcompilerparser.y
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/dtcompilerparser.y Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/compiler/dtcompilerparser.y Thu Mar 26 21:13:14 2020 (r359343)
@@ -170,7 +170,6 @@ extern char *DtCompilerParsertext;
extern DT_FIELD *AslGbl_CurrentField;
extern int DtLabelByteOffset;
-extern UINT64 DtCompilerParserResult; /* Expression return value */
extern UINT64 DtCompilerParserlineno; /* Current line number */
extern UINT32 DtTokenFirstLine;
Modified: vendor-sys/acpica/dist/source/compiler/dtparser.l
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/dtparser.l Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/compiler/dtparser.l Thu Mar 26 21:13:14 2020 (r359343)
@@ -208,7 +208,7 @@ NewLine [\n]
/*
* Local support functions
*/
-YY_BUFFER_STATE LexBuffer;
+static YY_BUFFER_STATE LexBuffer;
/******************************************************************************
*
Modified: vendor-sys/acpica/dist/source/compiler/dttable1.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/dttable1.c Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/compiler/dttable1.c Thu Mar 26 21:13:14 2020 (r359343)
@@ -1967,11 +1967,16 @@ DtCompileIvrs (
switch (IvrsHeader->Type)
{
- case ACPI_IVRS_TYPE_HARDWARE:
+ case ACPI_IVRS_TYPE_HARDWARE1:
InfoTable = AcpiDmTableInfoIvrs0;
break;
+ case ACPI_IVRS_TYPE_HARDWARE2:
+
+ InfoTable = AcpiDmTableInfoIvrs01;
+ break;
+
case ACPI_IVRS_TYPE_MEMORY1:
case ACPI_IVRS_TYPE_MEMORY2:
case ACPI_IVRS_TYPE_MEMORY3:
@@ -1994,7 +1999,8 @@ DtCompileIvrs (
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
- if (IvrsHeader->Type == ACPI_IVRS_TYPE_HARDWARE)
+ if (IvrsHeader->Type == ACPI_IVRS_TYPE_HARDWARE1 ||
+ IvrsHeader->Type == ACPI_IVRS_TYPE_HARDWARE2)
{
while (*PFieldList &&
!strcmp ((*PFieldList)->Name, "Entry Type"))
Modified: vendor-sys/acpica/dist/source/compiler/dtutils.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/dtutils.c Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/compiler/dtutils.c Thu Mar 26 21:13:14 2020 (r359343)
@@ -189,7 +189,8 @@ DtError (
/* Check if user wants to ignore this exception */
- if (AslIsExceptionIgnored (Level, MessageId))
+ if (AslIsExceptionIgnored (AslGbl_Files[ASL_FILE_INPUT].Filename,
+ FieldObject->Line, Level, MessageId))
{
return;
}
Modified: vendor-sys/acpica/dist/source/compiler/prparser.l
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/prparser.l Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/compiler/prparser.l Thu Mar 26 21:13:14 2020 (r359343)
@@ -224,7 +224,7 @@ Identifier [a-zA-Z][0-9a-zA-Z]*
/*
* Local support functions
*/
-YY_BUFFER_STATE LexBuffer;
+static YY_BUFFER_STATE LexBuffer;
/******************************************************************************
Modified: vendor-sys/acpica/dist/source/components/debugger/dbinput.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/debugger/dbinput.c Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/components/debugger/dbinput.c Thu Mar 26 21:13:14 2020 (r359343)
@@ -637,19 +637,16 @@ AcpiDbGetNextToken (
return (NULL);
}
- /* Remove any spaces at the beginning */
+ /* Remove any spaces at the beginning, ignore blank lines */
- if (*String == ' ')
+ while (*String && isspace (*String))
{
- while (*String && (*String == ' '))
- {
- String++;
- }
+ String++;
+ }
- if (!(*String))
- {
- return (NULL);
- }
+ if (!(*String))
+ {
+ return (NULL);
}
switch (*String)
@@ -754,7 +751,7 @@ AcpiDbGetNextToken (
/* Find end of token */
- while (*String && (*String != ' '))
+ while (*String && !isspace (*String))
{
String++;
}
Modified: vendor-sys/acpica/dist/source/components/debugger/dbxface.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/debugger/dbxface.c Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/components/debugger/dbxface.c Thu Mar 26 21:13:14 2020 (r359343)
@@ -594,6 +594,7 @@ AcpiInitializeDebugger (
AcpiGbl_DbOutputFlags = ACPI_DB_CONSOLE_OUTPUT;
AcpiGbl_DbOpt_NoIniMethods = FALSE;
+ AcpiGbl_DbOpt_NoRegionSupport = FALSE;
AcpiGbl_DbBuffer = AcpiOsAllocate (ACPI_DEBUG_BUFFER_SIZE);
if (!AcpiGbl_DbBuffer)
Modified: vendor-sys/acpica/dist/source/components/dispatcher/dswexec.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/dispatcher/dswexec.c Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/components/dispatcher/dswexec.c Thu Mar 26 21:13:14 2020 (r359343)
@@ -158,8 +158,10 @@
#include "acinterp.h"
#include "acnamesp.h"
#include "acdebug.h"
+#ifdef ACPI_EXEC_APP
+#include "aecommon.h"
+#endif
-
#define _COMPONENT ACPI_DISPATCHER
ACPI_MODULE_NAME ("dswexec")
@@ -504,8 +506,11 @@ AcpiDsExecEndOp (
UINT32 OpClass;
ACPI_PARSE_OBJECT *NextOp;
ACPI_PARSE_OBJECT *FirstArg;
+#ifdef ACPI_EXEC_APP
+ char *Namepath;
+ ACPI_OPERAND_OBJECT *ObjDesc;
+#endif
-
ACPI_FUNCTION_TRACE_PTR (DsExecEndOp, WalkState);
@@ -717,6 +722,29 @@ AcpiDsExecEndOp (
}
Status = AcpiDsEvalBufferFieldOperands (WalkState, Op);
+ if (ACPI_FAILURE (Status))
+ {
+ break;
+ }
+
+#ifdef ACPI_EXEC_APP
+ /*
+ * AcpiExec support for namespace initialization file (initialize
+ * BufferFields in this code.)
+ */
+ Namepath = AcpiNsGetExternalPathname (Op->Common.Node);
+ Status = AeLookupInitFileEntry (Namepath, &ObjDesc);
+ if (ACPI_SUCCESS (Status))
+ {
+ Status = AcpiExWriteDataToField (ObjDesc, Op->Common.Node->Object, NULL);
+ if ACPI_FAILURE (Status)
+ {
+ ACPI_EXCEPTION ((AE_INFO, Status, "While writing to buffer field"));
+ }
+ }
+ ACPI_FREE (Namepath);
+ Status = AE_OK;
+#endif
break;
Modified: vendor-sys/acpica/dist/source/components/dispatcher/dswload.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/dispatcher/dswload.c Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/components/dispatcher/dswload.c Thu Mar 26 21:13:14 2020 (r359343)
@@ -156,7 +156,6 @@
#include "acdispat.h"
#include "acinterp.h"
#include "acnamesp.h"
-
#ifdef ACPI_ASL_COMPILER
#include "acdisasm.h"
#endif
@@ -555,7 +554,6 @@ AcpiDsLoad1EndOp (
ACPI_PARSE_OBJECT *Op;
ACPI_OBJECT_TYPE ObjectType;
ACPI_STATUS Status = AE_OK;
-
#ifdef ACPI_ASL_COMPILER
UINT8 ParamCount;
#endif
Modified: vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c Thu Mar 26 18:50:54 2020 (r359342)
+++ vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c Thu Mar 26 21:13:14 2020 (r359343)
@@ -157,6 +157,9 @@
#include "acinterp.h"
#include "acnamesp.h"
#include "acevents.h"
+#ifdef ACPI_EXEC_APP
+#include "aecommon.h"
+#endif
#define _COMPONENT ACPI_DISPATCHER
ACPI_MODULE_NAME ("dswload2")
@@ -531,6 +534,10 @@ AcpiDsLoad2EndOp (
ACPI_NAMESPACE_NODE *NewNode;
UINT32 i;
UINT8 RegionSpace;
+#ifdef ACPI_EXEC_APP
+ ACPI_OPERAND_OBJECT *ObjDesc;
+ char *Namepath;
+#endif
ACPI_FUNCTION_TRACE (DsLoad2EndOp);
@@ -627,6 +634,11 @@ AcpiDsLoad2EndOp (
* be evaluated later during the execution phase
*/
Status = AcpiDsCreateBufferField (Op, WalkState);
+ if ACPI_FAILURE (Status)
+ {
+ ACPI_EXCEPTION ((AE_INFO, Status, "CreateBufferField failure"));
+ goto Cleanup;
+ }
break;
case AML_TYPE_NAMED_FIELD:
@@ -766,6 +778,31 @@ AcpiDsLoad2EndOp (
case AML_NAME_OP:
Status = AcpiDsCreateNode (WalkState, Node, Op);
+ if (ACPI_FAILURE (Status))
+ {
+ goto Cleanup;
+ }
+
+#ifdef ACPI_EXEC_APP
+ /*
+ * AcpiExec support for namespace initialization file (initialize
+ * Name opcodes in this code.)
+ */
+ Namepath = AcpiNsGetExternalPathname (Node);
+ Status = AeLookupInitFileEntry (Namepath, &ObjDesc);
+ if (ACPI_SUCCESS (Status))
+ {
+ /* Detach any existing object, attach new object */
+
+ if (Node->Object)
+ {
+ AcpiNsDetachObject (Node);
+ }
+ AcpiNsAttachObject (Node, ObjDesc, ObjDesc->Common.Type);
+ }
+ ACPI_FREE (Namepath);
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-vendor
mailing list