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 merge conflicts
details: https://anonhg.NetBSD.org/src/rev/0f292e270687
branches: trunk
changeset: 957405:0f292e270687
user: christos <christos%NetBSD.org@localhost>
date: Fri Nov 27 16:58:32 2020 +0000
description:
merge conflicts
diffstat:
sys/external/bsd/acpica/dist/compiler/aslcompiler.l | 6 +-
sys/external/bsd/acpica/dist/compiler/aslload.c | 9 +-
sys/external/bsd/acpica/dist/compiler/aslopcodes.c | 6 +
sys/external/bsd/acpica/dist/compiler/aslprepkg.c | 17 +-
sys/external/bsd/acpica/dist/compiler/aslutils.c | 8 +-
sys/external/bsd/acpica/dist/compiler/aslxref.c | 11 +-
sys/external/bsd/acpica/dist/debugger/dbexec.c | 42 +-
sys/external/bsd/acpica/dist/debugger/dbinput.c | 12 +-
sys/external/bsd/acpica/dist/debugger/dbmethod.c | 183 ++++++++-
sys/external/bsd/acpica/dist/disassembler/dmbuffer.c | 4 +
sys/external/bsd/acpica/dist/disassembler/dmcstyle.c | 2 +-
sys/external/bsd/acpica/dist/events/evregion.c | 59 +-
sys/external/bsd/acpica/dist/events/evrgnini.c | 11 +-
sys/external/bsd/acpica/dist/include/acdebug.h | 6 +
sys/external/bsd/acpica/dist/include/acexcep.h | 4 +-
sys/external/bsd/acpica/dist/include/acpixf.h | 2 +-
sys/external/bsd/acpica/dist/include/actbl1.h | 16 +-
sys/external/bsd/acpica/dist/include/actypes.h | 16 +-
sys/external/bsd/acpica/dist/namespace/nsrepair2.c | 39 +-
sys/external/bsd/acpica/dist/os_specific/service_layers/oslinuxtbl.c | 2 +-
20 files changed, 331 insertions(+), 124 deletions(-)
diffs (truncated from 1029 to 300 lines):
diff -r 8f1f846c88a7 -r 0f292e270687 sys/external/bsd/acpica/dist/compiler/aslcompiler.l
--- a/sys/external/bsd/acpica/dist/compiler/aslcompiler.l Fri Nov 27 16:56:51 2020 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslcompiler.l Fri Nov 27 16:58:32 2020 +0000
@@ -171,8 +171,8 @@
/*
* Begin standard ASL grammar
*/
-[0-9][a-zA-Z0-9]* { AslCompilerlval.i = UtDoConstant ((char *) AslCompilertext);
- count (1); return (PARSEOP_INTEGER); }
+[0-9][a-zA-Z0-9]* { count (1); AslCompilerlval.i = UtDoConstant ((char *) AslCompilertext);
+ return (PARSEOP_INTEGER); }
"Include" { count (1); return (PARSEOP_INCLUDE); }
"External" { count (1); return (PARSEOP_EXTERNAL); }
@@ -733,7 +733,6 @@
* the required length.
*/
strcpy (s, "____");
- AcpiUtStrupr (AslCompilertext);
}
memcpy (s, AslCompilertext, strlen (AslCompilertext));
AslCompilerlval.s = s;
@@ -743,7 +742,6 @@
{NameString} { char *s;
count (0);
s=UtLocalCacheCalloc (strlen (AslCompilertext)+1);
- AcpiUtStrupr (AslCompilertext);
strcpy (s, AslCompilertext);
AslCompilerlval.s = s;
DbgPrint (ASL_PARSE_OUTPUT, "NameString: %s\n", s);
diff -r 8f1f846c88a7 -r 0f292e270687 sys/external/bsd/acpica/dist/compiler/aslload.c
--- a/sys/external/bsd/acpica/dist/compiler/aslload.c Fri Nov 27 16:56:51 2020 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslload.c Fri Nov 27 16:58:32 2020 +0000
@@ -1296,9 +1296,16 @@
return (AE_OK);
}
- /* Save the target node within the alias node */
+ /* Save the target node within the alias node as well as type information */
Node->Object = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, TargetNode);
+ Node->Type = TargetNode->Type;
+ if (Node->Type == ACPI_TYPE_METHOD)
+ {
+ /* Save the parameter count for methods */
+
+ Node->Value = TargetNode->Value;
+ }
}
return (AE_OK);
diff -r 8f1f846c88a7 -r 0f292e270687 sys/external/bsd/acpica/dist/compiler/aslopcodes.c
--- a/sys/external/bsd/acpica/dist/compiler/aslopcodes.c Fri Nov 27 16:56:51 2020 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslopcodes.c Fri Nov 27 16:58:32 2020 +0000
@@ -690,7 +690,13 @@
}
else
{
+ /* Convert UUID string to a buffer, check for a known UUID */
+
AcpiUtConvertStringToUuid (InString, Buffer);
+ if (!AcpiAhMatchUuid (Buffer))
+ {
+ AslError (ASL_REMARK, ASL_MSG_UUID_NOT_FOUND, Op, NULL);
+ }
}
/* Change Op to a Buffer */
diff -r 8f1f846c88a7 -r 0f292e270687 sys/external/bsd/acpica/dist/compiler/aslprepkg.c
--- a/sys/external/bsd/acpica/dist/compiler/aslprepkg.c Fri Nov 27 16:56:51 2020 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslprepkg.c Fri Nov 27 16:58:32 2020 +0000
@@ -210,6 +210,17 @@
*/
for (i = 0; i < Count; i++)
{
+ if (!Op)
+ {
+ /*
+ * If we get to this point, it means that the package length
+ * is larger than the initializer list. Stop processing the
+ * package and return because we have run out of package
+ * elements to analyze.
+ */
+ return;
+ }
+
ApCheckObjectType (Predefined->Info.Name, Op,
Package->RetInfo.ObjectType1, i);
Op = Op->Asl.Next;
@@ -809,7 +820,7 @@
UINT32 ExpectedCount)
{
- snprintf (AslGbl_MsgBuffer, sizeof(AslGbl_MsgBuffer), "%s: length %u, required minimum is %u",
+ snprintf (AslGbl_MsgBuffer, sizeof(AslGbl_MsgBuffer), "%4.4s: length %u, required minimum is %u",
PredefinedName, Count, ExpectedCount);
AslError (ASL_ERROR, ASL_MSG_RESERVED_PACKAGE_LENGTH, Op, AslGbl_MsgBuffer);
@@ -838,7 +849,7 @@
ACPI_PARSE_OBJECT *Op)
{
- snprintf (AslGbl_MsgBuffer, sizeof(AslGbl_MsgBuffer), "%s: length is zero", PredefinedName);
+ snprintf (AslGbl_MsgBuffer, sizeof(AslGbl_MsgBuffer), "%4.4s: length is zero", PredefinedName);
AslError (ASL_ERROR, ASL_MSG_RESERVED_PACKAGE_LENGTH, Op, AslGbl_MsgBuffer);
}
@@ -867,7 +878,7 @@
UINT32 ExpectedCount)
{
- snprintf (AslGbl_MsgBuffer, sizeof(AslGbl_MsgBuffer), "%s: length is %u, only %u required",
+ snprintf (AslGbl_MsgBuffer, sizeof(AslGbl_MsgBuffer), "%4.4s: length is %u, only %u required",
PredefinedName, Count, ExpectedCount);
AslError (ASL_REMARK, ASL_MSG_RESERVED_PACKAGE_LENGTH, Op, AslGbl_MsgBuffer);
diff -r 8f1f846c88a7 -r 0f292e270687 sys/external/bsd/acpica/dist/compiler/aslutils.c
--- a/sys/external/bsd/acpica/dist/compiler/aslutils.c Fri Nov 27 16:56:51 2020 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslutils.c Fri Nov 27 16:58:32 2020 +0000
@@ -966,14 +966,16 @@
{
ACPI_STATUS Status;
UINT64 ConvertedInteger;
- char ErrBuf[64];
+ char ErrBuf[128];
+ const ACPI_EXCEPTION_INFO *ExceptionInfo;
Status = AcpiUtStrtoul64 (String, &ConvertedInteger);
if (ACPI_FAILURE (Status))
{
- snprintf (ErrBuf, sizeof(ErrBuf), "While creating 64-bit constant: %s\n",
- AcpiFormatException (Status));
+ ExceptionInfo = AcpiUtValidateException ((ACPI_STATUS) Status);
+ snprintf (ErrBuf, sizeof(ErrBuf), " %s while converting to 64-bit integer",
+ ExceptionInfo->Description);
AslCommonError (ASL_ERROR, ASL_MSG_SYNTAX, AslGbl_CurrentLineNumber,
AslGbl_LogicalLineNumber, AslGbl_CurrentLineOffset,
diff -r 8f1f846c88a7 -r 0f292e270687 sys/external/bsd/acpica/dist/compiler/aslxref.c
--- a/sys/external/bsd/acpica/dist/compiler/aslxref.c Fri Nov 27 16:56:51 2020 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslxref.c Fri Nov 27 16:58:32 2020 +0000
@@ -325,6 +325,7 @@
UINT32 i;
ACPI_NAMESPACE_NODE *DeclarationParentMethod;
ACPI_PARSE_OBJECT *ReferenceParentMethod;
+ char *ExternalPath;
ACPI_FUNCTION_TRACE_PTR (XfNamespaceLocateBegin, Op);
@@ -1156,7 +1157,15 @@
Op->Asl.Parent->Asl.ParseOpcode != PARSEOP_CONDREFOF &&
!XfRefIsGuardedByIfCondRefOf (Node, Op))
{
- AslError (ASL_ERROR, ASL_MSG_UNDEFINED_EXTERNAL, Op, NULL);
+ ExternalPath = AcpiNsGetNormalizedPathname (Node, TRUE);
+ sprintf (AslGbl_MsgBuffer, "full path of external object: %s",
+ ExternalPath);
+ AslDualParseOpError (ASL_ERROR, ASL_MSG_UNDEFINED_EXTERNAL, Op, NULL,
+ ASL_MSG_EXTERNAL_FOUND_HERE, Node->Op, AslGbl_MsgBuffer);
+ if (ExternalPath)
+ {
+ ACPI_FREE (ExternalPath);
+ }
}
/* 5) Check for a connection object */
diff -r 8f1f846c88a7 -r 0f292e270687 sys/external/bsd/acpica/dist/debugger/dbexec.c
--- a/sys/external/bsd/acpica/dist/debugger/dbexec.c Fri Nov 27 16:56:51 2020 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbexec.c Fri Nov 27 16:58:32 2020 +0000
@@ -144,7 +144,8 @@
*
* RETURN: Status
*
- * DESCRIPTION: Execute a control method.
+ * DESCRIPTION: Execute a control method. Used to evaluate objects via the
+ * "EXECUTE" or "EVALUATE" commands.
*
******************************************************************************/
@@ -398,11 +399,12 @@
Status = AcpiEvaluateObject (Node, NULL, NULL, &ReturnObj);
+ AcpiGbl_MethodExecuting = FALSE;
+
AcpiOsPrintf ("Evaluation of [%4.4s] returned %s\n",
AcpiUtGetNodeName (Node),
AcpiFormatException (Status));
- AcpiGbl_MethodExecuting = FALSE;
return (AE_OK);
}
@@ -419,7 +421,8 @@
* RETURN: None
*
* DESCRIPTION: Execute a control method. Name is relative to the current
- * scope.
+ * scope. Function used for the "EXECUTE", "EVALUATE", and
+ * "ALL" commands
*
******************************************************************************/
@@ -463,6 +466,12 @@
return;
}
+ if ((Flags & EX_ALL) && (strlen (Name) > 4))
+ {
+ AcpiOsPrintf ("Input name (%s) must be a 4-char NameSeg\n", Name);
+ return;
+ }
+
NameString = ACPI_ALLOCATE (strlen (Name) + 1);
if (!NameString)
{
@@ -482,13 +491,27 @@
return;
}
- AcpiGbl_DbMethodInfo.Name = NameString;
- AcpiGbl_DbMethodInfo.Args = Args;
- AcpiGbl_DbMethodInfo.Types = Types;
- AcpiGbl_DbMethodInfo.Flags = Flags;
+ /* Command (ALL <nameseg>) to execute all methods of a particular name */
- ReturnObj.Pointer = NULL;
- ReturnObj.Length = ACPI_ALLOCATE_BUFFER;
+ else if (Flags & EX_ALL)
+ {
+ AcpiGbl_DbMethodInfo.Name = NameString;
+ ReturnObj.Pointer = NULL;
+ ReturnObj.Length = ACPI_ALLOCATE_BUFFER;
+ AcpiDbEvaluateAll (NameString);
+ ACPI_FREE (NameString);
+ return;
+ }
+ else
+ {
+ AcpiGbl_DbMethodInfo.Name = NameString;
+ AcpiGbl_DbMethodInfo.Args = Args;
+ AcpiGbl_DbMethodInfo.Types = Types;
+ AcpiGbl_DbMethodInfo.Flags = Flags;
+
+ ReturnObj.Pointer = NULL;
+ ReturnObj.Length = ACPI_ALLOCATE_BUFFER;
+ }
Status = AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
if (ACPI_FAILURE (Status))
@@ -549,6 +572,7 @@
(UINT32) ReturnObj.Length);
AcpiDbDumpExternalObject (ReturnObj.Pointer, 1);
+ AcpiOsPrintf ("\n");
/* Dump a _PLD buffer if present */
diff -r 8f1f846c88a7 -r 0f292e270687 sys/external/bsd/acpica/dist/debugger/dbinput.c
--- a/sys/external/bsd/acpica/dist/debugger/dbinput.c Fri Nov 27 16:56:51 2020 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbinput.c Fri Nov 27 16:58:32 2020 +0000
@@ -87,6 +87,7 @@
{
CMD_NOT_FOUND = 0,
CMD_NULL,
+ CMD_ALL,
CMD_ALLOCATIONS,
CMD_ARGS,
CMD_ARGUMENTS,
@@ -167,6 +168,7 @@
{
{"<NOT FOUND>", 0},
{"<NULL>", 0},
+ {"ALL", 1},
{"ALLOCATIONS", 0},
{"ARGS", 0},
{"ARGUMENTS", 0},
@@ -269,6 +271,7 @@
{1, " Type <Object>", "Display object type\n"},
{0, "\nControl Method Execution:", "\n"},
+ {1, " All <NameSeg>", "Evaluate all objects named NameSeg\n"},
{1, " Evaluate <Namepath> [Arguments]", "Evaluate object or control method\n"},
{1, " Execute <Namepath> [Arguments]", "Synonym for Evaluate\n"},
#ifdef ACPI_APPLICATION
@@ -491,7 +494,7 @@
}
else
{
- /* Display help for all commands that match the subtring */
+ /* Display help for all commands that match the substring */
AcpiDbDisplayCommandInfo (Command, TRUE);
}
@@ -839,6 +842,13 @@
}
break;
+ case CMD_ALL:
Home |
Main Index |
Thread Index |
Old Index