summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/psopcode.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2007-03-22 17:24:05 +0000
committerjkim <jkim@FreeBSD.org>2007-03-22 17:24:05 +0000
commite031ab5da47b5f6c28c3cc5d576128b2d8d202e6 (patch)
tree69d0fa3b3760b0abcc0335ff748e39701a8bf064 /sys/contrib/dev/acpica/psopcode.c
parentdbc8115981195155aec9304dd8f0ee570bd3d32c (diff)
downloadFreeBSD-src-e031ab5da47b5f6c28c3cc5d576128b2d8d202e6.zip
FreeBSD-src-e031ab5da47b5f6c28c3cc5d576128b2d8d202e6.tar.gz
Vendor import of Intel ACPI-CA 20070320
Diffstat (limited to 'sys/contrib/dev/acpica/psopcode.c')
-rw-r--r--sys/contrib/dev/acpica/psopcode.c38
1 files changed, 33 insertions, 5 deletions
diff --git a/sys/contrib/dev/acpica/psopcode.c b/sys/contrib/dev/acpica/psopcode.c
index b7a805a..fad6d39 100644
--- a/sys/contrib/dev/acpica/psopcode.c
+++ b/sys/contrib/dev/acpica/psopcode.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psopcode - Parser/Interpreter opcode information table
- * $Revision: 1.93 $
+ * $Revision: 1.99 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -125,6 +125,9 @@
ACPI_MODULE_NAME ("psopcode")
+const UINT8 AcpiGbl_ArgumentCount[] = {0,1,1,1,1,2,2,2,2,3,3,6};
+
+
/*******************************************************************************
*
* NAME: AcpiGbl_AmlOpInfo
@@ -495,7 +498,7 @@ const ACPI_OPCODE_INFO *
AcpiPsGetOpcodeInfo (
UINT16 Opcode)
{
- ACPI_FUNCTION_NAME ("PsGetOpcodeInfo");
+ ACPI_FUNCTION_NAME (PsGetOpcodeInfo);
/*
@@ -518,7 +521,7 @@ AcpiPsGetOpcodeInfo (
/* Unknown AML opcode */
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"Unknown AML opcode [%4.4X]\n", Opcode));
return (&AcpiGbl_AmlOpInfo [_UNK]);
@@ -554,8 +557,33 @@ AcpiPsGetOpcodeName (
return (Op->Name);
#else
- return ("AE_NOT_CONFIGURED");
+ return ("OpcodeName unavailable");
#endif
}
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiPsGetArgumentCount
+ *
+ * PARAMETERS: OpType - Type associated with the AML opcode
+ *
+ * RETURN: Argument count
+ *
+ * DESCRIPTION: Obtain the number of expected arguments for an AML opcode
+ *
+ ******************************************************************************/
+
+UINT8
+AcpiPsGetArgumentCount (
+ UINT32 OpType)
+{
+
+ if (OpType <= AML_TYPE_EXEC_6A_0T_1R)
+ {
+ return (AcpiGbl_ArgumentCount[OpType]);
+ }
+
+ return (0);
+}
OpenPOWER on IntegriCloud