summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/exoparg2.c
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2004-05-25 02:34:44 +0000
committernjl <njl@FreeBSD.org>2004-05-25 02:34:44 +0000
commit7dda61e34c56846a7ad4da7feef2a91aec7b9c02 (patch)
tree29dd9bbba1b290e1293c9cd9f23c53bf025abfa3 /sys/contrib/dev/acpica/exoparg2.c
parentdddb7af88f13c7148125c30a85f44b025270f810 (diff)
downloadFreeBSD-src-7dda61e34c56846a7ad4da7feef2a91aec7b9c02.zip
FreeBSD-src-7dda61e34c56846a7ad4da7feef2a91aec7b9c02.tar.gz
Vendor import of Intel ACPI-CA 20040514.
Diffstat (limited to 'sys/contrib/dev/acpica/exoparg2.c')
-rw-r--r--sys/contrib/dev/acpica/exoparg2.c40
1 files changed, 36 insertions, 4 deletions
diff --git a/sys/contrib/dev/acpica/exoparg2.c b/sys/contrib/dev/acpica/exoparg2.c
index a39320e..5ab65d4 100644
--- a/sys/contrib/dev/acpica/exoparg2.c
+++ b/sys/contrib/dev/acpica/exoparg2.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exoparg2 - AML execution - opcodes with 2 arguments
- * $Revision: 119 $
+ * $Revision: 121 $
*
*****************************************************************************/
@@ -172,6 +172,7 @@ AcpiExOpcode_2A_0T_0R (
{
ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
ACPI_NAMESPACE_NODE *Node;
+ UINT32 Value;
ACPI_STATUS Status = AE_OK;
@@ -189,17 +190,49 @@ AcpiExOpcode_2A_0T_0R (
Node = (ACPI_NAMESPACE_NODE *) Operand[0];
+ /* Second value is the notify value */
+
+ Value = (UINT32) Operand[1]->Integer.Value;
+
/* Notifies allowed on this object? */
if (!AcpiEvIsNotifyObject (Node))
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unexpected notify object type [%s]\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ "Unexpected notify object type [%s]\n",
AcpiUtGetTypeName (Node->Type)));
Status = AE_AML_OPERAND_TYPE;
break;
}
+#ifdef ACPI_GPE_NOTIFY_CHECK
+ /*
+ * GPE method wake/notify check. Here, we want to ensure that we
+ * don't receive any "DeviceWake" Notifies from a GPE _Lxx or _Exx
+ * GPE method during system runtime. If we do, the GPE is marked
+ * as "wake-only" and disabled.
+ *
+ * 1) Is the Notify() value == DeviceWake?
+ * 2) Is this a GPE deferred method? (An _Lxx or _Exx method)
+ * 3) Did the original GPE happen at system runtime?
+ * (versus during wake)
+ *
+ * If all three cases are true, this is a wake-only GPE that should
+ * be disabled at runtime.
+ */
+ if (Value == 2) /* DeviceWake */
+ {
+ Status = AcpiEvCheckForWakeOnlyGpe (WalkState->GpeEventInfo);
+ if (ACPI_FAILURE (Status))
+ {
+ /* AE_WAKE_ONLY_GPE only error, means ignore this notify */
+
+ return_ACPI_STATUS (AE_OK)
+ }
+ }
+#endif
+
/*
* Dispatch the notify to the appropriate handler
* NOTE: the request is queued for execution after this method
@@ -207,8 +240,7 @@ AcpiExOpcode_2A_0T_0R (
* from this thread -- because handlers may in turn run other
* control methods.
*/
- Status = AcpiEvQueueNotifyRequest (Node,
- (UINT32) Operand[1]->Integer.Value);
+ Status = AcpiEvQueueNotifyRequest (Node, Value);
break;
OpenPOWER on IntegriCloud