summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/components/dispatcher
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-04-04 10:17:51 +0000
committerdim <dim@FreeBSD.org>2015-04-04 10:17:51 +0000
commit441da571d47ec226c5c1799fe6e9dad14931a813 (patch)
tree03ae73b5fa8cee569039a08677ba8f5db4c7032b /sys/contrib/dev/acpica/components/dispatcher
parenta66c38928305566ab81042d4242432a649ec767f (diff)
downloadFreeBSD-src-441da571d47ec226c5c1799fe6e9dad14931a813.zip
FreeBSD-src-441da571d47ec226c5c1799fe6e9dad14931a813.tar.gz
MFC r272444 (by jkim):
Merge ACPICA 20140926. MFC r278970 (by jkim): Merge ACPICA 20141107 and 20150204. Approved by: jkim Relnotes: yes
Diffstat (limited to 'sys/contrib/dev/acpica/components/dispatcher')
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dsargs.c4
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dscontrol.c4
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dsfield.c8
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dsinit.c65
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dsmethod.c160
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c4
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dsobject.c4
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dsopcode.c4
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dsutils.c20
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dswexec.c7
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dswload.c23
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dswload2.c4
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dswscope.c4
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dswstate.c5
14 files changed, 248 insertions, 68 deletions
diff --git a/sys/contrib/dev/acpica/components/dispatcher/dsargs.c b/sys/contrib/dev/acpica/components/dispatcher/dsargs.c
index 2c574ca1..254f704 100644
--- a/sys/contrib/dev/acpica/components/dispatcher/dsargs.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dsargs.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -42,8 +42,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSARGS_C__
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acparser.h>
diff --git a/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c b/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c
index 3d256ea..bb23156 100644
--- a/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -42,8 +42,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSCONTROL_C__
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/amlcode.h>
diff --git a/sys/contrib/dev/acpica/components/dispatcher/dsfield.c b/sys/contrib/dev/acpica/components/dispatcher/dsfield.c
index ab4f5b9..d376bb1 100644
--- a/sys/contrib/dev/acpica/components/dispatcher/dsfield.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dsfield.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSFIELD_C__
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/amlcode.h>
@@ -116,7 +114,7 @@ AcpiDsCreateExternalRegion (
* OperationRegion not found. Generate an External for it, and
* insert the name into the namespace.
*/
- AcpiDmAddToExternalList (Op, Path, ACPI_TYPE_REGION, 0);
+ AcpiDmAddOpToExternalList (Op, Path, ACPI_TYPE_REGION, 0, 0);
Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_REGION,
ACPI_IMODE_LOAD_PASS1, ACPI_NS_SEARCH_PARENT, WalkState, Node);
if (ACPI_FAILURE (Status))
@@ -391,6 +389,7 @@ AcpiDsGetFieldNames (
*/
Info->ResourceBuffer = NULL;
Info->ConnectionNode = NULL;
+ Info->PinNumberIndex = 0;
/*
* A Connection() is either an actual resource descriptor (buffer)
@@ -466,6 +465,7 @@ AcpiDsGetFieldNames (
}
Info->FieldBitPosition += Info->FieldBitLength;
+ Info->PinNumberIndex++; /* Index relative to previous Connection() */
break;
default:
diff --git a/sys/contrib/dev/acpica/components/dispatcher/dsinit.c b/sys/contrib/dev/acpica/components/dispatcher/dsinit.c
index 5ab1f50..62f9bde 100644
--- a/sys/contrib/dev/acpica/components/dispatcher/dsinit.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dsinit.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSINIT_C__
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acdispat.h>
@@ -52,6 +50,7 @@
#define _COMPONENT ACPI_DISPATCHER
ACPI_MODULE_NAME ("dsinit")
+
/* Local prototypes */
static ACPI_STATUS
@@ -91,8 +90,8 @@ AcpiDsInitOneObject (
{
ACPI_INIT_WALK_INFO *Info = (ACPI_INIT_WALK_INFO *) Context;
ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
- ACPI_OBJECT_TYPE Type;
ACPI_STATUS Status;
+ ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_FUNCTION_ENTRY ();
@@ -111,9 +110,7 @@ AcpiDsInitOneObject (
/* And even then, we are only interested in a few object types */
- Type = AcpiNsGetType (ObjHandle);
-
- switch (Type)
+ switch (AcpiNsGetType (ObjHandle))
{
case ACPI_TYPE_REGION:
@@ -129,8 +126,45 @@ AcpiDsInitOneObject (
break;
case ACPI_TYPE_METHOD:
-
+ /*
+ * Auto-serialization support. We will examine each method that is
+ * NotSerialized to determine if it creates any Named objects. If
+ * it does, it will be marked serialized to prevent problems if
+ * the method is entered by two or more threads and an attempt is
+ * made to create the same named object twice -- which results in
+ * an AE_ALREADY_EXISTS exception and method abort.
+ */
Info->MethodCount++;
+ ObjDesc = AcpiNsGetAttachedObject (Node);
+ if (!ObjDesc)
+ {
+ break;
+ }
+
+ /* Ignore if already serialized */
+
+ if (ObjDesc->Method.InfoFlags & ACPI_METHOD_SERIALIZED)
+ {
+ Info->SerialMethodCount++;
+ break;
+ }
+
+ if (AcpiGbl_AutoSerializeMethods)
+ {
+ /* Parse/scan method and serialize it if necessary */
+
+ AcpiDsAutoSerializeMethod (Node, ObjDesc);
+ if (ObjDesc->Method.InfoFlags & ACPI_METHOD_SERIALIZED)
+ {
+ /* Method was just converted to Serialized */
+
+ Info->SerialMethodCount++;
+ Info->SerializedMethodCount++;
+ break;
+ }
+ }
+
+ Info->NonSerialMethodCount++;
break;
case ACPI_TYPE_DEVICE:
@@ -187,7 +221,6 @@ AcpiDsInitializeObjects (
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"**** Starting initialization of namespace objects ****\n"));
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "Parsing all Control Methods:"));
/* Set all init info to zero */
@@ -223,12 +256,14 @@ AcpiDsInitializeObjects (
}
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
- "\nTable [%4.4s](id %4.4X) - %u Objects with %u Devices %u Methods %u Regions\n",
- Table->Signature, OwnerId, Info.ObjectCount,
- Info.DeviceCount, Info.MethodCount, Info.OpRegionCount));
-
- ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
- "%u Methods, %u Regions\n", Info.MethodCount, Info.OpRegionCount));
+ "Table [%4.4s] (id %4.4X) - %4u Objects with %3u Devices, "
+ "%3u Regions, %3u Methods (%u/%u/%u Serial/Non/Cvt)\n",
+ Table->Signature, OwnerId, Info.ObjectCount, Info.DeviceCount,
+ Info.OpRegionCount, Info.MethodCount, Info.SerialMethodCount,
+ Info.NonSerialMethodCount, Info.SerializedMethodCount));
+
+ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "%u Methods, %u Regions\n",
+ Info.MethodCount, Info.OpRegionCount));
return_ACPI_STATUS (AE_OK);
}
diff --git a/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c b/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c
index d2dccaf..a687c72 100644
--- a/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,14 +41,14 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSMETHOD_C__
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acdispat.h>
#include <contrib/dev/acpica/include/acinterp.h>
#include <contrib/dev/acpica/include/acnamesp.h>
#include <contrib/dev/acpica/include/acdisasm.h>
+#include <contrib/dev/acpica/include/acparser.h>
+#include <contrib/dev/acpica/include/amlcode.h>
#define _COMPONENT ACPI_DISPATCHER
@@ -57,12 +57,156 @@
/* Local prototypes */
static ACPI_STATUS
+AcpiDsDetectNamedOpcodes (
+ ACPI_WALK_STATE *WalkState,
+ ACPI_PARSE_OBJECT **OutOp);
+
+static ACPI_STATUS
AcpiDsCreateMethodMutex (
ACPI_OPERAND_OBJECT *MethodDesc);
/*******************************************************************************
*
+ * FUNCTION: AcpiDsAutoSerializeMethod
+ *
+ * PARAMETERS: Node - Namespace Node of the method
+ * ObjDesc - Method object attached to node
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Parse a control method AML to scan for control methods that
+ * need serialization due to the creation of named objects.
+ *
+ * NOTE: It is a bit of overkill to mark all such methods serialized, since
+ * there is only a problem if the method actually blocks during execution.
+ * A blocking operation is, for example, a Sleep() operation, or any access
+ * to an operation region. However, it is probably not possible to easily
+ * detect whether a method will block or not, so we simply mark all suspicious
+ * methods as serialized.
+ *
+ * NOTE2: This code is essentially a generic routine for parsing a single
+ * control method.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDsAutoSerializeMethod (
+ ACPI_NAMESPACE_NODE *Node,
+ ACPI_OPERAND_OBJECT *ObjDesc)
+{
+ ACPI_STATUS Status;
+ ACPI_PARSE_OBJECT *Op = NULL;
+ ACPI_WALK_STATE *WalkState;
+
+
+ ACPI_FUNCTION_TRACE_PTR (DsAutoSerializeMethod, Node);
+
+
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
+ "Method auto-serialization parse [%4.4s] %p\n",
+ AcpiUtGetNodeName (Node), Node));
+
+ /* Create/Init a root op for the method parse tree */
+
+ Op = AcpiPsAllocOp (AML_METHOD_OP);
+ if (!Op)
+ {
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
+
+ AcpiPsSetName (Op, Node->Name.Integer);
+ Op->Common.Node = Node;
+
+ /* Create and initialize a new walk state */
+
+ WalkState = AcpiDsCreateWalkState (Node->OwnerId, NULL, NULL, NULL);
+ if (!WalkState)
+ {
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
+
+ Status = AcpiDsInitAmlWalk (WalkState, Op, Node, ObjDesc->Method.AmlStart,
+ ObjDesc->Method.AmlLength, NULL, 0);
+ if (ACPI_FAILURE (Status))
+ {
+ AcpiDsDeleteWalkState (WalkState);
+ return_ACPI_STATUS (Status);
+ }
+
+ WalkState->DescendingCallback = AcpiDsDetectNamedOpcodes;
+
+ /* Parse the method, scan for creation of named objects */
+
+ Status = AcpiPsParseAml (WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ AcpiPsDeleteParseTree (Op);
+ return_ACPI_STATUS (Status);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDsDetectNamedOpcodes
+ *
+ * PARAMETERS: WalkState - Current state of the parse tree walk
+ * OutOp - Unused, required for parser interface
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Descending callback used during the loading of ACPI tables.
+ * Currently used to detect methods that must be marked serialized
+ * in order to avoid problems with the creation of named objects.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiDsDetectNamedOpcodes (
+ ACPI_WALK_STATE *WalkState,
+ ACPI_PARSE_OBJECT **OutOp)
+{
+
+ ACPI_FUNCTION_NAME (AcpiDsDetectNamedOpcodes);
+
+
+ /* We are only interested in opcodes that create a new name */
+
+ if (!(WalkState->OpInfo->Flags & (AML_NAMED | AML_CREATE | AML_FIELD)))
+ {
+ return (AE_OK);
+ }
+
+ /*
+ * At this point, we know we have a Named object opcode.
+ * Mark the method as serialized. Later code will create a mutex for
+ * this method to enforce serialization.
+ *
+ * Note, ACPI_METHOD_IGNORE_SYNC_LEVEL flag means that we will ignore the
+ * Sync Level mechanism for this method, even though it is now serialized.
+ * Otherwise, there can be conflicts with existing ASL code that actually
+ * uses sync levels.
+ */
+ WalkState->MethodDesc->Method.SyncLevel = 0;
+ WalkState->MethodDesc->Method.InfoFlags |=
+ (ACPI_METHOD_SERIALIZED | ACPI_METHOD_IGNORE_SYNC_LEVEL);
+
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+ "Method serialized [%4.4s] %p - [%s] (%4.4X)\n",
+ WalkState->MethodNode->Name.Ascii, WalkState->MethodNode,
+ WalkState->OpInfo->Name, WalkState->Opcode));
+
+ /* Abort the parse, no need to examine this method any further */
+
+ return (AE_CTRL_TERMINATE);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDsMethodError
*
* PARAMETERS: Status - Execution status
@@ -238,11 +382,16 @@ AcpiDsBeginMethodExecution (
/*
* The CurrentSyncLevel (per-thread) must be less than or equal to
* the sync level of the method. This mechanism provides some
- * deadlock prevention
+ * deadlock prevention.
+ *
+ * If the method was auto-serialized, we just ignore the sync level
+ * mechanism, because auto-serialization of methods can interfere
+ * with ASL code that actually uses sync levels.
*
* Top-level method invocation has no walk state at this point
*/
if (WalkState &&
+ (!(ObjDesc->Method.InfoFlags & ACPI_METHOD_IGNORE_SYNC_LEVEL)) &&
(WalkState->Thread->CurrentSyncLevel > ObjDesc->Method.Mutex->Mutex.SyncLevel))
{
ACPI_ERROR ((AE_INFO,
@@ -710,7 +859,8 @@ AcpiDsTerminateControlMethod (
* thread exits here.
*/
MethodDesc->Method.InfoFlags &= ~ACPI_METHOD_SERIALIZED_PENDING;
- MethodDesc->Method.InfoFlags |= ACPI_METHOD_SERIALIZED;
+ MethodDesc->Method.InfoFlags |=
+ (ACPI_METHOD_SERIALIZED | ACPI_METHOD_IGNORE_SYNC_LEVEL);
MethodDesc->Method.SyncLevel = 0;
}
diff --git a/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c b/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c
index 76157f5..4b998d9 100644
--- a/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSMTHDAT_C__
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acdispat.h>
diff --git a/sys/contrib/dev/acpica/components/dispatcher/dsobject.c b/sys/contrib/dev/acpica/components/dispatcher/dsobject.c
index a853d3d..106c6ab 100644
--- a/sys/contrib/dev/acpica/components/dispatcher/dsobject.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dsobject.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSOBJECT_C__
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acparser.h>
diff --git a/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c b/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c
index b7ff590..86fe26c 100644
--- a/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSOPCODE_C__
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acparser.h>
diff --git a/sys/contrib/dev/acpica/components/dispatcher/dsutils.c b/sys/contrib/dev/acpica/components/dispatcher/dsutils.c
index 0a386cc..f4f0f33 100644
--- a/sys/contrib/dev/acpica/components/dispatcher/dsutils.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dsutils.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSUTILS_C__
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acparser.h>
@@ -779,16 +777,16 @@ AcpiDsCreateOperands (
Index++;
}
- Index--;
+ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
+ "NumOperands %d, ArgCount %d, Index %d\n",
+ WalkState->NumOperands, ArgCount, Index));
- /* It is the appropriate order to get objects from the Result stack */
+ /* Create the interpreter arguments, in reverse order */
+ Index--;
for (i = 0; i < ArgCount; i++)
{
Arg = Arguments[Index];
-
- /* Force the filling of the operand stack in inverse order */
-
WalkState->OperandIndex = (UINT8) Index;
Status = AcpiDsCreateOperand (WalkState, Arg, Index);
@@ -797,10 +795,10 @@ AcpiDsCreateOperands (
goto Cleanup;
}
+ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
+ "Created Arg #%u (%p) %u args total\n",
+ Index, Arg, ArgCount));
Index--;
-
- ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Arg #%u (%p) done, Arg1=%p\n",
- Index, Arg, FirstArg));
}
return_ACPI_STATUS (Status);
diff --git a/sys/contrib/dev/acpica/components/dispatcher/dswexec.c b/sys/contrib/dev/acpica/components/dispatcher/dswexec.c
index 6955f3c..f391fe0 100644
--- a/sys/contrib/dev/acpica/components/dispatcher/dswexec.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dswexec.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -42,8 +42,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSWEXEC_C__
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acparser.h>
@@ -541,7 +539,8 @@ AcpiDsExecEndOp (
return_ACPI_STATUS (AE_OK);
}
- ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Method invocation, Op=%p\n", Op));
+ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
+ "Method invocation, Op=%p\n", Op));
/*
* (AML_METHODCALL) Op->Asl.Value.Arg->Asl.Node contains
diff --git a/sys/contrib/dev/acpica/components/dispatcher/dswload.c b/sys/contrib/dev/acpica/components/dispatcher/dswload.c
index 1cc8d4f..8bc425a 100644
--- a/sys/contrib/dev/acpica/components/dispatcher/dswload.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dswload.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSWLOAD_C__
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acparser.h>
@@ -80,8 +78,21 @@ AcpiDsInitCallbacks (
switch (PassNumber)
{
+ case 0:
+
+ /* Parse only - caller will setup callbacks */
+
+ WalkState->ParseFlags = ACPI_PARSE_LOAD_PASS1 |
+ ACPI_PARSE_DELETE_TREE |
+ ACPI_PARSE_DISASSEMBLE;
+ WalkState->DescendingCallback = NULL;
+ WalkState->AscendingCallback = NULL;
+ break;
+
case 1:
+ /* Load pass 1 */
+
WalkState->ParseFlags = ACPI_PARSE_LOAD_PASS1 |
ACPI_PARSE_DELETE_TREE;
WalkState->DescendingCallback = AcpiDsLoad1BeginOp;
@@ -90,6 +101,8 @@ AcpiDsInitCallbacks (
case 2:
+ /* Load pass 2 */
+
WalkState->ParseFlags = ACPI_PARSE_LOAD_PASS1 |
ACPI_PARSE_DELETE_TREE;
WalkState->DescendingCallback = AcpiDsLoad2BeginOp;
@@ -98,6 +111,8 @@ AcpiDsInitCallbacks (
case 3:
+ /* Execution pass */
+
#ifndef ACPI_NO_METHOD_EXECUTION
WalkState->ParseFlags |= ACPI_PARSE_EXECUTE |
ACPI_PARSE_DELETE_TREE;
@@ -193,7 +208,7 @@ AcpiDsLoad1BeginOp (
* Target of Scope() not found. Generate an External for it, and
* insert the name into the namespace.
*/
- AcpiDmAddToExternalList (Op, Path, ACPI_TYPE_DEVICE, 0);
+ AcpiDmAddOpToExternalList (Op, Path, ACPI_TYPE_DEVICE, 0, 0);
Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ObjectType,
ACPI_IMODE_LOAD_PASS1, ACPI_NS_SEARCH_PARENT,
WalkState, &Node);
diff --git a/sys/contrib/dev/acpica/components/dispatcher/dswload2.c b/sys/contrib/dev/acpica/components/dispatcher/dswload2.c
index 2b85413..4728774 100644
--- a/sys/contrib/dev/acpica/components/dispatcher/dswload2.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dswload2.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSWLOAD2_C__
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acparser.h>
diff --git a/sys/contrib/dev/acpica/components/dispatcher/dswscope.c b/sys/contrib/dev/acpica/components/dispatcher/dswscope.c
index 8530b5d..dc1fedc 100644
--- a/sys/contrib/dev/acpica/components/dispatcher/dswscope.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dswscope.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#define __DSWSCOPE_C__
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acdispat.h>
diff --git a/sys/contrib/dev/acpica/components/dispatcher/dswstate.c b/sys/contrib/dev/acpica/components/dispatcher/dswstate.c
index 8fd36bf..5211666 100644
--- a/sys/contrib/dev/acpica/components/dispatcher/dswstate.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dswstate.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -41,9 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-
-#define __DSWSTATE_C__
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acparser.h>
OpenPOWER on IntegriCloud