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/9b64f56254d8
branches: trunk
changeset: 933507:9b64f56254d8
user: christos <christos%NetBSD.org@localhost>
date: Mon May 25 23:19:28 2020 +0000
description:
merge conflicts
diffstat:
sys/external/bsd/acpica/dist/compiler/aslcompiler.l | 2 +-
sys/external/bsd/acpica/dist/compiler/aslload.c | 81 ++++----
sys/external/bsd/acpica/dist/compiler/aslpredef.c | 2 +-
sys/external/bsd/acpica/dist/compiler/aslxref.c | 165 +++++++++++++++++-
sys/external/bsd/acpica/dist/compiler/dtutils.c | 11 +-
sys/external/bsd/acpica/dist/disassembler/dmbuffer.c | 19 ++-
sys/external/bsd/acpica/dist/include/acglobal.h | 1 +
sys/external/bsd/acpica/dist/include/acpixf.h | 2 +-
8 files changed, 222 insertions(+), 61 deletions(-)
diffs (truncated from 559 to 300 lines):
diff -r 44fc2d1a42f5 -r 9b64f56254d8 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 Mon May 25 23:19:28 2020 +0000
@@ -711,7 +711,7 @@
}
/*
- * The eror code is contained inside the
+ * The error code is contained inside the
* {ErrorCode} pattern. Extract it and log it
* as the expected error code.
*/
diff -r 44fc2d1a42f5 -r 9b64f56254d8 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 Mon May 25 23:19:28 2020 +0000
@@ -1,6 +1,6 @@
/******************************************************************************
*
- * Module Name: dswload - Dispatcher namespace load callbacks
+ * Module Name: aslload - compiler namespace load callbacks
*
*****************************************************************************/
@@ -93,7 +93,6 @@
ACPI_NAMESPACE_NODE *Node,
ACPI_PARSE_OBJECT *Op,
ACPI_OBJECT_TYPE ExternalOpType,
- ACPI_OBJECT_TYPE ObjectType,
ACPI_WALK_STATE *WalkState);
@@ -407,7 +406,6 @@
ACPI_PARSE_OBJECT *MethodOp;
ACPI_STATUS Status;
ACPI_OBJECT_TYPE ObjectType;
- ACPI_OBJECT_TYPE ActualObjectType = ACPI_TYPE_ANY;
char *Path;
UINT32 Flags = ACPI_NS_NO_UPSEARCH;
ACPI_PARSE_OBJECT *Arg;
@@ -581,8 +579,7 @@
*
* first child is name, next child is ObjectType
*/
- ActualObjectType = (UINT8) Op->Asl.Child->Asl.Next->Asl.Value.Integer;
- ObjectType = ACPI_TYPE_ANY;
+ ObjectType = (UINT8) Op->Asl.Child->Asl.Next->Asl.Value.Integer;
/*
* We will mark every new node along the path as "External". This
@@ -601,7 +598,7 @@
* Store (\_SB_.PCI0.ABCD, Local0)
* }
*/
- Flags |= ACPI_NS_EXTERNAL;
+ Flags |= ACPI_NS_EXTERNAL | ACPI_NS_DONT_OPEN_SCOPE;
break;
case PARSEOP_DEFAULT_ARG:
@@ -805,8 +802,7 @@
else if ((Node->Flags & ANOBJ_IS_EXTERNAL) ||
(Op->Asl.ParseOpcode == PARSEOP_EXTERNAL))
{
- Status = LdAnalyzeExternals (Node, Op, ActualObjectType,
- ObjectType, WalkState);
+ Status = LdAnalyzeExternals (Node, Op, ObjectType, WalkState);
if (ACPI_FAILURE (Status))
{
if (Status == AE_ERROR)
@@ -821,6 +817,19 @@
}
return_ACPI_STATUS (Status);
}
+
+ if (!(Node->Flags & ANOBJ_IS_EXTERNAL) &&
+ (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL))
+ {
+ /*
+ * If we get to here, it means that an actual definition of
+ * the object declared external exists. Meaning that Op
+ * loading this this Op should have no change to the ACPI
+ * namespace. By going to FinishNode, we skip the
+ * assignment of Node->Op = Op.
+ */
+ goto FinishNode;
+ }
}
else
{
@@ -872,30 +881,15 @@
}
}
-FinishNode:
- /*
- * Point the parse node to the new namespace node, and point
- * the Node back to the original Parse node
- */
- Op->Asl.Node = Node;
+ /* Point the Node back to the original Parse node */
+
Node->Op = Op;
- /*
- * Set the actual data type if appropriate (EXTERNAL term only)
- * As of 11/19/2019, ASL External() does not support parameter
- * counts. When an External method is loaded, the parameter count is
- * recorded in the external's arg count parameter. The parameter count may
- * or may not be known in the declaration. If the value of this node turns
- * out to be ASL_EXTERNAL_METHOD_UNKNOWN_PARAMS, it indicates that
- * we do not know the parameter count and that we must look at the usage of
- * the External method call to get this information.
- */
- if (ActualObjectType != ACPI_TYPE_ANY)
- {
- Node->Type = (UINT8) ActualObjectType;
- Node->Value = (UINT32)
- Op->Asl.Child->Asl.Next->Asl.Next->Asl.Value.Integer;
- }
+FinishNode:
+
+ /* Point the parse node to the new namespace node */
+
+ Op->Asl.Node = Node;
if (Op->Asl.ParseOpcode == PARSEOP_METHOD)
{
@@ -905,6 +899,13 @@
*/
Node->Value = (UINT32) Op->Asl.Extra;
}
+ else if (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL &&
+ Node->Type == ACPI_TYPE_METHOD &&
+ (Node->Flags & ANOBJ_IS_EXTERNAL))
+ {
+ Node->Value =
+ (UINT32) Op->Asl.Child->Asl.Next->Asl.Next->Asl.Value.Integer;
+ }
return_ACPI_STATUS (Status);
}
@@ -912,7 +913,7 @@
/*******************************************************************************
*
- * FUNCTION: LdAnalyzeExternals
+ * FUNCTION: LdMatchExternType
*
* PARAMETERS: Type1
* Type2
@@ -929,7 +930,7 @@
******************************************************************************/
static BOOLEAN
-LdTypesMatchExternType (
+LdMatchExternType (
ACPI_OBJECT_TYPE Type1,
ACPI_OBJECT_TYPE Type2)
{
@@ -985,7 +986,6 @@
* PARAMETERS: Node - Node that represents the named object
* Op - Named object declaring this named object
* ExternalOpType - Type of ExternalOp
- * ObjectType - Type of Declared object
* WalkState - Current WalkState
*
* RETURN: Status
@@ -1003,7 +1003,6 @@
ACPI_NAMESPACE_NODE *Node,
ACPI_PARSE_OBJECT *Op,
ACPI_OBJECT_TYPE ExternalOpType,
- ACPI_OBJECT_TYPE ObjectType,
ACPI_WALK_STATE *WalkState)
{
ACPI_STATUS Status = AE_OK;
@@ -1027,12 +1026,12 @@
else
{
ActualExternalOpType = Node->Type;
- ActualOpType = ObjectType;
+ ActualOpType = ExternalOpType;
}
if ((ActualOpType != ACPI_TYPE_ANY) &&
(ActualExternalOpType != ACPI_TYPE_ANY) &&
- !LdTypesMatchExternType (ActualExternalOpType, ActualOpType))
+ !LdMatchExternType (ActualExternalOpType, ActualOpType))
{
if (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL &&
Node->Op->Asl.ParseOpcode == PARSEOP_EXTERNAL)
@@ -1060,6 +1059,8 @@
}
}
+ /* Set the object type of the external */
+
if ((Node->Flags & ANOBJ_IS_EXTERNAL) &&
(Op->Asl.ParseOpcode != PARSEOP_EXTERNAL))
{
@@ -1068,13 +1069,13 @@
* previously declared External
*/
Node->Flags &= ~ANOBJ_IS_EXTERNAL;
- Node->Type = (UINT8) ObjectType;
+ Node->Type = (UINT8) ExternalOpType;
/* Just retyped a node, probably will need to open a scope */
- if (AcpiNsOpensScope (ObjectType))
+ if (AcpiNsOpensScope (ExternalOpType))
{
- Status = AcpiDsScopeStackPush (Node, ObjectType, WalkState);
+ Status = AcpiDsScopeStackPush (Node, ExternalOpType, WalkState);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -1095,7 +1096,7 @@
}
else if ((Node->Flags & ANOBJ_IS_EXTERNAL) &&
(Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) &&
- (ObjectType == ACPI_TYPE_ANY))
+ (ExternalOpType == ACPI_TYPE_ANY))
{
/* Allow update of externals of unknown type. */
diff -r 44fc2d1a42f5 -r 9b64f56254d8 sys/external/bsd/acpica/dist/compiler/aslpredef.c
--- a/sys/external/bsd/acpica/dist/compiler/aslpredef.c Mon May 25 23:16:29 2020 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslpredef.c Mon May 25 23:19:28 2020 +0000
@@ -566,7 +566,7 @@
/*
* Was not actually emitted by the compiler. This is a special case,
* however. If the ASL code being compiled was the result of a
- * dissasembly, it may possibly contain valid compiler-emitted names
+ * disassembly, it may possibly contain valid compiler-emitted names
* of the form "_T_x". We don't want to issue an error or even a
* warning and force the user to manually change the names. So, we
* will issue a remark instead.
diff -r 44fc2d1a42f5 -r 9b64f56254d8 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 Mon May 25 23:19:28 2020 +0000
@@ -91,6 +91,16 @@
UINT32 FieldBitLength,
UINT32 AccessBitWidth);
+static BOOLEAN
+XfFindCondRefOfName (
+ ACPI_NAMESPACE_NODE *Node,
+ ACPI_PARSE_OBJECT *Op);
+
+static BOOLEAN
+XfRefIsGuardedByIfCondRefOf (
+ ACPI_NAMESPACE_NODE *Node,
+ ACPI_PARSE_OBJECT *Op);
+
/*******************************************************************************
*
@@ -474,17 +484,6 @@
}
/*
- * One special case: CondRefOf operator - we don't care if the name exists
- * or not at this point, just ignore it, the point of the operator is to
- * determine if the name exists at runtime.
- */
- if ((Op->Asl.Parent) &&
- (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_CONDREFOF))
- {
- return_ACPI_STATUS (AE_OK);
- }
-
- /*
* We must enable the "search-to-root" for single NameSegs, but
* we have to be very careful about opening up scopes
*/
@@ -492,7 +491,8 @@
if ((Op->Asl.ParseOpcode == PARSEOP_NAMESTRING) ||
(Op->Asl.ParseOpcode == PARSEOP_NAMESEG) ||
(Op->Asl.ParseOpcode == PARSEOP_METHODCALL) ||
- (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL))
+ (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) ||
+ (Op->Asl.ParseOpcode == PARSEOP_CONDREFOF))
{
/*
* These are name references, do not push the scope stack
@@ -557,7 +557,22 @@
* We didn't find the name reference by path -- we can qualify this
* a little better before we print an error message
*/
- if (strlen (Path) == ACPI_NAMESEG_SIZE)
+
+ if ((Op->Asl.Parent) &&
+ (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_CONDREFOF))
+ {
+ /*
+ * One special case: CondRefOf operator - if the name doesn't
+ * exist at this point, it means that there's no actual or
+ * external declaration. If the name is not found, just ignore
+ * it, the point of the operator is to determine if the name
+ * exists at runtime. We wanted to see if this named object
+ * exists to facilitate analysis to allow protected usage of
Home |
Main Index |
Thread Index |
Old Index