aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Smith <msmith@FreeBSD.org>2001-09-07 01:22:25 +0000
committerMike Smith <msmith@FreeBSD.org>2001-09-07 01:22:25 +0000
commit7fb2c1c6169b76180d4ee5c3147edf4da2fdd083 (patch)
treeba0c24c50a259baa38d43cef66fae1699ec4f152
parent2ee2f9cb7457edd22680e19323177347cd0aabff (diff)
downloadsrc-7fb2c1c6169b76180d4ee5c3147edf4da2fdd083.tar.gz
src-7fb2c1c6169b76180d4ee5c3147edf4da2fdd083.zip
Vendor-branch import of the Intel ACPI CA 20010831 snapshot.
Notes
Notes: svn path=/vendor-sys/acpica/dist/; revision=83174
-rw-r--r--sys/contrib/dev/acpica/acconfig.h4
-rw-r--r--sys/contrib/dev/acpica/acdebug.h78
-rw-r--r--sys/contrib/dev/acpica/acexcep.h12
-rw-r--r--sys/contrib/dev/acpica/acgcc.h4
-rw-r--r--sys/contrib/dev/acpica/acglobal.h29
-rw-r--r--sys/contrib/dev/acpica/aclocal.h32
-rw-r--r--sys/contrib/dev/acpica/acmacros.h73
-rw-r--r--sys/contrib/dev/acpica/acoutput.h56
-rw-r--r--sys/contrib/dev/acpica/acparser.h41
-rw-r--r--sys/contrib/dev/acpica/acstruct.h6
-rw-r--r--sys/contrib/dev/acpica/actypes.h7
-rw-r--r--sys/contrib/dev/acpica/acutils.h94
-rw-r--r--sys/contrib/dev/acpica/dbcmds.c74
-rw-r--r--sys/contrib/dev/acpica/dbdisasm.c105
-rw-r--r--sys/contrib/dev/acpica/dbdisply.c11
-rw-r--r--sys/contrib/dev/acpica/dbexec.c48
-rw-r--r--sys/contrib/dev/acpica/dbfileio.c26
-rw-r--r--sys/contrib/dev/acpica/dbhistry.c56
-rw-r--r--sys/contrib/dev/acpica/dbinput.c139
-rw-r--r--sys/contrib/dev/acpica/dbstats.c81
-rw-r--r--sys/contrib/dev/acpica/dbutils.c6
-rw-r--r--sys/contrib/dev/acpica/dbxface.c40
-rw-r--r--sys/contrib/dev/acpica/dsfield.c5
-rw-r--r--sys/contrib/dev/acpica/dsmethod.c6
-rw-r--r--sys/contrib/dev/acpica/dsmthdat.c10
-rw-r--r--sys/contrib/dev/acpica/dsobject.c24
-rw-r--r--sys/contrib/dev/acpica/dsopcode.c25
-rw-r--r--sys/contrib/dev/acpica/dsutils.c27
-rw-r--r--sys/contrib/dev/acpica/dswexec.c67
-rw-r--r--sys/contrib/dev/acpica/dswload.c59
-rw-r--r--sys/contrib/dev/acpica/dswscope.c8
-rw-r--r--sys/contrib/dev/acpica/dswstate.c13
-rw-r--r--sys/contrib/dev/acpica/evevent.c27
-rw-r--r--sys/contrib/dev/acpica/evmisc.c14
-rw-r--r--sys/contrib/dev/acpica/evregion.c18
-rw-r--r--sys/contrib/dev/acpica/evrgnini.c6
-rw-r--r--sys/contrib/dev/acpica/evsci.c14
-rw-r--r--sys/contrib/dev/acpica/evxface.c3
-rw-r--r--sys/contrib/dev/acpica/evxfevnt.c10
-rw-r--r--sys/contrib/dev/acpica/evxfregn.c7
-rw-r--r--sys/contrib/dev/acpica/exconfig.c56
-rw-r--r--sys/contrib/dev/acpica/exconvrt.c33
-rw-r--r--sys/contrib/dev/acpica/excreate.c11
-rw-r--r--sys/contrib/dev/acpica/exdump.c49
-rw-r--r--sys/contrib/dev/acpica/exdyadic.c265
-rw-r--r--sys/contrib/dev/acpica/exfield.c9
-rw-r--r--sys/contrib/dev/acpica/exfldio.c94
-rw-r--r--sys/contrib/dev/acpica/exmisc.c162
-rw-r--r--sys/contrib/dev/acpica/exmonad.c119
-rw-r--r--sys/contrib/dev/acpica/exmutex.c11
-rw-r--r--sys/contrib/dev/acpica/exnames.c8
-rw-r--r--sys/contrib/dev/acpica/exprep.c16
-rw-r--r--sys/contrib/dev/acpica/exregion.c8
-rw-r--r--sys/contrib/dev/acpica/exresolv.c4
-rw-r--r--sys/contrib/dev/acpica/exresop.c19
-rw-r--r--sys/contrib/dev/acpica/exstore.c26
-rw-r--r--sys/contrib/dev/acpica/exstoren.c3
-rw-r--r--sys/contrib/dev/acpica/exstorob.c11
-rw-r--r--sys/contrib/dev/acpica/exsystem.c25
-rw-r--r--sys/contrib/dev/acpica/exutils.c37
-rw-r--r--sys/contrib/dev/acpica/exxface.c5
-rw-r--r--sys/contrib/dev/acpica/hwacpi.c28
-rw-r--r--sys/contrib/dev/acpica/hwgpe.c16
-rw-r--r--sys/contrib/dev/acpica/hwregs.c52
-rw-r--r--sys/contrib/dev/acpica/hwsleep.c14
-rw-r--r--sys/contrib/dev/acpica/hwtimer.c6
-rw-r--r--sys/contrib/dev/acpica/nsaccess.c27
-rw-r--r--sys/contrib/dev/acpica/nsalloc.c40
-rw-r--r--sys/contrib/dev/acpica/nsdump.c22
-rw-r--r--sys/contrib/dev/acpica/nseval.c23
-rw-r--r--sys/contrib/dev/acpica/nsinit.c7
-rw-r--r--sys/contrib/dev/acpica/nsload.c13
-rw-r--r--sys/contrib/dev/acpica/nsnames.c11
-rw-r--r--sys/contrib/dev/acpica/nsobject.c20
-rw-r--r--sys/contrib/dev/acpica/nssearch.c12
-rw-r--r--sys/contrib/dev/acpica/nsutils.c28
-rw-r--r--sys/contrib/dev/acpica/nswalk.c18
-rw-r--r--sys/contrib/dev/acpica/nsxfname.c11
-rw-r--r--sys/contrib/dev/acpica/nsxfobj.c13
-rw-r--r--sys/contrib/dev/acpica/psargs.c9
-rw-r--r--sys/contrib/dev/acpica/psfind.c16
-rw-r--r--sys/contrib/dev/acpica/psopcode.c396
-rw-r--r--sys/contrib/dev/acpica/psparse.c211
-rw-r--r--sys/contrib/dev/acpica/psscope.c4
-rw-r--r--sys/contrib/dev/acpica/pstree.c18
-rw-r--r--sys/contrib/dev/acpica/psutils.c236
-rw-r--r--sys/contrib/dev/acpica/pswalk.c6
-rw-r--r--sys/contrib/dev/acpica/psxface.c3
-rw-r--r--sys/contrib/dev/acpica/rsaddr.c14
-rw-r--r--sys/contrib/dev/acpica/rscalc.c10
-rw-r--r--sys/contrib/dev/acpica/rscreate.c6
-rw-r--r--sys/contrib/dev/acpica/rsdump.c52
-rw-r--r--sys/contrib/dev/acpica/rsirq.c8
-rw-r--r--sys/contrib/dev/acpica/rslist.c12
-rw-r--r--sys/contrib/dev/acpica/rsmisc.c6
-rw-r--r--sys/contrib/dev/acpica/rsxface.c4
-rw-r--r--sys/contrib/dev/acpica/tbconvrt.c17
-rw-r--r--sys/contrib/dev/acpica/tbget.c30
-rw-r--r--sys/contrib/dev/acpica/tbinstal.c14
-rw-r--r--sys/contrib/dev/acpica/tbutils.c4
-rw-r--r--sys/contrib/dev/acpica/tbxface.c4
-rw-r--r--sys/contrib/dev/acpica/tbxfroot.c17
-rw-r--r--sys/contrib/dev/acpica/utalloc.c47
-rw-r--r--sys/contrib/dev/acpica/utcopy.c17
-rw-r--r--sys/contrib/dev/acpica/utdebug.c313
-rw-r--r--sys/contrib/dev/acpica/utdelete.c13
-rw-r--r--sys/contrib/dev/acpica/uteval.c10
-rw-r--r--sys/contrib/dev/acpica/utglobal.c109
-rw-r--r--sys/contrib/dev/acpica/utinit.c5
-rw-r--r--sys/contrib/dev/acpica/utmisc.c44
-rw-r--r--sys/contrib/dev/acpica/utobject.c21
-rw-r--r--sys/contrib/dev/acpica/utxface.c11
112 files changed, 1992 insertions, 2392 deletions
diff --git a/sys/contrib/dev/acpica/acconfig.h b/sys/contrib/dev/acpica/acconfig.h
index f4d99b8116f0..058d2036ecf8 100644
--- a/sys/contrib/dev/acpica/acconfig.h
+++ b/sys/contrib/dev/acpica/acconfig.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acconfig.h - Global configuration constants
- * $Revision: 68 $
+ * $Revision: 69 $
*
*****************************************************************************/
@@ -144,7 +144,7 @@
/* Version string */
-#define ACPI_CA_VERSION 0x20010816
+#define ACPI_CA_VERSION 0x20010831
/* Maximum objects in the various object caches */
diff --git a/sys/contrib/dev/acpica/acdebug.h b/sys/contrib/dev/acpica/acdebug.h
index 0a1c2934e919..5f89e28128b1 100644
--- a/sys/contrib/dev/acpica/acdebug.h
+++ b/sys/contrib/dev/acpica/acdebug.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acdebug.h - ACPI/AML debugger
- * $Revision: 44 $
+ * $Revision: 47 $
*
*****************************************************************************/
@@ -129,50 +129,44 @@ extern NATIVE_CHAR *optarg;
extern UINT8 *AmlPtr;
extern UINT32 AmlLength;
-extern BOOLEAN opt_tables;
-extern BOOLEAN opt_disasm;
-extern BOOLEAN opt_stats;
-extern BOOLEAN opt_parse_jit;
-extern BOOLEAN opt_verbose;
-extern BOOLEAN opt_ini_methods;
-
-
-extern NATIVE_CHAR *Args[DB_MAX_ARGS];
-extern NATIVE_CHAR LineBuf[80];
-extern NATIVE_CHAR ScopeBuf[40];
-extern NATIVE_CHAR DebugFilename[40];
-extern BOOLEAN OutputToFile;
-extern NATIVE_CHAR *Buffer;
-extern NATIVE_CHAR *Filename;
-extern NATIVE_CHAR *INDENT_STRING;
+extern BOOLEAN AcpiGbl_DbOpt_tables;
+extern BOOLEAN AcpiGbl_DbOpt_disasm;
+extern BOOLEAN AcpiGbl_DbOpt_stats;
+extern BOOLEAN AcpiGbl_DbOpt_parse_jit;
+extern BOOLEAN AcpiGbl_DbOpt_verbose;
+extern BOOLEAN AcpiGbl_DbOpt_ini_methods;
+
+
+extern NATIVE_CHAR *AcpiGbl_DbArgs[DB_MAX_ARGS];
+extern NATIVE_CHAR AcpiGbl_DbLineBuf[80];
+extern NATIVE_CHAR AcpiGbl_DbScopeBuf[40];
+extern NATIVE_CHAR AcpiGbl_DbDebugFilename[40];
+extern BOOLEAN AcpiGbl_DbOutputToFile;
+extern NATIVE_CHAR *AcpiGbl_DbBuffer;
+extern NATIVE_CHAR *AcpiGbl_DbFilename;
+extern NATIVE_CHAR *AcpiGbl_DbDisasmIndent;
extern UINT8 AcpiGbl_DbOutputFlags;
extern UINT32 AcpiGbl_DbDebugLevel;
extern UINT32 AcpiGbl_DbConsoleDebugLevel;
-extern UINT32 NumNames;
-extern UINT32 NumMethods;
-extern UINT32 NumRegions;
-extern UINT32 NumPackages;
-extern UINT32 NumAliases;
-extern UINT32 NumDevices;
-extern UINT32 NumFieldDefs;
-extern UINT32 NumThermalZones;
-extern UINT32 NumNodes;
-extern UINT32 NumGrammarElements;
-extern UINT32 NumMethodElements ;
-extern UINT32 NumMutexes;
-extern UINT32 NumPowerResources;
-extern UINT32 NumBankFields ;
-extern UINT32 NumIndexFields;
-extern UINT32 NumEvents;
-
-extern UINT32 SizeOfParseTree;
-extern UINT32 SizeOfMethodTrees;
-extern UINT32 SizeOfNTEs;
-extern UINT32 SizeOfAcpiObjects;
-
-
-#define BUFFER_SIZE 4196
+/*
+ * Statistic globals
+ */
+extern UINT16 AcpiGbl_ObjTypeCount[INTERNAL_TYPE_NODE_MAX+1];
+extern UINT16 AcpiGbl_NodeTypeCount[INTERNAL_TYPE_NODE_MAX+1];
+extern UINT16 AcpiGbl_ObjTypeCountMisc;
+extern UINT16 AcpiGbl_NodeTypeCountMisc;
+extern UINT32 AcpiGbl_NumNodes;
+extern UINT32 AcpiGbl_NumObjects;
+
+
+extern UINT32 AcpiGbl_SizeOfParseTree;
+extern UINT32 AcpiGbl_SizeOfMethodTrees;
+extern UINT32 AcpiGbl_SizeOfNodeEntries;
+extern UINT32 AcpiGbl_SizeOfAcpiObjects;
+
+
+#define ACPI_DEBUG_BUFFER_SIZE 4196
#define DB_REDIRECTABLE_OUTPUT 0x01
#define DB_CONSOLE_OUTPUT 0x02
@@ -196,7 +190,7 @@ typedef struct ArgumentInfo
#define PARAM_LIST(pl) pl
-#define DBTEST_OUTPUT_LEVEL(lvl) if (opt_verbose)
+#define DBTEST_OUTPUT_LEVEL(lvl) if (AcpiGbl_DbOpt_verbose)
#define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\
AcpiOsPrintf PARAM_LIST(fp);}
diff --git a/sys/contrib/dev/acpica/acexcep.h b/sys/contrib/dev/acpica/acexcep.h
index 717c0df350aa..44bc2cbc9499 100644
--- a/sys/contrib/dev/acpica/acexcep.h
+++ b/sys/contrib/dev/acpica/acexcep.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acexcep.h - Exception codes returned by the ACPI subsystem
- * $Revision: 49 $
+ * $Revision: 50 $
*
*****************************************************************************/
@@ -244,7 +244,7 @@
* String versions of the exception codes above
* These strings must match the corresponding defines exactly
*/
-NATIVE_CHAR *AcpiGbl_ExceptionNames_Env[] =
+NATIVE_CHAR const *AcpiGbl_ExceptionNames_Env[] =
{
"AE_OK",
"AE_ERROR",
@@ -275,7 +275,7 @@ NATIVE_CHAR *AcpiGbl_ExceptionNames_Env[] =
"AE_NO_GLOBAL_LOCK",
};
-NATIVE_CHAR *AcpiGbl_ExceptionNames_Pgm[] =
+NATIVE_CHAR const *AcpiGbl_ExceptionNames_Pgm[] =
{
"AE_BAD_PARAMETER",
"AE_BAD_CHARACTER",
@@ -284,7 +284,7 @@ NATIVE_CHAR *AcpiGbl_ExceptionNames_Pgm[] =
"AE_BAD_ADDRESS",
};
-NATIVE_CHAR *AcpiGbl_ExceptionNames_Tbl[] =
+NATIVE_CHAR const *AcpiGbl_ExceptionNames_Tbl[] =
{
"AE_BAD_SIGNATURE",
"AE_BAD_HEADER",
@@ -292,7 +292,7 @@ NATIVE_CHAR *AcpiGbl_ExceptionNames_Tbl[] =
"AE_BAD_VALUE",
};
-NATIVE_CHAR *AcpiGbl_ExceptionNames_Aml[] =
+NATIVE_CHAR const *AcpiGbl_ExceptionNames_Aml[] =
{
"AE_AML_ERROR",
"AE_AML_PARSE",
@@ -321,7 +321,7 @@ NATIVE_CHAR *AcpiGbl_ExceptionNames_Aml[] =
"AE_AML_INVALID_RESOURCE_TYPE",
};
-NATIVE_CHAR *AcpiGbl_ExceptionNames_Ctrl[] =
+NATIVE_CHAR const *AcpiGbl_ExceptionNames_Ctrl[] =
{
"AE_CTRL_RETURN_VALUE",
"AE_CTRL_PENDING",
diff --git a/sys/contrib/dev/acpica/acgcc.h b/sys/contrib/dev/acpica/acgcc.h
index c426663d1bc4..81192c2d807c 100644
--- a/sys/contrib/dev/acpica/acgcc.h
+++ b/sys/contrib/dev/acpica/acgcc.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acgcc.h - GCC specific defines, etc.
- * $Revision: 6 $
+ * $Revision: 9 $
*
*****************************************************************************/
@@ -192,7 +192,7 @@
#define disable() __cli()
#define enable() __sti()
#define halt() __asm__ __volatile__ ("sti; hlt":::"memory")
-#define wbinvd()
+#define wbinvd() __asm__ __volatile__ ("wbinvd":::"memory")
/*! [Begin] no source code translation
*
diff --git a/sys/contrib/dev/acpica/acglobal.h b/sys/contrib/dev/acpica/acglobal.h
index ee06d5e0bd51..bf05740b2170 100644
--- a/sys/contrib/dev/acpica/acglobal.h
+++ b/sys/contrib/dev/acpica/acglobal.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acglobal.h - Declarations for global variables
- * $Revision: 103 $
+ * $Revision: 106 $
*
*****************************************************************************/
@@ -131,8 +131,6 @@
#endif
-extern NATIVE_CHAR *MsgAcpiErrorBreak;
-
/*****************************************************************************
*
* Debug support
@@ -144,7 +142,6 @@ extern NATIVE_CHAR *MsgAcpiErrorBreak;
extern UINT32 AcpiDbgLevel;
extern UINT32 AcpiDbgLayer;
-
/* Procedure nesting level for debug output */
extern UINT32 AcpiGbl_NestingLevel;
@@ -226,8 +223,8 @@ ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockPresent;
extern BOOLEAN AcpiGbl_Shutdown;
extern UINT32 AcpiGbl_SystemFlags;
extern UINT32 AcpiGbl_StartupFlags;
-extern UINT8 AcpiGbl_DecodeTo8bit[8];
-extern NATIVE_CHAR AcpiGbl_HexToAscii[16];
+extern const UINT8 AcpiGbl_DecodeTo8bit[8];
+extern const NATIVE_CHAR *AcpiGbl_DbSleepStates[ACPI_NUM_SLEEP_STATES];
/*****************************************************************************
@@ -243,13 +240,16 @@ extern NATIVE_CHAR AcpiGbl_HexToAscii[16];
ACPI_EXTERN ACPI_NAMESPACE_NODE AcpiGbl_RootNodeStruct;
ACPI_EXTERN ACPI_NAMESPACE_NODE *AcpiGbl_RootNode;
-extern UINT8 AcpiGbl_NsProperties[NUM_NS_TYPES];
-extern PREDEFINED_NAMES AcpiGbl_PreDefinedNames [NUM_PREDEFINED_NAMES];
+extern const UINT8 AcpiGbl_NsProperties[NUM_NS_TYPES];
+extern const PREDEFINED_NAMES AcpiGbl_PreDefinedNames [NUM_PREDEFINED_NAMES];
#ifdef ACPI_DEBUG
ACPI_EXTERN UINT32 AcpiGbl_CurrentNodeCount;
ACPI_EXTERN UINT32 AcpiGbl_CurrentNodeSize;
ACPI_EXTERN UINT32 AcpiGbl_MaxConcurrentNodeCount;
+ACPI_EXTERN UINT32 AcpiGbl_EntryStackPointer;
+ACPI_EXTERN UINT32 AcpiGbl_LowestStackPointer;
+ACPI_EXTERN UINT32 AcpiGbl_DeepestNesting;
#endif
/*****************************************************************************
@@ -261,11 +261,9 @@ ACPI_EXTERN UINT32 AcpiGbl_MaxConcurrentNodeCount;
ACPI_EXTERN ACPI_WALK_LIST *AcpiGbl_CurrentWalkList;
-/*
- * Table of Address Space handlers
- */
-ACPI_EXTERN ACPI_ADR_SPACE_INFO AcpiGbl_AddressSpaces[ACPI_NUM_ADDRESS_SPACES];
+/* Address Space handlers */
+ACPI_EXTERN ACPI_ADR_SPACE_INFO AcpiGbl_AddressSpaces[ACPI_NUM_ADDRESS_SPACES];
/* Control method single step flag */
@@ -288,11 +286,10 @@ ACPI_EXTERN ACPI_PARSE_OBJECT *AcpiGbl_ParsedNamespaceRoot;
****************************************************************************/
ACPI_EXTERN ACPI_FIXED_EVENT_INFO AcpiGbl_FixedEventHandlers[ACPI_NUM_FIXED_EVENTS];
-
ACPI_EXTERN ACPI_HANDLE AcpiGbl_GpeObjHandle;
ACPI_EXTERN UINT32 AcpiGbl_GpeRegisterCount;
-ACPI_EXTERN ACPI_GPE_REGISTERS *AcpiGbl_GpeRegisters;
-ACPI_EXTERN ACPI_GPE_LEVEL_INFO *AcpiGbl_GpeInfo;
+ACPI_EXTERN ACPI_GPE_REGISTERS *AcpiGbl_GpeRegisters;
+ACPI_EXTERN ACPI_GPE_LEVEL_INFO *AcpiGbl_GpeInfo;
/*
* Gpe validation and translation table
@@ -323,6 +320,4 @@ ACPI_EXTERN BOOLEAN AcpiGbl_DbTerminateThreads;
#endif
-
-
#endif /* __ACGLOBAL_H__ */
diff --git a/sys/contrib/dev/acpica/aclocal.h b/sys/contrib/dev/acpica/aclocal.h
index d9fb59b36bfb..135da9f7cdcc 100644
--- a/sys/contrib/dev/acpica/aclocal.h
+++ b/sys/contrib/dev/acpica/aclocal.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: aclocal.h - Internal data types used across the ACPI subsystem
- * $Revision: 127 $
+ * $Revision: 130 $
*
*****************************************************************************/
@@ -124,7 +124,6 @@ typedef void* ACPI_MUTEX;
typedef UINT32 ACPI_MUTEX_HANDLE;
-
#define ACPI_MEMORY_MODE 0x01
#define ACPI_LOGICAL_ADDRESSING 0x00
#define ACPI_PHYSICAL_ADDRESSING 0x01
@@ -630,15 +629,30 @@ ACPI_STATUS (*ACPI_PARSE_UPWARDS) (
#define ACPI_GET_OP_ARGS(a) ((a)->Flags & ACPI_OP_ARGS_MASK)
#define ACPI_GET_OP_TYPE(a) ((a)->Flags & ACPI_OP_TYPE_MASK)
+/*
+ * Flags byte: 0-4 (5 bits) = Opcode Class (0x001F
+ * 5 (1 bit) = Has arguments flag
+ * 6-7 (2 bits) = Reserved
+ */
+#define AML_NO_ARGS 0
+#define AML_HAS_ARGS 0x0020
+#define AML_NSOBJECT 0x0100
+#define AML_NSOPCODE 0x0200
+#define AML_NSNODE 0x0400
+#define AML_NAMED 0x0800
+#define AML_DEFER 0x1000
+#define AML_FIELD 0x2000
+#define AML_CREATE 0x4000
+
/*
* AML opcode, name, and argument layout
*/
typedef struct acpi_opcode_info
{
- UINT8 Flags; /* Opcode type, HasArgs flag */
UINT32 ParseArgs; /* Grammar/Parse time arguments */
UINT32 RuntimeArgs; /* Interpret time arguments */
+ UINT16 Flags; /* Opcode type, HasArgs flag */
#ifdef _OPCODE_NAMES
NATIVE_CHAR *Name; /* op name (debug only) */
@@ -918,7 +932,6 @@ typedef struct
} ACPI_DEVICE_ID;
-
/*****************************************************************************
*
* Miscellaneous
@@ -945,13 +958,20 @@ typedef struct dbmethodinfo
} DB_METHOD_INFO;
-
/*****************************************************************************
*
* Debug
*
****************************************************************************/
+typedef struct
+{
+ UINT32 ComponentId;
+ NATIVE_CHAR *ProcName;
+ NATIVE_CHAR *ModuleName;
+
+} ACPI_DEBUG_PRINT_INFO;
+
/* Entry for a memory allocation (debug only) */
@@ -984,7 +1004,6 @@ typedef struct AcpiDebugMemBlock
} ACPI_DEBUG_MEM_BLOCK;
-
#define ACPI_MEM_LIST_GLOBAL 0
#define ACPI_MEM_LIST_NSNODE 1
@@ -1021,5 +1040,4 @@ typedef struct
} ACPI_MEMORY_LIST;
-
#endif /* __ACLOCAL_H__ */
diff --git a/sys/contrib/dev/acpica/acmacros.h b/sys/contrib/dev/acpica/acmacros.h
index 620a8d5b9b0b..755bdb0a0865 100644
--- a/sys/contrib/dev/acpica/acmacros.h
+++ b/sys/contrib/dev/acpica/acmacros.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acmacros.h - C macros for the entire subsystem.
- * $Revision: 86 $
+ * $Revision: 94 $
*
*****************************************************************************/
@@ -320,7 +320,7 @@
#define ROUND_UP_TO(value,boundary) (((value) + ((boundary)-1)) / (boundary))
-/*
+/*
* Bitmask creation
* Bit positions start at zero.
* MASK_BITS_ABOVE creates a mask starting AT the position and above
@@ -330,7 +330,6 @@
#define MASK_BITS_BELOW(position) (((UINT32)(-1)) << ((UINT32) (position)))
-
/* Macros for GAS addressing */
#ifndef _IA16
@@ -395,9 +394,9 @@
* Macros for the master AML opcode table
*/
#ifdef ACPI_DEBUG
-#define OP_INFO_ENTRY(Flags,Name,PArgs,IArgs) {Flags,PArgs,IArgs,Name}
+#define ACPI_OP(Name,PArgs,IArgs,Flags) {PArgs,IArgs,Flags,Name}
#else
-#define OP_INFO_ENTRY(Flags,Name,PArgs,IArgs) {Flags,PArgs,IArgs}
+#define ACPI_OP(Name,PArgs,IArgs,Flags) {PArgs,IArgs,Flags}
#endif
#define ARG_TYPE_WIDTH 5
@@ -460,37 +459,33 @@
#ifdef ACPI_DEBUG
-#define REPORT_INFO(fp) {_ReportInfo(_THIS_MODULE,__LINE__,_COMPONENT); \
+#define REPORT_INFO(fp) {AcpiUtReportInfo(_THIS_MODULE,__LINE__,_COMPONENT); \
AcpiOsPrintf PARAM_LIST(fp);}
-#define REPORT_ERROR(fp) {_ReportError(_THIS_MODULE,__LINE__,_COMPONENT); \
+#define REPORT_ERROR(fp) {AcpiUtReportError(_THIS_MODULE,__LINE__,_COMPONENT); \
AcpiOsPrintf PARAM_LIST(fp);}
-#define REPORT_WARNING(fp) {_ReportWarning(_THIS_MODULE,__LINE__,_COMPONENT); \
+#define REPORT_WARNING(fp) {AcpiUtReportWarning(_THIS_MODULE,__LINE__,_COMPONENT); \
AcpiOsPrintf PARAM_LIST(fp);}
#else
-#define REPORT_INFO(fp) {_ReportInfo("ACPI",__LINE__,_COMPONENT); \
+#define REPORT_INFO(fp) {AcpiUtReportInfo("ACPI",__LINE__,_COMPONENT); \
AcpiOsPrintf PARAM_LIST(fp);}
-#define REPORT_ERROR(fp) {_ReportError("ACPI",__LINE__,_COMPONENT); \
+#define REPORT_ERROR(fp) {AcpiUtReportError("ACPI",__LINE__,_COMPONENT); \
AcpiOsPrintf PARAM_LIST(fp);}
-#define REPORT_WARNING(fp) {_ReportWarning("ACPI",__LINE__,_COMPONENT); \
+#define REPORT_WARNING(fp) {AcpiUtReportWarning("ACPI",__LINE__,_COMPONENT); \
AcpiOsPrintf PARAM_LIST(fp);}
#endif
/* Error reporting. These versions pass thru the module and line# */
-#define _REPORT_INFO(a,b,c,fp) {_ReportInfo(a,b,c); \
+#define _REPORT_INFO(a,b,c,fp) {AcpiUtReportInfo(a,b,c); \
AcpiOsPrintf PARAM_LIST(fp);}
-#define _REPORT_ERROR(a,b,c,fp) {_ReportError(a,b,c); \
+#define _REPORT_ERROR(a,b,c,fp) {AcpiUtReportError(a,b,c); \
AcpiOsPrintf PARAM_LIST(fp);}
-#define _REPORT_WARNING(a,b,c,fp) {_ReportWarning(a,b,c); \
+#define _REPORT_WARNING(a,b,c,fp) {AcpiUtReportWarning(a,b,c); \
AcpiOsPrintf PARAM_LIST(fp);}
-/* Buffer dump macros */
-
-#define DUMP_BUFFER(a,b) AcpiUtDumpBuffer((UINT8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT)
-
/*
* Debug macros that are conditionally compiled
*/
@@ -505,15 +500,22 @@
* as a local string ("_ProcName) so that it can be also used by the function exit macros below.
*/
-#define PROC_NAME(a) char * _ProcName = a;
-#define FUNCTION_TRACE(a) char * _ProcName = a;\
- FunctionTrace(_THIS_MODULE,__LINE__,_COMPONENT,a)
-#define FUNCTION_TRACE_PTR(a,b) char * _ProcName = a;\
- FunctionTracePtr(_THIS_MODULE,__LINE__,_COMPONENT,a,(void *)b)
-#define FUNCTION_TRACE_U32(a,b) char * _ProcName = a;\
- FunctionTraceU32(_THIS_MODULE,__LINE__,_COMPONENT,a,(UINT32)b)
-#define FUNCTION_TRACE_STR(a,b) char * _ProcName = a;\
- FunctionTraceStr(_THIS_MODULE,__LINE__,_COMPONENT,a,(NATIVE_CHAR *)b)
+#define PROC_NAME(a) ACPI_DEBUG_PRINT_INFO _Dbg; \
+ _Dbg.ComponentId = _COMPONENT; \
+ _Dbg.ProcName = a; \
+ _Dbg.ModuleName = _THIS_MODULE;
+
+#define FUNCTION_TRACE(a) PROC_NAME(a)\
+ AcpiUtTrace(__LINE__,&_Dbg)
+#define FUNCTION_TRACE_PTR(a,b) PROC_NAME(a)\
+ AcpiUtTracePtr(__LINE__,&_Dbg,(void *)b)
+#define FUNCTION_TRACE_U32(a,b) PROC_NAME(a)\
+ AcpiUtTraceU32(__LINE__,&_Dbg,(UINT32)b)
+#define FUNCTION_TRACE_STR(a,b) PROC_NAME(a)\
+ AcpiUtTraceStr(__LINE__,&_Dbg,(NATIVE_CHAR *)b)
+
+#define FUNCTION_ENTRY() AcpiUtTrackStackPtr()
+
/*
* Function exit tracing.
* WARNING: These macros include a return statement. This is usually considered
@@ -521,10 +523,10 @@
* One of the FUNCTION_TRACE macros above must be used in conjunction with these macros
* so that "_ProcName" is defined.
*/
-#define return_VOID {FunctionExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName);return;}
-#define return_ACPI_STATUS(s) {FunctionStatusExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName,s);return(s);}
-#define return_VALUE(s) {FunctionValueExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName,s);return(s);}
-#define return_PTR(s) {FunctionPtrExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName,(UINT8 *)s);return(s);}
+#define return_VOID {AcpiUtExit(__LINE__,&_Dbg);return;}
+#define return_ACPI_STATUS(s) {AcpiUtStatusExit(__LINE__,&_Dbg,s);return(s);}
+#define return_VALUE(s) {AcpiUtValueExit(__LINE__,&_Dbg,s);return(s);}
+#define return_PTR(s) {AcpiUtPtrExit(__LINE__,&_Dbg,(UINT8 *)s);return(s);}
/* Conditional execution */
@@ -548,6 +550,7 @@
#define DUMP_TABLES(a,b) AcpiNsDumpTables(a,b)
#define DUMP_PATHNAME(a,b,c,d) AcpiNsDumpPathname(a,b,c,d)
#define DUMP_RESOURCE_LIST(a) AcpiRsDumpResourceList(a)
+#define DUMP_BUFFER(a,b) AcpiUtDumpBuffer((UINT8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT)
#define BREAK_MSG(a) AcpiOsSignal (ACPI_SIGNAL_BREAKPOINT,(a))
@@ -595,12 +598,14 @@
#define FUNCTION_EXIT
#define FUNCTION_STATUS_EXIT(s)
#define FUNCTION_VALUE_EXIT(s)
+#define FUNCTION_ENTRY()
#define DUMP_STACK_ENTRY(a)
#define DUMP_OPERANDS(a,b,c,d,e)
#define DUMP_ENTRY(a,b)
#define DUMP_TABLES(a,b)
#define DUMP_PATHNAME(a,b,c,d)
#define DUMP_RESOURCE_LIST(a)
+#define DUMP_BUFFER(a,b)
#define ACPI_DEBUG_PRINT(pl)
#define ACPI_DEBUG_PRINT_RAW(pl)
#define BREAK_MSG(a)
@@ -636,19 +641,15 @@
#ifdef ACPI_DEBUG
-
/*
* 1) Set name to blanks
* 2) Copy the object name
*/
-
#define ADD_OBJECT_NAME(a,b) MEMSET (a->Common.Name, ' ', sizeof (a->Common.Name));\
STRNCPY (a->Common.Name, AcpiGbl_NsTypeNames[b], sizeof (a->Common.Name))
-
#else
#define ADD_OBJECT_NAME(a,b)
-
#endif
@@ -678,4 +679,6 @@
#endif /* ACPI_DBG_TRACK_ALLOCATIONS */
+#define ACPI_GET_STACK_POINTER _asm {mov eax, ebx}
+
#endif /* ACMACROS_H */
diff --git a/sys/contrib/dev/acpica/acoutput.h b/sys/contrib/dev/acpica/acoutput.h
index 48cf7bd54d70..0bb067af7bcc 100644
--- a/sys/contrib/dev/acpica/acoutput.h
+++ b/sys/contrib/dev/acpica/acoutput.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acoutput.h -- debug output
- * $Revision: 81 $
+ * $Revision: 84 $
*
*****************************************************************************/
@@ -170,37 +170,44 @@
#define ACPI_LV_ALL_EXCEPTIONS 0x0000003F
-/* Trace level -- also used in the global "DebugLevel" */
+/* Trace verbosity level 1 [Standard Trace Level] */
+
+#define ACPI_LV_PARSE 0x00000040
+#define ACPI_LV_LOAD 0x00000080
+#define ACPI_LV_DISPATCH 0x00000100
+#define ACPI_LV_EXEC 0x00000200
+#define ACPI_LV_NAMES 0x00000400
+#define ACPI_LV_OPREGION 0x00000800
+#define ACPI_LV_BFIELD 0x00001000
+#define ACPI_LV_TABLES 0x00002000
+#define ACPI_LV_VALUES 0x00004000
+#define ACPI_LV_OBJECTS 0x00008000
+#define ACPI_LV_RESOURCES 0x00010000
+#define ACPI_LV_USER_REQUESTS 0x00020000
+#define ACPI_LV_PACKAGE 0x00040000
+#define ACPI_LV_INIT 0x00080000
+#define ACPI_LV_VERBOSITY1 0x000FFF40 | ACPI_LV_ALL_EXCEPTIONS
+
+/* Trace verbosity level 2 [Function tracing and memory allocation] */
-#define ACPI_LV_THREADS 0x00000080
-#define ACPI_LV_PARSE 0x00000100
-#define ACPI_LV_DISPATCH 0x00000200
-#define ACPI_LV_LOAD 0x00000400
-#define ACPI_LV_EXEC 0x00000800
-#define ACPI_LV_NAMES 0x00001000
-#define ACPI_LV_OPREGION 0x00002000
-#define ACPI_LV_BFIELD 0x00004000
-#define ACPI_LV_TRASH 0x00008000
-#define ACPI_LV_TABLES 0x00010000
-#define ACPI_LV_FUNCTIONS 0x00020000
-#define ACPI_LV_VALUES 0x00040000
-#define ACPI_LV_OBJECTS 0x00080000
#define ACPI_LV_ALLOCATIONS 0x00100000
-#define ACPI_LV_RESOURCES 0x00200000
-#define ACPI_LV_IO 0x00400000
-#define ACPI_LV_INTERRUPTS 0x00800000
-#define ACPI_LV_USER_REQUESTS 0x01000000
-#define ACPI_LV_PACKAGE 0x02000000
-#define ACPI_LV_MUTEX 0x04000000
-#define ACPI_LV_INIT 0x08000000
-#define ACPI_LV_ALL 0x0FFFFF80
+#define ACPI_LV_FUNCTIONS 0x00200000
+#define ACPI_LV_VERBOSITY2 0x00300000 | ACPI_LV_VERBOSITY1
+#define ACPI_LV_ALL ACPI_LV_VERBOSITY2
+
+/* Trace verbosity level 3 [Threading, I/O, and Interrupts] */
+#define ACPI_LV_MUTEX 0x01000000
+#define ACPI_LV_THREADS 0x02000000
+#define ACPI_LV_IO 0x04000000
+#define ACPI_LV_INTERRUPTS 0x08000000
+#define ACPI_LV_VERBOSITY3 0x0F000000 | ACPI_LV_VERBOSITY2
/*
* Debug level macros that are used in the DEBUG_PRINT macros
*/
-#define ACPI_DEBUG_LEVEL(val) val,_COMPONENT,_ProcName,_THIS_MODULE,__LINE__
+#define ACPI_DEBUG_LEVEL(dl) dl,__LINE__,&_Dbg
/* Exception level -- used in the global "DebugLevel" */
@@ -223,7 +230,6 @@
#define ACPI_DB_NAMES ACPI_DEBUG_LEVEL (ACPI_LV_NAMES)
#define ACPI_DB_OPREGION ACPI_DEBUG_LEVEL (ACPI_LV_OPREGION)
#define ACPI_DB_BFIELD ACPI_DEBUG_LEVEL (ACPI_LV_BFIELD)
-#define ACPI_DB_TRASH ACPI_DEBUG_LEVEL (ACPI_LV_TRASH)
#define ACPI_DB_TABLES ACPI_DEBUG_LEVEL (ACPI_LV_TABLES)
#define ACPI_DB_FUNCTIONS ACPI_DEBUG_LEVEL (ACPI_LV_FUNCTIONS)
#define ACPI_DB_VALUES ACPI_DEBUG_LEVEL (ACPI_LV_VALUES)
diff --git a/sys/contrib/dev/acpica/acparser.h b/sys/contrib/dev/acpica/acparser.h
index 30890546af19..48f6fddb91b2 100644
--- a/sys/contrib/dev/acpica/acparser.h
+++ b/sys/contrib/dev/acpica/acparser.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: acparser.h - AML Parser subcomponent prototypes and defines
- * $Revision: 49 $
+ * $Revision: 51 $
*
*****************************************************************************/
@@ -152,15 +152,6 @@ AcpiPsxExecute (
ACPI_OPERAND_OBJECT **Params,
ACPI_OPERAND_OBJECT **ReturnObjDesc);
-
-BOOLEAN
-AcpiPsIsNamespaceObjectOp (
- UINT16 Opcode);
-BOOLEAN
-AcpiPsIsNamespaceOp (
- UINT16 Opcode);
-
-
/******************************************************************************
*
* Parser interfaces
@@ -208,7 +199,7 @@ AcpiPsGetNextArg (
/* psopcode - AML Opcode information */
-ACPI_OPCODE_INFO *
+const ACPI_OPCODE_INFO *
AcpiPsGetOpcodeInfo (
UINT16 Opcode);
@@ -377,34 +368,6 @@ BOOLEAN
AcpiPsIsPrefixChar (
UINT32 c);
-BOOLEAN
-AcpiPsIsNamedOp (
- UINT16 opcode);
-
-BOOLEAN
-AcpiPsIsNodeOp (
- UINT16 opcode);
-
-BOOLEAN
-AcpiPsIsDeferredOp (
- UINT16 opcode);
-
-BOOLEAN
-AcpiPsIsBytelistOp(
- UINT16 opcode);
-
-BOOLEAN
-AcpiPsIsFieldOp(
- UINT16 opcode);
-
-BOOLEAN
-AcpiPsIsCreateFieldOp (
- UINT16 Opcode);
-
-ACPI_PARSE2_OBJECT*
-AcpiPsToExtendedOp(
- ACPI_PARSE_OBJECT *op);
-
UINT32
AcpiPsGetName(
ACPI_PARSE_OBJECT *op);
diff --git a/sys/contrib/dev/acpica/acstruct.h b/sys/contrib/dev/acpica/acstruct.h
index b4947a71268a..d76bc2a1f197 100644
--- a/sys/contrib/dev/acpica/acstruct.h
+++ b/sys/contrib/dev/acpica/acstruct.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acstruct.h - Internal structs
- * $Revision: 3 $
+ * $Revision: 5 $
*
*****************************************************************************/
@@ -139,7 +139,7 @@
typedef struct acpi_walk_state
{
- UINT8 DataType; /* To differentiate various internal objs */\
+ UINT8 DataType; /* To differentiate various internal objs MUST BE FIRST!*/\
ACPI_OWNER_ID OwnerId; /* Owner of objects created during the walk */
BOOLEAN LastPredicate; /* Result of last predicate */
UINT8 NextOpInfo; /* Info about NextOp */
@@ -159,7 +159,7 @@ typedef struct acpi_walk_state
ACPI_GENERIC_STATE *ScopeInfo; /* Stack of nested scopes */
ACPI_PARSE_STATE *ParserState; /* Current state of parser */
UINT8 *AmlLastWhile;
- ACPI_OPCODE_INFO *OpInfo; /* Info on current opcode */
+ const ACPI_OPCODE_INFO *OpInfo; /* Info on current opcode */
ACPI_PARSE_DOWNWARDS DescendingCallback;
ACPI_PARSE_UPWARDS AscendingCallback;
diff --git a/sys/contrib/dev/acpica/actypes.h b/sys/contrib/dev/acpica/actypes.h
index aeb27423bf84..2375901fb38a 100644
--- a/sys/contrib/dev/acpica/actypes.h
+++ b/sys/contrib/dev/acpica/actypes.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actypes.h - Common data types for the entire ACPI subsystem
- * $Revision: 186 $
+ * $Revision: 187 $
*
*****************************************************************************/
@@ -827,6 +827,11 @@ typedef struct
} ACPI_MEM_SPACE_CONTEXT;
+/* Sleep states */
+
+#define ACPI_NUM_SLEEP_STATES 7
+
+
/*
* Definitions for Resource Attributes
*/
diff --git a/sys/contrib/dev/acpica/acutils.h b/sys/contrib/dev/acpica/acutils.h
index 23498fd3bff5..4e9add60f093 100644
--- a/sys/contrib/dev/acpica/acutils.h
+++ b/sys/contrib/dev/acpica/acutils.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
- * $Revision: 108 $
+ * $Revision: 112 $
*
*****************************************************************************/
@@ -345,102 +345,79 @@ AcpiUtUpdateObjectReference (
ACPI_OPERAND_OBJECT *Object,
UINT16 Action);
-ACPI_OPERAND_OBJECT *
-_UtCreateInternalObject (
- NATIVE_CHAR *ModuleName,
- UINT32 LineNumber,
- UINT32 ComponentId,
- ACPI_OBJECT_TYPE8 Type);
-
/*
* UtDebug - Debug interfaces
*/
-UINT32
-GetDebugLevel (
+void
+AcpiUtInitStackPtrTrace (
void);
void
-SetDebugLevel (
- UINT32 level);
+AcpiUtTrackStackPtr (
+ void);
void
-FunctionTrace (
- NATIVE_CHAR *ModuleName,
+AcpiUtTrace (
UINT32 LineNumber,
- UINT32 ComponentId,
- NATIVE_CHAR *FunctionName);
+ ACPI_DEBUG_PRINT_INFO *DbgInfo);
void
-FunctionTracePtr (
- NATIVE_CHAR *ModuleName,
+AcpiUtTracePtr (
UINT32 LineNumber,
- UINT32 ComponentId,
- NATIVE_CHAR *FunctionName,
+ ACPI_DEBUG_PRINT_INFO *DbgInfo,
void *Pointer);
void
-FunctionTraceU32 (
- NATIVE_CHAR *ModuleName,
+AcpiUtTraceU32 (
UINT32 LineNumber,
- UINT32 ComponentId,
- NATIVE_CHAR *FunctionName,
+ ACPI_DEBUG_PRINT_INFO *DbgInfo,
UINT32 Integer);
void
-FunctionTraceStr (
- NATIVE_CHAR *ModuleName,
+AcpiUtTraceStr (
UINT32 LineNumber,
- UINT32 ComponentId,
- NATIVE_CHAR *FunctionName,
+ ACPI_DEBUG_PRINT_INFO *DbgInfo,
NATIVE_CHAR *String);
void
-FunctionExit (
- NATIVE_CHAR *ModuleName,
+AcpiUtExit (
UINT32 LineNumber,
- UINT32 ComponentId,
- NATIVE_CHAR *FunctionName);
+ ACPI_DEBUG_PRINT_INFO *DbgInfo);
void
-FunctionStatusExit (
- NATIVE_CHAR *ModuleName,
+AcpiUtStatusExit (
UINT32 LineNumber,
- UINT32 ComponentId,
- NATIVE_CHAR *FunctionName,
+ ACPI_DEBUG_PRINT_INFO *DbgInfo,
ACPI_STATUS Status);
void
-FunctionValueExit (
- NATIVE_CHAR *ModuleName,
+AcpiUtValueExit (
UINT32 LineNumber,
- UINT32 ComponentId,
- NATIVE_CHAR *FunctionName,
+ ACPI_DEBUG_PRINT_INFO *DbgInfo,
ACPI_INTEGER Value);
void
-FunctionPtrExit (
- NATIVE_CHAR *ModuleName,
+AcpiUtPtrExit (
UINT32 LineNumber,
- UINT32 ComponentId,
- NATIVE_CHAR *FunctionName,
+ ACPI_DEBUG_PRINT_INFO *DbgInfo,
UINT8 *Ptr);
void
-_ReportInfo (
+AcpiUtReportInfo (
NATIVE_CHAR *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId);
void
-_ReportError (
+AcpiUtReportError (
NATIVE_CHAR *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId);
void
-_ReportWarning (
+AcpiUtReportWarning (
NATIVE_CHAR *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId);
@@ -455,23 +432,20 @@ AcpiUtDumpBuffer (
void
AcpiUtDebugPrint (
UINT32 RequestedDebugLevel,
- UINT32 ComponentId,
- NATIVE_CHAR *ModuleName,
- NATIVE_CHAR *ProcName,
UINT32 LineNumber,
+ ACPI_DEBUG_PRINT_INFO *DbgInfo,
char *Format,
...);
void
AcpiUtDebugPrintRaw (
UINT32 RequestedDebugLevel,
- UINT32 ComponentId,
- NATIVE_CHAR *ModuleName,
- NATIVE_CHAR *ProcName,
UINT32 LineNumber,
+ ACPI_DEBUG_PRINT_INFO *DbgInfo,
char *Format,
...);
+
/*
* UtDelete - Object deletion
*/
@@ -563,14 +537,21 @@ AcpiUtReleaseMutex (
* UtObject - internal object create/delete/cache routines
*/
+ACPI_OPERAND_OBJECT *
+AcpiUtCreateInternalObjectDbg (
+ NATIVE_CHAR *ModuleName,
+ UINT32 LineNumber,
+ UINT32 ComponentId,
+ ACPI_OBJECT_TYPE8 Type);
+
void *
-_UtAllocateObjectDesc (
+AcpiUtAllocateObjectDescDbg (
NATIVE_CHAR *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId);
-#define AcpiUtCreateInternalObject(t) _UtCreateInternalObject(_THIS_MODULE,__LINE__,_COMPONENT,t)
-#define AcpiUtAllocateObjectDesc() _UtAllocateObjectDesc(_THIS_MODULE,__LINE__,_COMPONENT)
+#define AcpiUtCreateInternalObject(t) AcpiUtCreateInternalObjectDbg (_THIS_MODULE,__LINE__,_COMPONENT,t)
+#define AcpiUtAllocateObjectDesc() AcpiUtAllocateObjectDescDbg (_THIS_MODULE,__LINE__,_COMPONENT)
void
AcpiUtDeleteObjectDesc (
@@ -759,5 +740,4 @@ AcpiUtDumpCurrentAllocations (
#endif
-
#endif /* _ACUTILS_H */
diff --git a/sys/contrib/dev/acpica/dbcmds.c b/sys/contrib/dev/acpica/dbcmds.c
index b729ae2abb72..fa77b566bd58 100644
--- a/sys/contrib/dev/acpica/dbcmds.c
+++ b/sys/contrib/dev/acpica/dbcmds.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbcmds - debug commands and output routines
- * $Revision: 61 $
+ * $Revision: 65 $
*
******************************************************************************/
@@ -138,7 +138,7 @@
* These object types map directly to the ACPI_TYPES
*/
-ARGUMENT_INFO AcpiDbObjectTypes [] =
+ARGUMENT_INFO AcpiDbObjectTypes [] =
{
{"ANY"},
{"NUMBERS"},
@@ -326,7 +326,7 @@ AcpiDbUnloadAcpiTable (
for (i = 0; i < NUM_ACPI_TABLES; i++)
{
- if (!STRNCMP (TableArg, AcpiGbl_AcpiTableData[i].Signature,
+ if (!STRNCMP (TableArg, AcpiGbl_AcpiTableData[i].Signature,
AcpiGbl_AcpiTableData[i].SigLength))
{
/* Found the table, unload it */
@@ -338,7 +338,7 @@ AcpiDbUnloadAcpiTable (
}
else
{
- AcpiOsPrintf ("%s, while unloading [%s]\n",
+ AcpiOsPrintf ("%s, while unloading [%s]\n",
AcpiFormatException (Status), TableArg);
}
@@ -984,7 +984,7 @@ AcpiDbSetScope (
if (!Name || Name[0] == 0)
{
- AcpiOsPrintf ("Current scope: %s\n", ScopeBuf);
+ AcpiOsPrintf ("Current scope: %s\n", AcpiGbl_DbScopeBuf);
return;
}
@@ -994,17 +994,17 @@ AcpiDbSetScope (
if (Name[0] == '\\')
{
- STRCPY (ScopeBuf, Name);
- STRCAT (ScopeBuf, "\\");
+ STRCPY (AcpiGbl_DbScopeBuf, Name);
+ STRCAT (AcpiGbl_DbScopeBuf, "\\");
}
else
{
- STRCAT (ScopeBuf, Name);
- STRCAT (ScopeBuf, "\\");
+ STRCAT (AcpiGbl_DbScopeBuf, Name);
+ STRCAT (AcpiGbl_DbScopeBuf, "\\");
}
- AcpiOsPrintf ("New scope: %s\n", ScopeBuf);
+ AcpiOsPrintf ("New scope: %s\n", AcpiGbl_DbScopeBuf);
}
@@ -1038,8 +1038,9 @@ AcpiDbDisplayResources (
/* Prepare for a return object of arbitrary size */
- ReturnObj.Pointer = Buffer;
- ReturnObj.Length = BUFFER_SIZE;
+ ReturnObj.Pointer = AcpiGbl_DbBuffer;
+ ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
+
/* _PRT */
@@ -1049,54 +1050,61 @@ AcpiDbDisplayResources (
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Could not obtain _PRT: %s\n", AcpiFormatException (Status));
- goto GoCRS;
+ goto GetCrs;
}
- ReturnObj.Pointer = Buffer;
- ReturnObj.Length = BUFFER_SIZE;
+ ReturnObj.Pointer = AcpiGbl_DbBuffer;
+ ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiGetIrqRoutingTable (ObjDesc, &ReturnObj);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("GetIrqRoutingTable failed: %s\n", AcpiFormatException (Status));
- goto GoCRS;
}
+ else
+ {
+ AcpiRsDumpIrqList ((UINT8 *) AcpiGbl_DbBuffer);
+ }
- AcpiRsDumpIrqList((UINT8 *)Buffer);
/* _CRS */
-GoCRS:
+
+GetCrs:
AcpiOsPrintf ("Evaluating _CRS\n");
- ReturnObj.Pointer = Buffer;
- ReturnObj.Length = BUFFER_SIZE;
+ ReturnObj.Pointer = AcpiGbl_DbBuffer;
+ ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiEvaluateObject (ObjDesc, "_CRS", NULL, &ReturnObj);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Could not obtain _CRS: %s\n", AcpiFormatException (Status));
- goto GoPRS;
+ goto GetPrs;
}
- ReturnObj.Pointer = Buffer;
- ReturnObj.Length = BUFFER_SIZE;
+ ReturnObj.Pointer = AcpiGbl_DbBuffer;
+ ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiGetCurrentResources (ObjDesc, &ReturnObj);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("AcpiGetCurrentResources failed: %s\n", AcpiFormatException (Status));
- goto GoPRS;
}
- AcpiRsDumpResourceList ((ACPI_RESOURCE *) Buffer);
+ else
+ {
+ AcpiRsDumpResourceList ((ACPI_RESOURCE *) AcpiGbl_DbBuffer);
+ }
+
/* _PRS */
-GoPRS:
+
+GetPrs:
AcpiOsPrintf ("Evaluating _PRS\n");
- ReturnObj.Pointer = Buffer;
- ReturnObj.Length = BUFFER_SIZE;
+ ReturnObj.Pointer = AcpiGbl_DbBuffer;
+ ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiEvaluateObject (ObjDesc, "_PRS", NULL, &ReturnObj);
if (ACPI_FAILURE (Status))
@@ -1105,17 +1113,19 @@ GoPRS:
goto Cleanup;
}
- ReturnObj.Pointer = Buffer;
- ReturnObj.Length = BUFFER_SIZE;
+ ReturnObj.Pointer = AcpiGbl_DbBuffer;
+ ReturnObj.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiGetPossibleResources (ObjDesc, &ReturnObj);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("AcpiGetPossibleResources failed: %s\n", AcpiFormatException (Status));
- goto Cleanup;
}
- AcpiRsDumpResourceList ((ACPI_RESOURCE *) Buffer);
+ else
+ {
+ AcpiRsDumpResourceList ((ACPI_RESOURCE *) AcpiGbl_DbBuffer);
+ }
Cleanup:
diff --git a/sys/contrib/dev/acpica/dbdisasm.c b/sys/contrib/dev/acpica/dbdisasm.c
index ccf68bf8a303..0e07f53def9d 100644
--- a/sys/contrib/dev/acpica/dbdisasm.c
+++ b/sys/contrib/dev/acpica/dbdisasm.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbdisasm - parser op tree display routines
- * $Revision: 43 $
+ * $Revision: 48 $
*
******************************************************************************/
@@ -135,7 +135,7 @@
#define DB_FULL_OP_INFO "%5.5X #%4.4X [%2.2d] "
-NATIVE_CHAR *INDENT_STRING = "....";
+NATIVE_CHAR *AcpiGbl_DbDisasmIndent = "....";
/*******************************************************************************
@@ -205,7 +205,6 @@ AcpiPsDisplayObjectPathname (
* (such as _OS_). Rather than worry about looking up all
* the predefined names, just display the name as given
*/
-
AcpiOsPrintf (" **** Path not found in parse tree");
}
@@ -299,7 +298,7 @@ AcpiDbDisplayOp (
/* indentation */
DepthCount = 0;
- if (!opt_verbose)
+ if (!AcpiGbl_DbOpt_verbose)
{
DepthCount++;
}
@@ -330,7 +329,7 @@ AcpiDbDisplayOp (
VERBOSE_PRINT ((DB_NO_OP_INFO, LastDepth));
for (i = 0; i < LastDepth; i++)
{
- AcpiOsPrintf ("%s", INDENT_STRING);
+ AcpiOsPrintf ("%s", AcpiGbl_DbDisasmIndent);
}
if (AcpiDbBlockType (Op) == BLOCK_PAREN)
@@ -352,7 +351,7 @@ AcpiDbDisplayOp (
VERBOSE_PRINT ((DB_NO_OP_INFO, LastDepth - j));
for (i = 0; i < (LastDepth - j - 1); i++)
{
- AcpiOsPrintf ("%s", INDENT_STRING);
+ AcpiOsPrintf ("%s", AcpiGbl_DbDisasmIndent);
}
if (AcpiDbBlockType (Op) == BLOCK_PAREN)
@@ -375,7 +374,7 @@ AcpiDbDisplayOp (
for (i = 0; i < DepthCount; i++)
{
- AcpiOsPrintf ("%s", INDENT_STRING);
+ AcpiOsPrintf ("%s", AcpiGbl_DbDisasmIndent);
}
@@ -387,7 +386,7 @@ AcpiDbDisplayOp (
if ((Op->Opcode == AML_INT_NAMEPATH_OP && Op->Value.Name) &&
(Op->Parent) &&
- (opt_verbose))
+ (AcpiGbl_DbOpt_verbose))
{
AcpiPsDisplayObjectPathname (Op);
}
@@ -414,7 +413,7 @@ AcpiDbDisplayOp (
VERBOSE_PRINT ((DB_NO_OP_INFO, LastDepth - i));
for (j = 0; j < DepthCount; j++)
{
- AcpiOsPrintf ("%s", INDENT_STRING);
+ AcpiOsPrintf ("%s", AcpiGbl_DbDisasmIndent);
}
AcpiOsPrintf ("}\n");
DepthCount--;
@@ -522,17 +521,19 @@ AcpiDbDisplayPath (
UINT32 Name;
BOOLEAN DoDot = FALSE;
ACPI_PARSE_OBJECT *NamePath;
+ const ACPI_OPCODE_INFO *OpInfo;
/* We are only interested in named objects */
- if (!AcpiPsIsNodeOp (Op->Opcode))
+ OpInfo = AcpiPsGetOpcodeInfo (Op->Opcode);
+ if (!(OpInfo->Flags & AML_NSNODE))
{
return;
}
- if (AcpiPsIsCreateFieldOp (Op->Opcode))
+ if (OpInfo->Flags & AML_CREATE)
{
/* Field creation - check for a fully qualified namepath */
@@ -573,42 +574,46 @@ AcpiDbDisplayPath (
Search = Search->Parent;
}
- if (Prev && !AcpiPsIsFieldOp (Search->Opcode))
+ if (Prev)
{
- /* below root scope, append scope name */
-
- if (DoDot)
+ OpInfo = AcpiPsGetOpcodeInfo (Search->Opcode);
+ if (!(OpInfo->Flags & AML_FIELD))
{
- /* append dot */
-
- AcpiOsPrintf (".");
- }
+ /* below root scope, append scope name */
- if (AcpiPsIsCreateFieldOp (Search->Opcode))
- {
- if (Op->Opcode == AML_CREATE_FIELD_OP)
+ if (DoDot)
{
- NamePath = AcpiPsGetArg (Op, 3);
+ /* append dot */
+
+ AcpiOsPrintf (".");
}
- else
+
+ if (OpInfo->Flags & AML_CREATE)
{
- NamePath = AcpiPsGetArg (Op, 2);
+ if (Op->Opcode == AML_CREATE_FIELD_OP)
+ {
+ NamePath = AcpiPsGetArg (Op, 3);
+ }
+ else
+ {
+ NamePath = AcpiPsGetArg (Op, 2);
+ }
+
+ if ((NamePath) &&
+ (NamePath->Value.String))
+ {
+ AcpiOsPrintf ("%4.4s", NamePath->Value.String);
+ }
}
- if ((NamePath) &&
- (NamePath->Value.String))
+ else
{
- AcpiOsPrintf ("%4.4s", NamePath->Value.String);
+ Name = AcpiPsGetName (Search);
+ AcpiOsPrintf ("%4.4s", &Name);
}
- }
- else
- {
- Name = AcpiPsGetName (Search);
- AcpiOsPrintf ("%4.4s", &Name);
+ DoDot = TRUE;
}
-
- DoDot = TRUE;
}
Prev = Search;
@@ -639,7 +644,7 @@ AcpiDbDisplayOpcode (
UINT8 *ByteData;
UINT32 ByteCount;
UINT32 i;
- ACPI_OPCODE_INFO *Opc = NULL;
+ const ACPI_OPCODE_INFO *OpInfo = NULL;
UINT32 Name;
@@ -656,7 +661,7 @@ AcpiDbDisplayOpcode (
case AML_BYTE_OP:
- if (opt_verbose)
+ if (AcpiGbl_DbOpt_verbose)
{
AcpiOsPrintf ("(UINT8) 0x%2.2X", Op->Value.Integer8);
}
@@ -671,7 +676,7 @@ AcpiDbDisplayOpcode (
case AML_WORD_OP:
- if (opt_verbose)
+ if (AcpiGbl_DbOpt_verbose)
{
AcpiOsPrintf ("(UINT16) 0x%4.4X", Op->Value.Integer16);
}
@@ -686,7 +691,7 @@ AcpiDbDisplayOpcode (
case AML_DWORD_OP:
- if (opt_verbose)
+ if (AcpiGbl_DbOpt_verbose)
{
AcpiOsPrintf ("(UINT32) 0x%8.8X", Op->Value.Integer32);
}
@@ -701,15 +706,15 @@ AcpiDbDisplayOpcode (
case AML_QWORD_OP:
- if (opt_verbose)
+ if (AcpiGbl_DbOpt_verbose)
{
- AcpiOsPrintf ("(UINT64) 0x%8.8X%8.8X", Op->Value.Integer64.Hi,
+ AcpiOsPrintf ("(UINT64) 0x%8.8X%8.8X", Op->Value.Integer64.Hi,
Op->Value.Integer64.Lo);
}
else
{
- AcpiOsPrintf ("0x%8.8X%8.8X", Op->Value.Integer64.Hi,
+ AcpiOsPrintf ("0x%8.8X%8.8X", Op->Value.Integer64.Hi,
Op->Value.Integer64.Lo);
}
@@ -772,7 +777,7 @@ AcpiDbDisplayOpcode (
case AML_INT_BYTELIST_OP:
- if (opt_verbose)
+ if (AcpiGbl_DbOpt_verbose)
{
AcpiOsPrintf ("ByteList (Length 0x%8.8X) ", Op->Value.Integer32);
}
@@ -797,8 +802,8 @@ AcpiDbDisplayOpcode (
/* Just get the opcode name and print it */
- Opc = AcpiPsGetOpcodeInfo (Op->Opcode);
- AcpiOsPrintf ("%s", Opc->Name);
+ OpInfo = AcpiPsGetOpcodeInfo (Op->Opcode);
+ AcpiOsPrintf ("%s", OpInfo->Name);
#ifndef PARSER_ONLY
@@ -813,8 +818,7 @@ AcpiDbDisplayOpcode (
break;
}
-
- if (!Opc)
+ if (!OpInfo)
{
/* If there is another element in the list, add a comma */
@@ -824,17 +828,16 @@ AcpiDbDisplayOpcode (
}
}
-
/*
* If this is a named opcode, print the associated name value
*/
-
- if (Op && AcpiPsIsNamedOp (Op->Opcode))
+ OpInfo = AcpiPsGetOpcodeInfo (Op->Opcode);
+ if (Op && (OpInfo->Flags & AML_NAMED))
{
Name = AcpiPsGetName (Op);
AcpiOsPrintf (" %4.4s", &Name);
- if (opt_verbose)
+ if (AcpiGbl_DbOpt_verbose)
{
AcpiOsPrintf (" (Path \\");
AcpiDbDisplayPath (Op);
diff --git a/sys/contrib/dev/acpica/dbdisply.c b/sys/contrib/dev/acpica/dbdisply.c
index 982a5c12d23f..f6da7838bc30 100644
--- a/sys/contrib/dev/acpica/dbdisply.c
+++ b/sys/contrib/dev/acpica/dbdisply.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbdisply - debug display commands
- * $Revision: 47 $
+ * $Revision: 50 $
*
******************************************************************************/
@@ -191,7 +191,7 @@ void
AcpiDbDumpParserDescriptor (
ACPI_PARSE_OBJECT *Op)
{
- ACPI_OPCODE_INFO *Info;
+ const ACPI_OPCODE_INFO *Info;
Info = AcpiPsGetOpcodeInfo (Op->Opcode);
@@ -413,7 +413,7 @@ AcpiDbDecodeInternalObject (
{
case ACPI_TYPE_INTEGER:
- AcpiOsPrintf (" %.8X%.8X", HIDWORD (ObjDesc->Integer.Value),
+ AcpiOsPrintf (" %.8X%.8X", HIDWORD (ObjDesc->Integer.Value),
LODWORD (ObjDesc->Integer.Value));
break;
@@ -425,7 +425,7 @@ AcpiDbDecodeInternalObject (
if (ObjDesc->String.Length > 24)
{
- AcpiOsPrintf ("...");
+ AcpiOsPrintf ("...");
}
else
{
@@ -597,7 +597,7 @@ AcpiDbDisplayMethodInfo (
ACPI_NAMESPACE_NODE *Node;
ACPI_PARSE_OBJECT *RootOp;
ACPI_PARSE_OBJECT *Op;
- ACPI_OPCODE_INFO *OpInfo;
+ const ACPI_OPCODE_INFO *OpInfo;
UINT32 NumOps = 0;
UINT32 NumOperands = 0;
UINT32 NumOperators = 0;
@@ -898,7 +898,6 @@ AcpiDbDisplayResultObject (
* For now, only display if single stepping
* however, this output is very useful in other contexts also
*/
-
if (!AcpiGbl_CmSingleStep)
{
return;
diff --git a/sys/contrib/dev/acpica/dbexec.c b/sys/contrib/dev/acpica/dbexec.c
index 9a14b8636b22..25cad7760bec 100644
--- a/sys/contrib/dev/acpica/dbexec.c
+++ b/sys/contrib/dev/acpica/dbexec.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbexec - debugger control method execution
- * $Revision: 29 $
+ * $Revision: 34 $
*
******************************************************************************/
@@ -132,7 +132,7 @@
MODULE_NAME ("dbexec")
-DB_METHOD_INFO Info;
+DB_METHOD_INFO AcpiGbl_DbMethodInfo;
/*******************************************************************************
@@ -159,7 +159,7 @@ AcpiDbExecuteMethod (
UINT32 i;
- if (OutputToFile && !AcpiDbgLevel)
+ if (AcpiGbl_DbOutputToFile && !AcpiDbgLevel)
{
AcpiOsPrintf ("Warning: debug output is not enabled!\n");
}
@@ -195,8 +195,8 @@ AcpiDbExecuteMethod (
/* Prepare for a return object of arbitrary size */
- ReturnObj->Pointer = Buffer;
- ReturnObj->Length = BUFFER_SIZE;
+ ReturnObj->Pointer = AcpiGbl_DbBuffer;
+ ReturnObj->Length = ACPI_DEBUG_BUFFER_SIZE;
/* Do the actual method execution */
@@ -233,7 +233,7 @@ AcpiDbExecuteSetup (
if ((Info->Name[0] != '\\') &&
(Info->Name[0] != '/'))
{
- STRCAT (Info->Pathname, ScopeBuf);
+ STRCAT (Info->Pathname, AcpiGbl_DbScopeBuf);
}
STRCAT (Info->Pathname, Info->Name);
@@ -277,12 +277,13 @@ AcpiDbGetOutstandingAllocations (void)
UINT32 i;
UINT32 Outstanding = 0;
+
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
for (i = ACPI_MEM_LIST_FIRST_CACHE_LIST; i < ACPI_NUM_MEM_LISTS; i++)
{
- Outstanding += (AcpiGbl_MemoryLists[i].TotalAllocated -
- AcpiGbl_MemoryLists[i].TotalFreed -
+ Outstanding += (AcpiGbl_MemoryLists[i].TotalAllocated -
+ AcpiGbl_MemoryLists[i].TotalFreed -
AcpiGbl_MemoryLists[i].CacheDepth);
}
#endif
@@ -326,12 +327,12 @@ AcpiDbExecute (
PreviousAllocations = AcpiDbGetOutstandingAllocations ();
#endif
- Info.Name = Name;
- Info.Args = Args;
- Info.Flags = Flags;
+ AcpiGbl_DbMethodInfo.Name = Name;
+ AcpiGbl_DbMethodInfo.Args = Args;
+ AcpiGbl_DbMethodInfo.Flags = Flags;
- AcpiDbExecuteSetup (&Info);
- Status = AcpiDbExecuteMethod (&Info, &ReturnObj);
+ AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
+ Status = AcpiDbExecuteMethod (&AcpiGbl_DbMethodInfo, &ReturnObj);
/*
* Allow any handlers in separate threads to complete.
@@ -357,8 +358,8 @@ AcpiDbExecute (
if (ACPI_FAILURE (Status))
{
- AcpiOsPrintf ("Execution of %s failed with status %s\n",
- Info.Pathname, AcpiFormatException (Status));
+ AcpiOsPrintf ("Execution of %s failed with status %s\n",
+ AcpiGbl_DbMethodInfo.Pathname, AcpiFormatException (Status));
}
else
@@ -368,7 +369,7 @@ AcpiDbExecute (
if (ReturnObj.Length)
{
AcpiOsPrintf ("Execution of %s returned object %p Buflen %X\n",
- Info.Pathname, ReturnObj.Pointer, ReturnObj.Length);
+ AcpiGbl_DbMethodInfo.Pathname, ReturnObj.Pointer, ReturnObj.Length);
AcpiDbDumpObject (ReturnObj.Pointer, 1);
}
}
@@ -414,7 +415,6 @@ AcpiDbMethodThread (
}
}
-
/* Signal our completion */
AcpiOsSignalSemaphore (Info->ThreadGate, 1);
@@ -471,13 +471,13 @@ AcpiDbCreateExecutionThreads (
/* Setup the context to be passed to each thread */
- Info.Name = MethodNameArg;
- Info.Args = NULL;
- Info.Flags = 0;
- Info.NumLoops = NumLoops;
- Info.ThreadGate = ThreadGate;
+ AcpiGbl_DbMethodInfo.Name = MethodNameArg;
+ AcpiGbl_DbMethodInfo.Args = NULL;
+ AcpiGbl_DbMethodInfo.Flags = 0;
+ AcpiGbl_DbMethodInfo.NumLoops = NumLoops;
+ AcpiGbl_DbMethodInfo.ThreadGate = ThreadGate;
- AcpiDbExecuteSetup (&Info);
+ AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
/* Create the threads */
@@ -486,7 +486,7 @@ AcpiDbCreateExecutionThreads (
for (i = 0; i < (NumThreads); i++)
{
- AcpiOsQueueForExecution (OSD_PRIORITY_MED, AcpiDbMethodThread, &Info);
+ AcpiOsQueueForExecution (OSD_PRIORITY_MED, AcpiDbMethodThread, &AcpiGbl_DbMethodInfo);
}
diff --git a/sys/contrib/dev/acpica/dbfileio.c b/sys/contrib/dev/acpica/dbfileio.c
index d492f659b3c7..79e97c10b7bb 100644
--- a/sys/contrib/dev/acpica/dbfileio.c
+++ b/sys/contrib/dev/acpica/dbfileio.c
@@ -2,7 +2,7 @@
*
* Module Name: dbfileio - Debugger file I/O commands. These can't usually
* be used when running the debugger in Ring 0 (Kernel mode)
- * $Revision: 44 $
+ * $Revision: 47 $
*
******************************************************************************/
@@ -129,11 +129,9 @@
MODULE_NAME ("dbfileio")
-ACPI_PARSE_OBJECT *root;
-
#ifdef ACPI_APPLICATION
#include <stdio.h>
-FILE *DebugFile = NULL;
+FILE *AcpiGbl_DebugFile = NULL;
#endif
@@ -201,12 +199,12 @@ AcpiDbCloseDebugFile (
#ifdef ACPI_APPLICATION
- if (DebugFile)
+ if (AcpiGbl_DebugFile)
{
- fclose (DebugFile);
- DebugFile = NULL;
- OutputToFile = FALSE;
- AcpiOsPrintf ("Debug output file %s closed\n", DebugFilename);
+ fclose (AcpiGbl_DebugFile);
+ AcpiGbl_DebugFile = NULL;
+ AcpiGbl_DbOutputToFile = FALSE;
+ AcpiOsPrintf ("Debug output file %s closed\n", AcpiGbl_DbDebugFilename);
}
#endif
@@ -233,12 +231,12 @@ AcpiDbOpenDebugFile (
#ifdef ACPI_APPLICATION
AcpiDbCloseDebugFile ();
- DebugFile = fopen (Name, "w+");
- if (DebugFile)
+ AcpiGbl_DebugFile = fopen (Name, "w+");
+ if (AcpiGbl_DebugFile)
{
AcpiOsPrintf ("Debug output file %s opened\n", Name);
- STRCPY (DebugFilename, Name);
- OutputToFile = TRUE;
+ STRCPY (AcpiGbl_DbDebugFilename, Name);
+ AcpiGbl_DbOutputToFile = TRUE;
}
else
{
@@ -314,7 +312,7 @@ AcpiDbLoadTable(
*TablePtr = ACPI_MEM_ALLOCATE ((size_t) *TableLength);
if (!*TablePtr)
{
- AcpiOsPrintf ("Could not allocate memory for ACPI table %4.4s (size=%X)\n",
+ AcpiOsPrintf ("Could not allocate memory for ACPI table %4.4s (size=%X)\n",
TableHeader.Signature, TableHeader.Length);
return (AE_NO_MEMORY);
}
diff --git a/sys/contrib/dev/acpica/dbhistry.c b/sys/contrib/dev/acpica/dbhistry.c
index 8749d4f0ece5..147c6f548984 100644
--- a/sys/contrib/dev/acpica/dbhistry.c
+++ b/sys/contrib/dev/acpica/dbhistry.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dbhistry - debugger HISTORY command
- * $Revision: 18 $
+ * $Revision: 19 $
*
*****************************************************************************/
@@ -145,11 +145,11 @@ typedef struct HistoryInfo
} HISTORY_INFO;
-HISTORY_INFO HistoryBuffer[HISTORY_SIZE];
-UINT16 LoHistory = 0;
-UINT16 NumHistory = 0;
-UINT16 NextHistoryIndex = 0;
-UINT32 NextCmdNum = 1;
+HISTORY_INFO AcpiGbl_HistoryBuffer[HISTORY_SIZE];
+UINT16 AcpiGbl_LoHistory = 0;
+UINT16 AcpiGbl_NumHistory = 0;
+UINT16 AcpiGbl_NextHistoryIndex = 0;
+UINT32 AcpiGbl_NextCmdNum = 1;
/*******************************************************************************
@@ -172,32 +172,33 @@ AcpiDbAddToHistory (
/* Put command into the next available slot */
- STRCPY (HistoryBuffer[NextHistoryIndex].Command, CommandLine);
- HistoryBuffer[NextHistoryIndex].CmdNum = NextCmdNum;
+ STRCPY (AcpiGbl_HistoryBuffer[AcpiGbl_NextHistoryIndex].Command, CommandLine);
+
+ AcpiGbl_HistoryBuffer[AcpiGbl_NextHistoryIndex].CmdNum = AcpiGbl_NextCmdNum;
/* Adjust indexes */
- if ((NumHistory == HISTORY_SIZE) &&
- (NextHistoryIndex == LoHistory))
+ if ((AcpiGbl_NumHistory == HISTORY_SIZE) &&
+ (AcpiGbl_NextHistoryIndex == AcpiGbl_LoHistory))
{
- LoHistory++;
- if (LoHistory >= HISTORY_SIZE)
+ AcpiGbl_LoHistory++;
+ if (AcpiGbl_LoHistory >= HISTORY_SIZE)
{
- LoHistory = 0;
+ AcpiGbl_LoHistory = 0;
}
}
- NextHistoryIndex++;
- if (NextHistoryIndex >= HISTORY_SIZE)
+ AcpiGbl_NextHistoryIndex++;
+ if (AcpiGbl_NextHistoryIndex >= HISTORY_SIZE)
{
- NextHistoryIndex = 0;
+ AcpiGbl_NextHistoryIndex = 0;
}
- NextCmdNum++;
- if (NumHistory < HISTORY_SIZE)
+ AcpiGbl_NextCmdNum++;
+ if (AcpiGbl_NumHistory < HISTORY_SIZE)
{
- NumHistory++;
+ AcpiGbl_NumHistory++;
}
}
@@ -222,13 +223,14 @@ AcpiDbDisplayHistory (void)
UINT16 HistoryIndex;
- HistoryIndex = LoHistory;
+ HistoryIndex = AcpiGbl_LoHistory;
/* Dump entire history buffer */
- for (i = 0; i < NumHistory; i++)
+ for (i = 0; i < AcpiGbl_NumHistory; i++)
{
- AcpiOsPrintf ("%ld %s\n", HistoryBuffer[HistoryIndex].CmdNum, HistoryBuffer[HistoryIndex].Command);
+ AcpiOsPrintf ("%ld %s\n", AcpiGbl_HistoryBuffer[HistoryIndex].CmdNum,
+ AcpiGbl_HistoryBuffer[HistoryIndex].Command);
HistoryIndex++;
if (HistoryIndex >= HISTORY_SIZE)
@@ -263,7 +265,7 @@ AcpiDbGetFromHistory (
if (CommandNumArg == NULL)
{
- CmdNum = NextCmdNum - 1;
+ CmdNum = AcpiGbl_NextCmdNum - 1;
}
else
@@ -274,14 +276,14 @@ AcpiDbGetFromHistory (
/* Search history buffer */
- HistoryIndex = LoHistory;
- for (i = 0; i < NumHistory; i++)
+ HistoryIndex = AcpiGbl_LoHistory;
+ for (i = 0; i < AcpiGbl_NumHistory; i++)
{
- if (HistoryBuffer[HistoryIndex].CmdNum == CmdNum)
+ if (AcpiGbl_HistoryBuffer[HistoryIndex].CmdNum == CmdNum)
{
/* Found the commnad, return it */
- return (HistoryBuffer[HistoryIndex].Command);
+ return (AcpiGbl_HistoryBuffer[HistoryIndex].Command);
}
diff --git a/sys/contrib/dev/acpica/dbinput.c b/sys/contrib/dev/acpica/dbinput.c
index 576fb68b4a5a..76b0f40b0b91 100644
--- a/sys/contrib/dev/acpica/dbinput.c
+++ b/sys/contrib/dev/acpica/dbinput.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbinput - user front-end to the AML debugger
- * $Revision: 64 $
+ * $Revision: 68 $
*
******************************************************************************/
@@ -133,29 +133,44 @@
* Globals that are specific to the debugger
*/
-NATIVE_CHAR LineBuf[80];
-NATIVE_CHAR ParsedBuf[80];
-NATIVE_CHAR ScopeBuf[40];
-NATIVE_CHAR DebugFilename[40];
-NATIVE_CHAR *Args[DB_MAX_ARGS];
-NATIVE_CHAR *Buffer;
-NATIVE_CHAR *Filename = NULL;
-BOOLEAN OutputToFile = FALSE;
+NATIVE_CHAR AcpiGbl_DbLineBuf[80];
+NATIVE_CHAR AcpiGbl_DbParsedBuf[80];
+NATIVE_CHAR AcpiGbl_DbScopeBuf[40];
+NATIVE_CHAR AcpiGbl_DbDebugFilename[40];
+NATIVE_CHAR *AcpiGbl_DbArgs[DB_MAX_ARGS];
+NATIVE_CHAR *AcpiGbl_DbBuffer;
+NATIVE_CHAR *AcpiGbl_DbFilename = NULL;
+BOOLEAN AcpiGbl_DbOutputToFile = FALSE;
-UINT32 AcpiGbl_DbDebugLevel = 0x0FFFFFFF;
-UINT32 AcpiGbl_DbConsoleDebugLevel = NORMAL_DEFAULT | ACPI_LV_TABLES;
-UINT8 AcpiGbl_DbOutputFlags = DB_CONSOLE_OUTPUT;
+UINT32 AcpiGbl_DbDebugLevel = ACPI_LV_VERBOSITY2;
+UINT32 AcpiGbl_DbConsoleDebugLevel = NORMAL_DEFAULT | ACPI_LV_TABLES;
+UINT8 AcpiGbl_DbOutputFlags = DB_CONSOLE_OUTPUT;
-BOOLEAN opt_tables = FALSE;
-BOOLEAN opt_disasm = FALSE;
-BOOLEAN opt_stats = FALSE;
-BOOLEAN opt_parse_jit = FALSE;
-BOOLEAN opt_verbose = TRUE;
-BOOLEAN opt_ini_methods = TRUE;
+BOOLEAN AcpiGbl_DbOpt_tables = FALSE;
+BOOLEAN AcpiGbl_DbOpt_disasm = FALSE;
+BOOLEAN AcpiGbl_DbOpt_stats = FALSE;
+BOOLEAN AcpiGbl_DbOpt_parse_jit = FALSE;
+BOOLEAN AcpiGbl_DbOpt_verbose = TRUE;
+BOOLEAN AcpiGbl_DbOpt_ini_methods = TRUE;
+
+/*
+ * Statistic globals
+ */
+UINT16 AcpiGbl_ObjTypeCount[INTERNAL_TYPE_NODE_MAX+1];
+UINT16 AcpiGbl_NodeTypeCount[INTERNAL_TYPE_NODE_MAX+1];
+UINT16 AcpiGbl_ObjTypeCountMisc;
+UINT16 AcpiGbl_NodeTypeCountMisc;
+UINT32 AcpiGbl_NumNodes;
+UINT32 AcpiGbl_NumObjects;
+UINT32 AcpiGbl_SizeOfParseTree;
+UINT32 AcpiGbl_SizeOfMethodTrees;
+UINT32 AcpiGbl_SizeOfNodeEntries;
+UINT32 AcpiGbl_SizeOfAcpiObjects;
+
/*
* Top-level debugger commands.
*
@@ -216,7 +231,7 @@ enum AcpiExDebuggerCommands
#define CMD_FIRST_VALID 2
-COMMAND_INFO Commands[] =
+const COMMAND_INFO AcpiGbl_DbCommands[] =
{
{"<NOT FOUND>", 0},
{"<NULL>", 0},
@@ -470,14 +485,14 @@ AcpiDbGetLine (
NATIVE_CHAR *This;
- STRCPY (ParsedBuf, InputBuffer);
- STRUPR (ParsedBuf);
+ STRCPY (AcpiGbl_DbParsedBuf, InputBuffer);
+ STRUPR (AcpiGbl_DbParsedBuf);
- This = ParsedBuf;
+ This = AcpiGbl_DbParsedBuf;
for (i = 0; i < DB_MAX_ARGS; i++)
{
- Args[i] = AcpiDbGetNextToken (This, &Next);
- if (!Args[i])
+ AcpiGbl_DbArgs[i] = AcpiDbGetNextToken (This, &Next);
+ if (!AcpiGbl_DbArgs[i])
{
break;
}
@@ -488,9 +503,9 @@ AcpiDbGetLine (
/* Uppercase the actual command */
- if (Args[0])
+ if (AcpiGbl_DbArgs[0])
{
- STRUPR (Args[0]);
+ STRUPR (AcpiGbl_DbArgs[0]);
}
Count = i;
@@ -527,9 +542,9 @@ AcpiDbMatchCommand (
return (CMD_NULL);
}
- for (i = CMD_FIRST_VALID; Commands[i].Name; i++)
+ for (i = CMD_FIRST_VALID; AcpiGbl_DbCommands[i].Name; i++)
{
- if (STRSTR (Commands[i].Name, UserCommand) == Commands[i].Name)
+ if (STRSTR (AcpiGbl_DbCommands[i].Name, UserCommand) == AcpiGbl_DbCommands[i].Name)
{
return (i);
}
@@ -576,15 +591,15 @@ AcpiDbCommandDispatch (
}
ParamCount = AcpiDbGetLine (InputBuffer);
- CommandIndex = AcpiDbMatchCommand (Args[0]);
+ CommandIndex = AcpiDbMatchCommand (AcpiGbl_DbArgs[0]);
Temp = 0;
/* Verify that we have the minimum number of params */
- if (ParamCount < Commands[CommandIndex].MinArgs)
+ if (ParamCount < AcpiGbl_DbCommands[CommandIndex].MinArgs)
{
AcpiOsPrintf ("%d parameters entered, [%s] requires %d parameters\n",
- ParamCount, Commands[CommandIndex].Name, Commands[CommandIndex].MinArgs);
+ ParamCount, AcpiGbl_DbCommands[CommandIndex].Name, AcpiGbl_DbCommands[CommandIndex].MinArgs);
return (AE_CTRL_TRUE);
}
@@ -600,6 +615,7 @@ AcpiDbCommandDispatch (
break;
case CMD_ALLOCATIONS:
+
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
AcpiUtDumpCurrentAllocations ((UINT32) -1, NULL);
#endif
@@ -611,7 +627,7 @@ AcpiDbCommandDispatch (
break;
case CMD_BREAKPOINT:
- AcpiDbSetMethodBreakpoint (Args[1], WalkState, Op);
+ AcpiDbSetMethodBreakpoint (AcpiGbl_DbArgs[1], WalkState, Op);
break;
case CMD_CALL:
@@ -624,11 +640,11 @@ AcpiDbCommandDispatch (
break;
case CMD_DEBUG:
- AcpiDbExecute (Args[1], &Args[2], EX_SINGLE_STEP);
+ AcpiDbExecute (AcpiGbl_DbArgs[1], &AcpiGbl_DbArgs[2], EX_SINGLE_STEP);
break;
case CMD_DUMP:
- AcpiDbDecodeAndDisplayObject (Args[1], Args[2]);
+ AcpiDbDecodeAndDisplayObject (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
break;
case CMD_ENABLEACPI:
@@ -645,11 +661,11 @@ AcpiDbCommandDispatch (
break;
case CMD_EXECUTE:
- AcpiDbExecute (Args[1], &Args[2], EX_NO_SINGLE_STEP);
+ AcpiDbExecute (AcpiGbl_DbArgs[1], &AcpiGbl_DbArgs[2], EX_NO_SINGLE_STEP);
break;
case CMD_FIND:
- AcpiDbFindNameInNamespace (Args[1]);
+ AcpiDbFindNameInNamespace (AcpiGbl_DbArgs[1]);
break;
case CMD_GO:
@@ -658,7 +674,7 @@ AcpiDbCommandDispatch (
case CMD_HELP:
case CMD_HELP2:
- AcpiDbDisplayHelp (Args[1]);
+ AcpiDbDisplayHelp (AcpiGbl_DbArgs[1]);
break;
case CMD_HISTORY:
@@ -666,7 +682,7 @@ AcpiDbCommandDispatch (
break;
case CMD_HISTORY_EXE:
- CommandLine = AcpiDbGetFromHistory (Args[1]);
+ CommandLine = AcpiDbGetFromHistory (AcpiGbl_DbArgs[1]);
if (!CommandLine)
{
return (AE_CTRL_TRUE);
@@ -718,23 +734,23 @@ AcpiDbCommandDispatch (
else if (ParamCount == 2)
{
Temp = AcpiGbl_DbConsoleDebugLevel;
- AcpiGbl_DbConsoleDebugLevel = STRTOUL (Args[1], NULL, 16);
+ AcpiGbl_DbConsoleDebugLevel = STRTOUL (AcpiGbl_DbArgs[1], NULL, 16);
AcpiOsPrintf ("Debug Level for console output was %8.8lX, now %8.8lX\n", Temp, AcpiGbl_DbConsoleDebugLevel);
}
else
{
Temp = AcpiGbl_DbDebugLevel;
- AcpiGbl_DbDebugLevel = STRTOUL (Args[1], NULL, 16);
+ AcpiGbl_DbDebugLevel = STRTOUL (AcpiGbl_DbArgs[1], NULL, 16);
AcpiOsPrintf ("Debug Level for file output was %8.8lX, now %8.8lX\n", Temp, AcpiGbl_DbDebugLevel);
}
break;
case CMD_LIST:
- AcpiDbDisassembleAml (Args[1], Op);
+ AcpiDbDisassembleAml (AcpiGbl_DbArgs[1], Op);
break;
case CMD_LOAD:
- Status = AcpiDbLoadAcpiTable (Args[1]);
+ Status = AcpiDbLoadAcpiTable (AcpiGbl_DbArgs[1]);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -750,40 +766,40 @@ AcpiDbCommandDispatch (
break;
case CMD_METHODS:
- AcpiDbDisplayObjects ("METHOD", Args[1]);
+ AcpiDbDisplayObjects ("METHOD", AcpiGbl_DbArgs[1]);
break;
case CMD_NAMESPACE:
- AcpiDbDumpNamespace (Args[1], Args[2]);
+ AcpiDbDumpNamespace (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
break;
case CMD_NOTIFY:
- Temp = STRTOUL (Args[2], NULL, 0);
- AcpiDbSendNotify (Args[1], Temp);
+ Temp = STRTOUL (AcpiGbl_DbArgs[2], NULL, 0);
+ AcpiDbSendNotify (AcpiGbl_DbArgs[1], Temp);
break;
case CMD_OBJECT:
- AcpiDbDisplayObjects (STRUPR (Args[1]), Args[2]);
+ AcpiDbDisplayObjects (STRUPR (AcpiGbl_DbArgs[1]), AcpiGbl_DbArgs[2]);
break;
case CMD_OPEN:
- AcpiDbOpenDebugFile (Args[1]);
+ AcpiDbOpenDebugFile (AcpiGbl_DbArgs[1]);
break;
case CMD_OWNER:
- AcpiDbDumpNamespaceByOwner (Args[1], Args[2]);
+ AcpiDbDumpNamespaceByOwner (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
break;
case CMD_PREFIX:
- AcpiDbSetScope (Args[1]);
+ AcpiDbSetScope (AcpiGbl_DbArgs[1]);
break;
case CMD_REFERENCES:
- AcpiDbFindReferences (Args[1]);
+ AcpiDbFindReferences (AcpiGbl_DbArgs[1]);
break;
case CMD_RESOURCES:
- AcpiDbDisplayResources (Args[1]);
+ AcpiDbDisplayResources (AcpiGbl_DbArgs[1]);
break;
case CMD_RESULTS:
@@ -791,11 +807,11 @@ AcpiDbCommandDispatch (
break;
case CMD_SET:
- AcpiDbSetMethodData (Args[1], Args[2], Args[3]);
+ AcpiDbSetMethodData (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2], AcpiGbl_DbArgs[3]);
break;
case CMD_STATS:
- AcpiDbDisplayStatistics (Args[1]);
+ AcpiDbDisplayStatistics (AcpiGbl_DbArgs[1]);
break;
case CMD_STOP:
@@ -803,7 +819,7 @@ AcpiDbCommandDispatch (
break;
case CMD_TABLES:
- AcpiDbDisplayTableInfo (Args[1]);
+ AcpiDbDisplayTableInfo (AcpiGbl_DbArgs[1]);
break;
case CMD_TERMINATE:
@@ -816,7 +832,7 @@ AcpiDbCommandDispatch (
break;
case CMD_THREADS:
- AcpiDbCreateExecutionThreads (Args[1], Args[2], Args[3]);
+ AcpiDbCreateExecutionThreads (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2], AcpiGbl_DbArgs[3]);
break;
case CMD_TREE:
@@ -824,7 +840,7 @@ AcpiDbCommandDispatch (
break;
case CMD_UNLOAD:
- AcpiDbUnloadAcpiTable (Args[1], Args[2]);
+ AcpiDbUnloadAcpiTable (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
break;
case CMD_EXIT:
@@ -835,7 +851,7 @@ AcpiDbCommandDispatch (
return (AE_CTRL_TERMINATE);
}
- if (!OutputToFile)
+ if (!AcpiGbl_DbOutputToFile)
{
AcpiDbgLevel = DEBUG_DEFAULT;
}
@@ -888,7 +904,7 @@ AcpiDbExecuteThread (
AcpiGbl_StepToNextCall = FALSE;
AcpiUtAcquireMutex (ACPI_MTX_DEBUG_CMD_READY);
- Status = AcpiDbCommandDispatch (LineBuf, NULL, NULL);
+ Status = AcpiDbCommandDispatch (AcpiGbl_DbLineBuf, NULL, NULL);
AcpiUtReleaseMutex (ACPI_MTX_DEBUG_CMD_COMPLETE);
}
}
@@ -917,7 +933,7 @@ AcpiDbSingleThread (
AcpiGbl_MethodExecuting = FALSE;
AcpiGbl_StepToNextCall = FALSE;
- Status = AcpiDbCommandDispatch (LineBuf, NULL, NULL);
+ Status = AcpiDbCommandDispatch (AcpiGbl_DbLineBuf, NULL, NULL);
}
@@ -964,7 +980,7 @@ AcpiDbUserCommands (
/* Get the user input line */
- AcpiOsGetLine (LineBuf);
+ AcpiOsGetLine (AcpiGbl_DbLineBuf);
/* Check for single or multithreaded debug */
@@ -975,7 +991,6 @@ AcpiDbUserCommands (
* Signal the debug thread that we have a command to execute,
* and wait for the command to complete.
*/
-
AcpiUtReleaseMutex (ACPI_MTX_DEBUG_CMD_READY);
AcpiUtAcquireMutex (ACPI_MTX_DEBUG_CMD_COMPLETE);
}
diff --git a/sys/contrib/dev/acpica/dbstats.c b/sys/contrib/dev/acpica/dbstats.c
index 043f42a6d1b9..8a60c11d9d56 100644
--- a/sys/contrib/dev/acpica/dbstats.c
+++ b/sys/contrib/dev/acpica/dbstats.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbstats - Generation and display of ACPI table statistics
- * $Revision: 43 $
+ * $Revision: 47 $
*
******************************************************************************/
@@ -137,6 +137,7 @@ ARGUMENT_INFO AcpiDbStatTypes [] =
{"MISC"},
{"TABLES"},
{"SIZES"},
+ {"STACK"},
{NULL} /* Must be null terminated */
};
@@ -146,23 +147,7 @@ ARGUMENT_INFO AcpiDbStatTypes [] =
#define CMD_MISC 3
#define CMD_TABLES 4
#define CMD_SIZES 5
-
-
-/*
- * Statistic globals
- */
-UINT16 AcpiGbl_ObjTypeCount[INTERNAL_TYPE_NODE_MAX+1];
-UINT16 AcpiGbl_NodeTypeCount[INTERNAL_TYPE_NODE_MAX+1];
-UINT16 AcpiGbl_ObjTypeCountMisc;
-UINT16 AcpiGbl_NodeTypeCountMisc;
-UINT32 NumNodes;
-UINT32 NumObjects;
-
-
-UINT32 SizeOfParseTree;
-UINT32 SizeOfMethodTrees;
-UINT32 SizeOfNodeEntries;
-UINT32 SizeOfAcpiObjects;
+#define CMD_STACK 6
/*******************************************************************************
@@ -196,7 +181,7 @@ AcpiDbEnumerateObject (
/* Enumerate this object first */
- NumObjects++;
+ AcpiGbl_NumObjects++;
Type = ObjDesc->Common.Type;
if (Type > INTERNAL_TYPE_NODE_MAX)
@@ -276,7 +261,7 @@ AcpiDbClassifyOneObject (
UINT32 Type;
- NumNodes++;
+ AcpiGbl_NumNodes++;
Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
ObjDesc = ((ACPI_NAMESPACE_NODE *) ObjHandle)->Object;
@@ -284,7 +269,7 @@ AcpiDbClassifyOneObject (
AcpiDbEnumerateObject (ObjDesc);
Type = Node->Type;
- if (Type > INTERNAL_TYPE_INVALID)
+ if (Type > INTERNAL_TYPE_NODE_MAX)
{
AcpiGbl_NodeTypeCountMisc++;
}
@@ -341,11 +326,11 @@ AcpiDbCountNamespaceObjects (
UINT32 i;
- NumNodes = 0;
- NumObjects = 0;
+ AcpiGbl_NumNodes = 0;
+ AcpiGbl_NumObjects = 0;
AcpiGbl_ObjTypeCountMisc = 0;
- for (i = 0; i < INTERNAL_TYPE_INVALID; i++)
+ for (i = 0; i < (INTERNAL_TYPE_NODE_MAX -1); i++)
{
AcpiGbl_ObjTypeCount [i] = 0;
AcpiGbl_NodeTypeCount [i] = 0;
@@ -401,11 +386,6 @@ AcpiDbDisplayStatistics (
return (AE_OK);
}
-#ifndef PARSER_ONLY
-
- AcpiDbCountNamespaceObjects ();
-#endif
-
switch (Type)
{
@@ -428,6 +408,10 @@ AcpiDbDisplayStatistics (
case CMD_OBJECTS:
+#ifndef PARSER_ONLY
+
+ AcpiDbCountNamespaceObjects ();
+
AcpiOsPrintf ("\nObjects defined in the current namespace:\n\n");
AcpiOsPrintf ("%16.16s % 10.10s % 10.10s\n", "ACPI_TYPE", "NODES", "OBJECTS");
@@ -441,17 +425,9 @@ AcpiDbDisplayStatistics (
AcpiGbl_NodeTypeCountMisc, AcpiGbl_ObjTypeCountMisc);
AcpiOsPrintf ("%16.16s % 10ld% 10ld\n", "TOTALS:",
- NumNodes, NumObjects);
-
-
-/*
- AcpiOsPrintf ("\n");
+ AcpiGbl_NumNodes, AcpiGbl_NumObjects);
- AcpiOsPrintf ("ASL/AML Grammar Usage:\n\n");
- AcpiOsPrintf ("Elements Inside Methods:....% 7ld\n", NumMethodElements);
- AcpiOsPrintf ("Elements Outside Methods:...% 7ld\n", NumGrammarElements - NumMethodElements);
- AcpiOsPrintf ("Total Grammar Elements:.....% 7ld\n", NumGrammarElements);
-*/
+#endif
break;
case CMD_MEMORY:
@@ -465,21 +441,21 @@ AcpiDbDisplayStatistics (
if (AcpiGbl_MemoryLists[i].MaxCacheDepth > 0)
{
- AcpiOsPrintf (" Cache: [Depth Max Avail Size] % 7d % 7d % 7d % 7d B\n",
+ AcpiOsPrintf (" Cache: [Depth Max Avail Size] % 7d % 7d % 7d % 7d B\n",
AcpiGbl_MemoryLists[i].CacheDepth,
- AcpiGbl_MemoryLists[i].MaxCacheDepth,
+ AcpiGbl_MemoryLists[i].MaxCacheDepth,
AcpiGbl_MemoryLists[i].MaxCacheDepth - AcpiGbl_MemoryLists[i].CacheDepth,
(AcpiGbl_MemoryLists[i].CacheDepth * AcpiGbl_MemoryLists[i].ObjectSize));
- AcpiOsPrintf (" Cache: [Requests Hits Misses ObjSize] % 7d % 7d % 7d % 7d B\n",
+ AcpiOsPrintf (" Cache: [Requests Hits Misses ObjSize] % 7d % 7d % 7d % 7d B\n",
AcpiGbl_MemoryLists[i].CacheRequests,
- AcpiGbl_MemoryLists[i].CacheHits,
+ AcpiGbl_MemoryLists[i].CacheHits,
AcpiGbl_MemoryLists[i].CacheRequests - AcpiGbl_MemoryLists[i].CacheHits,
- AcpiGbl_MemoryLists[i].ObjectSize);
+ AcpiGbl_MemoryLists[i].ObjectSize);
}
- Outstanding = AcpiGbl_MemoryLists[i].TotalAllocated -
- AcpiGbl_MemoryLists[i].TotalFreed -
+ Outstanding = AcpiGbl_MemoryLists[i].TotalAllocated -
+ AcpiGbl_MemoryLists[i].TotalFreed -
AcpiGbl_MemoryLists[i].CacheDepth;
if (AcpiGbl_MemoryLists[i].ObjectSize)
@@ -491,7 +467,7 @@ AcpiDbDisplayStatistics (
Size = ROUND_UP_TO_1K (AcpiGbl_MemoryLists[i].CurrentTotalSize);
}
- AcpiOsPrintf (" Mem: [Alloc Free Outstanding Size] % 7d % 7d % 7d % 7d Kb\n",
+ AcpiOsPrintf (" Mem: [Alloc Free Outstanding Size] % 7d % 7d % 7d % 7d Kb\n",
AcpiGbl_MemoryLists[i].TotalAllocated,
AcpiGbl_MemoryLists[i].TotalFreed,
Outstanding, Size);
@@ -551,6 +527,17 @@ AcpiDbDisplayStatistics (
break;
+
+ case CMD_STACK:
+
+ Size = AcpiGbl_EntryStackPointer - AcpiGbl_LowestStackPointer;
+
+ AcpiOsPrintf ("\nSubsystem Stack Usage:\n\n");
+ AcpiOsPrintf ("Entry Stack Pointer %X\n", AcpiGbl_EntryStackPointer);
+ AcpiOsPrintf ("Lowest Stack Pointer %X\n", AcpiGbl_LowestStackPointer);
+ AcpiOsPrintf ("Stack Use %X (%d)\n", Size, Size);
+ AcpiOsPrintf ("Deepest Procedure Nesting %d\n", AcpiGbl_DeepestNesting);
+ break;
}
AcpiOsPrintf ("\n");
diff --git a/sys/contrib/dev/acpica/dbutils.c b/sys/contrib/dev/acpica/dbutils.c
index 2ca67c4adb00..c3ada92397e1 100644
--- a/sys/contrib/dev/acpica/dbutils.c
+++ b/sys/contrib/dev/acpica/dbutils.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbutils - AML debugger utilities
- * $Revision: 41 $
+ * $Revision: 43 $
*
******************************************************************************/
@@ -154,7 +154,7 @@ AcpiDbSetOutputDestination (
if (OutputFlags & DB_REDIRECTABLE_OUTPUT)
{
- if (OutputToFile)
+ if (AcpiGbl_DbOutputToFile)
{
AcpiDbgLevel = AcpiGbl_DbDebugLevel;
}
@@ -232,7 +232,7 @@ AcpiDbDumpObject (
case ACPI_TYPE_INTEGER:
- AcpiOsPrintf ("[Integer] = %X%8.8X\n", HIDWORD (ObjDesc->Integer.Value),
+ AcpiOsPrintf ("[Integer] = %X%8.8X\n", HIDWORD (ObjDesc->Integer.Value),
LODWORD (ObjDesc->Integer.Value));
break;
diff --git a/sys/contrib/dev/acpica/dbxface.c b/sys/contrib/dev/acpica/dbxface.c
index 1d176fe48e73..e54b420a78b1 100644
--- a/sys/contrib/dev/acpica/dbxface.c
+++ b/sys/contrib/dev/acpica/dbxface.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbxface - AML Debugger external interfaces
- * $Revision: 38 $
+ * $Revision: 41 $
*
******************************************************************************/
@@ -157,6 +157,8 @@ AcpiDbSingleStep (
ACPI_PARSE_OBJECT *DisplayOp;
+ FUNCTION_ENTRY ();
+
/* Is there a breakpoint set? */
if (WalkState->MethodBreakpoint)
@@ -174,12 +176,10 @@ AcpiDbSingleStep (
}
}
-
/*
* Check if this is an opcode that we are interested in --
* namely, opcodes that have arguments
*/
-
if (Op->Opcode == AML_INT_NAMEDFIELD_OP)
{
return (AE_OK);
@@ -205,16 +205,14 @@ AcpiDbSingleStep (
}
}
-
/*
* Under certain debug conditions, display this opcode and its operands
*/
-
- if ((OutputToFile) ||
+ if ((AcpiGbl_DbOutputToFile) ||
(AcpiGbl_CmSingleStep) ||
(AcpiDbgLevel & ACPI_LV_PARSE))
{
- if ((OutputToFile) ||
+ if ((AcpiGbl_DbOutputToFile) ||
(AcpiDbgLevel & ACPI_LV_PARSE))
{
AcpiOsPrintf ("\n[AmlDebug] Next AML Opcode to execute:\n");
@@ -225,7 +223,6 @@ AcpiDbSingleStep (
* and disable parser trace output for the duration of the display because
* we don't want the extraneous debug output)
*/
-
OriginalDebugLevel = AcpiDbgLevel;
AcpiDbgLevel &= ~(ACPI_LV_PARSE | ACPI_LV_FUNCTIONS);
Next = Op->Next;
@@ -264,14 +261,12 @@ AcpiDbSingleStep (
/* TBD */
}
-
/* Restore everything */
Op->Next = Next;
AcpiOsPrintf ("\n");
AcpiDbgLevel = OriginalDebugLevel;
- }
-
+ }
/* If we are not single stepping, just continue executing the method */
@@ -285,7 +280,6 @@ AcpiDbSingleStep (
* If we are executing a step-to-call command,
* Check if this is a method call.
*/
-
if (AcpiGbl_StepToNextCall)
{
if (Op->Opcode != AML_INT_METHODCALL_OP)
@@ -305,7 +299,6 @@ AcpiDbSingleStep (
* If the next opcode is a method call, we will "step over" it
* by default.
*/
-
if (Op->Opcode == AML_INT_METHODCALL_OP)
{
AcpiGbl_CmSingleStep = FALSE; /* No more single step while executing called method */
@@ -357,15 +350,14 @@ AcpiDbSingleStep (
/* Get the user input line */
- AcpiOsGetLine (LineBuf);
+ AcpiOsGetLine (AcpiGbl_DbLineBuf);
}
- Status = AcpiDbCommandDispatch (LineBuf, WalkState, Op);
+ Status = AcpiDbCommandDispatch (AcpiGbl_DbLineBuf, WalkState, Op);
}
/* AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); */
-
/* User commands complete, continue execution of the interrupted method */
return (Status);
@@ -391,12 +383,12 @@ AcpiDbInitialize (void)
/* Init globals */
- Buffer = AcpiOsAllocate (BUFFER_SIZE);
+ AcpiGbl_DbBuffer = AcpiOsAllocate (ACPI_DEBUG_BUFFER_SIZE);
/* Initial scope is the root */
- ScopeBuf [0] = '\\';
- ScopeBuf [1] = 0;
+ AcpiGbl_DbScopeBuf [0] = '\\';
+ AcpiGbl_DbScopeBuf [1] = 0;
/*
@@ -404,7 +396,6 @@ AcpiDbInitialize (void)
* a separate thread so that the front end can be in another address
* space, environment, or even another machine.
*/
-
if (AcpiGbl_DebuggerConfiguration & DEBUGGER_MULTI_THREADED)
{
/* These were created with one unit, grab it */
@@ -417,14 +408,13 @@ AcpiDbInitialize (void)
AcpiOsQueueForExecution (0, AcpiDbExecuteThread, NULL);
}
- if (!opt_verbose)
+ if (!AcpiGbl_DbOpt_verbose)
{
- INDENT_STRING = " ";
- opt_disasm = TRUE;
- opt_stats = FALSE;
+ AcpiGbl_DbDisasmIndent = " ";
+ AcpiGbl_DbOpt_disasm = TRUE;
+ AcpiGbl_DbOpt_stats = FALSE;
}
-
return (0);
}
diff --git a/sys/contrib/dev/acpica/dsfield.c b/sys/contrib/dev/acpica/dsfield.c
index d9e8c5074ec9..8027453d3a30 100644
--- a/sys/contrib/dev/acpica/dsfield.c
+++ b/sys/contrib/dev/acpica/dsfield.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsfield - Dispatcher field routines
- * $Revision: 43 $
+ * $Revision: 44 $
*
*****************************************************************************/
@@ -227,7 +227,6 @@ AcpiDsCreateField (
* Initialize an object for the new Node that is on
* the object stack
*/
-
Status = AcpiExPrepRegionFieldValue (Node, RegionNode, FieldFlags,
FieldBitPosition, Arg->Value.Size);
if (ACPI_FAILURE (Status))
@@ -358,7 +357,6 @@ AcpiDsCreateBankField (
* Initialize an object for the new Node that is on
* the object stack
*/
-
Status = AcpiExPrepBankFieldValue (Node, RegionNode, RegisterNode,
BankValue, FieldFlags, FieldBitPosition,
Arg->Value.Size);
@@ -486,7 +484,6 @@ AcpiDsCreateIndexField (
* Initialize an object for the new Node that is on
* the object stack
*/
-
Status = AcpiExPrepIndexFieldValue (Node, IndexRegisterNode,
DataRegisterNode, FieldFlags,
FieldBitPosition, Arg->Value.Size);
diff --git a/sys/contrib/dev/acpica/dsmethod.c b/sys/contrib/dev/acpica/dsmethod.c
index b9ffc8077763..5ac3dd2fb869 100644
--- a/sys/contrib/dev/acpica/dsmethod.c
+++ b/sys/contrib/dev/acpica/dsmethod.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsmethod - Parser/Interpreter interface - control method parsing
- * $Revision: 64 $
+ * $Revision: 65 $
*
*****************************************************************************/
@@ -453,7 +453,7 @@ AcpiDsCallControlMethod (
return_ACPI_STATUS (AE_NO_MEMORY);
}
- Status = AcpiPsParseAml (Op, ObjDesc->Method.Pcode,
+ Status = AcpiPsParseAml (Op, ObjDesc->Method.Pcode,
ObjDesc->Method.PcodeLength,
ACPI_PARSE_LOAD_PASS1 | ACPI_PARSE_DELETE_TREE,
MethodNode, NULL, NULL,
@@ -476,7 +476,7 @@ AcpiDsCallControlMethod (
ThisWalkState->NumOperands = 0;
- ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Starting nested execution, newstate=%p\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Starting nested execution, newstate=%p\n",
NextWalkState));
return_ACPI_STATUS (AE_OK);
diff --git a/sys/contrib/dev/acpica/dsmthdat.c b/sys/contrib/dev/acpica/dsmthdat.c
index 7645b31e5e04..e44829def13d 100644
--- a/sys/contrib/dev/acpica/dsmthdat.c
+++ b/sys/contrib/dev/acpica/dsmthdat.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dsmthdat - control method arguments and local variables
- * $Revision: 48 $
+ * $Revision: 49 $
*
******************************************************************************/
@@ -359,7 +359,6 @@ AcpiDsMethodDataGetEntry (
* Get the requested object.
* The stack "Opcode" is either a LocalVariable or an Argument
*/
-
switch (Opcode)
{
@@ -429,6 +428,7 @@ AcpiDsMethodDataSetEntry (
FUNCTION_TRACE ("DsMethodDataSetEntry");
+
/* Get a pointer to the stack entry to set */
Status = AcpiDsMethodDataGetEntry (Opcode, Index, WalkState, &Entry);
@@ -631,7 +631,6 @@ AcpiDsMethodDataGetValue (
* was referenced by the method (via the ASL)
* before it was initialized. Either case is an error.
*/
-
switch (Opcode)
{
case AML_ARG_OP:
@@ -657,7 +656,6 @@ AcpiDsMethodDataGetValue (
* Index points to initialized and valid object stack value.
* Return an additional reference to the object
*/
-
*DestDesc = Object;
AcpiUtAddReference (Object);
@@ -713,7 +711,6 @@ AcpiDsMethodDataDeleteValue (
*/
*Entry = NULL;
-
if ((Object) &&
(VALID_DESCRIPTOR_TYPE (Object, ACPI_DESC_TYPE_INTERNAL)))
{
@@ -725,7 +722,6 @@ AcpiDsMethodDataDeleteValue (
AcpiUtRemoveReference (Object);
}
-
return_ACPI_STATUS (AE_OK);
}
@@ -792,7 +788,6 @@ AcpiDsStoreObjectToLocal (
* is an object reference stored there, we have to do
* an indirect store!
*/
-
if (*Entry)
{
/*
@@ -811,7 +806,6 @@ AcpiDsStoreObjectToLocal (
*
* Weird, but true.
*/
-
if ((Opcode == AML_ARG_OP) &&
(VALID_DESCRIPTOR_TYPE (*Entry, ACPI_DESC_TYPE_NAMED)))
{
diff --git a/sys/contrib/dev/acpica/dsobject.c b/sys/contrib/dev/acpica/dsobject.c
index 12a0f81b70ff..2857ec02641f 100644
--- a/sys/contrib/dev/acpica/dsobject.c
+++ b/sys/contrib/dev/acpica/dsobject.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsobject - Dispatcher object management routines
- * $Revision: 71 $
+ * $Revision: 74 $
*
*****************************************************************************/
@@ -170,7 +170,6 @@ AcpiDsInitOneObject (
* We are only interested in objects owned by the table that
* was just loaded
*/
-
if (((ACPI_NAMESPACE_NODE *) ObjHandle)->OwnerId !=
Info->TableDesc->TableId)
{
@@ -206,7 +205,6 @@ AcpiDsInitOneObject (
* Set the execution data width (32 or 64) based upon the
* revision number of the parent ACPI table.
*/
-
if (TableRevision == 1)
{
((ACPI_NAMESPACE_NODE *)ObjHandle)->Flags |= ANOBJ_DATA_WIDTH_32;
@@ -332,7 +330,7 @@ AcpiDsInitObjectFromOp (
ACPI_PARSE_OBJECT *Arg;
ACPI_PARSE2_OBJECT *ByteList;
ACPI_OPERAND_OBJECT *ArgDesc;
- ACPI_OPCODE_INFO *OpInfo;
+ const ACPI_OPCODE_INFO *OpInfo;
ACPI_OPERAND_OBJECT *ObjDesc;
@@ -374,7 +372,7 @@ AcpiDsInitObjectFromOp (
if (ArgDesc->Common.Type != ACPI_TYPE_INTEGER)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Expecting number, got obj: %p type %X\n",
ArgDesc, ArgDesc->Common.Type));
AcpiUtRemoveReference (ArgDesc);
@@ -407,10 +405,9 @@ AcpiDsInitObjectFromOp (
}
/*
- * Second arg is the buffer data (optional) ByteList can be either
+ * Second arg is the buffer data (optional) ByteList can be either
* individual bytes or a string initializer.
*/
-
Arg = Op->Value.Arg; /* skip first arg */
ByteList = (ACPI_PARSE2_OBJECT *) Arg->Next;
@@ -433,10 +430,10 @@ AcpiDsInitObjectFromOp (
case ACPI_TYPE_PACKAGE:
/*
- * When called, an internal package object has already been built and
+ * When called, an internal package object has already been built and
* is pointed to by ObjDesc. AcpiDsBuildInternalObject builds another
- * internal package object, so remove reference to the original so
- * that it is deleted. Error checking is done within the remove
+ * internal package object, so remove reference to the original so
+ * that it is deleted. Error checking is done within the remove
* reference function.
*/
AcpiUtRemoveReference (ObjDesc);
@@ -503,7 +500,7 @@ AcpiDsInitObjectFromOp (
}
/*
- * Decode constants here. Turn them into real integer objects
+ * Decode constants here. Turn them into real integer objects
* that are initialized to the value of the constant.
*/
switch (Op->Opcode)
@@ -707,7 +704,7 @@ AcpiDsBuildInternalPackageObj (
{
return_ACPI_STATUS (AE_NO_MEMORY);
}
-
+
if (Op->Opcode == AML_VAR_PACKAGE_OP)
{
/*
@@ -839,7 +836,6 @@ AcpiDsCreateNode (
return_ACPI_STATUS (AE_OK);
}
-
/* Build an internal object for the argument(s) */
Status = AcpiDsBuildInternalObject (WalkState, Op->Value.Arg, &ObjDesc);
@@ -848,7 +844,6 @@ AcpiDsCreateNode (
return_ACPI_STATUS (Status);
}
-
/* Re-type the object according to it's argument */
Node->Type = ObjDesc->Common.Type;
@@ -867,7 +862,6 @@ AcpiDsCreateNode (
Cleanup:
AcpiUtRemoveReference (ObjDesc);
-
return_ACPI_STATUS (Status);
}
diff --git a/sys/contrib/dev/acpica/dsopcode.c b/sys/contrib/dev/acpica/dsopcode.c
index 83b9036377e9..b903e117dace 100644
--- a/sys/contrib/dev/acpica/dsopcode.c
+++ b/sys/contrib/dev/acpica/dsopcode.c
@@ -2,7 +2,7 @@
*
* Module Name: dsopcode - Dispatcher Op Region support and handling of
* "control" opcodes
- * $Revision: 49 $
+ * $Revision: 51 $
*
*****************************************************************************/
@@ -178,7 +178,6 @@ AcpiDsGetBufferFieldArguments (
* Allocate a new parser op to be the root of the parsed
* OpRegion tree
*/
-
Op = AcpiPsAllocOp (AML_SCOPE_OP);
if (!Op)
{
@@ -208,7 +207,6 @@ AcpiDsGetBufferFieldArguments (
return_ACPI_STATUS (Status);
}
-
/* Get and init the actual FielUnitOp created above */
FieldOp = Op->Value.Arg;
@@ -292,7 +290,7 @@ AcpiDsGetRegionArguments (
DEBUG_EXEC(AcpiUtDisplayInitPathname (Node, " [Operation Region]"));
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] OpRegion Init at AML %p[%x]\n",
- &Node->Name, ExtraDesc->Extra.Pcode,
+ &Node->Name, ExtraDesc->Extra.Pcode,
*(UINT32*) ExtraDesc->Extra.Pcode));
/*
@@ -322,14 +320,12 @@ AcpiDsGetRegionArguments (
Status = AcpiPsParseAml (Op, ExtraDesc->Extra.Pcode,
ExtraDesc->Extra.PcodeLength, 0,
NULL, NULL, NULL, AcpiDsLoad1BeginOp, AcpiDsLoad1EndOp);
-
if (ACPI_FAILURE (Status))
{
AcpiPsDeleteParseTree (Op);
return_ACPI_STATUS (Status);
}
-
/* Get and init the actual RegionOp created above */
RegionOp = Op->Value.Arg;
@@ -505,12 +501,10 @@ AcpiDsEvalBufferFieldOperands (
Offset = (UINT32) OffDesc->Integer.Value;
-
/*
* If ResDesc is a Name, it will be a direct name pointer after
* AcpiExResolveOperands()
*/
-
if (!VALID_DESCRIPTOR_TYPE (ResDesc, ACPI_DESC_TYPE_NAMED))
{
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "(%s) destination must be a Node\n",
@@ -520,11 +514,9 @@ AcpiDsEvalBufferFieldOperands (
goto Cleanup;
}
-
/*
* Setup the Bit offsets and counts, according to the opcode
*/
-
switch (Op->Opcode)
{
@@ -613,7 +605,6 @@ AcpiDsEvalBufferFieldOperands (
/*
* Setup field according to the object type
*/
-
switch (SrcDesc->Common.Type)
{
@@ -624,7 +615,7 @@ AcpiDsEvalBufferFieldOperands (
if ((BitOffset + BitCount) >
(8 * (UINT32) SrcDesc->Buffer.Length))
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Field size %d exceeds Buffer size %d (bits)\n",
BitOffset + BitCount, 8 * (UINT32) SrcDesc->Buffer.Length));
Status = AE_AML_BUFFER_LIMIT;
@@ -746,13 +737,14 @@ AcpiDsEvalRegionOperands (
/*
* This is where we evaluate the address and length fields of the OpRegion declaration
*/
-
Node = Op->Node;
/* NextOp points to the op that holds the SpaceID */
+
NextOp = Op->Value.Arg;
/* NextOp points to address op */
+
NextOp = NextOp->Next;
/* AcpiEvaluate/create the address and length operands */
@@ -852,7 +844,6 @@ AcpiDsExecBeginControlOp (
* constructs. We need to manage these as a stack, in order
* to handle nesting.
*/
-
ControlState = AcpiUtCreateControlState ();
if (!ControlState)
{
@@ -936,7 +927,7 @@ AcpiDsExecEndControlOp (
* Save the result of the predicate in case there is an
* ELSE to come
*/
- WalkState->LastPredicate =
+ WalkState->LastPredicate =
(BOOLEAN) WalkState->ControlState->Common.Value;
/*
@@ -980,7 +971,6 @@ AcpiDsExecEndControlOp (
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"[RETURN_OP] Op=%p Arg=%p\n",Op, Op->Value.Arg));
-
/*
* One optional operand -- the return value
* It can be either an immediate operand or a result that
@@ -1027,7 +1017,6 @@ AcpiDsExecEndControlOp (
*
* Allow references created by the Index operator to return unchanged.
*/
-
if (VALID_DESCRIPTOR_TYPE (WalkState->Results->Results.ObjDesc [0], ACPI_DESC_TYPE_INTERNAL) &&
((WalkState->Results->Results.ObjDesc [0])->Common.Type == INTERNAL_TYPE_REFERENCE) &&
((WalkState->Results->Results.ObjDesc [0])->Reference.Opcode != AML_INDEX_OP))
@@ -1086,7 +1075,7 @@ AcpiDsExecEndControlOp (
case AML_BREAK_OP:
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"Break to end of current package, Op=%p\n", Op));
/* TBD: update behavior for ACPI 2.0 */
diff --git a/sys/contrib/dev/acpica/dsutils.c b/sys/contrib/dev/acpica/dsutils.c
index 1e1bc831c4fb..f9fab91e0c23 100644
--- a/sys/contrib/dev/acpica/dsutils.c
+++ b/sys/contrib/dev/acpica/dsutils.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dsutils - Dispatcher utilities
- * $Revision: 68 $
+ * $Revision: 72 $
*
******************************************************************************/
@@ -147,7 +147,7 @@ AcpiDsIsResultUsed (
ACPI_PARSE_OBJECT *Op,
ACPI_WALK_STATE *WalkState)
{
- ACPI_OPCODE_INFO *ParentInfo;
+ const ACPI_OPCODE_INFO *ParentInfo;
FUNCTION_TRACE_PTR ("DsIsResultUsed", Op);
@@ -192,7 +192,6 @@ AcpiDsIsResultUsed (
* Otherwise leave it as is, it will be deleted when it is used
* as an operand later.
*/
-
switch (ACPI_GET_OP_CLASS (ParentInfo))
{
/*
@@ -206,7 +205,7 @@ AcpiDsIsResultUsed (
/* Never delete the return value associated with a return opcode */
- ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
+ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"Result used, [RETURN] opcode=%X Op=%X\n", Op->Opcode, Op));
return_VALUE (TRUE);
break;
@@ -218,7 +217,6 @@ AcpiDsIsResultUsed (
* If we are executing the predicate AND this is the predicate op,
* we will use the return value!
*/
-
if ((WalkState->ControlState->Common.State == CONTROL_PREDICATE_EXECUTING) &&
(WalkState->ControlState->Control.PredicateOp == Op))
{
@@ -255,7 +253,7 @@ AcpiDsIsResultUsed (
return_VALUE (TRUE);
}
- ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
+ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"Result not used, Parent opcode=%X Op=%X\n", Op->Opcode, Op));
return_VALUE (FALSE);
@@ -362,6 +360,7 @@ AcpiDsCreateOperand (
UINT16 Opcode;
UINT32 Flags;
OPERATING_MODE InterpreterMode;
+ const ACPI_OPCODE_INFO *OpInfo;
FUNCTION_TRACE_PTR ("DsCreateOperand", Arg);
@@ -396,7 +395,8 @@ AcpiDsCreateOperand (
* namespace objects during the execution of control methods.
*/
ParentOp = Arg->Parent;
- if ((AcpiPsIsNodeOp (ParentOp->Opcode)) &&
+ OpInfo = AcpiPsGetOpcodeInfo (ParentOp->Opcode);
+ if ((OpInfo->Flags & AML_NSNODE) &&
(ParentOp->Opcode != AML_INT_METHODCALL_OP) &&
(ParentOp->Opcode != AML_REGION_OP) &&
(ParentOp->Opcode != AML_INT_NAMEPATH_OP))
@@ -427,7 +427,6 @@ AcpiDsCreateOperand (
* The only case where we pass through (ignore) a NOT_FOUND
* error is for the CondRefOf opcode.
*/
-
if (Status == AE_NOT_FOUND)
{
if (ParentOp->Opcode == AML_COND_REF_OF_OP)
@@ -524,7 +523,7 @@ AcpiDsCreateOperand (
* Only error is underflow, and this indicates
* a missing or null operand!
*/
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Missing or null operand, %s\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Missing or null operand, %s\n",
AcpiFormatException (Status)));
return_ACPI_STATUS (Status);
}
@@ -593,6 +592,7 @@ AcpiDsCreateOperands (
FUNCTION_TRACE_PTR ("DsCreateOperands", FirstArg);
+
/* For all arguments in the list... */
Arg = FirstArg;
@@ -622,7 +622,6 @@ Cleanup:
* pop everything off of the operand stack and delete those
* objects
*/
-
AcpiDsObjStackPopAndDelete (ArgCount, WalkState);
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "While creating Arg %d - %s\n",
@@ -665,7 +664,6 @@ AcpiDsResolveOperands (
* TBD: [Investigate] Note from previous parser:
* RefOf problem with AcpiExResolveToValue() conversion.
*/
-
for (i = 0; i < WalkState->NumOperands; i++)
{
Status = AcpiExResolveToValue (&WalkState->Operands[i], WalkState);
@@ -700,7 +698,7 @@ AcpiDsMapOpcodeToDataType (
UINT32 *OutFlags)
{
ACPI_OBJECT_TYPE8 DataType = INTERNAL_TYPE_INVALID;
- ACPI_OPCODE_INFO *OpInfo;
+ const ACPI_OPCODE_INFO *OpInfo;
UINT32 Flags = 0;
@@ -742,7 +740,7 @@ AcpiDsMapOpcodeToDataType (
break;
default:
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Unknown (type LITERAL) AML opcode: %x\n", Opcode));
break;
}
@@ -854,6 +852,9 @@ AcpiDsMapNamedOpcodeToDataType (
ACPI_OBJECT_TYPE8 DataType;
+ FUNCTION_ENTRY ();
+
+
/* Decode Opcode */
switch (Opcode)
diff --git a/sys/contrib/dev/acpica/dswexec.c b/sys/contrib/dev/acpica/dswexec.c
index ba8df46130b3..f9bfe8edb116 100644
--- a/sys/contrib/dev/acpica/dswexec.c
+++ b/sys/contrib/dev/acpica/dswexec.c
@@ -2,7 +2,7 @@
*
* Module Name: dswexec - Dispatcher method execution callbacks;
* dispatch to interpreter.
- * $Revision: 64 $
+ * $Revision: 70 $
*
*****************************************************************************/
@@ -200,7 +200,6 @@ AcpiDsGetPredicateValue (
* Result of predicate evaluation currently must
* be a number
*/
-
if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
{
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
@@ -220,7 +219,6 @@ AcpiDsGetPredicateValue (
* Save the result of the predicate evaluation on
* the control stack
*/
-
if (ObjDesc->Integer.Value)
{
WalkState->ControlState->Common.Value = TRUE;
@@ -232,7 +230,6 @@ AcpiDsGetPredicateValue (
* Predicate is FALSE, we will just toss the
* rest of the package
*/
-
WalkState->ControlState->Common.Value = FALSE;
Status = AE_CTRL_FALSE;
}
@@ -251,11 +248,9 @@ Cleanup:
* Delete the predicate result object (we know that
* we don't need it anymore)
*/
-
AcpiUtRemoveReference (ObjDesc);
WalkState->ControlState->Common.State = CONTROL_NORMAL;
-
return_ACPI_STATUS (Status);
}
@@ -283,8 +278,9 @@ AcpiDsExecBeginOp (
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_OBJECT **OutOp)
{
- ACPI_OPCODE_INFO *OpInfo;
+ const ACPI_OPCODE_INFO *OpInfo;
ACPI_STATUS Status = AE_OK;
+ UINT8 OpcodeClass;
FUNCTION_TRACE_PTR ("DsExecBeginOp", Op);
@@ -316,7 +312,6 @@ AcpiDsExecBeginOp (
* must be the beginning of the associated predicate.
* Save this knowledge in the current scope descriptor
*/
-
if ((WalkState->ControlState) &&
(WalkState->ControlState->Common.State ==
CONTROL_CONDITIONAL_EXECUTING))
@@ -333,20 +328,19 @@ AcpiDsExecBeginOp (
OpInfo = AcpiPsGetOpcodeInfo (Op->Opcode);
+ OpcodeClass = (UINT8) ACPI_GET_OP_CLASS (OpInfo);
/* We want to send namepaths to the load code */
if (Op->Opcode == AML_INT_NAMEPATH_OP)
{
- OpInfo->Flags = OPTYPE_NAMED_OBJECT;
+ OpcodeClass = OPTYPE_NAMED_OBJECT;
}
-
/*
* Handle the opcode based upon the opcode type
*/
-
- switch (ACPI_GET_OP_CLASS (OpInfo))
+ switch (OpcodeClass)
{
case OPTYPE_CONTROL:
@@ -371,7 +365,6 @@ AcpiDsExecBeginOp (
* will be deleted upon completion of the execution
* of this method.
*/
-
Status = AcpiDsLoad2BeginOp (Op->Opcode, Op, WalkState, NULL);
}
@@ -442,7 +435,8 @@ AcpiDsExecEndOp (
ACPI_PARSE_OBJECT *NextOp;
ACPI_PARSE_OBJECT *FirstArg;
ACPI_OPERAND_OBJECT *ResultObj = NULL;
- ACPI_OPCODE_INFO *OpInfo;
+ const ACPI_OPCODE_INFO *OpInfo;
+ UINT32 i;
FUNCTION_TRACE_PTR ("DsExecEndOp", Op);
@@ -530,6 +524,36 @@ AcpiDsExecEndOp (
goto Cleanup;
}
+ /* Resolve all operands */
+
+ Status = AcpiExResolveOperands (Opcode,
+ &(WalkState->Operands [WalkState->NumOperands -1]),
+ WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ /* TBD: must pop and delete operands */
+
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "[%s]: Could not resolve operands, %s\n",
+ AcpiPsGetOpcodeName (Opcode), AcpiFormatException (Status)));
+
+ /*
+ * On error, we must delete all the operands and clear the
+ * operand stack
+ */
+ for (i = 0; i < WalkState->NumOperands; i++)
+ {
+ AcpiUtRemoveReference (WalkState->Operands[i]);
+ WalkState->Operands[i] = NULL;
+ }
+
+ WalkState->NumOperands = 0;
+
+ goto Cleanup;
+ }
+
+ DUMP_OPERANDS (WALK_OPERANDS, IMODE_EXECUTE, AcpiPsGetOpcodeName (Opcode),
+ WalkState->NumOperands, "after ExResolveOperands");
+
switch (Optype)
{
case OPTYPE_MONADIC1:
@@ -595,9 +619,11 @@ AcpiDsExecEndOp (
Status = AcpiExTriadic (Opcode, WalkState, &ResultObj);
break;
+
case OPTYPE_QUADRADIC: /* Opcode with 4 operands */
break;
+
case OPTYPE_HEXADIC: /* Opcode with 6 operands */
/* 6 Operands, 0 ExternalResult, 1 InternalResult */
@@ -614,6 +640,14 @@ AcpiDsExecEndOp (
break;
}
+ /* Clear the operand stack */
+
+ for (i = 0; i < WalkState->NumOperands; i++)
+ {
+ WalkState->Operands[i] = NULL;
+ }
+ WalkState->NumOperands = 0;
+
/*
* If a result object was returned from above, push it on the
* current result stack
@@ -668,7 +702,6 @@ AcpiDsExecEndOp (
* references here (Local variables, arguments
* to *this* method, etc.)
*/
-
Status = AcpiDsResolveOperands (WalkState);
if (ACPI_FAILURE (Status))
{
@@ -691,7 +724,7 @@ AcpiDsExecEndOp (
case OPTYPE_CREATE_FIELD:
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"Executing CreateField Buffer/Index Op=%X\n", Op));
Status = AcpiDsLoad2EndOp (WalkState, Op);
@@ -751,7 +784,7 @@ AcpiDsExecEndOp (
default:
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Unimplemented opcode, type=%X Opcode=%X Op=%X\n",
Optype, Op->Opcode, Op));
diff --git a/sys/contrib/dev/acpica/dswload.c b/sys/contrib/dev/acpica/dswload.c
index ab9ed5dd492d..bf3de7c118bb 100644
--- a/sys/contrib/dev/acpica/dswload.c
+++ b/sys/contrib/dev/acpica/dswload.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswload - Dispatcher namespace load callbacks
- * $Revision: 40 $
+ * $Revision: 44 $
*
*****************************************************************************/
@@ -154,6 +154,7 @@ AcpiDsLoad1BeginOp (
ACPI_STATUS Status;
ACPI_OBJECT_TYPE8 DataType;
NATIVE_CHAR *Path;
+ const ACPI_OPCODE_INFO *OpInfo;
PROC_NAME ("DsLoad1BeginOp");
@@ -162,13 +163,13 @@ AcpiDsLoad1BeginOp (
/* We are only interested in opcodes that have an associated name */
- if (!AcpiPsIsNamedOp (Opcode))
+ OpInfo = AcpiPsGetOpcodeInfo (Opcode);
+ if (!(OpInfo->Flags & AML_NAMED))
{
*OutOp = Op;
return (AE_OK);
}
-
/* Check if this object has already been installed in the namespace */
if (Op && Op->Node)
@@ -199,7 +200,7 @@ AcpiDsLoad1BeginOp (
* as we go downward in the parse tree. Any necessary subobjects that involve
* arguments to the opcode must be created as we go back up the parse tree later.
*/
- Status = AcpiNsLookup (WalkState->ScopeInfo, Path, DataType,
+ Status = AcpiNsLookup (WalkState->ScopeInfo, Path, DataType,
IMODE_LOAD_PASS1, NS_NO_UPSEARCH, WalkState, &(Node));
if (ACPI_FAILURE (Status))
@@ -227,12 +228,9 @@ AcpiDsLoad1BeginOp (
* can get it again quickly when this scope is closed
*/
Op->Node = Node;
-
-
AcpiPsAppendArg (AcpiPsGetParentScope (WalkState->ParserState), Op);
*OutOp = Op;
-
return (Status);
}
@@ -258,19 +256,21 @@ AcpiDsLoad1EndOp (
ACPI_PARSE_OBJECT *Op)
{
ACPI_OBJECT_TYPE8 DataType;
+ const ACPI_OPCODE_INFO *OpInfo;
PROC_NAME ("DsLoad1EndOp");
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Op=%p State=%p\n", Op, WalkState));
+
/* We are only interested in opcodes that have an associated name */
- if (!AcpiPsIsNamedOp (Op->Opcode))
+ OpInfo = AcpiPsGetOpcodeInfo (Op->Opcode);
+ if (!(OpInfo->Flags & AML_NAMED))
{
return (AE_OK);
}
-
/* Get the type to determine if we should pop the scope */
DataType = AcpiDsMapNamedOpcodeToDataType (Op->Opcode);
@@ -288,7 +288,6 @@ AcpiDsLoad1EndOp (
}
}
-
/* Pop the scope stack */
if (AcpiNsOpensScope (DataType))
@@ -300,7 +299,6 @@ AcpiDsLoad1EndOp (
}
return (AE_OK);
-
}
@@ -330,6 +328,7 @@ AcpiDsLoad2BeginOp (
ACPI_OBJECT_TYPE8 DataType;
NATIVE_CHAR *BufferPtr;
void *Original = NULL;
+ const ACPI_OPCODE_INFO *OpInfo;
PROC_NAME ("DsLoad2BeginOp");
@@ -338,16 +337,16 @@ AcpiDsLoad2BeginOp (
/* We only care about Namespace opcodes here */
- if (!AcpiPsIsNamespaceOp (Opcode) &&
+ OpInfo = AcpiPsGetOpcodeInfo (Opcode);
+ if (!(OpInfo->Flags & AML_NSOPCODE) &&
Opcode != AML_INT_NAMEPATH_OP)
{
return (AE_OK);
}
+ /* TBD: [Restructure] Temp! same code as in psparse */
- /* Temp! same code as in psparse */
-
- if (!AcpiPsIsNamedOp (Opcode))
+ if (!(OpInfo->Flags & AML_NAMED))
{
return (AE_OK);
}
@@ -406,7 +405,7 @@ AcpiDsLoad2BeginOp (
* The NamePath is an object reference to an existing object. Don't enter the
* name into the namespace, but look it up for use later
*/
- Status = AcpiNsLookup (WalkState->ScopeInfo, BufferPtr, DataType,
+ Status = AcpiNsLookup (WalkState->ScopeInfo, BufferPtr, DataType,
IMODE_EXECUTE, NS_SEARCH_PARENT, WalkState, &(Node));
}
@@ -434,7 +433,7 @@ AcpiDsLoad2BeginOp (
* as we go downward in the parse tree. Any necessary subobjects that involve
* arguments to the opcode must be created as we go back up the parse tree later.
*/
- Status = AcpiNsLookup (WalkState->ScopeInfo, BufferPtr, DataType,
+ Status = AcpiNsLookup (WalkState->ScopeInfo, BufferPtr, DataType,
IMODE_EXECUTE, NS_NO_UPSEARCH, WalkState, &(Node));
}
@@ -456,7 +455,6 @@ AcpiDsLoad2BeginOp (
*OutOp = Op;
}
-
/*
* Put the Node in the "op" object that the parser uses, so we
* can get it again quickly when this scope is closed
@@ -500,16 +498,21 @@ AcpiDsLoad2EndOp (
ACPI_PARSE_OBJECT *Op)
{
ACPI_STATUS Status = AE_OK;
- ACPI_OBJECT_TYPE8 DataType;
+ ACPI_OBJECT_TYPE8 DataType;
ACPI_NAMESPACE_NODE *Node;
ACPI_PARSE_OBJECT *Arg;
ACPI_NAMESPACE_NODE *NewNode;
+ const ACPI_OPCODE_INFO *OpInfo;
PROC_NAME ("DsLoad2EndOp");
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Op=%p State=%p\n", Op, WalkState));
- if (!AcpiPsIsNamespaceObjectOp (Op->Opcode))
+
+ /* Only interested in opcodes that have namespace objects */
+
+ OpInfo = AcpiPsGetOpcodeInfo (Op->Opcode);
+ if (!(OpInfo->Flags & AML_NSOBJECT))
{
return (AE_OK);
}
@@ -521,7 +524,7 @@ AcpiDsLoad2EndOp (
if (((ACPI_PARSE2_OBJECT *)Op)->Name == -1)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unnamed scope! Op=%p State=%p\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unnamed scope! Op=%p State=%p\n",
Op, WalkState));
return (AE_OK);
}
@@ -540,7 +543,6 @@ AcpiDsLoad2EndOp (
* Put the Node on the object stack (Contains the ACPI Name of
* this object)
*/
-
WalkState->Operands[0] = (void *) Node;
WalkState->NumOperands = 1;
@@ -554,7 +556,6 @@ AcpiDsLoad2EndOp (
AcpiDsScopeStackPop (WalkState);
}
-
/*
* Named operations are as follows:
*
@@ -601,9 +602,8 @@ AcpiDsLoad2EndOp (
* Create the field object, but the field buffer and index must
* be evaluated later during the execution phase
*/
-
- ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
- "CreateXxxField: State=%p Op=%p NamedObj=%p\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
+ "CreateXxxField: State=%p Op=%p NamedObj=%p\n",
WalkState, Op, Node));
/* Get the NameString argument */
@@ -663,22 +663,19 @@ AcpiDsLoad2EndOp (
case AML_INT_METHODCALL_OP:
- ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
+ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"RESOLVING-MethodCall: State=%p Op=%p NamedObj=%p\n",
WalkState, Op, Node));
/*
* Lookup the method name and save the Node
*/
-
Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Value.String,
ACPI_TYPE_ANY, IMODE_LOAD_PASS2,
NS_SEARCH_PARENT | NS_DONT_OPEN_SCOPE,
WalkState, &(NewNode));
-
if (ACPI_SUCCESS (Status))
{
-
/* TBD: has name already been resolved by here ??*/
/* TBD: [Restructure] Make sure that what we found is indeed a method! */
@@ -837,7 +834,7 @@ AcpiDsLoad2EndOp (
}
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
- "LOADING-Opregion: Op=%p State=%p NamedObj=%p\n",
+ "LOADING-Opregion: Op=%p State=%p NamedObj=%p\n",
Op, WalkState, Node));
/*
diff --git a/sys/contrib/dev/acpica/dswscope.c b/sys/contrib/dev/acpica/dswscope.c
index b0c578a3da4e..f14c06d3211d 100644
--- a/sys/contrib/dev/acpica/dswscope.c
+++ b/sys/contrib/dev/acpica/dswscope.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswscope - Scope stack manipulation
- * $Revision: 46 $
+ * $Revision: 48 $
*
*****************************************************************************/
@@ -145,7 +145,7 @@ AcpiDsScopeStackClear (
{
ACPI_GENERIC_STATE *ScopeInfo;
- PROC_NAME ("AcpiDsScopeStackClear");
+ PROC_NAME ("DsScopeStackClear");
while (WalkState->ScopeInfo)
@@ -188,7 +188,7 @@ AcpiDsScopeStackPush (
if (!Node)
{
- /* invalid scope */
+ /* Invalid scope */
REPORT_ERROR (("DsScopeStackPush: null scope passed\n"));
return_ACPI_STATUS (AE_BAD_PARAMETER);
@@ -249,10 +249,10 @@ AcpiDsScopeStackPop (
FUNCTION_TRACE ("DsScopeStackPop");
+
/*
* Pop scope info object off the stack.
*/
-
ScopeInfo = AcpiUtPopGenericState (&WalkState->ScopeInfo);
if (!ScopeInfo)
{
diff --git a/sys/contrib/dev/acpica/dswstate.c b/sys/contrib/dev/acpica/dswstate.c
index 8ba87c47c771..cbb265b325eb 100644
--- a/sys/contrib/dev/acpica/dswstate.c
+++ b/sys/contrib/dev/acpica/dswstate.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswstate - Dispatcher parse tree walk management routines
- * $Revision: 48 $
+ * $Revision: 50 $
*
*****************************************************************************/
@@ -163,7 +163,7 @@ AcpiDsResultInsert (
if (Index >= OBJ_NUM_OPERANDS)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Index out of range: %X Obj=%p State=%p Num=%X\n",
Index, Object, WalkState, State->Results.NumResults));
return (AE_BAD_PARAMETER);
@@ -289,7 +289,6 @@ AcpiDsResultPop (
return (AE_OK);
}
-
if (!State->Results.NumResults)
{
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Result stack is empty! State=%p\n",
@@ -318,7 +317,6 @@ AcpiDsResultPop (
}
}
-
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No result objects! State=%p\n", WalkState));
return (AE_AML_NO_RETURN_VALUE);
}
@@ -368,7 +366,6 @@ AcpiDsResultPopFromBottom (
*Object = State->Results.ObjDesc [0];
-
/* Push entire stack down one element */
for (Index = 0; Index < State->Results.NumResults; Index++)
@@ -846,7 +843,7 @@ AcpiDsGetCurrentWalkState (
PROC_NAME ("DsGetCurrentWalkState");
- ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "DsGetCurrentWalkState, =%p\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "DsGetCurrentWalkState, =%p\n",
WalkList->WalkState));
if (!WalkList)
@@ -876,8 +873,6 @@ AcpiDsPushWalkState (
ACPI_WALK_STATE *WalkState,
ACPI_WALK_LIST *WalkList)
{
-
-
FUNCTION_TRACE ("DsPushWalkState");
@@ -985,7 +980,6 @@ AcpiDsCreateWalkState (
return_PTR (NULL);
}
-
/* Put the new state at the head of the walk list */
AcpiDsPushWalkState (WalkState, WalkList);
@@ -1058,7 +1052,6 @@ AcpiDsDeleteWalkState (
AcpiUtDeleteGenericState (State);
}
-
AcpiUtReleaseToCache (ACPI_MEM_LIST_WALK, WalkState);
return_VOID;
}
diff --git a/sys/contrib/dev/acpica/evevent.c b/sys/contrib/dev/acpica/evevent.c
index f3c0e524c3a7..92b51e60b225 100644
--- a/sys/contrib/dev/acpica/evevent.c
+++ b/sys/contrib/dev/acpica/evevent.c
@@ -2,7 +2,7 @@
*
* Module Name: evevent - Fixed and General Purpose AcpiEvent
* handling and dispatch
- * $Revision: 47 $
+ * $Revision: 50 $
*
*****************************************************************************/
@@ -173,7 +173,6 @@ AcpiEvInitialize (
* done prior to enabling SCIs to prevent interrupts from occuring
* before handers are installed.
*/
-
Status = AcpiEvFixedEventInitialize ();
if (ACPI_FAILURE (Status))
{
@@ -275,14 +274,14 @@ AcpiEvFixedEventDetect (void)
UINT32 StatusRegister;
UINT32 EnableRegister;
- PROC_NAME ("AcpiEvFixedEventDetect");
+
+ PROC_NAME ("EvFixedEventDetect");
/*
* Read the fixed feature status and enable registers, as all the cases
* depend on their values.
*/
-
StatusRegister = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK, PM1_STS);
EnableRegister = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK, PM1_EN);
@@ -344,7 +343,11 @@ UINT32
AcpiEvFixedEventDispatch (
UINT32 Event)
{
- UINT32 RegisterId;
+ UINT32 RegisterId;
+
+
+ FUNCTION_ENTRY ();
+
/* Clear the status bit */
@@ -443,7 +446,6 @@ AcpiEvGpeInitialize (void)
* FADT table contain zeros. The GPE0_LEN and GPE1_LEN do not need
* to be the same size."
*/
-
Gpe0RegisterCount = (UINT16) DIV_2 (AcpiGbl_FADT->Gpe0BlkLen);
Gpe1RegisterCount = (UINT16) DIV_2 (AcpiGbl_FADT->Gpe1BlkLen);
AcpiGbl_GpeRegisterCount = Gpe0RegisterCount + Gpe1RegisterCount;
@@ -457,7 +459,6 @@ AcpiEvGpeInitialize (void)
/*
* Allocate the Gpe information block
*/
-
AcpiGbl_GpeRegisters = ACPI_MEM_CALLOCATE (AcpiGbl_GpeRegisterCount *
sizeof (ACPI_GPE_REGISTERS));
if (!AcpiGbl_GpeRegisters)
@@ -472,7 +473,6 @@ AcpiEvGpeInitialize (void)
* There are eight distinct GP events per register.
* Initialization to zeros is sufficient
*/
-
AcpiGbl_GpeInfo = ACPI_MEM_CALLOCATE (MUL_8 (AcpiGbl_GpeRegisterCount) *
sizeof (ACPI_GPE_LEVEL_INFO));
if (!AcpiGbl_GpeInfo)
@@ -651,7 +651,6 @@ AcpiEvSaveMethodInfo (
* Now we can add this information to the GpeInfo block
* for use during dispatch of this GPE.
*/
-
AcpiGbl_GpeInfo [GpeNumber].Type = Type;
AcpiGbl_GpeInfo [GpeNumber].MethodHandle = ObjHandle;
@@ -659,7 +658,6 @@ AcpiEvSaveMethodInfo (
/*
* Enable the GPE (SCIs should be disabled at this point)
*/
-
AcpiHwEnableGpe (GpeNumber);
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Registered GPE method %s as GPE number %X\n",
@@ -741,16 +739,16 @@ AcpiEvGpeDetect (void)
*/
for (i = 0; i < AcpiGbl_GpeRegisterCount; i++)
{
- AcpiOsReadPort (AcpiGbl_GpeRegisters[i].StatusAddr,
+ AcpiOsReadPort (AcpiGbl_GpeRegisters[i].StatusAddr,
&AcpiGbl_GpeRegisters[i].Status, 8);
- AcpiOsReadPort (AcpiGbl_GpeRegisters[i].EnableAddr,
+ AcpiOsReadPort (AcpiGbl_GpeRegisters[i].EnableAddr,
&AcpiGbl_GpeRegisters[i].Enable, 8);
ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS,
"GPE block at %X - Enable %08X Status %08X\n",
- AcpiGbl_GpeRegisters[i].EnableAddr,
- AcpiGbl_GpeRegisters[i].Status,
+ AcpiGbl_GpeRegisters[i].EnableAddr,
+ AcpiGbl_GpeRegisters[i].Status,
AcpiGbl_GpeRegisters[i].Enable));
/* First check if there is anything active at all in this register */
@@ -874,6 +872,7 @@ AcpiEvGpeDispatch (
{
ACPI_GPE_LEVEL_INFO GpeInfo;
+
FUNCTION_TRACE ("EvGpeDispatch");
diff --git a/sys/contrib/dev/acpica/evmisc.c b/sys/contrib/dev/acpica/evmisc.c
index 94217042a4c9..8f5d157bd96f 100644
--- a/sys/contrib/dev/acpica/evmisc.c
+++ b/sys/contrib/dev/acpica/evmisc.c
@@ -2,7 +2,7 @@
*
* Module Name: evmisc - ACPI device notification handler dispatch
* and ACPI Global Lock support
- * $Revision: 32 $
+ * $Revision: 33 $
*
*****************************************************************************/
@@ -158,7 +158,6 @@ AcpiEvQueueNotifyRequest (
* For value 0x80 (Status Change) on the power button or sleep button,
* initiate soft-off or sleep operation?
*/
-
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"Dispatching Notify(%X) on node %p\n", NotifyValue, Node));
@@ -189,7 +188,6 @@ AcpiEvQueueNotifyRequest (
/*
* Get the notify object attached to the device Node
*/
-
ObjDesc = AcpiNsGetAttachedObject (Node);
if (ObjDesc)
{
@@ -282,11 +280,13 @@ AcpiEvNotifyDispatch (
ACPI_OPERAND_OBJECT *HandlerObj;
+ FUNCTION_ENTRY ();
+
+
/*
* We will invoke a global notify handler if installed.
* This is done _before_ we invoke the per-device handler attached to the device.
*/
-
if (NotifyInfo->Notify.Value <= MAX_SYS_NOTIFY)
{
/* Global system notification handler */
@@ -326,7 +326,6 @@ AcpiEvNotifyDispatch (
HandlerObj->NotifyHandler.Context);
}
-
/* All done with the info object */
AcpiUtDeleteGenericState (NotifyInfo);
@@ -387,7 +386,6 @@ AcpiEvGlobalLockHandler (
* If we don't get it now, it will be marked pending and we will
* take another interrupt when it becomes free.
*/
-
GlobalLock = AcpiGbl_FACS->GlobalLock;
ACPI_ACQUIRE_GLOBAL_LOCK (GlobalLock, Acquired);
if (Acquired)
@@ -512,14 +510,12 @@ AcpiEvAcquireGlobalLock(void)
* Did not get the lock. The pending bit was set above, and we must now
* wait until we get the global lock released interrupt.
*/
-
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Waiting for the HW Global Lock\n"));
/*
* Acquire the global lock semaphore first.
* Since this wait will block, we must release the interpreter
*/
-
Status = AcpiExSystemWaitSemaphore (AcpiGbl_GlobalLockSemaphore,
ACPI_UINT32_MAX);
return_ACPI_STATUS (Status);
@@ -543,6 +539,7 @@ AcpiEvReleaseGlobalLock (void)
FUNCTION_TRACE ("EvReleaseGlobalLock");
+
if (!AcpiGbl_GlobalLockThreadCount)
{
REPORT_WARNING(("Global Lock has not be acquired, cannot release\n"));
@@ -561,7 +558,6 @@ AcpiEvReleaseGlobalLock (void)
* No more threads holding lock, we can do the actual hardware
* release
*/
-
GlobalLock = AcpiGbl_FACS->GlobalLock;
ACPI_RELEASE_GLOBAL_LOCK (GlobalLock, Pending);
AcpiGbl_GlobalLockAcquired = FALSE;
diff --git a/sys/contrib/dev/acpica/evregion.c b/sys/contrib/dev/acpica/evregion.c
index 1537af029311..b708a977ce86 100644
--- a/sys/contrib/dev/acpica/evregion.c
+++ b/sys/contrib/dev/acpica/evregion.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evregion - ACPI AddressSpace (OpRegion) handler dispatch
- * $Revision: 107 $
+ * $Revision: 109 $
*
*****************************************************************************/
@@ -148,6 +148,7 @@ AcpiEvInstallDefaultAddressSpaceHandlers (
FUNCTION_TRACE ("EvInstallDefaultAddressSpaceHandlers");
+
/*
* All address spaces (PCI Config, EC, SMBus) are scope dependent
* and registration must occur for a specific device. In the case
@@ -163,7 +164,6 @@ AcpiEvInstallDefaultAddressSpaceHandlers (
* NOTE: We ignore AE_EXIST because this means that a handler has
* already been installed (via AcpiInstallAddressSpaceHandler)
*/
-
Status = AcpiInstallAddressSpaceHandler (AcpiGbl_RootNode,
ACPI_ADR_SPACE_SYSTEM_MEMORY,
ACPI_DEFAULT_HANDLER, NULL, NULL);
@@ -239,7 +239,6 @@ AcpiEvExecuteRegMethod (
* 0 for disconnecting the handler
* Passed as a parameter
*/
-
AcpiUtInitStaticObject (&SpaceIdDesc);
AcpiUtInitStaticObject (&FunctionDesc);
@@ -405,9 +404,10 @@ AcpiEvAddressSpaceDispatch (
if (!(HandlerDesc->AddrHandler.Flags & ADDR_HANDLER_DEFAULT_INSTALLED))
{
- /* We just returned from a non-default handler, we must re-enter the
- interpreter */
-
+ /*
+ * We just returned from a non-default handler, we must re-enter the
+ * interpreter
+ */
AcpiExEnterInterpreter ();
}
@@ -443,12 +443,12 @@ AcpiEvDisassociateRegionFromHandler(
FUNCTION_TRACE ("EvDisassociateRegionFromHandler");
+
RegionContext = RegionObj->Region.Extra->Extra.RegionContext;
/*
* Get the address handler from the region object
*/
-
HandlerObj = RegionObj->Region.AddrHandler;
if (!HandlerObj)
{
@@ -462,7 +462,6 @@ AcpiEvDisassociateRegionFromHandler(
/*
* Find this region in the handler's list
*/
-
ObjDesc = HandlerObj->AddrHandler.RegionList;
LastObjPtr = &HandlerObj->AddrHandler.RegionList;
@@ -577,7 +576,7 @@ AcpiEvAssociateRegionAndHandler (
FUNCTION_TRACE ("EvAssociateRegionAndHandler");
- ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
+ ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
"Adding Region %p to address handler %p [%s]\n",
RegionObj, HandlerObj, AcpiUtGetRegionName (RegionObj->Region.SpaceId)));
@@ -669,7 +668,6 @@ AcpiEvAddrHandlerHelper (
* We only care about regions.and objects
* that can have address handlers
*/
-
if ((Node->Type != ACPI_TYPE_DEVICE) &&
(Node->Type != ACPI_TYPE_REGION) &&
(Node != AcpiGbl_RootNode))
diff --git a/sys/contrib/dev/acpica/evrgnini.c b/sys/contrib/dev/acpica/evrgnini.c
index b08d5b7b75dd..280fa3a58c16 100644
--- a/sys/contrib/dev/acpica/evrgnini.c
+++ b/sys/contrib/dev/acpica/evrgnini.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evrgnini- ACPI AddressSpace (OpRegion) init
- * $Revision: 45 $
+ * $Revision: 46 $
*
*****************************************************************************/
@@ -358,7 +358,7 @@ AcpiEvPciConfigRegionSetup (
}
/*
- * The PCI bus number comes from the _BBN method
+ * The PCI bus number comes from the _BBN method
*/
Status = AcpiUtEvaluateNumericObject (METHOD_NAME__BBN, Node, &Temp);
if (ACPI_SUCCESS (Status))
@@ -523,7 +523,7 @@ AcpiEvInitializeRegion (
/*
* Found it! Now update the region and the handler
*/
- AcpiEvAssociateRegionAndHandler (HandlerObj, RegionObj,
+ AcpiEvAssociateRegionAndHandler (HandlerObj, RegionObj,
AcpiNsLocked);
return_ACPI_STATUS (AE_OK);
}
diff --git a/sys/contrib/dev/acpica/evsci.c b/sys/contrib/dev/acpica/evsci.c
index d9dbd8be494e..9c674bedf657 100644
--- a/sys/contrib/dev/acpica/evsci.c
+++ b/sys/contrib/dev/acpica/evsci.c
@@ -2,7 +2,7 @@
*
* Module Name: evsci - System Control Interrupt configuration and
* legacy to ACPI mode state transition functions
- * $Revision: 73 $
+ * $Revision: 74 $
*
******************************************************************************/
@@ -203,17 +203,15 @@ AcpiEvSciHandler (void *Context)
UINT32
AcpiEvInstallSciHandler (void)
{
- UINT32 Except = AE_OK;
+ UINT32 Status = AE_OK;
FUNCTION_TRACE ("EvInstallSciHandler");
- Except = AcpiOsInstallInterruptHandler ((UINT32) AcpiGbl_FADT->SciInt,
- AcpiEvSciHandler,
- NULL);
-
- return_ACPI_STATUS (Except);
+ Status = AcpiOsInstallInterruptHandler ((UINT32) AcpiGbl_FADT->SciInt,
+ AcpiEvSciHandler, NULL);
+ return_ACPI_STATUS (Status);
}
@@ -237,6 +235,7 @@ AcpiEvRemoveSciHandler (void)
{
FUNCTION_TRACE ("EvRemoveSciHandler");
+
#if 0
/* TBD:[Investigate] Figure this out!! Disable all events first ??? */
@@ -375,7 +374,6 @@ AcpiEvTerminate (void)
/*
* Free global tables, etc.
*/
-
if (AcpiGbl_GpeRegisters)
{
ACPI_MEM_FREE (AcpiGbl_GpeRegisters);
diff --git a/sys/contrib/dev/acpica/evxface.c b/sys/contrib/dev/acpica/evxface.c
index 18193cfebcec..3aa29b596133 100644
--- a/sys/contrib/dev/acpica/evxface.c
+++ b/sys/contrib/dev/acpica/evxface.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evxface - External interfaces for ACPI events
- * $Revision: 111 $
+ * $Revision: 112 $
*
*****************************************************************************/
@@ -801,7 +801,6 @@ AcpiAcquireGlobalLock (
* TBD: [Restructure] add timeout param to internal interface, and
* perhaps INTERPRETER_LOCKED
*/
-
Status = AcpiEvAcquireGlobalLock ();
AcpiExExitInterpreter ();
diff --git a/sys/contrib/dev/acpica/evxfevnt.c b/sys/contrib/dev/acpica/evxfevnt.c
index 33492ec5601f..68adc2db0fe5 100644
--- a/sys/contrib/dev/acpica/evxfevnt.c
+++ b/sys/contrib/dev/acpica/evxfevnt.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evxfevnt - External Interfaces, ACPI event disable/enable
- * $Revision: 34 $
+ * $Revision: 36 $
*
*****************************************************************************/
@@ -301,12 +301,11 @@ AcpiEnableEvent (
* Enable the requested fixed event (by writing a one to the
* enable register bit)
*/
-
AcpiHwRegisterBitAccess (ACPI_WRITE, ACPI_MTX_LOCK, RegisterId, 1);
if (1 != AcpiHwRegisterBitAccess(ACPI_READ, ACPI_MTX_LOCK, RegisterId))
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Fixed event bit clear when it should be set\n"));
return_ACPI_STATUS (AE_NO_HARDWARE_RESPONSE);
}
@@ -414,12 +413,11 @@ AcpiDisableEvent (
* Disable the requested fixed event (by writing a zero to the
* enable register bit)
*/
-
AcpiHwRegisterBitAccess (ACPI_WRITE, ACPI_MTX_LOCK, RegisterId, 0);
if (0 != AcpiHwRegisterBitAccess(ACPI_READ, ACPI_MTX_LOCK, RegisterId))
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Fixed event bit set when it should be clear,\n"));
return_ACPI_STATUS (AE_NO_HARDWARE_RESPONSE);
}
@@ -524,7 +522,6 @@ AcpiClearEvent (
* Clear the requested fixed event (By writing a one to the
* status register bit)
*/
-
AcpiHwRegisterBitAccess (ACPI_WRITE, ACPI_MTX_LOCK, RegisterId, 1);
break;
@@ -659,7 +656,6 @@ AcpiGetEventStatus (
Status = AE_BAD_PARAMETER;
}
-
return_ACPI_STATUS (Status);
}
diff --git a/sys/contrib/dev/acpica/evxfregn.c b/sys/contrib/dev/acpica/evxfregn.c
index 7e14873ff259..cab8a43be9aa 100644
--- a/sys/contrib/dev/acpica/evxfregn.c
+++ b/sys/contrib/dev/acpica/evxfregn.c
@@ -2,7 +2,7 @@
*
* Module Name: evxfregn - External Interfaces, ACPI Operation Regions and
* Address Spaces.
- * $Revision: 35 $
+ * $Revision: 36 $
*
*****************************************************************************/
@@ -196,7 +196,6 @@ AcpiInstallAddressSpaceHandler (
* and the root. This is where the default handlers
* get placed.
*/
-
if ((Node->Type != ACPI_TYPE_DEVICE) &&
(Node->Type != ACPI_TYPE_PROCESSOR) &&
(Node->Type != ACPI_TYPE_THERMAL) &&
@@ -245,7 +244,6 @@ AcpiInstallAddressSpaceHandler (
/*
* Check for an existing internal object
*/
-
ObjDesc = AcpiNsGetAttachedObject (Node);
if (ObjDesc)
{
@@ -361,7 +359,6 @@ AcpiInstallAddressSpaceHandler (
/*
* Place this handler 1st on the list
*/
-
HandlerObj->Common.ReferenceCount =
(UINT16) (HandlerObj->Common.ReferenceCount +
ObjDesc->Common.ReferenceCount - 1);
@@ -448,7 +445,6 @@ AcpiRemoveAddressSpaceHandler (
/*
* find the address handler the user requested
*/
-
HandlerObj = ObjDesc->Device.AddrHandler;
LastObjPtr = &ObjDesc->Device.AddrHandler;
while (HandlerObj)
@@ -456,7 +452,6 @@ AcpiRemoveAddressSpaceHandler (
/*
* We have a handler, see if user requested this one
*/
-
if(HandlerObj->AddrHandler.SpaceId == SpaceId)
{
/*
diff --git a/sys/contrib/dev/acpica/exconfig.c b/sys/contrib/dev/acpica/exconfig.c
index c79f8b8c1eeb..9bdad16feb2d 100644
--- a/sys/contrib/dev/acpica/exconfig.c
+++ b/sys/contrib/dev/acpica/exconfig.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exconfig - Namespace reconfiguration (Load/Unload opcodes)
- * $Revision: 37 $
+ * $Revision: 41 $
*
*****************************************************************************/
@@ -147,7 +147,7 @@
static ACPI_STATUS
AcpiExLoadTableOp (
ACPI_OPERAND_OBJECT *RgnDesc,
- ACPI_HANDLE *DdbHandle)
+ ACPI_OPERAND_OBJECT **DdbHandle)
{
ACPI_STATUS Status;
ACPI_OPERAND_OBJECT *TableDesc = NULL;
@@ -294,22 +294,22 @@ Cleanup:
static ACPI_STATUS
AcpiExUnloadTable (
- ACPI_HANDLE DdbHandle)
+ ACPI_OPERAND_OBJECT *DdbHandle)
{
ACPI_STATUS Status = AE_NOT_IMPLEMENTED;
- ACPI_OPERAND_OBJECT *TableDesc = (ACPI_OPERAND_OBJECT *) DdbHandle;
+ ACPI_OPERAND_OBJECT *TableDesc = DdbHandle;
ACPI_TABLE_DESC *TableInfo;
FUNCTION_TRACE ("ExUnloadTable");
- /* Validate the handle */
- /* Although the handle is partially validated in AcpiExReconfiguration(),
- * when it calls AcpiExResolveOperands(), the handle is more completely
- * validated here.
+ /*
+ * Validate the handle
+ * Although the handle is partially validated in AcpiExReconfiguration(),
+ * when it calls AcpiExResolveOperands(), the handle is more completely
+ * validated here.
*/
-
if ((!DdbHandle) ||
(!VALID_DESCRIPTOR_TYPE (DdbHandle, ACPI_DESC_TYPE_INTERNAL)) ||
(((ACPI_OPERAND_OBJECT *)DdbHandle)->Common.Type !=
@@ -318,7 +318,6 @@ AcpiExUnloadTable (
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
-
/* Get the actual table descriptor from the DdbHandle */
TableInfo = (ACPI_TABLE_DESC *) TableDesc->Reference.Object;
@@ -327,7 +326,6 @@ AcpiExUnloadTable (
* Delete the entire namespace under this table Node
* (Offset contains the TableId)
*/
-
Status = AcpiNsDeleteNamespaceByOwner (TableInfo->TableId);
if (ACPI_FAILURE (Status))
{
@@ -364,56 +362,28 @@ AcpiExReconfiguration (
UINT16 Opcode,
ACPI_WALK_STATE *WalkState)
{
+ ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
ACPI_STATUS Status;
- ACPI_OPERAND_OBJECT *RegionDesc = NULL;
- ACPI_HANDLE *DdbHandle;
FUNCTION_TRACE ("ExReconfiguration");
+#define DdbHandle Operand[0]
+#define RegionDesc Operand[1]
- /* Resolve the operands */
-
- Status = AcpiExResolveOperands (Opcode, WALK_OPERANDS, WalkState);
- DUMP_OPERANDS (WALK_OPERANDS, IMODE_EXECUTE, AcpiPsGetOpcodeName (Opcode),
- 2, "after AcpiExResolveOperands");
- /* Get the table handle, common for both opcodes */
-
- Status |= AcpiDsObjStackPopObject ((ACPI_OPERAND_OBJECT **) &DdbHandle,
- WalkState);
switch (Opcode)
{
case AML_LOAD_OP:
- /* Get the region or field descriptor */
-
- Status |= AcpiDsObjStackPopObject (&RegionDesc, WalkState);
- if (ACPI_FAILURE (Status))
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "bad operand(s) (Load) (%s)\n",
- AcpiFormatException (Status)));
-
- AcpiUtRemoveReference (RegionDesc);
- return_ACPI_STATUS (Status);
- }
-
- Status = AcpiExLoadTableOp (RegionDesc, DdbHandle);
+ Status = AcpiExLoadTableOp (RegionDesc, &DdbHandle);
break;
case AML_UNLOAD_OP:
- if (ACPI_FAILURE (Status))
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "bad operand(s) (unload) (%s)\n",
- AcpiFormatException (Status)));
-
- return_ACPI_STATUS (Status);
- }
-
Status = AcpiExUnloadTable (DdbHandle);
break;
diff --git a/sys/contrib/dev/acpica/exconvrt.c b/sys/contrib/dev/acpica/exconvrt.c
index d8af78d56e9c..4c607ab5f782 100644
--- a/sys/contrib/dev/acpica/exconvrt.c
+++ b/sys/contrib/dev/acpica/exconvrt.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exconvrt - Object conversion routines
- * $Revision: 20 $
+ * $Revision: 22 $
*
*****************************************************************************/
@@ -158,6 +158,9 @@ AcpiExConvertToInteger (
UINT32 IntegerSize = sizeof (ACPI_INTEGER);
+ FUNCTION_ENTRY ();
+
+
switch (ObjDesc->Common.Type)
{
case ACPI_TYPE_INTEGER:
@@ -231,7 +234,6 @@ AcpiExConvertToInteger (
* Convert string to an integer
* String must be hexadecimal as per the ACPI specification
*/
-
Result = STRTOUL (Pointer, NULL, 16);
break;
@@ -298,6 +300,9 @@ AcpiExConvertToBuffer (
UINT8 *NewBuf;
+ FUNCTION_ENTRY ();
+
+
switch (ObjDesc->Common.Type)
{
case ACPI_TYPE_INTEGER:
@@ -376,7 +381,6 @@ AcpiExConvertToBuffer (
}
-
/*******************************************************************************
*
* FUNCTION: AcpiExConvertAscii
@@ -404,23 +408,7 @@ AcpiExConvertToAscii (
UINT32 Length = sizeof (ACPI_INTEGER);
- /******** TBD: DEBUG only
- char *buf;
- char sbuf[32];
-#include <stdio.h>
-#include <stdlib.h>
- buf = _ui64toa (Integer, sbuf, 10);
- printf ("1): %s\n", sbuf);
-
- AcpiExConvertToDecimalAscii (Integer, 0, sbuf);
- printf ("2): %s\n", sbuf);
-
-
- buf = _ui64toa (Integer, sbuf, 16);
- printf ("3): %s\n", sbuf);
-
- printf ("4): %s\n", String);
-***************************************************/
+ FUNCTION_ENTRY ();
switch (Base)
@@ -479,7 +467,7 @@ AcpiExConvertToAscii (
/*
* Since leading zeros are supressed, we must check for the case where
- * the integer equals 0.
+ * the integer equals 0.
*
* Finally, null terminate the string and return the length
*/
@@ -525,6 +513,8 @@ AcpiExConvertToString (
UINT8 *Pointer;
+ FUNCTION_ENTRY ();
+
switch (ObjDesc->Common.Type)
{
@@ -731,7 +721,6 @@ AcpiExConvertToTargetType (
* If required by the target,
* perform implicit conversion on the source before we store it.
*/
-
switch (GET_CURRENT_ARG_TYPE (WalkState->OpInfo->RuntimeArgs))
{
case ARGI_SIMPLE_TARGET:
diff --git a/sys/contrib/dev/acpica/excreate.c b/sys/contrib/dev/acpica/excreate.c
index 1718b122e336..f4b7439dc651 100644
--- a/sys/contrib/dev/acpica/excreate.c
+++ b/sys/contrib/dev/acpica/excreate.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: excreate - Named object creation
- * $Revision: 64 $
+ * $Revision: 65 $
*
*****************************************************************************/
@@ -187,7 +187,6 @@ AcpiExCreateBufferField (
/*
* Allocate a method object for this field unit
*/
-
ObjDesc->BufferField.Extra = AcpiUtCreateInternalObject (
INTERNAL_TYPE_EXTRA);
if (!ObjDesc->BufferField.Extra)
@@ -201,7 +200,6 @@ AcpiExCreateBufferField (
* opcode and operands -- since the buffer and index
* operands must be evaluated.
*/
-
ObjDesc->BufferField.Extra->Extra.Pcode = AmlPtr;
ObjDesc->BufferField.Extra->Extra.PcodeLength = AmlLength;
ObjDesc->BufferField.Node = Node;
@@ -235,7 +233,6 @@ AcpiExCreateBufferField (
* There is an existing object here; delete it and zero out the
* object field within the Node
*/
-
DUMP_PATHNAME (Node,
"ExCreateBufferField: Removing Current Reference",
ACPI_LV_BFIELD, _COMPONENT);
@@ -381,8 +378,6 @@ AcpiExCreateEvent (
FUNCTION_TRACE ("ExCreateEvent");
- BREAKPOINT3;
-
ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_EVENT);
if (!ObjDesc)
{
@@ -556,7 +551,6 @@ AcpiExCreateRegion (
/*
* Allocate a method object for this region.
*/
-
ObjDesc->Region.Extra = AcpiUtCreateInternalObject (
INTERNAL_TYPE_EXTRA);
if (!ObjDesc->Region.Extra)
@@ -569,7 +563,6 @@ AcpiExCreateRegion (
* Remember location in AML stream of address & length
* operands since they need to be evaluated at run time.
*/
-
ObjDesc->Region.Extra->Extra.Pcode = AmlPtr;
ObjDesc->Region.Extra->Extra.PcodeLength = AmlLength;
@@ -596,7 +589,6 @@ AcpiExCreateRegion (
* If we have a valid region, initialize it
* Namespace is NOT locked at this point.
*/
-
Status = AcpiEvInitializeRegion (ObjDesc, FALSE);
if (ACPI_FAILURE (Status))
@@ -830,7 +822,6 @@ AcpiExCreateMethod (
* First argument is the Method Flags (contains parameter count for the
* method)
*/
-
ObjDesc->Method.MethodFlags = (UINT8) MethodFlags;
ObjDesc->Method.ParamCount = (UINT8) (MethodFlags &
METHOD_FLAGS_ARG_COUNT);
diff --git a/sys/contrib/dev/acpica/exdump.c b/sys/contrib/dev/acpica/exdump.c
index 6c4855762aef..96e3fca86d92 100644
--- a/sys/contrib/dev/acpica/exdump.c
+++ b/sys/contrib/dev/acpica/exdump.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exdump - Interpreter debug output routines
- * $Revision: 116 $
+ * $Revision: 122 $
*
*****************************************************************************/
@@ -261,7 +261,7 @@ AcpiExDumpOperand (
if (VALID_DESCRIPTOR_TYPE (EntryDesc, ACPI_DESC_TYPE_NAMED))
{
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Node: \n"));
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%p NS Node: ", EntryDesc));
DUMP_ENTRY (EntryDesc, ACPI_LV_INFO);
return (AE_OK);
}
@@ -275,7 +275,7 @@ AcpiExDumpOperand (
if (!VALID_DESCRIPTOR_TYPE (EntryDesc, ACPI_DESC_TYPE_INTERNAL))
{
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%p Not a local object \n", EntryDesc));
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%p Is not a local object \n", EntryDesc));
DUMP_BUFFER (EntryDesc, sizeof (ACPI_OPERAND_OBJECT));
return (AE_OK);
}
@@ -414,22 +414,25 @@ AcpiExDumpOperand (
case ACPI_TYPE_INTEGER:
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Number %lX\n",
- EntryDesc->Integer.Value));
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Integer %8.8X%8.8X\n",
+ HIDWORD (EntryDesc->Integer.Value),
+ LODWORD (EntryDesc->Integer.Value)));
break;
case INTERNAL_TYPE_IF:
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "If [Number] %lX\n",
- EntryDesc->Integer.Value));
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "If [Integer] %8.8X%8.8X\n",
+ HIDWORD (EntryDesc->Integer.Value),
+ LODWORD (EntryDesc->Integer.Value)));
break;
case INTERNAL_TYPE_WHILE:
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "While [Number] %lX\n",
- EntryDesc->Integer.Value));
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "While [Integer] %8.8X%8.8X\n",
+ HIDWORD (EntryDesc->Integer.Value),
+ LODWORD (EntryDesc->Integer.Value)));
break;
@@ -438,14 +441,13 @@ AcpiExDumpOperand (
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "Package count %X @ %p\n",
EntryDesc->Package.Count, EntryDesc->Package.Elements));
-
/*
* If elements exist, package vector pointer is valid,
* and debug_level exceeds 1, dump package's elements.
*/
if (EntryDesc->Package.Count &&
EntryDesc->Package.Elements &&
- GetDebugLevel () > 1)
+ AcpiDbgLevel > 1)
{
ACPI_OPERAND_OBJECT**Element;
UINT16 ElementIndex;
@@ -487,16 +489,16 @@ AcpiExDumpOperand (
case ACPI_TYPE_STRING:
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "String length %X @ %p\n\n",
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "String length %X @ %p \"",
EntryDesc->String.Length, EntryDesc->String.Pointer));
- for (i=0; i < EntryDesc->String.Length; i++)
+ for (i = 0; i < EntryDesc->String.Length; i++)
{
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "%c",
EntryDesc->String.Pointer[i]));
}
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "\n\n"));
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "\"\n"));
break;
@@ -646,7 +648,8 @@ AcpiExDumpOperands (
ACPI_OPERAND_OBJECT **EntryDesc;
- PROC_NAME ("AcpiExDumpOperands");
+ PROC_NAME ("ExDumpOperands");
+
if (!Ident)
{
@@ -660,10 +663,8 @@ AcpiExDumpOperands (
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "************* AcpiExDumpOperands Mode=%X ******************\n",
- InterpreterMode));
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "From %12s(%d) %s: %s\n", ModuleName, LineNumber, Ident, Note));
+ "************* Operand Stack Contents (Opcode [%s], %d Operands)\n",
+ Ident, NumLevels));
if (NumLevels == 0)
{
@@ -682,6 +683,9 @@ AcpiExDumpOperands (
}
}
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+ "************* Stack dump from %s(%d), %s\n",
+ ModuleName, LineNumber, Note));
return;
}
@@ -703,6 +707,9 @@ AcpiExDumpNode (
UINT32 Flags)
{
+ FUNCTION_ENTRY ();
+
+
if (!Flags)
{
if (!((ACPI_LV_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
@@ -740,7 +747,7 @@ AcpiExDumpObjectDescriptor (
ACPI_OPERAND_OBJECT *ObjDesc,
UINT32 Flags)
{
- ACPI_OPCODE_INFO *OpInfo;
+ const ACPI_OPCODE_INFO *OpInfo;
FUNCTION_TRACE ("ExDumpObjectDescriptor");
@@ -748,7 +755,7 @@ AcpiExDumpObjectDescriptor (
if (!Flags)
{
- if (!((ACPI_DB_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
+ if (!((ACPI_LV_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
{
return;
}
diff --git a/sys/contrib/dev/acpica/exdyadic.c b/sys/contrib/dev/acpica/exdyadic.c
index e542f64edad4..546438328c8e 100644
--- a/sys/contrib/dev/acpica/exdyadic.c
+++ b/sys/contrib/dev/acpica/exdyadic.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exdyadic - ACPI AML execution for dyadic (2-operand) operators
- * $Revision: 85 $
+ * $Revision: 88 $
*
*****************************************************************************/
@@ -159,6 +159,9 @@ AcpiExDoConcatenate (
UINT32 IntegerSize = sizeof (ACPI_INTEGER);
+ FUNCTION_ENTRY ();
+
+
/*
* There are three cases to handle:
* 1) Two Integers concatenated to produce a buffer
@@ -328,8 +331,7 @@ AcpiExDyadic1 (
UINT16 Opcode,
ACPI_WALK_STATE *WalkState)
{
- ACPI_OPERAND_OBJECT *ObjDesc = NULL;
- ACPI_OPERAND_OBJECT *ValDesc = NULL;
+ ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
ACPI_NAMESPACE_NODE *Node;
ACPI_STATUS Status = AE_OK;
@@ -337,44 +339,24 @@ AcpiExDyadic1 (
FUNCTION_TRACE_PTR ("ExDyadic1", WALK_OPERANDS);
- /* Resolve all operands */
-
- Status = AcpiExResolveOperands (Opcode, WALK_OPERANDS, WalkState);
- DUMP_OPERANDS (WALK_OPERANDS, IMODE_EXECUTE, AcpiPsGetOpcodeName (Opcode),
- 2, "after AcpiExResolveOperands");
-
- /* Get the operands */
-
- Status |= AcpiDsObjStackPopObject (&ValDesc, WalkState);
- Status |= AcpiDsObjStackPopObject (&ObjDesc, WalkState);
- if (ACPI_FAILURE (Status))
- {
- /* Invalid parameters on object stack */
-
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "(%s) bad operand(s) %s\n",
- AcpiPsGetOpcodeName (Opcode), AcpiFormatException (Status)));
-
- goto Cleanup;
- }
-
/* Examine the opcode */
switch (Opcode)
{
- /* DefNotify := NotifyOp NotifyObject NotifyValue */
+ /* DefNotify := NotifyOp (0)NotifyObject (1)NotifyValue */
case AML_NOTIFY_OP:
/* The ObjDesc is actually an Node */
- Node = (ACPI_NAMESPACE_NODE *) ObjDesc;
- ObjDesc = NULL;
+ Node = (ACPI_NAMESPACE_NODE *) Operand[0];
+ Operand[0] = NULL;
/* Object must be a device or thermal zone */
- if (Node && ValDesc)
+ if (Node && Operand[1])
{
switch (Node->Type)
{
@@ -388,14 +370,13 @@ AcpiExDyadic1 (
* from this thread -- because handlers may in turn run other
* control methods.
*/
-
Status = AcpiEvQueueNotifyRequest (Node,
- (UINT32) ValDesc->Integer.Value);
+ (UINT32) Operand[1]->Integer.Value);
break;
default:
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unexpected notify object type %X\n",
- ObjDesc->Common.Type));
+ Operand[0]->Common.Type));
Status = AE_AML_OPERAND_TYPE;
break;
@@ -410,12 +391,11 @@ AcpiExDyadic1 (
}
-Cleanup:
/* Always delete both operands */
- AcpiUtRemoveReference (ValDesc);
- AcpiUtRemoveReference (ObjDesc);
+ AcpiUtRemoveReference (Operand[1]);
+ AcpiUtRemoveReference (Operand[0]);
return_ACPI_STATUS (Status);
@@ -445,53 +425,15 @@ AcpiExDyadic2R (
ACPI_WALK_STATE *WalkState,
ACPI_OPERAND_OBJECT **ReturnDesc)
{
- ACPI_OPERAND_OBJECT *ObjDesc = NULL;
- ACPI_OPERAND_OBJECT *ObjDesc2 = NULL;
- ACPI_OPERAND_OBJECT *ResDesc = NULL;
- ACPI_OPERAND_OBJECT *ResDesc2 = NULL;
+ ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
ACPI_OPERAND_OBJECT *RetDesc = NULL;
ACPI_OPERAND_OBJECT *RetDesc2 = NULL;
ACPI_STATUS Status = AE_OK;
- UINT32 NumOperands = 3;
FUNCTION_TRACE_U32 ("ExDyadic2R", Opcode);
- /* Resolve all operands */
-
- Status = AcpiExResolveOperands (Opcode, WALK_OPERANDS, WalkState);
- DUMP_OPERANDS (WALK_OPERANDS, IMODE_EXECUTE, AcpiPsGetOpcodeName (Opcode),
- NumOperands, "after AcpiExResolveOperands");
-
- if (ACPI_FAILURE (Status))
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "(%s) Could not resolve operand(s) (%s)\n",
- AcpiPsGetOpcodeName (Opcode), AcpiFormatException (Status)));
-
- goto Cleanup;
- }
-
- /* Get all operands */
-
- if (AML_DIVIDE_OP == Opcode)
- {
- NumOperands = 4;
- Status |= AcpiDsObjStackPopObject (&ResDesc2, WalkState);
- }
-
- Status |= AcpiDsObjStackPopObject (&ResDesc, WalkState);
- Status |= AcpiDsObjStackPopObject (&ObjDesc2, WalkState);
- Status |= AcpiDsObjStackPopObject (&ObjDesc, WalkState);
- if (ACPI_FAILURE (Status))
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "(%s) bad operand(s) (%s)\n",
- AcpiPsGetOpcodeName (Opcode), AcpiFormatException (Status)));
-
- goto Cleanup;
- }
-
-
/* Create an internal return object if necessary */
switch (Opcode)
@@ -523,7 +465,6 @@ AcpiExDyadic2R (
/*
* Execute the opcode
*/
-
switch (Opcode)
{
@@ -531,8 +472,8 @@ AcpiExDyadic2R (
case AML_ADD_OP:
- RetDesc->Integer.Value = ObjDesc->Integer.Value +
- ObjDesc2->Integer.Value;
+ RetDesc->Integer.Value = Operand[0]->Integer.Value +
+ Operand[1]->Integer.Value;
break;
@@ -540,8 +481,8 @@ AcpiExDyadic2R (
case AML_BIT_AND_OP:
- RetDesc->Integer.Value = ObjDesc->Integer.Value &
- ObjDesc2->Integer.Value;
+ RetDesc->Integer.Value = Operand[0]->Integer.Value &
+ Operand[1]->Integer.Value;
break;
@@ -549,8 +490,8 @@ AcpiExDyadic2R (
case AML_BIT_NAND_OP:
- RetDesc->Integer.Value = ~(ObjDesc->Integer.Value &
- ObjDesc2->Integer.Value);
+ RetDesc->Integer.Value = ~(Operand[0]->Integer.Value &
+ Operand[1]->Integer.Value);
break;
@@ -558,8 +499,8 @@ AcpiExDyadic2R (
case AML_BIT_OR_OP:
- RetDesc->Integer.Value = ObjDesc->Integer.Value |
- ObjDesc2->Integer.Value;
+ RetDesc->Integer.Value = Operand[0]->Integer.Value |
+ Operand[1]->Integer.Value;
break;
@@ -567,8 +508,8 @@ AcpiExDyadic2R (
case AML_BIT_NOR_OP:
- RetDesc->Integer.Value = ~(ObjDesc->Integer.Value |
- ObjDesc2->Integer.Value);
+ RetDesc->Integer.Value = ~(Operand[0]->Integer.Value |
+ Operand[1]->Integer.Value);
break;
@@ -576,8 +517,8 @@ AcpiExDyadic2R (
case AML_BIT_XOR_OP:
- RetDesc->Integer.Value = ObjDesc->Integer.Value ^
- ObjDesc2->Integer.Value;
+ RetDesc->Integer.Value = Operand[0]->Integer.Value ^
+ Operand[1]->Integer.Value;
break;
@@ -585,7 +526,7 @@ AcpiExDyadic2R (
case AML_DIVIDE_OP:
- if (!ObjDesc2->Integer.Value)
+ if (!Operand[1]->Integer.Value)
{
REPORT_ERROR
(("DivideOp: Divide by zero\n"));
@@ -603,13 +544,13 @@ AcpiExDyadic2R (
/* Remainder (modulo) */
- RetDesc->Integer.Value = ACPI_MODULO (ObjDesc->Integer.Value,
- ObjDesc2->Integer.Value);
+ RetDesc->Integer.Value = ACPI_MODULO (Operand[0]->Integer.Value,
+ Operand[1]->Integer.Value);
/* Result (what we used to call the quotient) */
- RetDesc2->Integer.Value = ACPI_DIVIDE (ObjDesc->Integer.Value,
- ObjDesc2->Integer.Value);
+ RetDesc2->Integer.Value = ACPI_DIVIDE (Operand[0]->Integer.Value,
+ Operand[1]->Integer.Value);
break;
@@ -617,7 +558,7 @@ AcpiExDyadic2R (
case AML_MOD_OP: /* ACPI 2.0 */
- if (!ObjDesc2->Integer.Value)
+ if (!Operand[1]->Integer.Value)
{
REPORT_ERROR
(("ModOp: Divide by zero\n"));
@@ -628,8 +569,8 @@ AcpiExDyadic2R (
/* Remainder (modulo) */
- RetDesc->Integer.Value = ACPI_MODULO (ObjDesc->Integer.Value,
- ObjDesc2->Integer.Value);
+ RetDesc->Integer.Value = ACPI_MODULO (Operand[0]->Integer.Value,
+ Operand[1]->Integer.Value);
break;
@@ -637,8 +578,8 @@ AcpiExDyadic2R (
case AML_MULTIPLY_OP:
- RetDesc->Integer.Value = ObjDesc->Integer.Value *
- ObjDesc2->Integer.Value;
+ RetDesc->Integer.Value = Operand[0]->Integer.Value *
+ Operand[1]->Integer.Value;
break;
@@ -646,8 +587,8 @@ AcpiExDyadic2R (
case AML_SHIFT_LEFT_OP:
- RetDesc->Integer.Value = ObjDesc->Integer.Value <<
- ObjDesc2->Integer.Value;
+ RetDesc->Integer.Value = Operand[0]->Integer.Value <<
+ Operand[1]->Integer.Value;
break;
@@ -655,8 +596,8 @@ AcpiExDyadic2R (
case AML_SHIFT_RIGHT_OP:
- RetDesc->Integer.Value = ObjDesc->Integer.Value >>
- ObjDesc2->Integer.Value;
+ RetDesc->Integer.Value = Operand[0]->Integer.Value >>
+ Operand[1]->Integer.Value;
break;
@@ -664,8 +605,8 @@ AcpiExDyadic2R (
case AML_SUBTRACT_OP:
- RetDesc->Integer.Value = ObjDesc->Integer.Value -
- ObjDesc2->Integer.Value;
+ RetDesc->Integer.Value = Operand[0]->Integer.Value -
+ Operand[1]->Integer.Value;
break;
@@ -680,18 +621,18 @@ AcpiExDyadic2R (
* guaranteed to be either Integer/String/Buffer by the operand
* resolution mechanism above.
*/
- switch (ObjDesc->Common.Type)
+ switch (Operand[0]->Common.Type)
{
case ACPI_TYPE_INTEGER:
- Status = AcpiExConvertToInteger (ObjDesc2, &ObjDesc2, WalkState);
+ Status = AcpiExConvertToInteger (Operand[1], &Operand[1], WalkState);
break;
case ACPI_TYPE_STRING:
- Status = AcpiExConvertToString (ObjDesc2, &ObjDesc2, 16, ACPI_UINT32_MAX, WalkState);
+ Status = AcpiExConvertToString (Operand[1], &Operand[1], 16, ACPI_UINT32_MAX, WalkState);
break;
case ACPI_TYPE_BUFFER:
- Status = AcpiExConvertToBuffer (ObjDesc2, &ObjDesc2, WalkState);
+ Status = AcpiExConvertToBuffer (Operand[1], &Operand[1], WalkState);
break;
default:
@@ -709,7 +650,7 @@ AcpiExDyadic2R (
* (Both are Integer, String, or Buffer), and we can now perform the
* concatenation.
*/
- Status = AcpiExDoConcatenate (ObjDesc, ObjDesc2, &RetDesc, WalkState);
+ Status = AcpiExDoConcatenate (Operand[0], Operand[1], &RetDesc, WalkState);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -721,8 +662,8 @@ AcpiExDyadic2R (
case AML_TO_STRING_OP: /* ACPI 2.0 */
- Status = AcpiExConvertToString (ObjDesc, &RetDesc, 16,
- (UINT32) ObjDesc2->Integer.Value, WalkState);
+ Status = AcpiExConvertToString (Operand[0], &RetDesc, 16,
+ (UINT32) Operand[1]->Integer.Value, WalkState);
break;
@@ -745,12 +686,11 @@ AcpiExDyadic2R (
/*
- * Store the result of the operation (which is now in ObjDesc) into
+ * Store the result of the operation (which is now in Operand[0]) into
* the result descriptor, or the location pointed to by the result
- * descriptor (ResDesc).
+ * descriptor (Operand[2]).
*/
-
- Status = AcpiExStore (RetDesc, ResDesc, WalkState);
+ Status = AcpiExStore (RetDesc, Operand[2], WalkState);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -758,14 +698,19 @@ AcpiExDyadic2R (
if (AML_DIVIDE_OP == Opcode)
{
- Status = AcpiExStore (RetDesc2, ResDesc2, WalkState);
+ Status = AcpiExStore (RetDesc2, Operand[3], WalkState);
/*
* Since the remainder is not returned, remove a reference to
* the object we created earlier
*/
+ AcpiUtRemoveReference (RetDesc);
+ *ReturnDesc = RetDesc2;
+ }
- AcpiUtRemoveReference (RetDesc2);
+ else
+ {
+ *ReturnDesc = RetDesc;
}
@@ -773,8 +718,8 @@ Cleanup:
/* Always delete the operands */
- AcpiUtRemoveReference (ObjDesc);
- AcpiUtRemoveReference (ObjDesc2);
+ AcpiUtRemoveReference (Operand[0]);
+ AcpiUtRemoveReference (Operand[1]);
/* Delete return object on error */
@@ -783,8 +728,8 @@ Cleanup:
{
/* On failure, delete the result ops */
- AcpiUtRemoveReference (ResDesc);
- AcpiUtRemoveReference (ResDesc2);
+ AcpiUtRemoveReference (Operand[2]);
+ AcpiUtRemoveReference (Operand[3]);
if (RetDesc)
{
@@ -797,7 +742,6 @@ Cleanup:
/* Set the return object and exit */
- *ReturnDesc = RetDesc;
return_ACPI_STATUS (Status);
}
@@ -824,8 +768,7 @@ AcpiExDyadic2S (
ACPI_WALK_STATE *WalkState,
ACPI_OPERAND_OBJECT **ReturnDesc)
{
- ACPI_OPERAND_OBJECT *ObjDesc;
- ACPI_OPERAND_OBJECT *TimeDesc;
+ ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
ACPI_OPERAND_OBJECT *RetDesc = NULL;
ACPI_STATUS Status;
@@ -833,26 +776,6 @@ AcpiExDyadic2S (
FUNCTION_TRACE_PTR ("ExDyadic2S", WALK_OPERANDS);
- /* Resolve all operands */
-
- Status = AcpiExResolveOperands (Opcode, WALK_OPERANDS, WalkState);
- DUMP_OPERANDS (WALK_OPERANDS, IMODE_EXECUTE, AcpiPsGetOpcodeName (Opcode),
- 2, "after AcpiExResolveOperands");
-
- /* Get all operands */
-
- Status |= AcpiDsObjStackPopObject (&TimeDesc, WalkState);
- Status |= AcpiDsObjStackPopObject (&ObjDesc, WalkState);
- if (ACPI_FAILURE (Status))
- {
- /* Invalid parameters on object stack */
-
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "(%s) bad operand(s) %s\n",
- AcpiPsGetOpcodeName (Opcode), AcpiFormatException (Status)));
-
- goto Cleanup;
- }
-
/* Create the internal return object */
@@ -877,7 +800,7 @@ AcpiExDyadic2S (
case AML_ACQUIRE_OP:
- Status = AcpiExAcquireMutex (TimeDesc, ObjDesc, WalkState);
+ Status = AcpiExAcquireMutex (Operand[1], Operand[0], WalkState);
break;
@@ -885,7 +808,7 @@ AcpiExDyadic2S (
case AML_WAIT_OP:
- Status = AcpiExSystemWaitEvent (TimeDesc, ObjDesc);
+ Status = AcpiExSystemWaitEvent (Operand[1], Operand[0]);
break;
@@ -901,7 +824,6 @@ AcpiExDyadic2S (
* Return a boolean indicating if operation timed out
* (TRUE) or not (FALSE)
*/
-
if (Status == AE_TIME)
{
RetDesc->Integer.Value = ACPI_INTEGER_MAX; /* TRUE, op timed out */
@@ -913,8 +835,8 @@ Cleanup:
/* Delete params */
- AcpiUtRemoveReference (TimeDesc);
- AcpiUtRemoveReference (ObjDesc);
+ AcpiUtRemoveReference (Operand[1]);
+ AcpiUtRemoveReference (Operand[0]);
/* Delete return object on error */
@@ -957,37 +879,15 @@ AcpiExDyadic2 (
ACPI_WALK_STATE *WalkState,
ACPI_OPERAND_OBJECT **ReturnDesc)
{
- ACPI_OPERAND_OBJECT *ObjDesc;
- ACPI_OPERAND_OBJECT *ObjDesc2;
+ ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
ACPI_OPERAND_OBJECT *RetDesc = NULL;
- ACPI_STATUS Status;
+ ACPI_STATUS Status = AE_OK;
BOOLEAN Lboolean;
FUNCTION_TRACE_PTR ("ExDyadic2", WALK_OPERANDS);
- /* Resolve all operands */
-
- Status = AcpiExResolveOperands (Opcode, WALK_OPERANDS, WalkState);
- DUMP_OPERANDS (WALK_OPERANDS, IMODE_EXECUTE, AcpiPsGetOpcodeName (Opcode),
- 2, "after AcpiExResolveOperands");
-
- /* Get all operands */
-
- Status |= AcpiDsObjStackPopObject (&ObjDesc2, WalkState);
- Status |= AcpiDsObjStackPopObject (&ObjDesc, WalkState);
- if (ACPI_FAILURE (Status))
- {
- /* Invalid parameters on object stack */
-
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "(%s) bad operand(s) %s\n",
- AcpiPsGetOpcodeName (Opcode), AcpiFormatException (Status)));
-
- goto Cleanup;
- }
-
-
/* Create the internal return object */
RetDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
@@ -1000,7 +900,6 @@ AcpiExDyadic2 (
/*
* Execute the Opcode
*/
-
Lboolean = FALSE;
switch (Opcode)
{
@@ -1009,8 +908,8 @@ AcpiExDyadic2 (
case AML_LAND_OP:
- Lboolean = (BOOLEAN) (ObjDesc->Integer.Value &&
- ObjDesc2->Integer.Value);
+ Lboolean = (BOOLEAN) (Operand[0]->Integer.Value &&
+ Operand[1]->Integer.Value);
break;
@@ -1018,8 +917,8 @@ AcpiExDyadic2 (
case AML_LEQUAL_OP:
- Lboolean = (BOOLEAN) (ObjDesc->Integer.Value ==
- ObjDesc2->Integer.Value);
+ Lboolean = (BOOLEAN) (Operand[0]->Integer.Value ==
+ Operand[1]->Integer.Value);
break;
@@ -1027,8 +926,8 @@ AcpiExDyadic2 (
case AML_LGREATER_OP:
- Lboolean = (BOOLEAN) (ObjDesc->Integer.Value >
- ObjDesc2->Integer.Value);
+ Lboolean = (BOOLEAN) (Operand[0]->Integer.Value >
+ Operand[1]->Integer.Value);
break;
@@ -1036,8 +935,8 @@ AcpiExDyadic2 (
case AML_LLESS_OP:
- Lboolean = (BOOLEAN) (ObjDesc->Integer.Value <
- ObjDesc2->Integer.Value);
+ Lboolean = (BOOLEAN) (Operand[0]->Integer.Value <
+ Operand[1]->Integer.Value);
break;
@@ -1045,8 +944,8 @@ AcpiExDyadic2 (
case AML_LOR_OP:
- Lboolean = (BOOLEAN) (ObjDesc->Integer.Value ||
- ObjDesc2->Integer.Value);
+ Lboolean = (BOOLEAN) (Operand[0]->Integer.Value ||
+ Operand[1]->Integer.Value);
break;
@@ -1084,8 +983,8 @@ Cleanup:
/* Always delete operands */
- AcpiUtRemoveReference (ObjDesc);
- AcpiUtRemoveReference (ObjDesc2);
+ AcpiUtRemoveReference (Operand[0]);
+ AcpiUtRemoveReference (Operand[1]);
/* Delete return object on error */
diff --git a/sys/contrib/dev/acpica/exfield.c b/sys/contrib/dev/acpica/exfield.c
index 9c9e9e7a006e..49f30620e854 100644
--- a/sys/contrib/dev/acpica/exfield.c
+++ b/sys/contrib/dev/acpica/exfield.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exfield - ACPI AML (p-code) execution - field manipulation
- * $Revision: 92 $
+ * $Revision: 95 $
*
*****************************************************************************/
@@ -176,7 +176,6 @@ AcpiExReadDataFromField (
*
* Note: Field.length is in bits.
*/
-
Length = ROUND_BITS_UP_TO_BYTES (ObjDesc->Field.BitLength);
if (Length > sizeof (ACPI_INTEGER))
@@ -373,7 +372,7 @@ AcpiExAccessBufferField (
ACPI_STATUS Status;
- FUNCTION_TRACE_PTR ("AcpiExAccessBufferField", ObjDesc);
+ FUNCTION_TRACE_PTR ("ExAccessBufferField", ObjDesc);
/*
@@ -483,7 +482,6 @@ AcpiExAccessBankField (
* BankField ASL declaration. The BankRegister is always a Field in
* an operation region.
*/
-
Status = AcpiExCommonAccessField (ACPI_WRITE,
ObjDesc->BankField.BankRegisterObj,
&ObjDesc->BankField.Value,
@@ -604,12 +602,11 @@ AcpiExCommonAccessField (
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Obj=%p Type=%X Buf=%p Len=%X\n",
ObjDesc, ObjDesc->Common.Type, Buffer, BufferLength));
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Mode=%d BitLen=%X BitOff=%X ByteOff=%X\n",
- Mode, ObjDesc->CommonField.BitLength,
+ Mode, ObjDesc->CommonField.BitLength,
ObjDesc->CommonField.StartFieldBitOffset,
ObjDesc->CommonField.BaseByteOffset));
-
/* Perform the actual read or write of the field */
switch (Mode)
diff --git a/sys/contrib/dev/acpica/exfldio.c b/sys/contrib/dev/acpica/exfldio.c
index 5e21ea1194c9..feca92c00545 100644
--- a/sys/contrib/dev/acpica/exfldio.c
+++ b/sys/contrib/dev/acpica/exfldio.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exfldio - Aml Field I/O
- * $Revision: 62 $
+ * $Revision: 64 $
*
*****************************************************************************/
@@ -155,6 +155,7 @@ AcpiExSetupField (
FUNCTION_TRACE_U32 ("ExSetupField", FieldDatumByteOffset);
+
RgnDesc = ObjDesc->CommonField.RegionObj;
if (ACPI_TYPE_REGION != RgnDesc->Common.Type)
@@ -191,7 +192,7 @@ AcpiExSetupField (
{
if (RgnDesc->Region.Length < ObjDesc->CommonField.AccessByteWidth)
{
- /*
+ /*
* This is the case where the AccessType (AccWord, etc.) is wider
* than the region itself. For example, a region of length one
* byte, and a field with Dword access specified.
@@ -207,7 +208,7 @@ AcpiExSetupField (
*/
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Field base+offset+width %X+%X+%X exceeds region size (%X bytes) field=%p region=%p\n",
- ObjDesc->CommonField.BaseByteOffset, FieldDatumByteOffset,
+ ObjDesc->CommonField.BaseByteOffset, FieldDatumByteOffset,
ObjDesc->CommonField.AccessByteWidth,
RgnDesc->Region.Length, ObjDesc, RgnDesc));
@@ -349,10 +350,10 @@ AcpiExReadFieldDatum (
*
* PARAMETERS: MergedDatum - Value to store
* Buffer - Receiving buffer
- * ByteGranularity - 1/2/4 Granularity of the field
+ * ByteGranularity - 1/2/4 Granularity of the field
* (aka Datum Size)
* Offset - Datum offset into the buffer
- *
+ *
* RETURN: none
*
* DESCRIPTION: Store the merged datum to the buffer according to the
@@ -368,6 +369,9 @@ AcpiExGetBufferDatum(
UINT32 Offset)
{
+ FUNCTION_ENTRY ();
+
+
switch (ByteGranularity)
{
case ACPI_FIELD_BYTE_GRANULARITY:
@@ -387,14 +391,14 @@ AcpiExGetBufferDatum(
/*******************************************************************************
*
- * FUNCTION: AcpiExSetBufferDatum
+ * FUNCTION: AcpiExSetBufferDatum
*
* PARAMETERS: MergedDatum - Value to store
* Buffer - Receiving buffer
- * ByteGranularity - 1/2/4 Granularity of the field
+ * ByteGranularity - 1/2/4 Granularity of the field
* (aka Datum Size)
* Offset - Datum offset into the buffer
- *
+ *
* RETURN: none
*
* DESCRIPTION: Store the merged datum to the buffer according to the
@@ -410,6 +414,9 @@ AcpiExSetBufferDatum (
UINT32 Offset)
{
+ FUNCTION_ENTRY ();
+
+
switch (ByteGranularity)
{
case ACPI_FIELD_BYTE_GRANULARITY:
@@ -477,7 +484,7 @@ AcpiExExtractFromField (
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"ByteLen=%x, DatumLen=%x, BitGran=%x, ByteGran=%x\n",
- ByteFieldLength, DatumCount, ObjDesc->CommonField.AccessBitWidth,
+ ByteFieldLength, DatumCount, ObjDesc->CommonField.AccessBitWidth,
ObjDesc->CommonField.AccessByteWidth));
@@ -518,7 +525,7 @@ AcpiExExtractFromField (
/* Store the datum to the caller buffer */
- AcpiExSetBufferDatum (MergedDatum, Buffer, ObjDesc->CommonField.AccessByteWidth,
+ AcpiExSetBufferDatum (MergedDatum, Buffer, ObjDesc->CommonField.AccessByteWidth,
DatumOffset);
return_ACPI_STATUS (AE_OK);
@@ -567,28 +574,28 @@ AcpiExExtractFromField (
else
{
/*
- * Put together the appropriate bits of the two raw data to make a
+ * Put together the appropriate bits of the two raw data to make a
* single complete field datum
*
- * 1) Normalize the first datum down to bit 0
+ * 1) Normalize the first datum down to bit 0
*/
MergedDatum = (PreviousRawDatum >> ObjDesc->CommonField.StartFieldBitOffset);
/* 2) Insert the second datum "above" the first datum */
MergedDatum |= (ThisRawDatum << ObjDesc->CommonField.DatumValidBits);
-
+
if ((DatumOffset >= (DatumCount -1)))
{
/*
* This is the last iteration of the loop. We need to clear
- * any unused bits (bits that are not part of this field) that
- * came from the last raw datum before we store the final
+ * any unused bits (bits that are not part of this field) that
+ * came from the last raw datum before we store the final
* merged datum into the caller buffer.
*/
if (ObjDesc->CommonField.EndBufferValidBits)
{
- MergedDatum &=
+ MergedDatum &=
MASK_BITS_ABOVE (ObjDesc->CommonField.EndBufferValidBits);
}
}
@@ -599,11 +606,11 @@ AcpiExExtractFromField (
* Store the merged field datum in the caller's buffer, according to
* the granularity of the field (size of each datum).
*/
- AcpiExSetBufferDatum (MergedDatum, Buffer, ObjDesc->CommonField.AccessByteWidth,
+ AcpiExSetBufferDatum (MergedDatum, Buffer, ObjDesc->CommonField.AccessByteWidth,
DatumOffset);
/*
- * Save the raw datum that was just acquired since it may contain bits
+ * Save the raw datum that was just acquired since it may contain bits
* of the *next* field datum. Update offsets
*/
PreviousRawDatum = ThisRawDatum;
@@ -642,7 +649,6 @@ AcpiExWriteFieldDatum (
FUNCTION_TRACE_U32 ("ExWriteFieldDatum", FieldDatumByteOffset);
-
/*
* BufferFields - Read from a Buffer
* Other Fields - Read from a Operation Region.
@@ -683,11 +689,11 @@ AcpiExWriteFieldDatum (
* 3) The current offset into the field
*/
RgnDesc = ObjDesc->CommonField.RegionObj;
- Address = RgnDesc->Region.Address +
+ Address = RgnDesc->Region.Address +
ObjDesc->CommonField.BaseByteOffset +
FieldDatumByteOffset;
- ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
+ ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
"Store %X in Region %s(%X) at %8.8lX%8.8lX width %X\n",
Value, AcpiUtGetRegionName (RgnDesc->Region.SpaceId),
RgnDesc->Region.SpaceId, HIDWORD(Address), LODWORD(Address),
@@ -700,7 +706,7 @@ AcpiExWriteFieldDatum (
if (Status == AE_NOT_IMPLEMENTED)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"**** Region type %s(%X) not implemented\n",
AcpiUtGetRegionName (RgnDesc->Region.SpaceId),
RgnDesc->Region.SpaceId));
@@ -708,7 +714,7 @@ AcpiExWriteFieldDatum (
else if (Status == AE_NOT_EXIST)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"**** Region type %s(%X) does not have a handler\n",
AcpiUtGetRegionName (RgnDesc->Region.SpaceId),
RgnDesc->Region.SpaceId));
@@ -775,18 +781,18 @@ AcpiExWriteFieldDatumWithUpdateRule (
case UPDATE_PRESERVE:
- /*
- * Check if update rule needs to be applied (not if mask is all
- * ones) The left shift drops the bits we want to ignore.
+ /*
+ * Check if update rule needs to be applied (not if mask is all
+ * ones) The left shift drops the bits we want to ignore.
*/
- if ((~Mask << (sizeof (Mask) * 8 -
+ if ((~Mask << (sizeof (Mask) * 8 -
ObjDesc->CommonField.AccessBitWidth)) != 0)
{
/*
* Read the current contents of the byte/word/dword containing
* the field, and merge with the new field value.
*/
- Status = AcpiExReadFieldDatum (ObjDesc, FieldDatumByteOffset,
+ Status = AcpiExReadFieldDatum (ObjDesc, FieldDatumByteOffset,
&CurrentValue);
MergedValue |= (CurrentValue & ~Mask);
}
@@ -821,7 +827,7 @@ AcpiExWriteFieldDatumWithUpdateRule (
/* Write the merged value */
- Status = AcpiExWriteFieldDatum (ObjDesc, FieldDatumByteOffset,
+ Status = AcpiExWriteFieldDatum (ObjDesc, FieldDatumByteOffset,
MergedValue);
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Mask %X DatumOffset %X Value %X, MergedValue %X\n",
@@ -865,7 +871,7 @@ AcpiExInsertIntoField (
/*
- * Incoming buffer must be at least as long as the field, we do not
+ * Incoming buffer must be at least as long as the field, we do not
* allow "partial" field writes. We do not care if the buffer is
* larger than the field, this typically happens when an integer is
* written to a field that is actually smaller than an integer.
@@ -887,7 +893,7 @@ AcpiExInsertIntoField (
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"ByteLen=%x, DatumLen=%x, BitGran=%x, ByteGran=%x\n",
- ByteFieldLength, DatumCount, ObjDesc->CommonField.AccessBitWidth,
+ ByteFieldLength, DatumCount, ObjDesc->CommonField.AccessBitWidth,
ObjDesc->CommonField.AccessByteWidth));
@@ -902,7 +908,7 @@ AcpiExInsertIntoField (
/* Get a single datum from the caller's buffer */
- AcpiExGetBufferDatum (&PreviousRawDatum, Buffer,
+ AcpiExGetBufferDatum (&PreviousRawDatum, Buffer,
ObjDesc->CommonField.AccessByteWidth, DatumOffset);
/*
@@ -956,8 +962,8 @@ AcpiExInsertIntoField (
* We don't need to worry about the update rule for these data, because
* all of the bits in each datum are part of the field.
*
- * The last datum must be special cased because it might contain bits
- * that are not part of the field -- therefore the "update rule" must be
+ * The last datum must be special cased because it might contain bits
+ * that are not part of the field -- therefore the "update rule" must be
* applied in Part3 below.
*/
while (DatumOffset < DatumCount)
@@ -965,11 +971,11 @@ AcpiExInsertIntoField (
DatumOffset++;
FieldDatumByteOffset += ObjDesc->CommonField.AccessByteWidth;
- /*
- * Get the next raw buffer datum. It may contain bits of the previous
+ /*
+ * Get the next raw buffer datum. It may contain bits of the previous
* field datum
*/
- AcpiExGetBufferDatum (&ThisRawDatum, Buffer,
+ AcpiExGetBufferDatum (&ThisRawDatum, Buffer,
ObjDesc->CommonField.AccessByteWidth, DatumOffset);
/* Create the field datum based on the field alignment */
@@ -977,10 +983,10 @@ AcpiExInsertIntoField (
if (ObjDesc->CommonField.StartFieldBitOffset != 0)
{
/*
- * Put together appropriate bits of the two raw buffer data to make
+ * Put together appropriate bits of the two raw buffer data to make
* a single complete field datum
*/
- MergedDatum =
+ MergedDatum =
(PreviousRawDatum >> ObjDesc->CommonField.DatumValidBits) |
(ThisRawDatum << ObjDesc->CommonField.StartFieldBitOffset);
}
@@ -1001,8 +1007,8 @@ AcpiExInsertIntoField (
if ((DatumOffset == DatumCount) &&
ObjDesc->CommonField.EndFieldValidBits)
{
- /*
- * Part3:
+ /*
+ * Part3:
* This is the last datum and the field does not end on a datum boundary.
* Build the partial datum and write with the update rule.
*/
@@ -1014,7 +1020,7 @@ AcpiExInsertIntoField (
/* Write the last datum with the update rule */
- Status = AcpiExWriteFieldDatumWithUpdateRule (ObjDesc, Mask,
+ Status = AcpiExWriteFieldDatumWithUpdateRule (ObjDesc, Mask,
MergedDatum, FieldDatumByteOffset);
if (ACPI_FAILURE (Status))
{
@@ -1026,7 +1032,7 @@ AcpiExInsertIntoField (
{
/* Normal case -- write the completed datum */
- Status = AcpiExWriteFieldDatum (ObjDesc,
+ Status = AcpiExWriteFieldDatum (ObjDesc,
FieldDatumByteOffset, MergedDatum);
if (ACPI_FAILURE (Status))
{
@@ -1035,7 +1041,7 @@ AcpiExInsertIntoField (
}
/*
- * Save the most recent datum since it may contain bits of the *next*
+ * Save the most recent datum since it may contain bits of the *next*
* field datum. Update current byte offset.
*/
PreviousRawDatum = ThisRawDatum;
diff --git a/sys/contrib/dev/acpica/exmisc.c b/sys/contrib/dev/acpica/exmisc.c
index ea9f8887e213..173a0bcc09a9 100644
--- a/sys/contrib/dev/acpica/exmisc.c
+++ b/sys/contrib/dev/acpica/exmisc.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exmisc - ACPI AML (p-code) execution - specific opcodes
- * $Revision: 80 $
+ * $Revision: 83 $
*
*****************************************************************************/
@@ -129,88 +129,6 @@
MODULE_NAME ("exmisc")
-/*******************************************************************************
- *
- * FUNCTION: AcpiExFatal
- *
- * PARAMETERS: none
- *
- * RETURN: Status. If the OS returns from the OSD call, we just keep
- * on going.
- *
- * DESCRIPTION: Execute Fatal operator
- *
- * ACPI SPECIFICATION REFERENCES:
- * DefFatal := FatalOp FatalType FatalCode FatalArg
- * FatalType := ByteData
- * FatalCode := DWordData
- * FatalArg := TermArg=>Integer
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiExFatal (
- ACPI_WALK_STATE *WalkState)
-{
- ACPI_OPERAND_OBJECT *TypeDesc;
- ACPI_OPERAND_OBJECT *CodeDesc;
- ACPI_OPERAND_OBJECT *ArgDesc;
- ACPI_STATUS Status;
-
-
- FUNCTION_TRACE ("ExFatal");
-
-
- /* Resolve operands */
-
- Status = AcpiExResolveOperands (AML_FATAL_OP, WALK_OPERANDS, WalkState);
- DUMP_OPERANDS (WALK_OPERANDS, IMODE_EXECUTE,
- AcpiPsGetOpcodeName (AML_FATAL_OP),
- 3, "after AcpiExResolveOperands");
-
- /* Get operands */
-
- Status |= AcpiDsObjStackPopObject (&ArgDesc, WalkState);
- Status |= AcpiDsObjStackPopObject (&CodeDesc, WalkState);
- Status |= AcpiDsObjStackPopObject (&TypeDesc, WalkState);
- if (ACPI_FAILURE (Status))
- {
- /* Invalid parameters on object stack */
-
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "bad operand(s) (Status=%X)\n",
- Status));
- goto Cleanup;
- }
-
-
- /* DefFatal := FatalOp FatalType FatalCode FatalArg */
-
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "Type %x Code %x Arg %x <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n",
- TypeDesc->Integer.Value, CodeDesc->Integer.Value, ArgDesc->Integer.Value));
-
-
- /*
- * TBD: [Unhandled] call OSD interface to notify OS of fatal error
- * requiring shutdown!
- */
-
-
-Cleanup:
-
- /* Free the operands */
-
- AcpiUtRemoveReference (ArgDesc);
- AcpiUtRemoveReference (CodeDesc);
- AcpiUtRemoveReference (TypeDesc);
-
-
- /* If we get back from the OS call, we might as well keep going. */
-
- REPORT_WARNING (("An AML \"Fatal\" Opcode (FatalOp) was executed\n"));
- return_ACPI_STATUS (AE_OK);
-}
-
/*******************************************************************************
*
@@ -234,41 +152,19 @@ AcpiExTriadic (
ACPI_WALK_STATE *WalkState,
ACPI_OPERAND_OBJECT **ReturnDesc)
{
- ACPI_OPERAND_OBJECT *ObjDesc1;
- ACPI_OPERAND_OBJECT *ObjDesc2;
- ACPI_OPERAND_OBJECT *ResDesc;
+ ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
ACPI_OPERAND_OBJECT *RetDesc = NULL;
ACPI_OPERAND_OBJECT *TmpDesc;
ACPI_SIGNAL_FATAL_INFO *Fatal;
- ACPI_STATUS Status;
-
+ ACPI_STATUS Status = AE_OK;
FUNCTION_TRACE ("ExTriadic");
- /* Resolve operands */
- /* First operand can be either a package or a buffer */
-
- Status = AcpiExResolveOperands (AML_INDEX_OP, WALK_OPERANDS, WalkState);
- DUMP_OPERANDS (WALK_OPERANDS, IMODE_EXECUTE,
- AcpiPsGetOpcodeName (AML_INDEX_OP),
- 3, "after AcpiExResolveOperands");
-
- /* Get all operands */
-
- Status |= AcpiDsObjStackPopObject (&ResDesc, WalkState);
- Status |= AcpiDsObjStackPopObject (&ObjDesc2, WalkState);
- Status |= AcpiDsObjStackPopObject (&ObjDesc1, WalkState);
- if (ACPI_FAILURE (Status))
- {
- /* Invalid parameters on object stack */
-
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "bad operand(s) (Status=%X)\n",
- Status));
- goto Cleanup;
- }
-
+#define ObjDesc1 Operand[0]
+#define ObjDesc2 Operand[1]
+#define ResDesc Operand[2]
switch (Opcode)
@@ -280,7 +176,7 @@ AcpiExTriadic (
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"FatalOp: Type %x Code %x Arg %x <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n",
- (UINT32) ObjDesc1->Integer.Value, (UINT32) ObjDesc2->Integer.Value,
+ (UINT32) ObjDesc1->Integer.Value, (UINT32) ObjDesc2->Integer.Value,
(UINT32) ResDesc->Integer.Value));
@@ -303,7 +199,6 @@ AcpiExTriadic (
break;
-
case AML_MID_OP:
/* DefMid := MidOp Source Index Length Result */
@@ -325,6 +220,7 @@ AcpiExTriadic (
Status = AE_NO_MEMORY;
goto Cleanup;
}
+
/*
* At this point, the ObjDesc1 operand is either a Package or a Buffer
*/
@@ -396,7 +292,6 @@ AcpiExTriadic (
}
-
Cleanup:
/* Always delete operands */
@@ -444,45 +339,22 @@ AcpiExHexadic (
ACPI_WALK_STATE *WalkState,
ACPI_OPERAND_OBJECT **ReturnDesc)
{
- ACPI_OPERAND_OBJECT *PkgDesc;
- ACPI_OPERAND_OBJECT *Op1Desc;
- ACPI_OPERAND_OBJECT *V1Desc;
- ACPI_OPERAND_OBJECT *Op2Desc;
- ACPI_OPERAND_OBJECT *V2Desc;
- ACPI_OPERAND_OBJECT *StartDesc;
+ ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
ACPI_OPERAND_OBJECT *RetDesc = NULL;
- ACPI_STATUS Status;
+ ACPI_STATUS Status = AE_OK;
UINT32 Index;
UINT32 MatchValue = (UINT32) -1;
FUNCTION_TRACE ("ExHexadic");
+#define PkgDesc Operand[0]
+#define Op1Desc Operand[1]
+#define V1Desc Operand[2]
+#define Op2Desc Operand[3]
+#define V2Desc Operand[4]
+#define StartDesc Operand[5]
- /* Resolve all operands */
-
- Status = AcpiExResolveOperands (AML_MATCH_OP, WALK_OPERANDS, WalkState);
- DUMP_OPERANDS (WALK_OPERANDS, IMODE_EXECUTE,
- AcpiPsGetOpcodeName (AML_MATCH_OP),
- 6, "after AcpiExResolveOperands");
-
- /* Get all operands */
-
- Status |= AcpiDsObjStackPopObject (&StartDesc, WalkState);
- Status |= AcpiDsObjStackPopObject (&V2Desc, WalkState);
- Status |= AcpiDsObjStackPopObject (&Op2Desc, WalkState);
- Status |= AcpiDsObjStackPopObject (&V1Desc, WalkState);
- Status |= AcpiDsObjStackPopObject (&Op1Desc, WalkState);
- Status |= AcpiDsObjStackPopObject (&PkgDesc, WalkState);
-
- if (ACPI_FAILURE (Status))
- {
- /* Invalid parameters on object stack */
-
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "bad operand(s) (Status=%X)\n",
- Status));
- goto Cleanup;
- }
switch (Opcode)
@@ -525,7 +397,6 @@ AcpiExHexadic (
* (its initial value) indicating that no match was found. When
* returned as a Number, this will produce the Ones value as specified.
*/
-
for ( ; Index < PkgDesc->Package.Count; ++Index)
{
/*
@@ -686,7 +557,6 @@ AcpiExHexadic (
}
-
Cleanup:
/* Free the operands */
diff --git a/sys/contrib/dev/acpica/exmonad.c b/sys/contrib/dev/acpica/exmonad.c
index 9a4ea4ce18b5..07ad15d5fb5f 100644
--- a/sys/contrib/dev/acpica/exmonad.c
+++ b/sys/contrib/dev/acpica/exmonad.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exmonad - ACPI AML execution for monadic (1 operand) operators
- * $Revision: 108 $
+ * $Revision: 110 $
*
*****************************************************************************/
@@ -208,6 +208,9 @@ Cleanup:
return_ACPI_STATUS (Status);
}
+#define ObjDesc Operand[0]
+#define ResDesc Operand[1]
+
/*******************************************************************************
*
@@ -227,43 +230,13 @@ AcpiExMonadic1 (
UINT16 Opcode,
ACPI_WALK_STATE *WalkState)
{
- ACPI_OPERAND_OBJECT *ObjDesc = NULL;
+ ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
ACPI_STATUS Status;
- ACPI_STATUS ResolveStatus;
FUNCTION_TRACE_PTR ("ExMonadic1", WALK_OPERANDS);
- /* Resolve the operand */
-
- ResolveStatus = AcpiExResolveOperands (Opcode, WALK_OPERANDS, WalkState);
- DUMP_OPERANDS (WALK_OPERANDS, IMODE_EXECUTE,
- AcpiPsGetOpcodeName (Opcode),
- 1, "after AcpiExResolveOperands");
-
- /* Get the operand */
-
- Status = AcpiDsObjStackPopObject (&ObjDesc, WalkState);
-
- /* Check operand status */
-
- if (ACPI_FAILURE (ResolveStatus))
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "[%s]: Could not resolve operands, %s\n",
- AcpiPsGetOpcodeName (Opcode), AcpiFormatException (ResolveStatus)));
-
- goto Cleanup;
- }
-
- if (ACPI_FAILURE (Status))
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "[%s]: bad operand(s) %s\n",
- AcpiPsGetOpcodeName (Opcode), AcpiFormatException (Status)));
-
- goto Cleanup;
- }
-
/* Examine the opcode */
switch (Opcode)
@@ -321,7 +294,6 @@ AcpiExMonadic1 (
} /* switch */
-Cleanup:
/* Always delete the operand */
@@ -350,13 +322,11 @@ AcpiExMonadic2R (
ACPI_WALK_STATE *WalkState,
ACPI_OPERAND_OBJECT **ReturnDesc)
{
- ACPI_OPERAND_OBJECT *ObjDesc;
- ACPI_OPERAND_OBJECT *ResDesc;
+ ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
ACPI_OPERAND_OBJECT *RetDesc = NULL;
ACPI_OPERAND_OBJECT *RetDesc2 = NULL;
UINT32 ResVal;
- ACPI_STATUS Status;
- ACPI_STATUS ResolveStatus;
+ ACPI_STATUS Status = AE_OK;
UINT32 i;
UINT32 j;
ACPI_INTEGER Digit;
@@ -365,35 +335,6 @@ AcpiExMonadic2R (
FUNCTION_TRACE_PTR ("ExMonadic2R", WALK_OPERANDS);
- /* Resolve all operands */
-
- ResolveStatus = AcpiExResolveOperands (Opcode, WALK_OPERANDS, WalkState);
- DUMP_OPERANDS (WALK_OPERANDS, IMODE_EXECUTE,
- AcpiPsGetOpcodeName (Opcode),
- 2, "after AcpiExResolveOperands");
-
- /* Get all operands */
-
- Status = AcpiDsObjStackPopObject (&ResDesc, WalkState);
- Status |= AcpiDsObjStackPopObject (&ObjDesc, WalkState);
-
- /* Now we can check the status codes */
-
- if (ACPI_FAILURE (ResolveStatus))
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "[%s]: Could not resolve operands, %s\n",
- AcpiPsGetOpcodeName (Opcode), AcpiFormatException (ResolveStatus)));
-
- goto Cleanup;
- }
-
- if (ACPI_FAILURE (Status))
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "[%s]: bad operand(s) %s\n",
- AcpiPsGetOpcodeName (Opcode), AcpiFormatException(Status)));
-
- goto Cleanup;
- }
/* Create a return object of type NUMBER for most opcodes */
@@ -550,21 +491,18 @@ AcpiExMonadic2R (
* different than the return value stored in the result descriptor
* (There are really two return values)
*/
-
if ((ACPI_NAMESPACE_NODE *) ObjDesc == AcpiGbl_RootNode)
{
/*
* This means that the object does not exist in the namespace,
* return FALSE
*/
-
RetDesc->Integer.Value = 0;
/*
* Must delete the result descriptor since there is no reference
* being returned
*/
-
AcpiUtRemoveReference (ResDesc);
goto Cleanup;
}
@@ -720,11 +658,10 @@ AcpiExMonadic2 (
ACPI_WALK_STATE *WalkState,
ACPI_OPERAND_OBJECT **ReturnDesc)
{
- ACPI_OPERAND_OBJECT *ObjDesc;
+ ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
ACPI_OPERAND_OBJECT *TmpDesc;
ACPI_OPERAND_OBJECT *RetDesc = NULL;
- ACPI_STATUS ResolveStatus;
- ACPI_STATUS Status;
+ ACPI_STATUS Status = AE_OK;
UINT32 Type;
ACPI_INTEGER Value;
@@ -732,39 +669,10 @@ AcpiExMonadic2 (
FUNCTION_TRACE_PTR ("ExMonadic2", WALK_OPERANDS);
- /* Attempt to resolve the operands */
-
- ResolveStatus = AcpiExResolveOperands (Opcode, WALK_OPERANDS, WalkState);
- DUMP_OPERANDS (WALK_OPERANDS, IMODE_EXECUTE,
- AcpiPsGetOpcodeName (Opcode),
- 1, "after AcpiExResolveOperands");
-
- /* Always get all operands */
-
- Status = AcpiDsObjStackPopObject (&ObjDesc, WalkState);
-
- /* Now we can check the status codes */
-
- if (ACPI_FAILURE (ResolveStatus))
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "[%s]: Could not resolve operands, %s\n",
- AcpiPsGetOpcodeName (Opcode), AcpiFormatException (ResolveStatus)));
-
- goto Cleanup;
- }
-
- if (ACPI_FAILURE (Status))
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "[%s]: Bad operand(s), %s\n",
- AcpiPsGetOpcodeName (Opcode), AcpiFormatException (Status)));
-
- goto Cleanup;
- }
/* Get the operand and decode the opcode */
-
switch (Opcode)
{
@@ -794,9 +702,8 @@ AcpiExMonadic2 (
* can be either an Node or an internal object.
*
* TBD: [Future] This may be the prototype code for all cases where
- * an Reference is expected!! 10/99
+ * a Reference is expected!! 10/99
*/
-
if (VALID_DESCRIPTOR_TYPE (ObjDesc, ACPI_DESC_TYPE_NAMED))
{
RetDesc = ObjDesc;
@@ -808,7 +715,6 @@ AcpiExMonadic2 (
* Duplicate the Reference in a new object so that we can resolve it
* without destroying the original Reference object
*/
-
RetDesc = AcpiUtCreateInternalObject (INTERNAL_TYPE_REFERENCE);
if (!RetDesc)
{
@@ -826,7 +732,6 @@ AcpiExMonadic2 (
* Convert the RetDesc Reference to a Number
* (This deletes the original RetDesc)
*/
-
Status = AcpiExResolveOperands (AML_LNOT_OP, &RetDesc, WalkState);
if (ACPI_FAILURE (Status))
{
@@ -1010,7 +915,6 @@ AcpiExMonadic2 (
* Now that we have the size of the object, create a result
* object to hold the value
*/
-
RetDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc)
{
@@ -1091,7 +995,6 @@ AcpiExMonadic2 (
* This must be a reference object produced by the Index
* ASL operation -- check internal opcode
*/
-
if ((ObjDesc->Reference.Opcode != AML_INDEX_OP) &&
(ObjDesc->Reference.Opcode != AML_REF_OF_OP))
{
@@ -1112,7 +1015,6 @@ AcpiExMonadic2 (
* 1) A Buffer
* 2) A Package
*/
-
if (ObjDesc->Reference.TargetType == ACPI_TYPE_BUFFER_FIELD)
{
/*
@@ -1147,7 +1049,6 @@ AcpiExMonadic2 (
* element of the package. We must add another reference to
* this object, however.
*/
-
RetDesc = *(ObjDesc->Reference.Where);
if (!RetDesc)
{
diff --git a/sys/contrib/dev/acpica/exmutex.c b/sys/contrib/dev/acpica/exmutex.c
index e0ed60ab845c..f8129a20bdaa 100644
--- a/sys/contrib/dev/acpica/exmutex.c
+++ b/sys/contrib/dev/acpica/exmutex.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exmutex - ASL Mutex Acquire/Release functions
- * $Revision: 5 $
+ * $Revision: 7 $
*
*****************************************************************************/
@@ -214,7 +214,7 @@ AcpiExAcquireMutex (
ACPI_STATUS Status;
- FUNCTION_TRACE_PTR ("AcpiExAcquireMutex", ObjDesc);
+ FUNCTION_TRACE_PTR ("ExAcquireMutex", ObjDesc);
if (!ObjDesc)
{
@@ -285,7 +285,7 @@ AcpiExReleaseMutex (
ACPI_STATUS Status;
- FUNCTION_TRACE ("AcpiExReleaseMutex");
+ FUNCTION_TRACE ("ExReleaseMutex");
if (!ObjDesc)
@@ -293,7 +293,7 @@ AcpiExReleaseMutex (
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
- /* The mutex must have been previously acquired in order to release it */
+ /* The mutex must have been previously acquired in order to release it */
if (!ObjDesc->Mutex.Owner)
{
@@ -365,6 +365,9 @@ AcpiExReleaseAllMutexes (
ACPI_OPERAND_OBJECT *This;
+ FUNCTION_ENTRY ();
+
+
/*
* Traverse the list of owned mutexes, releasing each one.
*/
diff --git a/sys/contrib/dev/acpica/exnames.c b/sys/contrib/dev/acpica/exnames.c
index 85edbba9330c..77ac397dea01 100644
--- a/sys/contrib/dev/acpica/exnames.c
+++ b/sys/contrib/dev/acpica/exnames.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exnames - interpreter/scanner name load/execute
- * $Revision: 81 $
+ * $Revision: 82 $
*
*****************************************************************************/
@@ -167,7 +167,6 @@ AcpiExAllocateNameString (
* Also, one byte for the null terminator.
* This may actually be somewhat longer than needed.
*/
-
if (PrefixCount == (UINT32) -1)
{
/* Special case for root */
@@ -183,7 +182,6 @@ AcpiExAllocateNameString (
* Allocate a buffer for the name.
* This buffer must be deleted by the caller!
*/
-
NameString = ACPI_MEM_ALLOCATE (SizeNeeded);
if (!NameString)
{
@@ -230,7 +228,6 @@ AcpiExAllocateNameString (
* Terminate string following prefixes. AcpiExNameSegment() will
* append the segment(s)
*/
-
*TempPtr = 0;
return_PTR (NameString);
@@ -388,7 +385,6 @@ AcpiExGetNameString (
* DataType is not a field name.
* Examine first character of name for root or parent prefix operators
*/
-
switch (*AmlAddress)
{
@@ -446,6 +442,7 @@ AcpiExGetNameString (
}
/* Indicate that we processed a prefix */
+
HasPrefix = TRUE;
Status = AcpiExNameSegment (&AmlAddress, NameString);
@@ -473,6 +470,7 @@ AcpiExGetNameString (
}
/* Indicate that we processed a prefix */
+
HasPrefix = TRUE;
while (NumSegments &&
diff --git a/sys/contrib/dev/acpica/exprep.c b/sys/contrib/dev/acpica/exprep.c
index a8f8474962b5..8dfe99c8b748 100644
--- a/sys/contrib/dev/acpica/exprep.c
+++ b/sys/contrib/dev/acpica/exprep.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exprep - ACPI AML (p-code) execution - field prep utilities
- * $Revision: 93 $
+ * $Revision: 95 $
*
*****************************************************************************/
@@ -147,7 +147,7 @@ AcpiExDecodeFieldAccessType (
UINT16 Length,
UINT32 *Alignment)
{
- PROC_NAME ("AcpiExDecodeFieldAccessType");
+ PROC_NAME ("ExDecodeFieldAccessType");
switch (Access)
@@ -260,7 +260,7 @@ AcpiExPrepCommonFieldObject (
ObjDesc->CommonField.BitLength = (UINT16) FieldBitLength;
- /*
+ /*
* Decode the access type so we can compute offsets. The access type gives
* two pieces of information - the width of each field access and the
* necessary alignment of the access. For AnyAcc, the width used is the
@@ -293,13 +293,13 @@ AcpiExPrepCommonFieldObject (
}
- /*
+ /*
* BaseByteOffset is the address of the start of the field within the region. It is
* the byte address of the first *datum* (field-width data unit) of the field.
* (i.e., the first datum that contains at least the first *bit* of the field.)
*/
NearestByteAddress = ROUND_BITS_DOWN_TO_BYTES (FieldBitPosition);
- ObjDesc->CommonField.BaseByteOffset = ROUND_DOWN (NearestByteAddress,
+ ObjDesc->CommonField.BaseByteOffset = ROUND_DOWN (NearestByteAddress,
DIV_8 (Alignment));
/*
@@ -313,15 +313,15 @@ AcpiExPrepCommonFieldObject (
/*
* DatumValidBits is the number of valid field bits in the first field datum.
*/
- ObjDesc->CommonField.DatumValidBits = (UINT8) (AccessBitWidth -
+ ObjDesc->CommonField.DatumValidBits = (UINT8) (AccessBitWidth -
ObjDesc->CommonField.StartFieldBitOffset);
- /*
+ /*
* Valid bits -- the number of bits that compose a partial datum,
* 1) At the end of the field within the region (arbitrary starting bit offset)
* 2) At the end of a buffer used to contain the field (starting offset always zero)
*/
- ObjDesc->CommonField.EndFieldValidBits = (UINT8) ((ObjDesc->CommonField.StartFieldBitOffset +
+ ObjDesc->CommonField.EndFieldValidBits = (UINT8) ((ObjDesc->CommonField.StartFieldBitOffset +
FieldBitLength) % AccessBitWidth);
ObjDesc->CommonField.EndBufferValidBits = (UINT8) (FieldBitLength % AccessBitWidth); /* StartBufferBitOffset always = 0 */
diff --git a/sys/contrib/dev/acpica/exregion.c b/sys/contrib/dev/acpica/exregion.c
index d42ae31b0b79..8bf9ec149e48 100644
--- a/sys/contrib/dev/acpica/exregion.c
+++ b/sys/contrib/dev/acpica/exregion.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exregion - ACPI default OpRegion (address space) handlers
- * $Revision: 55 $
+ * $Revision: 57 $
*
*****************************************************************************/
@@ -195,7 +195,6 @@ AcpiExSystemMemorySpaceHandler (
* Is 1) Address below the current mapping? OR
* 2) Address beyond the current mapping?
*/
-
if ((Address < MemInfo->MappedPhysicalAddress) ||
(((ACPI_INTEGER) Address + Length) >
((ACPI_INTEGER) MemInfo->MappedPhysicalAddress + MemInfo->MappedLength)))
@@ -204,7 +203,6 @@ AcpiExSystemMemorySpaceHandler (
* The request cannot be resolved by the current memory mapping;
* Delete the existing mapping and create a new one.
*/
-
if (MemInfo->MappedLength)
{
/* Valid mapping, delete it */
@@ -414,8 +412,8 @@ AcpiExPciConfigSpaceHandler (
PciRegister = (UINT16) Address;
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "IO %d (%d) Seg(%04x) Bus(%04x) Dev(%04x) Func(%04x) Reg(%04x)\n",
- Function, BitWidth, PciId->Segment, PciId->Bus, PciId->Device,
+ "IO %d (%d) Seg(%04x) Bus(%04x) Dev(%04x) Func(%04x) Reg(%04x)\n",
+ Function, BitWidth, PciId->Segment, PciId->Bus, PciId->Device,
PciId->Function, PciRegister));
switch (Function)
diff --git a/sys/contrib/dev/acpica/exresolv.c b/sys/contrib/dev/acpica/exresolv.c
index ac97dc6ef484..dd72ba6de50e 100644
--- a/sys/contrib/dev/acpica/exresolv.c
+++ b/sys/contrib/dev/acpica/exresolv.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exresolv - AML Interpreter object resolution
- * $Revision: 96 $
+ * $Revision: 97 $
*
*****************************************************************************/
@@ -457,7 +457,7 @@ AcpiExResolveObjectToValue (
* the package, can't dereference it
*/
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "Attempt to deref an Index to NULL pkg element Idx=%p\n",
+ "Attempt to deref an Index to NULL pkg element Idx=%p\n",
StackDesc));
Status = AE_AML_UNINITIALIZED_ELEMENT;
}
diff --git a/sys/contrib/dev/acpica/exresop.c b/sys/contrib/dev/acpica/exresop.c
index 8c12470069a9..a383503919cb 100644
--- a/sys/contrib/dev/acpica/exresop.c
+++ b/sys/contrib/dev/acpica/exresop.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exresop - AML Interpreter operand/object resolution
- * $Revision: 33 $
+ * $Revision: 37 $
*
*****************************************************************************/
@@ -151,7 +151,8 @@ AcpiExCheckObjectType (
ACPI_OBJECT_TYPE ThisType,
void *Object)
{
- PROC_NAME ("AcpiExCheckObjectType");
+ PROC_NAME ("ExCheckObjectType");
+
if (TypeNeeded == ACPI_TYPE_ANY)
{
@@ -204,7 +205,7 @@ AcpiExResolveOperands (
UINT8 ObjectType;
void *TempNode;
UINT32 ArgTypes;
- ACPI_OPCODE_INFO *OpInfo;
+ const ACPI_OPCODE_INFO *OpInfo;
UINT32 ThisArgType;
ACPI_OBJECT_TYPE TypeNeeded;
@@ -222,7 +223,7 @@ AcpiExResolveOperands (
ArgTypes = OpInfo->RuntimeArgs;
if (ArgTypes == ARGI_INVALID_OPCODE)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Internal - %X is not a valid AML opcode\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Internal - %X is not a valid AML opcode\n",
Opcode));
return_ACPI_STATUS (AE_AML_INTERNAL);
@@ -239,12 +240,11 @@ AcpiExResolveOperands (
* to) the required type; if stack underflows; or upon
* finding a NULL stack entry (which should not happen).
*/
-
while (GET_CURRENT_ARG_TYPE (ArgTypes))
{
if (!StackPtr || !*StackPtr)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Internal - null stack entry at %X\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Internal - null stack entry at %X\n",
StackPtr));
return_ACPI_STATUS (AE_AML_INTERNAL);
@@ -284,7 +284,6 @@ AcpiExResolveOperands (
/*
* Decode the Reference
*/
-
OpInfo = AcpiPsGetOpcodeInfo (Opcode);
if (ACPI_GET_OP_TYPE (OpInfo) != ACPI_OP_TYPE_OPCODE)
{
@@ -333,7 +332,6 @@ AcpiExResolveOperands (
/*
* Get one argument type, point to the next
*/
-
ThisArgType = GET_CURRENT_ARG_TYPE (ArgTypes);
INCREMENT_ARG_LIST (ArgTypes);
@@ -342,7 +340,6 @@ AcpiExResolveOperands (
* Handle cases where the object does not need to be
* resolved to a value
*/
-
switch (ThisArgType)
{
@@ -375,7 +372,6 @@ AcpiExResolveOperands (
* Convert an indirect name ptr to direct name ptr and put
* it on the stack
*/
-
TempNode = ObjDesc->Reference.Object;
AcpiUtRemoveReference (ObjDesc);
(*StackPtr) = TempNode;
@@ -393,7 +389,6 @@ AcpiExResolveOperands (
* Instead, we just want to store the reference object.
* -- All others must be resolved below.
*/
-
if ((Opcode == AML_STORE_OP) &&
((*StackPtr)->Common.Type == INTERNAL_TYPE_REFERENCE) &&
((*StackPtr)->Reference.Opcode == AML_INDEX_OP))
@@ -407,7 +402,6 @@ AcpiExResolveOperands (
/*
* Resolve this object to a value
*/
-
Status = AcpiExResolveToValue (StackPtr, WalkState);
if (ACPI_FAILURE (Status))
{
@@ -470,7 +464,6 @@ AcpiExResolveOperands (
/*
* The more complex cases allow multiple resolved object types
*/
-
case ARGI_INTEGER: /* Number */
/*
diff --git a/sys/contrib/dev/acpica/exstore.c b/sys/contrib/dev/acpica/exstore.c
index bc1b536b2615..815f32ba4688 100644
--- a/sys/contrib/dev/acpica/exstore.c
+++ b/sys/contrib/dev/acpica/exstore.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exstore - AML Interpreter object store support
- * $Revision: 142 $
+ * $Revision: 147 $
*
*****************************************************************************/
@@ -214,7 +214,6 @@ AcpiExStore (
* 4) Store to the debug object
* 5) Store to a constant -- a noop
*/
-
switch (RefDesc->Reference.Opcode)
{
@@ -251,46 +250,47 @@ AcpiExStore (
* Storing to the Debug object causes the value stored to be
* displayed and otherwise has no effect -- see ACPI Specification
*/
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "**** Write to Debug Object: ****: \n"));
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "**** Write to Debug Object: ****:\n\n"));
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OBJECTS, "[ACPI Debug] %s: ",
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[ACPI Debug] %s: ",
AcpiUtGetTypeName (ValDesc->Common.Type)));
switch (ValDesc->Common.Type)
{
case ACPI_TYPE_INTEGER:
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OBJECTS, "0x%X (%d)\n",
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "0x%X (%d)\n",
(UINT32) ValDesc->Integer.Value, (UINT32) ValDesc->Integer.Value));
break;
case ACPI_TYPE_BUFFER:
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OBJECTS, "Length 0x%X\n",
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "Length 0x%X\n",
(UINT32) ValDesc->Buffer.Length));
break;
case ACPI_TYPE_STRING:
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OBJECTS, "%s\n", ValDesc->String.Pointer));
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "%s\n", ValDesc->String.Pointer));
break;
case ACPI_TYPE_PACKAGE:
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OBJECTS, "Elements - 0x%X\n",
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "Elements - 0x%X\n",
(UINT32) ValDesc->Package.Elements));
break;
default:
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OBJECTS, "@0x%p\n", ValDesc));
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "@0x%p\n", ValDesc));
break;
}
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, "\n"));
break;
@@ -358,14 +358,13 @@ AcpiExStoreObjectToIndex (
UINT8 Value = 0;
- FUNCTION_TRACE ("AcpiExStoreObjectToIndex");
+ FUNCTION_TRACE ("ExStoreObjectToIndex");
/*
* Destination must be a reference pointer, and
* must point to either a buffer or a package
*/
-
switch (DestDesc->Reference.TargetType)
{
case ACPI_TYPE_PACKAGE:
@@ -437,7 +436,6 @@ AcpiExStoreObjectToIndex (
* reference to the newly created descriptor for now being
* part of the parent package
*/
-
*(DestDesc->Reference.Where) = ObjDesc;
AcpiUtAddReference (ObjDesc);
}
@@ -491,7 +489,6 @@ AcpiExStoreObjectToIndex (
* The assignment of the individual elements will be slightly
* different for each source type.
*/
-
switch (ValDesc->Common.Type)
{
case ACPI_TYPE_INTEGER:
@@ -601,11 +598,11 @@ AcpiExStoreObjectToNode (
FUNCTION_TRACE ("ExStoreObjectToNode");
+
/*
* Assuming the parameters were already validated
*/
-
/*
* Get current type of the node, and object attached to Node
*/
@@ -734,7 +731,6 @@ AcpiExStoreObjectToObject (
/*
* Assuming the parameters are valid!
*/
-
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Storing %p(%s) to %p(%s)\n",
SourceDesc, AcpiUtGetTypeName (SourceDesc->Common.Type),
DestDesc, AcpiUtGetTypeName (DestDesc->Common.Type)));
diff --git a/sys/contrib/dev/acpica/exstoren.c b/sys/contrib/dev/acpica/exstoren.c
index 574755f2a2b6..0cd24c1f915f 100644
--- a/sys/contrib/dev/acpica/exstoren.c
+++ b/sys/contrib/dev/acpica/exstoren.c
@@ -3,7 +3,7 @@
*
* Module Name: exstoren - AML Interpreter object store support,
* Store to Node (namespace object)
- * $Revision: 39 $
+ * $Revision: 40 $
*
*****************************************************************************/
@@ -298,7 +298,6 @@ AcpiExStoreObject (
* The target namespace node is uninitialized (has no target object),
* and will take on the type of the source object
*/
-
*TargetDescPtr = SourceDesc;
break;
diff --git a/sys/contrib/dev/acpica/exstorob.c b/sys/contrib/dev/acpica/exstorob.c
index 86c567d72584..297a15495d72 100644
--- a/sys/contrib/dev/acpica/exstorob.c
+++ b/sys/contrib/dev/acpica/exstorob.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exstorob - AML Interpreter object store support, store to object
- * $Revision: 35 $
+ * $Revision: 37 $
*
*****************************************************************************/
@@ -151,7 +151,8 @@ AcpiExCopyBufferToBuffer (
UINT32 Length;
UINT8 *Buffer;
- PROC_NAME ("AcpiExCopyBufferToBuffer");
+
+ PROC_NAME ("ExCopyBufferToBuffer");
/*
@@ -225,6 +226,9 @@ AcpiExCopyStringToString (
UINT8 *Buffer;
+ FUNCTION_ENTRY ();
+
+
/*
* We know that SourceDesc is a string by now.
*/
@@ -262,9 +266,8 @@ AcpiExCopyStringToString (
{
return (AE_NO_MEMORY);
}
- TargetDesc->String.Length = Length;
-
+ TargetDesc->String.Length = Length;
MEMCPY (TargetDesc->String.Pointer, Buffer, Length);
}
diff --git a/sys/contrib/dev/acpica/exsystem.c b/sys/contrib/dev/acpica/exsystem.c
index b97c06a51aaa..df034483f057 100644
--- a/sys/contrib/dev/acpica/exsystem.c
+++ b/sys/contrib/dev/acpica/exsystem.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exsystem - Interface to OS services
- * $Revision: 65 $
+ * $Revision: 67 $
*
*****************************************************************************/
@@ -150,7 +150,8 @@ AcpiExSystemWaitSemaphore (
ACPI_STATUS Status;
- FUNCTION_TRACE ("AcpiExSystemWaitSemaphore");
+ FUNCTION_TRACE ("ExSystemWaitSemaphore");
+
Status = AcpiOsWaitSemaphore (Semaphore, 1, 0);
if (ACPI_SUCCESS (Status))
@@ -200,6 +201,8 @@ void
AcpiExSystemDoStall (
UINT32 HowLong)
{
+ FUNCTION_ENTRY ();
+
if (HowLong > 1000) /* 1 millisecond */
{
@@ -237,6 +240,10 @@ void
AcpiExSystemDoSuspend (
UINT32 HowLong)
{
+
+ FUNCTION_ENTRY ();
+
+
/* Since this thread will sleep, we must release the interpreter */
AcpiExExitInterpreter ();
@@ -273,7 +280,8 @@ AcpiExSystemAcquireMutex (
ACPI_STATUS Status = AE_OK;
- FUNCTION_TRACE_PTR ("AcpiExSystemAcquireMutex", ObjDesc);
+ FUNCTION_TRACE_PTR ("ExSystemAcquireMutex", ObjDesc);
+
if (!ObjDesc)
{
@@ -283,7 +291,6 @@ AcpiExSystemAcquireMutex (
/*
* Support for the _GL_ Mutex object -- go get the global lock
*/
-
if (ObjDesc->Mutex.Semaphore == AcpiGbl_GlobalLockSemaphore)
{
Status = AcpiEvAcquireGlobalLock ();
@@ -318,7 +325,7 @@ AcpiExSystemReleaseMutex (
ACPI_STATUS Status = AE_OK;
- FUNCTION_TRACE ("AcpiExSystemReleaseMutex");
+ FUNCTION_TRACE ("ExSystemReleaseMutex");
if (!ObjDesc)
@@ -360,7 +367,7 @@ AcpiExSystemSignalEvent (
ACPI_STATUS Status = AE_OK;
- FUNCTION_TRACE ("AcpiExSystemSignalEvent");
+ FUNCTION_TRACE ("ExSystemSignalEvent");
if (ObjDesc)
@@ -395,7 +402,7 @@ AcpiExSystemWaitEvent (
ACPI_STATUS Status = AE_OK;
- FUNCTION_TRACE ("AcpiExSystemWaitEvent");
+ FUNCTION_TRACE ("ExSystemWaitEvent");
if (ObjDesc)
@@ -429,11 +436,13 @@ AcpiExSystemResetEvent (
void *TempSemaphore;
+ FUNCTION_ENTRY ();
+
+
/*
* We are going to simply delete the existing semaphore and
* create a new one!
*/
-
Status = AcpiOsCreateSemaphore (ACPI_NO_UNIT_LIMIT, 0, &TempSemaphore);
if (ACPI_SUCCESS (Status))
{
diff --git a/sys/contrib/dev/acpica/exutils.c b/sys/contrib/dev/acpica/exutils.c
index 6a857c50bcb3..8c3efab5e4e1 100644
--- a/sys/contrib/dev/acpica/exutils.c
+++ b/sys/contrib/dev/acpica/exutils.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exutils - interpreter/scanner utilities
- * $Revision: 82 $
+ * $Revision: 84 $
*
*****************************************************************************/
@@ -117,12 +117,29 @@
#define __EXUTILS_C__
+/*
+ * DEFINE_AML_GLOBALS is tested in amlcode.h
+ * to determine whether certain global names should be "defined" or only
+ * "declared" in the current compilation. This enhances maintainability
+ * by enabling a single header file to embody all knowledge of the names
+ * in question.
+ *
+ * Exactly one module of any executable should #define DEFINE_GLOBALS
+ * before #including the header files which use this convention. The
+ * names in question will be defined and initialized in that module,
+ * and declared as extern in all other modules which #include those
+ * header files.
+ */
+
+#define DEFINE_AML_GLOBALS
+
#include "acpi.h"
#include "acparser.h"
#include "acinterp.h"
#include "amlcode.h"
#include "acnamesp.h"
#include "acevents.h"
+#include "acparser.h"
#define _COMPONENT ACPI_EXECUTER
MODULE_NAME ("exutils")
@@ -201,6 +218,9 @@ AcpiExValidateObjectType (
ACPI_OBJECT_TYPE Type)
{
+ FUNCTION_ENTRY ();
+
+
if ((Type > ACPI_TYPE_MAX && Type < INTERNAL_TYPE_BEGIN) ||
(Type > INTERNAL_TYPE_MAX))
{
@@ -232,11 +252,13 @@ AcpiExTruncateFor32bitTable (
ACPI_WALK_STATE *WalkState)
{
+ FUNCTION_ENTRY ();
+
+
/*
* Object must be a valid number and we must be executing
* a control method
*/
-
if ((!ObjDesc) ||
(ObjDesc->Common.Type != ACPI_TYPE_INTEGER) ||
(!WalkState->MethodNode))
@@ -405,6 +427,9 @@ _ntohl (
} In;
+ FUNCTION_ENTRY ();
+
+
In.Value = Value;
Out.Bytes[0] = In.Bytes[3];
@@ -434,6 +459,10 @@ AcpiExEisaIdToString (
{
UINT32 id;
+
+ FUNCTION_ENTRY ();
+
+
/* swap to big-endian to get contiguous bits */
id = _ntohl (NumericId);
@@ -471,8 +500,10 @@ AcpiExUnsignedIntegerToString (
UINT32 DigitsNeeded;
- DigitsNeeded = AcpiExDigitsNeeded (Value, 10);
+ FUNCTION_ENTRY ();
+
+ DigitsNeeded = AcpiExDigitsNeeded (Value, 10);
OutString[DigitsNeeded] = '\0';
for (Count = DigitsNeeded; Count > 0; Count--)
diff --git a/sys/contrib/dev/acpica/exxface.c b/sys/contrib/dev/acpica/exxface.c
index d34c46008bc7..a646c7106e1f 100644
--- a/sys/contrib/dev/acpica/exxface.c
+++ b/sys/contrib/dev/acpica/exxface.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exxface - External interpreter interfaces
- * $Revision: 27 $
+ * $Revision: 29 $
*
*****************************************************************************/
@@ -124,6 +124,7 @@
#define _COMPONENT ACPI_EXECUTER
MODULE_NAME ("exxface")
+#if 0
/*
* DEFINE_AML_GLOBALS is tested in amlcode.h
@@ -177,7 +178,6 @@ AcpiExExecuteMethod (
* The point here is to lock the interpreter and call the low
* level execute.
*/
-
Status = AcpiExEnterInterpreter ();
if (ACPI_FAILURE (Status))
{
@@ -192,3 +192,4 @@ AcpiExExecuteMethod (
}
+#endif
diff --git a/sys/contrib/dev/acpica/hwacpi.c b/sys/contrib/dev/acpica/hwacpi.c
index 3cf3d853e5f8..df690a6fcc8d 100644
--- a/sys/contrib/dev/acpica/hwacpi.c
+++ b/sys/contrib/dev/acpica/hwacpi.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: hwacpi - ACPI Hardware Initialization/Mode Interface
- * $Revision: 43 $
+ * $Revision: 45 $
*
*****************************************************************************/
@@ -159,24 +159,10 @@ AcpiHwInitialize (
return_ACPI_STATUS (AE_NO_ACPI_TABLES);
}
- /* Must support *some* mode! */
-/*
- if (!(SystemFlags & SYS_MODES_MASK))
- {
- RestoreAcpiChipset = FALSE;
-
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "Supported modes uninitialized!\n"));
- return_ACPI_STATUS (AE_ERROR);
- }
-
-*/
-
+ /* Identify current ACPI/legacy mode */
switch (AcpiGbl_SystemFlags & SYS_MODES_MASK)
{
- /* Identify current ACPI/legacy mode */
-
case (SYS_MODE_ACPI):
AcpiGbl_OriginalMode = SYS_MODE_ACPI;
@@ -231,7 +217,6 @@ AcpiHwInitialize (
* coded here. If this changes in the spec, this code will need to
* be modified. The PM1bEvtBlk behaves as expected.
*/
-
AcpiGbl_Pm1EnableRegisterSave = (UINT16) AcpiHwRegisterRead (
ACPI_MTX_LOCK, PM1_EN);
@@ -240,7 +225,6 @@ AcpiHwInitialize (
* The GPEs behave similarly, except that the length of the register
* block is not fixed, so the buffer must be allocated with malloc
*/
-
if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XGpe0Blk.Address) &&
AcpiGbl_FADT->Gpe0BlkLen)
{
@@ -318,6 +302,7 @@ AcpiHwSetMode (
ACPI_STATUS Status = AE_NO_HARDWARE_RESPONSE;
+
FUNCTION_TRACE ("HwSetMode");
@@ -335,12 +320,15 @@ AcpiHwSetMode (
* BIOS should clear all fixed status bits and restore fixed event
* enable bits to default
*/
-
AcpiOsWritePort (AcpiGbl_FADT->SmiCmd, AcpiGbl_FADT->AcpiDisable, 8);
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"Attempting to enable Legacy (non-ACPI) mode\n"));
}
+ /* Give the platform some time to react */
+
+ AcpiOsStall (5000);
+
if (AcpiHwGetMode () == Mode)
{
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Mode %X successfully enabled\n", Mode));
@@ -381,6 +369,7 @@ AcpiHwGetMode (void)
}
}
+
/******************************************************************************
*
* FUNCTION: AcpiHwGetModeCapabilities
@@ -411,7 +400,6 @@ AcpiHwGetModeCapabilities (void)
* tables. Therefore since we're in SYS_MODE_LEGACY, the system
* must support both modes
*/
-
AcpiGbl_SystemFlags |= (SYS_MODE_ACPI | SYS_MODE_LEGACY);
}
diff --git a/sys/contrib/dev/acpica/hwgpe.c b/sys/contrib/dev/acpica/hwgpe.c
index 6340c803967f..761cd93f6e72 100644
--- a/sys/contrib/dev/acpica/hwgpe.c
+++ b/sys/contrib/dev/acpica/hwgpe.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: hwgpe - Low level GPE enable/disable/clear functions
- * $Revision: 31 $
+ * $Revision: 32 $
*
*****************************************************************************/
@@ -144,6 +144,10 @@ AcpiHwEnableGpe (
UINT32 RegisterIndex;
UINT32 BitMask;
+
+ FUNCTION_ENTRY ();
+
+
/*
* Translate GPE number to index into global registers array.
*/
@@ -185,6 +189,10 @@ AcpiHwDisableGpe (
UINT32 RegisterIndex;
UINT32 BitMask;
+
+ FUNCTION_ENTRY ();
+
+
/*
* Translate GPE number to index into global registers array.
*/
@@ -226,6 +234,9 @@ AcpiHwClearGpe (
UINT32 BitMask;
+ FUNCTION_ENTRY ();
+
+
/*
* Translate GPE number to index into global registers array.
*/
@@ -266,6 +277,9 @@ AcpiHwGetGpeStatus (
UINT32 BitMask = 0;
+ FUNCTION_ENTRY ();
+
+
if (!EventStatus)
{
return;
diff --git a/sys/contrib/dev/acpica/hwregs.c b/sys/contrib/dev/acpica/hwregs.c
index d231b4763bc8..8bcda9d6353b 100644
--- a/sys/contrib/dev/acpica/hwregs.c
+++ b/sys/contrib/dev/acpica/hwregs.c
@@ -3,7 +3,7 @@
*
* Module Name: hwregs - Read/write access functions for the various ACPI
* control and status registers.
- * $Revision: 104 $
+ * $Revision: 109 $
*
******************************************************************************/
@@ -126,12 +126,6 @@
MODULE_NAME ("hwregs")
-/* This matches the #defines in actypes.h. */
-
-NATIVE_CHAR *SleepStateTable[] = {"\\_S0_","\\_S1_","\\_S2_","\\_S3_",
- "\\_S4_","\\_S5_","\\_S4B"};
-
-
/*******************************************************************************
*
* FUNCTION: AcpiHwGetBitShift
@@ -196,7 +190,7 @@ AcpiHwClearAcpiStatus (void)
if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XPm1bEvtBlk.Address))
{
- AcpiOsWritePort ((ACPI_IO_ADDRESS)
+ AcpiOsWritePort ((ACPI_IO_ADDRESS)
ACPI_GET_ADDRESS (AcpiGbl_FADT->XPm1bEvtBlk.Address),
ALL_FIXED_STS_BITS, 16);
}
@@ -263,7 +257,6 @@ AcpiHwObtainSleepTypeRegisterData (
/*
* Validate parameters
*/
-
if ((SleepState > ACPI_S_STATES_MAX) ||
!Slp_TypA || !Slp_TypB)
{
@@ -273,8 +266,8 @@ AcpiHwObtainSleepTypeRegisterData (
/*
* AcpiEvaluate the namespace object containing the values for this state
*/
-
- Status = AcpiNsEvaluateByName (SleepStateTable[SleepState], NULL, &ObjDesc);
+ Status = AcpiNsEvaluateByName ((NATIVE_CHAR *) AcpiGbl_DbSleepStates[SleepState],
+ NULL, &ObjDesc);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -391,7 +384,6 @@ AcpiHwRegisterBitAccess (
* Check bit id to fine locate Register offset.
* Check Mask to determine Register offset, and then read-write.
*/
-
switch (REGISTER_BLOCK_ID (RegisterId))
{
case PM1_STS:
@@ -442,7 +434,6 @@ AcpiHwRegisterBitAccess (
* others should be written as 0 so they will be left
* unchanged
*/
-
Value <<= AcpiHwGetBitShift (Mask);
Value &= Mask;
@@ -557,7 +548,6 @@ AcpiHwRegisterBitAccess (
* Therefore, pass the RegisterId, not just generic PM1_CONTROL,
* because we need to do different things. Yuck.
*/
-
AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK, RegisterId,
(UINT16) RegisterValue);
}
@@ -625,7 +615,6 @@ AcpiHwRegisterBitAccess (
* gpe_block_id is one of GPE[01]_EN_BLOCK and GPE[01]_STS_BLOCK
* gpe_bit_number is relative from the gpe_block (0x00~0xFF)
*/
-
Mask = REGISTER_BIT_ID(RegisterId); /* gpe_bit_number */
RegisterId = REGISTER_BLOCK_ID(RegisterId) | (Mask >> 3);
Mask = AcpiGbl_DecodeTo8bit [Mask % 8];
@@ -655,9 +644,10 @@ AcpiHwRegisterBitAccess (
Value &= Mask;
RegisterValue |= Value;
- /* This write will put the Action state into the General Purpose */
- /* Enable Register indexed by the value in Mask */
-
+ /*
+ * This write will put the Action state into the General Purpose
+ * Enable Register indexed by the value in Mask
+ */
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "About to write %04X to %04X\n",
RegisterValue, RegisterId));
AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK, RegisterId,
@@ -670,6 +660,7 @@ AcpiHwRegisterBitAccess (
case SMI_CMD_BLOCK:
case PROCESSOR_BLOCK:
+
/* Not used by any callers at this time - therefore, not implemented */
default:
@@ -714,7 +705,7 @@ AcpiHwRegisterRead (
UINT32 BankOffset;
- FUNCTION_TRACE ("AcpiHwRegisterRead");
+ FUNCTION_TRACE ("HwRegisterRead");
if (ACPI_MTX_LOCK == UseLock)
@@ -760,13 +751,13 @@ AcpiHwRegisterRead (
/*
- * For the GPE? Blocks, the lower word of RegisterId contains the
- * byte offset for which to read, as each part of each block may be
+ * For the GPE? Blocks, the lower word of RegisterId contains the
+ * byte offset for which to read, as each part of each block may be
* several bytes long.
*/
case GPE0_STS_BLOCK: /* 8-bit access */
- BankOffset = REGISTER_BIT_ID(RegisterId);
+ BankOffset = REGISTER_BIT_ID(RegisterId);
Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XGpe0Blk, BankOffset);
break;
@@ -778,7 +769,7 @@ AcpiHwRegisterRead (
case GPE1_STS_BLOCK: /* 8-bit access */
- BankOffset = REGISTER_BIT_ID(RegisterId);
+ BankOffset = REGISTER_BIT_ID(RegisterId);
Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XGpe1Blk, BankOffset);
break;
@@ -830,7 +821,8 @@ AcpiHwRegisterWrite (
{
UINT32 BankOffset;
- FUNCTION_TRACE ("AcpiHwRegisterWrite");
+
+ FUNCTION_TRACE ("HwRegisterWrite");
if (ACPI_MTX_LOCK == UseLock)
@@ -889,7 +881,7 @@ AcpiHwRegisterWrite (
case GPE0_STS_BLOCK: /* 8-bit access */
- BankOffset = REGISTER_BIT_ID(RegisterId);
+ BankOffset = REGISTER_BIT_ID(RegisterId);
AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XGpe0Blk, BankOffset);
break;
@@ -903,7 +895,7 @@ AcpiHwRegisterWrite (
case GPE1_STS_BLOCK: /* 8-bit access */
- BankOffset = REGISTER_BIT_ID(RegisterId);
+ BankOffset = REGISTER_BIT_ID(RegisterId);
AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XGpe1Blk, BankOffset);
break;
@@ -966,6 +958,9 @@ AcpiHwLowLevelRead (
UINT16 PciRegister;
+ FUNCTION_ENTRY ();
+
+
/*
* Must have a valid pointer to a GAS structure, and
* a non-zero address within
@@ -981,7 +976,6 @@ AcpiHwLowLevelRead (
* Three address spaces supported:
* Memory, Io, or PCI config.
*/
-
switch (Reg->AddressSpaceId)
{
case ACPI_ADR_SPACE_SYSTEM_MEMORY:
@@ -1045,6 +1039,9 @@ AcpiHwLowLevelWrite (
UINT16 PciRegister;
+ FUNCTION_ENTRY ();
+
+
/*
* Must have a valid pointer to a GAS structure, and
* a non-zero address within
@@ -1060,7 +1057,6 @@ AcpiHwLowLevelWrite (
* Three address spaces supported:
* Memory, Io, or PCI config.
*/
-
switch (Reg->AddressSpaceId)
{
case ACPI_ADR_SPACE_SYSTEM_MEMORY:
diff --git a/sys/contrib/dev/acpica/hwsleep.c b/sys/contrib/dev/acpica/hwsleep.c
index fb7a4ee2258a..d0d4ed864875 100644
--- a/sys/contrib/dev/acpica/hwsleep.c
+++ b/sys/contrib/dev/acpica/hwsleep.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Name: hwsleep.c - ACPI Hardware Sleep/Wake Interface
- * $Revision: 18 $
+ * $Revision: 21 $
*
*****************************************************************************/
@@ -245,7 +245,6 @@ AcpiEnterSleepState (
/*
* _PSW methods could be run here to enable wake-on keyboard, LAN, etc.
*/
-
Status = AcpiHwObtainSleepTypeRegisterData (SleepState, &TypeA, &TypeB);
if (!ACPI_SUCCESS (Status))
{
@@ -306,7 +305,7 @@ AcpiEnterSleepState (
AcpiHwRegisterWrite (ACPI_MTX_LOCK, PM1A_CONTROL, PM1AControl);
AcpiHwRegisterWrite (ACPI_MTX_LOCK, PM1B_CONTROL, PM1BControl);
- /*
+ /*
* Wait a second, then try again. This is to get S4/5 to work on all machines.
*/
if (SleepState > ACPI_STATE_S3)
@@ -319,8 +318,11 @@ AcpiEnterSleepState (
/* wait until we enter sleep state */
- while (!AcpiHwRegisterBitAccess (ACPI_READ,ACPI_MTX_LOCK,WAK_STS))
- { }
+ do
+ {
+ AcpiOsStall(10000);
+ }
+ while (!AcpiHwRegisterBitAccess (ACPI_READ, ACPI_MTX_LOCK, WAK_STS));
enable ();
@@ -346,6 +348,7 @@ AcpiLeaveSleepState (
ACPI_OBJECT_LIST ArgList;
ACPI_OBJECT Arg;
+
FUNCTION_TRACE ("AcpiLeaveSleepState");
@@ -359,6 +362,7 @@ AcpiLeaveSleepState (
AcpiEvaluateObject (NULL, "\\_BFS", &ArgList, NULL);
AcpiEvaluateObject (NULL, "\\_WAK", &ArgList, NULL);
+
/* _WAK returns stuff - do we want to look at it? */
/* Re-enable GPEs */
diff --git a/sys/contrib/dev/acpica/hwtimer.c b/sys/contrib/dev/acpica/hwtimer.c
index dccd9417cd06..22e484b2fe49 100644
--- a/sys/contrib/dev/acpica/hwtimer.c
+++ b/sys/contrib/dev/acpica/hwtimer.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Name: hwtimer.c - ACPI Power Management Timer Interface
- * $Revision: 11 $
+ * $Revision: 12 $
*
*****************************************************************************/
@@ -192,7 +192,7 @@ AcpiGetTimer (
FUNCTION_TRACE ("AcpiGetTimer");
-
+
/* Ensure that ACPI has been initialized */
ACPI_IS_INITIALIZATION_COMPLETE (Status);
@@ -206,7 +206,7 @@ AcpiGetTimer (
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
- AcpiOsReadPort ((ACPI_IO_ADDRESS)
+ AcpiOsReadPort ((ACPI_IO_ADDRESS)
ACPI_GET_ADDRESS (AcpiGbl_FADT->XPmTmrBlk.Address), Ticks, 32);
return_ACPI_STATUS (AE_OK);
diff --git a/sys/contrib/dev/acpica/nsaccess.c b/sys/contrib/dev/acpica/nsaccess.c
index 98a658ac6da3..6e42625cbf13 100644
--- a/sys/contrib/dev/acpica/nsaccess.c
+++ b/sys/contrib/dev/acpica/nsaccess.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nsaccess - Top-level functions for accessing ACPI namespace
- * $Revision: 130 $
+ * $Revision: 133 $
*
******************************************************************************/
@@ -145,7 +145,7 @@ ACPI_STATUS
AcpiNsRootInitialize (void)
{
ACPI_STATUS Status = AE_OK;
- PREDEFINED_NAMES *InitVal = NULL;
+ const PREDEFINED_NAMES *InitVal = NULL;
ACPI_NAMESPACE_NODE *NewNode;
ACPI_OPERAND_OBJECT *ObjDesc;
@@ -159,7 +159,6 @@ AcpiNsRootInitialize (void)
* The global root ptr is initially NULL, so a non-NULL value indicates
* that AcpiNsRootInitialize() has already been called; just return.
*/
-
if (AcpiGbl_RootNode)
{
Status = AE_OK;
@@ -171,7 +170,6 @@ AcpiNsRootInitialize (void)
* Tell the rest of the subsystem that the root is initialized
* (This is OK because the namespace is locked)
*/
-
AcpiGbl_RootNode = &AcpiGbl_RootNodeStruct;
@@ -187,7 +185,7 @@ AcpiNsRootInitialize (void)
if (ACPI_FAILURE (Status) || (!NewNode)) /* Must be on same line for code converter */
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Could not create predefined name %s, %s\n",
InitVal->Name, AcpiFormatException (Status)));
}
@@ -197,14 +195,12 @@ AcpiNsRootInitialize (void)
* If entry in PreDefinedNames[] specifies an
* initial value, create the initial value.
*/
-
if (InitVal->Val)
{
/*
* Entry requests an initial value, allocate a
* descriptor for it.
*/
-
ObjDesc = AcpiUtCreateInternalObject (InitVal->Type);
if (!ObjDesc)
{
@@ -257,11 +253,11 @@ AcpiNsRootInitialize (void)
{
goto UnlockAndExit;
}
+
/*
* We just created the mutex for the
* global lock, save it
*/
-
AcpiGbl_GlobalLockSemaphore = ObjDesc->Mutex.Semaphore;
}
@@ -372,7 +368,6 @@ AcpiNsLookup (
* Get the prefix scope.
* A null scope means use the root scope
*/
-
if ((!ScopeInfo) ||
(!ScopeInfo->Scope.Node))
{
@@ -394,7 +389,6 @@ AcpiNsLookup (
* but the BankFieldDefn may also check for a Field definition as well
* as an OperationRegion.
*/
-
if (INTERNAL_TYPE_FIELD_DEFN == Type)
{
/* DefFieldDefn defines fields in a Region */
@@ -451,7 +445,6 @@ AcpiNsLookup (
* - A MultiNamePrefixOp, followed by a byte indicating the
* number of segments and the segments themselves.
*/
-
if (*Pathname == AML_ROOT_PREFIX)
{
/* Pathname is fully qualified, look in root name table */
@@ -462,7 +455,7 @@ AcpiNsLookup (
Pathname++;
- ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Searching from root [%p]\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Searching from root [%p]\n",
CurrentNode));
/* Direct reference to root, "\" */
@@ -487,7 +480,6 @@ AcpiNsLookup (
* Handle up-prefix (carat). More than one prefix
* is supported
*/
-
while (*Pathname == AML_PARENT_PREFIX)
{
/* Point to segment part or next ParentPrefix */
@@ -515,7 +507,6 @@ AcpiNsLookup (
* Examine the name prefix opcode, if any,
* to determine the number of segments
*/
-
if (*Pathname == AML_DUAL_NAME_PREFIX)
{
NumSegments = 2;
@@ -574,8 +565,6 @@ AcpiNsLookup (
* Search namespace for each segment of the name.
* Loop through and verify/add each name segment.
*/
-
-
while (NumSegments-- && CurrentNode)
{
/*
@@ -608,7 +597,7 @@ AcpiNsLookup (
{
/* Name not found in ACPI namespace */
- ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
+ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
"Name [%4.4s] not found in scope %X\n",
&SimpleName, CurrentNode));
}
@@ -651,7 +640,6 @@ AcpiNsLookup (
* specific type, but the type of found object is known, use that type
* to see if it opens a scope.
*/
-
if ((0 == NumSegments) && (ACPI_TYPE_ANY == Type))
{
Type = ThisNode->Type;
@@ -664,7 +652,6 @@ AcpiNsLookup (
* More segments or the type implies enclosed scope,
* and the next scope has not been allocated.
*/
-
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Load mode=%X ThisNode=%X\n",
InterpreterMode, ThisNode));
}
@@ -680,7 +667,6 @@ AcpiNsLookup (
/*
* Always check if we need to open a new scope
*/
-
CheckForNewScopeAndExit:
if (!(Flags & NS_DONT_OPEN_SCOPE) && (WalkState))
@@ -689,7 +675,6 @@ CheckForNewScopeAndExit:
* If entry is a type which opens a scope,
* push the new scope on the scope stack.
*/
-
if (AcpiNsOpensScope (TypeToCheckFor))
{
/* 8-12-98 ASL Grammar Update supports null NamePath */
diff --git a/sys/contrib/dev/acpica/nsalloc.c b/sys/contrib/dev/acpica/nsalloc.c
index 6a6d2d14588b..d4e712aa11c1 100644
--- a/sys/contrib/dev/acpica/nsalloc.c
+++ b/sys/contrib/dev/acpica/nsalloc.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nsalloc - Namespace allocation and deletion utilities
- * $Revision: 53 $
+ * $Revision: 55 $
*
******************************************************************************/
@@ -130,11 +130,11 @@
*
* FUNCTION: AcpiNsCreateNode
*
- * PARAMETERS:
+ * PARAMETERS: AcpiName - Name of the new node
*
* RETURN: None
*
- * DESCRIPTION:
+ * DESCRIPTION: Create a namespace node
*
******************************************************************************/
@@ -144,6 +144,7 @@ AcpiNsCreateNode (
{
ACPI_NAMESPACE_NODE *Node;
+
FUNCTION_TRACE ("NsCreateNode");
@@ -167,11 +168,11 @@ AcpiNsCreateNode (
*
* FUNCTION: AcpiNsDeleteNode
*
- * PARAMETERS:
+ * PARAMETERS: Node - Node to be deleted
*
* RETURN: None
*
- * DESCRIPTION:
+ * DESCRIPTION: Delete a namespace node
*
******************************************************************************/
@@ -186,6 +187,7 @@ AcpiNsDeleteNode (
FUNCTION_TRACE_PTR ("NsDeleteNode", Node);
+
ParentNode = AcpiNsGetParentObject (Node);
PrevNode = NULL;
@@ -216,7 +218,6 @@ AcpiNsDeleteNode (
/*
* Detach an object if there is one
*/
-
if (Node->Object)
{
AcpiNsDetachObject (Node);
@@ -233,7 +234,7 @@ AcpiNsDeleteNode (
*
* PARAMETERS: WalkState - Current state of the walk
* ParentNode - The parent of the new Node
- * Node - The new Node to install
+ * Node - The new Node to install
* Type - ACPI object type of the new Node
*
* RETURN: None
@@ -246,7 +247,7 @@ void
AcpiNsInstallNode (
ACPI_WALK_STATE *WalkState,
ACPI_NAMESPACE_NODE *ParentNode, /* Parent */
- ACPI_NAMESPACE_NODE *Node, /* New Child*/
+ ACPI_NAMESPACE_NODE *Node, /* New Child*/
ACPI_OBJECT_TYPE8 Type)
{
UINT16 OwnerId = TABLE_ID_DSDT;
@@ -377,7 +378,7 @@ AcpiNsDeleteChildren (
UINT8 Flags;
- FUNCTION_TRACE_PTR ("AcpiNsDeleteChildren", ParentNode);
+ FUNCTION_TRACE_PTR ("NsDeleteChildren", ParentNode);
if (!ParentNode)
@@ -421,7 +422,6 @@ AcpiNsDeleteChildren (
/*
* Detach an object if there is one
*/
-
if (ChildNode->Object)
{
AcpiNsDetachObject (ChildNode);
@@ -448,7 +448,7 @@ AcpiNsDeleteChildren (
*
* FUNCTION: AcpiNsDeleteNamespaceSubtree
*
- * PARAMETERS: None.
+ * PARAMETERS: ParentNode - Root of the subtree to be deleted
*
* RETURN: None.
*
@@ -482,14 +482,12 @@ AcpiNsDeleteNamespaceSubtree (
* Traverse the tree of objects until we bubble back up
* to where we started.
*/
-
while (Level > 0)
{
/*
* Get the next typed object in this scope.
* Null returned if not found
*/
-
ChildNode = AcpiNsGetNextObject (ACPI_TYPE_ANY, ParentNode,
ChildNode);
if (ChildNode)
@@ -498,7 +496,6 @@ AcpiNsDeleteNamespaceSubtree (
* Found an object - delete the object within
* the Value field
*/
-
ObjDesc = AcpiNsGetAttachedObject (ChildNode);
if (ObjDesc)
{
@@ -515,7 +512,6 @@ AcpiNsDeleteNamespaceSubtree (
* There is at least one child of this object,
* visit the object
*/
-
Level++;
ParentNode = ChildNode;
ChildNode = 0;
@@ -556,7 +552,7 @@ AcpiNsDeleteNamespaceSubtree (
* FUNCTION: AcpiNsRemoveReference
*
* PARAMETERS: Node - Named object whose reference count is to be
- * decremented
+ * decremented
*
* RETURN: None.
*
@@ -573,6 +569,9 @@ AcpiNsRemoveReference (
ACPI_NAMESPACE_NODE *NextNode;
+ FUNCTION_ENTRY ();
+
+
/*
* Decrement the reference count(s) of this object and all
* objects up to the root, Delete anything with zero remaining references.
@@ -605,9 +604,9 @@ AcpiNsRemoveReference (
*
* FUNCTION: AcpiNsDeleteNamespaceByOwner
*
- * PARAMETERS: None.
+ * PARAMETERS: OwnerId - All nodes with this owner will be deleted
*
- * RETURN: None.
+ * RETURN: Status
*
* DESCRIPTION: Delete entries within the namespace that are owned by a
* specific ID. Used to delete entire ACPI tables. All
@@ -625,7 +624,7 @@ AcpiNsDeleteNamespaceByOwner (
ACPI_NAMESPACE_NODE *ParentNode;
- FUNCTION_TRACE ("NsDeleteNamespaceSubtree");
+ FUNCTION_TRACE ("NsDeleteNamespaceByOwner");
ParentNode = AcpiGbl_RootNode;
@@ -636,14 +635,12 @@ AcpiNsDeleteNamespaceByOwner (
* Traverse the tree of objects until we bubble back up
* to where we started.
*/
-
while (Level > 0)
{
/*
* Get the next typed object in this scope.
* Null returned if not found
*/
-
ChildNode = AcpiNsGetNextObject (ACPI_TYPE_ANY, ParentNode,
ChildNode);
@@ -655,7 +652,6 @@ AcpiNsDeleteNamespaceByOwner (
* Found an object - delete the object within
* the Value field
*/
-
ObjDesc = AcpiNsGetAttachedObject (ChildNode);
if (ObjDesc)
{
diff --git a/sys/contrib/dev/acpica/nsdump.c b/sys/contrib/dev/acpica/nsdump.c
index 85644af280a3..6e237f4952cb 100644
--- a/sys/contrib/dev/acpica/nsdump.c
+++ b/sys/contrib/dev/acpica/nsdump.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsdump - table dumping routines for debug
- * $Revision: 95 $
+ * $Revision: 99 $
*
*****************************************************************************/
@@ -156,6 +156,7 @@ AcpiNsDumpPathname (
FUNCTION_TRACE ("NsDumpPathname");
+
/* Do this only if the requested debug level and component are enabled */
if (!(AcpiDbgLevel & Level) || !(AcpiDbgLayer & Component))
@@ -215,7 +216,7 @@ AcpiNsDumpOneObject (
UINT32 WhichBit;
- PROC_NAME ("AcpiNsDumpOneObject");
+ PROC_NAME ("NsDumpOneObject");
ThisNode = AcpiNsConvertHandleToEntry (ObjHandle);
@@ -314,7 +315,6 @@ AcpiNsDumpOneObject (
/*
* Now we can print out the pertinent information
*/
-
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_TABLES, " %4.4s %-9s ", &ThisNode->Name, AcpiUtGetTypeName (Type)));
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_TABLES, "%p S:%p O:%p", ThisNode, ThisNode->Child, ThisNode->Object));
@@ -516,6 +516,9 @@ AcpiNsDumpObjects (
ACPI_WALK_INFO Info;
+ FUNCTION_ENTRY ();
+
+
Info.DebugLevel = ACPI_LV_TABLES;
Info.OwnerId = OwnerId;
@@ -549,7 +552,8 @@ AcpiNsDumpOneDevice (
ACPI_STATUS Status;
UINT32 i;
- PROC_NAME ("AcpiNsDumpOneDevice");
+
+ PROC_NAME ("NsDumpOneDevice");
Status = AcpiNsDumpOneObject (ObjHandle, Level, Context, ReturnValue);
@@ -585,12 +589,13 @@ AcpiNsDumpRootDevices (void)
{
ACPI_HANDLE SysBusHandle;
- PROC_NAME ("AcpiNsDumpRootDevices");
+
+ PROC_NAME ("NsDumpRootDevices");
/* Only dump the table if tracing is enabled */
- if (!(ACPI_DB_TABLES & AcpiDbgLevel))
+ if (!(ACPI_LV_TABLES & AcpiDbgLevel))
{
return;
}
@@ -671,14 +676,13 @@ AcpiNsDumpEntry (
ACPI_WALK_INFO Info;
- FUNCTION_TRACE_PTR ("NsDumpEntry", Handle);
+ FUNCTION_ENTRY ();
+
Info.DebugLevel = DebugLevel;
Info.OwnerId = ACPI_UINT32_MAX;
AcpiNsDumpOneObject (Handle, 1, &Info, NULL);
-
- return_VOID;
}
#endif
diff --git a/sys/contrib/dev/acpica/nseval.c b/sys/contrib/dev/acpica/nseval.c
index 709e6a480f80..72ef9dcea042 100644
--- a/sys/contrib/dev/acpica/nseval.c
+++ b/sys/contrib/dev/acpica/nseval.c
@@ -2,7 +2,7 @@
*
* Module Name: nseval - Object evaluation interfaces -- includes control
* method lookup and execution.
- * $Revision: 94 $
+ * $Revision: 97 $
*
******************************************************************************/
@@ -216,7 +216,6 @@ AcpiNsEvaluateRelative (
* Now that we have a handle to the object, we can attempt
* to evaluate it.
*/
-
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%s [%p] Value %p\n",
Pathname, Node, Node->Object));
@@ -295,8 +294,7 @@ AcpiNsEvaluateByName (
* Now that we have a handle to the object, we can attempt
* to evaluate it.
*/
-
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%s [%p] Value %p\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%s [%p] Value %p\n",
Pathname, Node, Node->Object));
Status = AcpiNsEvaluateByHandle (Node, Params, ReturnObject);
@@ -513,9 +511,17 @@ AcpiNsExecuteControlMethod (
AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
/*
- * Execute the method via the interpreter
+ * Execute the method via the interpreter. The interpreter is locked
+ * here before calling into the AML parser
*/
- Status = AcpiExExecuteMethod (MethodNode, Params, ReturnObjDesc);
+ Status = AcpiExEnterInterpreter ();
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ Status = AcpiPsxExecute (MethodNode, Params, ReturnObjDesc);
+ AcpiExExitInterpreter ();
return_ACPI_STATUS (Status);
}
@@ -551,7 +557,6 @@ AcpiNsGetObjectValue (
/*
* We take the value from certain objects directly
*/
-
if ((Node->Type == ACPI_TYPE_PROCESSOR) ||
(Node->Type == ACPI_TYPE_POWER))
{
@@ -568,7 +573,6 @@ AcpiNsGetObjectValue (
/*
* Get the attached object
*/
-
ValDesc = AcpiNsGetAttachedObject (Node);
if (!ValDesc)
{
@@ -582,7 +586,6 @@ AcpiNsGetObjectValue (
* TBD: [Future] - need a low-level object copy that handles
* the reference count automatically. (Don't want to copy it)
*/
-
MEMCPY (ObjDesc, ValDesc, sizeof (ACPI_OPERAND_OBJECT));
ObjDesc->Common.ReferenceCount = 1;
AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
@@ -625,7 +628,6 @@ AcpiNsGetObjectValue (
* We must release the namespace lock before entering the
* intepreter.
*/
-
AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
Status = AcpiExEnterInterpreter ();
if (ACPI_SUCCESS (Status))
@@ -640,7 +642,6 @@ AcpiNsGetObjectValue (
* If AcpiExResolveToValue() succeeded, the return value was
* placed in ObjDesc.
*/
-
if (ACPI_SUCCESS (Status))
{
Status = AE_CTRL_RETURN_VALUE;
diff --git a/sys/contrib/dev/acpica/nsinit.c b/sys/contrib/dev/acpica/nsinit.c
index 7ae355022ad8..919992a2d8bc 100644
--- a/sys/contrib/dev/acpica/nsinit.c
+++ b/sys/contrib/dev/acpica/nsinit.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsinit - namespace initialization
- * $Revision: 29 $
+ * $Revision: 31 $
*
*****************************************************************************/
@@ -270,7 +270,7 @@ AcpiNsInitOneObject (
ACPI_OPERAND_OBJECT *ObjDesc;
- PROC_NAME ("AcpiNsInitOneObject");
+ PROC_NAME ("NsInitOneObject");
Info->ObjectCount++;
@@ -396,7 +396,7 @@ AcpiNsInitOneDevice (
ACPI_DEVICE_WALK_INFO *Info = (ACPI_DEVICE_WALK_INFO *) Context;
- FUNCTION_TRACE ("AcpiNsInitOneDevice");
+ FUNCTION_TRACE ("NsInitOneDevice");
if (!(AcpiDbgLevel & ACPI_LV_INIT))
@@ -420,7 +420,6 @@ AcpiNsInitOneDevice (
/*
* Run _STA to determine if we can run _INI on the device.
*/
-
DEBUG_EXEC (AcpiUtDisplayInitPathname (Node, "_STA [Method]"));
Status = AcpiUtExecute_STA (Node, &Flags);
if (ACPI_FAILURE (Status))
diff --git a/sys/contrib/dev/acpica/nsload.c b/sys/contrib/dev/acpica/nsload.c
index 73f8a6c74d62..88f0fb6f6b0d 100644
--- a/sys/contrib/dev/acpica/nsload.c
+++ b/sys/contrib/dev/acpica/nsload.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsload - namespace loading/expanding/contracting procedures
- * $Revision: 42 $
+ * $Revision: 43 $
*
*****************************************************************************/
@@ -165,7 +165,6 @@ AcpiNsLoadNamespace (
* Load the namespace. The DSDT is required,
* but the SSDT and PSDT tables are optional.
*/
-
Status = AcpiNsLoadTableByType (ACPI_TABLE_DSDT);
if (ACPI_FAILURE (Status))
{
@@ -294,7 +293,6 @@ AcpiNsParseTable (
* to service the entire parse. The second pass of the parse then
* performs another complete parse of the AML..
*/
-
Status = AcpiNsOneCompleteParse (1, TableDesc);
if (ACPI_FAILURE (Status))
{
@@ -311,7 +309,6 @@ AcpiNsParseTable (
* overhead of this is compensated for by the fact that the
* parse objects are all cached.
*/
-
Status = AcpiNsOneCompleteParse (2, TableDesc);
if (ACPI_FAILURE (Status))
{
@@ -371,7 +368,6 @@ AcpiNsLoadTable (
* to another control method, we can't continue parsing
* because we don't know how many arguments to parse next!
*/
-
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "**** Loading table into namespace ****\n"));
AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
@@ -389,7 +385,6 @@ AcpiNsLoadTable (
* just-in-time parsing, we delete the control method
* parse trees.
*/
-
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"**** Begin Table Method Parsing and Object Initialization ****\n"));
@@ -435,7 +430,6 @@ AcpiNsLoadTableByType (
* Table types supported are:
* DSDT (one), SSDT/PSDT (multiple)
*/
-
switch (TableType)
{
@@ -473,7 +467,6 @@ AcpiNsLoadTableByType (
/*
* Traverse list of SSDT tables
*/
-
TableDesc = &AcpiGbl_AcpiTables[ACPI_TABLE_SSDT];
for (i = 0; i < AcpiGbl_AcpiTables[ACPI_TABLE_SSDT].Count; i++)
{
@@ -481,7 +474,6 @@ AcpiNsLoadTableByType (
* Only attempt to load table if it is not
* already loaded!
*/
-
if (!TableDesc->LoadedIntoNamespace)
{
Status = AcpiNsLoadTable (TableDesc, AcpiGbl_RootNode);
@@ -506,7 +498,6 @@ AcpiNsLoadTableByType (
/*
* Traverse list of PSDT tables
*/
-
TableDesc = &AcpiGbl_AcpiTables[ACPI_TABLE_PSDT];
for (i = 0; i < AcpiGbl_AcpiTables[ACPI_TABLE_PSDT].Count; i++)
@@ -584,7 +575,6 @@ AcpiNsDeleteSubtree (
* Traverse the tree of objects until we bubble back up
* to where we started.
*/
-
while (Level > 0)
{
/* Attempt to get the next object in this scope */
@@ -608,7 +598,6 @@ AcpiNsDeleteSubtree (
* There is at least one child of this object,
* visit the object
*/
-
Level++;
ParentHandle = ChildHandle;
ChildHandle = 0;
diff --git a/sys/contrib/dev/acpica/nsnames.c b/sys/contrib/dev/acpica/nsnames.c
index f2ca79348a95..aeced558cc95 100644
--- a/sys/contrib/dev/acpica/nsnames.c
+++ b/sys/contrib/dev/acpica/nsnames.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nsnames - Name manipulation and search
- * $Revision: 61 $
+ * $Revision: 63 $
*
******************************************************************************/
@@ -151,7 +151,7 @@ AcpiNsGetTablePathname (
ACPI_NAMESPACE_NODE *ParentNode;
- FUNCTION_TRACE_PTR ("AcpiNsGetTablePathname", Node);
+ FUNCTION_TRACE_PTR ("NsGetTablePathname", Node);
if (!AcpiGbl_RootNode || !Node)
@@ -235,6 +235,10 @@ AcpiNsGetPathnameLength (
UINT32 Size;
ACPI_NAMESPACE_NODE *NextNode;
+
+ FUNCTION_ENTRY ();
+
+
/*
* Compute length of pathname as 5 * number of name segments.
* Go back up the parent tree to the root
@@ -287,6 +291,7 @@ AcpiNsHandleToPathname (
ACPI_NAME Name;
UINT32 Size;
+
FUNCTION_TRACE_PTR ("NsHandleToPathname", TargetHandle);
@@ -296,7 +301,6 @@ AcpiNsHandleToPathname (
* If the name space has not been initialized,
* this function should not have been called.
*/
-
return_ACPI_STATUS (AE_NO_NAMESPACE);
}
@@ -351,7 +355,6 @@ AcpiNsHandleToPathname (
* Overlay the "." preceding the first segment with
* the root name "\"
*/
-
UserBuffer[Size] = '\\';
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Len=%X, %s \n", PathLength, UserBuffer));
diff --git a/sys/contrib/dev/acpica/nsobject.c b/sys/contrib/dev/acpica/nsobject.c
index 567c8f0ddfd9..ca27e8b6e48d 100644
--- a/sys/contrib/dev/acpica/nsobject.c
+++ b/sys/contrib/dev/acpica/nsobject.c
@@ -2,7 +2,7 @@
*
* Module Name: nsobject - Utilities for objects attached to namespace
* table entries
- * $Revision: 60 $
+ * $Revision: 63 $
*
******************************************************************************/
@@ -254,7 +254,6 @@ AcpiNsAttachObject (
{
ObjDesc = (ACPI_OPERAND_OBJECT *) Object;
-
/* If a valid type (non-ANY) was given, just use it */
if (ACPI_TYPE_ANY != Type)
@@ -262,13 +261,9 @@ AcpiNsAttachObject (
ObjType = Type;
}
-
/*
* Type is TYPE_Any, we must try to determinte the
- * actual type of the object
- */
-
- /*
+ * actual type of the object.
* Check if value points into the AML code
*/
else if (AcpiTbSystemTablePointer (Object))
@@ -303,11 +298,11 @@ AcpiNsAttachObject (
/* Otherwise, fall through and set the type to Integer */
- case AML_ZERO_OP:
- case AML_ONES_OP:
+ case AML_ZERO_OP:
+ case AML_ONES_OP:
case AML_ONE_OP:
- case AML_BYTE_OP:
- case AML_WORD_OP:
+ case AML_BYTE_OP:
+ case AML_WORD_OP:
case AML_DWORD_OP:
case AML_QWORD_OP:
@@ -356,7 +351,7 @@ AcpiNsAttachObject (
* Cannot figure out the type -- set to DefAny which
* will print as an error in the name table dump
*/
- if (GetDebugLevel () > 0)
+ if (AcpiDbgLevel > 0)
{
DUMP_PATHNAME (Node,
"NsAttachObject confused: setting bogus type for ",
@@ -447,6 +442,7 @@ AcpiNsDetachObject (
FUNCTION_TRACE ("NsDetachObject");
+
ObjDesc = Node->Object;
if (!ObjDesc)
{
diff --git a/sys/contrib/dev/acpica/nssearch.c b/sys/contrib/dev/acpica/nssearch.c
index 4b4f1902eea2..a0e0ed73a757 100644
--- a/sys/contrib/dev/acpica/nssearch.c
+++ b/sys/contrib/dev/acpica/nssearch.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nssearch - Namespace search
- * $Revision: 72 $
+ * $Revision: 74 $
*
******************************************************************************/
@@ -186,7 +186,6 @@ AcpiNsSearchNode (
* Search for name in this table, which is to say that we must search
* for the name among the children of this object
*/
-
NextNode = Node->Child;
while (NextNode)
{
@@ -201,7 +200,6 @@ AcpiNsSearchNode (
* The DefFieldDefn and BankFieldDefn cases are actually looking up
* the Region in which the field will be defined
*/
-
if ((INTERNAL_TYPE_FIELD_DEFN == Type) ||
(INTERNAL_TYPE_BANK_FIELD_DEFN == Type))
{
@@ -214,7 +212,6 @@ AcpiNsSearchNode (
* looked up. For any other value of Type, if the type stored in
* the entry is Any (i.e. unknown), save the actual type.
*/
-
if (Type != INTERNAL_TYPE_SCOPE &&
Type != INTERNAL_TYPE_DEF_ANY &&
Type != INTERNAL_TYPE_INDEX_FIELD_DEFN &&
@@ -223,7 +220,7 @@ AcpiNsSearchNode (
NextNode->Type = (UINT8) Type;
}
- ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
+ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
"Name %4.4s (actual type %X) found at %p\n",
&TargetName, NextNode->Type, NextNode));
@@ -314,7 +311,7 @@ AcpiNsSearchParentTree (
if (AcpiNsLocal (Type))
{
- ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "[%4.4s] type %X is local(no search)\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "[%4.4s] type %X is local(no search)\n",
&TargetName, Type));
}
@@ -347,7 +344,6 @@ AcpiNsSearchParentTree (
* Not found here, go up another level
* (until we reach the root)
*/
-
ParentNode = AcpiNsGetParentObject (ParentNode);
}
@@ -457,7 +453,6 @@ AcpiNsSearchAndEnter (
* the search when namespace references are being resolved
* (load pass 2) and during the execution phase.
*/
-
if ((InterpreterMode != IMODE_LOAD_PASS1) &&
(Flags & NS_SEARCH_PARENT))
{
@@ -465,7 +460,6 @@ AcpiNsSearchAndEnter (
* Not found in table - search parent tree according
* to ACPI specification
*/
-
Status = AcpiNsSearchParentTree (TargetName, Node,
Type, ReturnNode);
if (ACPI_SUCCESS (Status))
diff --git a/sys/contrib/dev/acpica/nsutils.c b/sys/contrib/dev/acpica/nsutils.c
index c468b8fb7bfc..c917ebedfc0b 100644
--- a/sys/contrib/dev/acpica/nsutils.c
+++ b/sys/contrib/dev/acpica/nsutils.c
@@ -2,7 +2,7 @@
*
* Module Name: nsutils - Utilities for accessing ACPI namespace, accessing
* parents and siblings and Scope manipulation
- * $Revision: 86 $
+ * $Revision: 89 $
*
*****************************************************************************/
@@ -230,12 +230,12 @@ AcpiNsLocal (
*
* FUNCTION: AcpiNsGetInternalNameLength
*
- * PARAMETERS: Info - Info struct initialized with the
+ * PARAMETERS: Info - Info struct initialized with the
* external name pointer.
*
* RETURN: Status
*
- * DESCRIPTION: Calculate the length of the internal (AML) namestring
+ * DESCRIPTION: Calculate the length of the internal (AML) namestring
* corresponding to the external (ASL) namestring.
*
******************************************************************************/
@@ -248,11 +248,14 @@ AcpiNsGetInternalNameLength (
UINT32 i;
+ FUNCTION_ENTRY ();
+
+
NextExternalChar = Info->ExternalName;
Info->NumCarats = 0;
Info->NumSegments = 0;
Info->FullyQualified = FALSE;
-
+
/*
* For the internal name, the required length is 4 bytes
* per segment, plus 1 each for RootPrefix, MultiNamePrefixOp,
@@ -273,7 +276,6 @@ AcpiNsGetInternalNameLength (
/*
* Handle Carat prefixes
*/
-
while (*NextExternalChar == '^')
{
Info->NumCarats++;
@@ -299,7 +301,7 @@ AcpiNsGetInternalNameLength (
}
}
- Info->Length = (ACPI_NAME_SIZE * Info->NumSegments) +
+ Info->Length = (ACPI_NAME_SIZE * Info->NumSegments) +
4 + Info->NumCarats;
Info->NextExternalChar = NextExternalChar;
@@ -316,7 +318,7 @@ AcpiNsGetInternalNameLength (
*
* RETURN: Status
*
- * DESCRIPTION: Construct the internal (AML) namestring
+ * DESCRIPTION: Construct the internal (AML) namestring
* corresponding to the external (ASL) namestring.
*
******************************************************************************/
@@ -332,9 +334,9 @@ AcpiNsBuildInternalName (
UINT32 i;
- FUNCTION_TRACE ("AcpiNsBuildInternalName");
+ FUNCTION_TRACE ("NsBuildInternalName");
+
-
/* Setup the correct prefixes, counts, and pointers */
if (Info->FullyQualified)
@@ -695,6 +697,9 @@ AcpiNsConvertHandleToEntry (
ACPI_HANDLE Handle)
{
+ FUNCTION_ENTRY ();
+
+
/*
* Simple implementation for now;
* TBD: [Future] Real integer handles allow for more verification
@@ -957,7 +962,7 @@ AcpiNsFindParentName (
ACPI_NAMESPACE_NODE *ParentNode;
- FUNCTION_TRACE ("FindParentName");
+ FUNCTION_TRACE ("NsFindParentName");
if (ChildNode)
@@ -1042,6 +1047,9 @@ AcpiNsGetParentObject (
{
+ FUNCTION_ENTRY ();
+
+
if (!Node)
{
return (NULL);
diff --git a/sys/contrib/dev/acpica/nswalk.c b/sys/contrib/dev/acpica/nswalk.c
index 71569bbdffeb..1cd54ce3d45d 100644
--- a/sys/contrib/dev/acpica/nswalk.c
+++ b/sys/contrib/dev/acpica/nswalk.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nswalk - Functions for walking the ACPI namespace
- * $Revision: 23 $
+ * $Revision: 24 $
*
*****************************************************************************/
@@ -154,9 +154,11 @@ AcpiNsGetNextObject (
ACPI_NAMESPACE_NODE *NextNode = NULL;
+ FUNCTION_ENTRY ();
+
+
if (!ChildNode)
{
-
/* It's really the parent's _scope_ that we want */
if (ParentNode->Child)
@@ -255,6 +257,7 @@ AcpiNsWalkNamespace (
FUNCTION_TRACE ("NsWalkNamespace");
+
/* Special case for the namespace Root Node */
if (StartNode == ACPI_ROOT_OBJECT)
@@ -275,14 +278,12 @@ AcpiNsWalkNamespace (
* started. When Level is zero, the loop is done because we have
* bubbled up to (and passed) the original parent handle (StartEntry)
*/
-
while (Level > 0)
{
/*
* Get the next typed object in this scope. Null returned
* if not found
*/
-
Status = AE_OK;
ChildNode = AcpiNsGetNextObject (ACPI_TYPE_ANY,
ParentNode,
@@ -294,7 +295,6 @@ AcpiNsWalkNamespace (
* Found an object, Get the type if we are not
* searching for ANY
*/
-
if (Type != ACPI_TYPE_ANY)
{
ChildType = ChildNode->Type;
@@ -306,7 +306,6 @@ AcpiNsWalkNamespace (
* Found a matching object, invoke the user
* callback function
*/
-
if (UnlockBeforeCallback)
{
AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
@@ -324,16 +323,21 @@ AcpiNsWalkNamespace (
{
case AE_OK:
case AE_CTRL_DEPTH:
+
/* Just keep going */
break;
case AE_CTRL_TERMINATE:
+
/* Exit now, with OK status */
+
return_ACPI_STATUS (AE_OK);
break;
default:
+
/* All others are valid exceptions */
+
return_ACPI_STATUS (Status);
break;
}
@@ -347,7 +351,6 @@ AcpiNsWalkNamespace (
* or if the user function has specified that the
* maximum depth has been reached.
*/
-
if ((Level < MaxDepth) && (Status != AE_CTRL_DEPTH))
{
if (AcpiNsGetNextObject (ACPI_TYPE_ANY,
@@ -378,6 +381,7 @@ AcpiNsWalkNamespace (
}
/* Complete walk, not terminated by user function */
+
return_ACPI_STATUS (AE_OK);
}
diff --git a/sys/contrib/dev/acpica/nsxfname.c b/sys/contrib/dev/acpica/nsxfname.c
index 6b46010b2567..2a80ca2b98cf 100644
--- a/sys/contrib/dev/acpica/nsxfname.c
+++ b/sys/contrib/dev/acpica/nsxfname.c
@@ -2,7 +2,7 @@
*
* Module Name: nsxfname - Public interfaces to the ACPI subsystem
* ACPI Namespace oriented interfaces
- * $Revision: 79 $
+ * $Revision: 80 $
*
*****************************************************************************/
@@ -159,6 +159,9 @@ AcpiGetHandle (
ACPI_NAMESPACE_NODE *PrefixNode = NULL;
+ FUNCTION_ENTRY ();
+
+
/* Ensure that ACPI has been initialized */
ACPI_IS_INITIALIZATION_COMPLETE (Status);
@@ -215,7 +218,7 @@ AcpiGetHandle (
/****************************************************************************
*
- * FUNCTION: AcpiGetPathname
+ * FUNCTION: AcpiGetName
*
* PARAMETERS: Handle - Handle to be converted to a pathname
* NameType - Full pathname or single segment
@@ -275,7 +278,6 @@ AcpiGetName (
* Wants the single segment ACPI name.
* Validate handle and convert to an Node
*/
-
AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
Node = AcpiNsConvertHandleToEntry (Handle);
if (!Node)
@@ -381,7 +383,6 @@ AcpiGetObjectInfo (
* not be present. The Info->Valid bits are used
* to indicate which methods ran successfully.
*/
-
Info->Valid = 0;
/* Execute the _HID method and save the result */
@@ -408,7 +409,6 @@ AcpiGetObjectInfo (
* Execute the _STA method and save the result
* _STA is not always present
*/
-
Status = AcpiUtExecute_STA (Node, &DeviceStatus);
if (ACPI_SUCCESS (Status))
{
@@ -420,7 +420,6 @@ AcpiGetObjectInfo (
* Execute the _ADR method and save result if successful
* _ADR is not always present
*/
-
Status = AcpiUtEvaluateNumericObject (METHOD_NAME__ADR,
Node, &Address);
diff --git a/sys/contrib/dev/acpica/nsxfobj.c b/sys/contrib/dev/acpica/nsxfobj.c
index c0bbeae2396a..8885ed2e3cef 100644
--- a/sys/contrib/dev/acpica/nsxfobj.c
+++ b/sys/contrib/dev/acpica/nsxfobj.c
@@ -2,7 +2,7 @@
*
* Module Name: nsxfobj - Public interfaces to the ACPI subsystem
* ACPI Object oriented interfaces
- * $Revision: 88 $
+ * $Revision: 89 $
*
******************************************************************************/
@@ -185,14 +185,12 @@ AcpiEvaluateObject (
* (which must be a control method), the external objects
* must be converted to internal objects
*/
-
if (ParamObjects && ParamObjects->Count)
{
/*
* Allocate a new parameter block for the internal objects
* Add 1 to count to allow for null terminated internal list
*/
-
Count = ParamObjects->Count;
ParamLength = (Count + 1) * sizeof (void *);
ObjectLength = Count * sizeof (ACPI_OPERAND_OBJECT);
@@ -211,7 +209,6 @@ AcpiEvaluateObject (
* Init the param array of pointers and NULL terminate
* the list
*/
-
for (i = 0; i < Count; i++)
{
ParamPtr[i] = &ObjectPtr[i];
@@ -243,7 +240,6 @@ AcpiEvaluateObject (
* 2) No handle, not fully qualified pathname (error)
* 3) Valid handle
*/
-
if ((Pathname) &&
(AcpiNsValidRootPrefix (Pathname[0])))
{
@@ -260,7 +256,6 @@ AcpiEvaluateObject (
* is specified. Since we've already handled fully
* qualified names above, this is an error
*/
-
if (!Pathname)
{
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Both Handle and Pathname are NULL\n"));
@@ -281,7 +276,6 @@ AcpiEvaluateObject (
* pathname it is relative. The handle will be validated
* in the lower procedures
*/
-
if (!Pathname)
{
/*
@@ -345,7 +339,6 @@ AcpiEvaluateObject (
* Check if there is enough room in the
* caller's buffer
*/
-
if (UserBufferLength < BufferSpaceNeeded)
{
/*
@@ -353,7 +346,6 @@ AcpiEvaluateObject (
* give him partial results fail the call
* but return the buffer size needed
*/
-
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"Needed buffer size %X, received %X\n",
BufferSpaceNeeded, UserBufferLength));
@@ -391,7 +383,6 @@ AcpiEvaluateObject (
/*
* Free the input parameter list (if we created one),
*/
-
if (ParamPtr)
{
/* Free the allocated parameter block */
@@ -713,7 +704,6 @@ AcpiWalkNamespace (
* to the user function - since this function
* must be allowed to make Acpi calls itself.
*/
-
AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
Status = AcpiNsWalkNamespace ((ACPI_OBJECT_TYPE8) Type,
StartObject, MaxDepth,
@@ -876,7 +866,6 @@ AcpiGetDevices (
* to the user function - since this function
* must be allowed to make Acpi calls itself.
*/
-
AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
Status = AcpiNsWalkNamespace (ACPI_TYPE_DEVICE,
ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
diff --git a/sys/contrib/dev/acpica/psargs.c b/sys/contrib/dev/acpica/psargs.c
index 61482e59c970..03d207e7ac22 100644
--- a/sys/contrib/dev/acpica/psargs.c
+++ b/sys/contrib/dev/acpica/psargs.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psargs - Parse AML opcode arguments
- * $Revision: 50 $
+ * $Revision: 51 $
*
*****************************************************************************/
@@ -362,7 +362,6 @@ AcpiPsGetNextNamepath (
/*
* Lookup the name in the parsed namespace
*/
-
Op = NULL;
if (MethodCall)
{
@@ -380,7 +379,6 @@ AcpiPsGetNextNamepath (
* associated with this method, and 2) Change the NAMEPATH
* object into a METHODCALL object.
*/
-
Count = AcpiPsGetArg (Op, 0);
if (Count && Count->Opcode == AML_BYTE_OP)
{
@@ -414,13 +412,11 @@ AcpiPsGetNextNamepath (
}
}
-
/*
* Either we didn't find the object in the namespace, or the object is
* something other than a control method. Just initialize the Op with the
* pathname
*/
-
AcpiPsInitOp (Arg, AML_INT_NAMEPATH_OP);
Arg->Value.Name = Path;
@@ -479,7 +475,6 @@ AcpiPsGetNextNamepath (
* parent tree, but don't open a new scope -- we just want to lookup the
* object (MUST BE mode EXECUTE to perform upsearch)
*/
-
Status = AcpiNsLookup (&ScopeInfo, Path, ACPI_TYPE_ANY, IMODE_EXECUTE,
NS_SEARCH_PARENT | NS_DONT_OPEN_SCOPE, NULL,
&Node);
@@ -529,7 +524,6 @@ AcpiPsGetNextNamepath (
* something other than a control method. Just initialize the Op with the
* pathname.
*/
-
AcpiPsInitOp (Arg, AML_INT_NAMEPATH_OP);
Arg->Value.Name = Path;
@@ -560,7 +554,6 @@ AcpiPsGetNextSimpleArg (
ACPI_PARSE_OBJECT *Arg)
{
-
FUNCTION_TRACE_U32 ("PsGetNextSimpleArg", ArgType);
diff --git a/sys/contrib/dev/acpica/psfind.c b/sys/contrib/dev/acpica/psfind.c
index c81e324c9843..ce4baef713f6 100644
--- a/sys/contrib/dev/acpica/psfind.c
+++ b/sys/contrib/dev/acpica/psfind.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: psfind - Parse tree search routine
- * $Revision: 25 $
+ * $Revision: 28 $
*
*****************************************************************************/
@@ -191,23 +191,27 @@ AcpiPsFindName (
{
ACPI_PARSE_OBJECT *Op;
ACPI_PARSE_OBJECT *Field;
+ const ACPI_OPCODE_INFO *OpInfo;
/* search scope level for matching name segment */
Op = AcpiPsGetChild (Scope);
+ OpInfo = AcpiPsGetOpcodeInfo (Op->Opcode);
while (Op)
{
- if (AcpiPsIsFieldOp (Op->Opcode))
+ if (OpInfo->Flags & AML_FIELD)
{
/* Field, search named fields */
Field = AcpiPsGetChild (Op);
while (Field)
{
- if (AcpiPsIsNamedOp (Field->Opcode) &&
+ OpInfo = AcpiPsGetOpcodeInfo (Field->Opcode);
+
+ if ((OpInfo->Flags & AML_NAMED) &&
AcpiPsGetName (Field) == Name &&
(!Opcode || Field->Opcode == Opcode))
{
@@ -218,7 +222,7 @@ AcpiPsFindName (
}
}
- else if (AcpiPsIsCreateFieldOp (Op->Opcode))
+ else if (OpInfo->Flags & AML_CREATE)
{
if (Op->Opcode == AML_CREATE_FIELD_OP)
{
@@ -240,7 +244,7 @@ AcpiPsFindName (
}
}
- else if ((AcpiPsIsNamedOp (Op->Opcode)) &&
+ else if ((OpInfo->Flags & AML_NAMED) &&
(AcpiPsGetName (Op) == Name) &&
(!Opcode || Op->Opcode == Opcode || Opcode == AML_SCOPE_OP))
{
@@ -288,7 +292,7 @@ AcpiPsFind (
if (!Scope || !Path)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Null path (%p) or scope (%p)!\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Null path (%p) or scope (%p)!\n",
Path, Scope));
return_PTR (NULL);
}
diff --git a/sys/contrib/dev/acpica/psopcode.c b/sys/contrib/dev/acpica/psopcode.c
index e17d4ccc3df4..adc455d98a4e 100644
--- a/sys/contrib/dev/acpica/psopcode.c
+++ b/sys/contrib/dev/acpica/psopcode.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psopcode - Parser opcode information table
- * $Revision: 35 $
+ * $Revision: 40 $
*
*****************************************************************************/
@@ -154,14 +154,6 @@
/*
- * Flags byte: 0-4 (5 bits) = Opcode Type
- * 5 (1 bit) = Has arguments flag
- * 6-7 (2 bits) = Reserved
- */
-#define AML_NO_ARGS 0
-#define AML_HAS_ARGS ACPI_OP_ARGS_MASK
-
-/*
* All AML opcodes and the parse-time arguments for each. Used by the AML parser Each list is compressed
* into a 32-bit number and stored in the master opcode table at the end of this file.
*/
@@ -420,149 +412,269 @@
/*
+ * Summary of opcode types/flags
+ */
+
+/******************************************************************************
+
+ Opcodes that have associated namespace objects
+
+ AML_SCOPE_OP
+ AML_DEVICE_OP
+ AML_THERMAL_ZONE_OP
+ AML_METHOD_OP
+ AML_POWER_RES_OP
+ AML_PROCESSOR_OP
+ AML_FIELD_OP
+ AML_INDEX_FIELD_OP
+ AML_BANK_FIELD_OP
+ AML_NAME_OP
+ AML_ALIAS_OP
+ AML_MUTEX_OP
+ AML_EVENT_OP
+ AML_REGION_OP
+ AML_CREATE_FIELD_OP
+ AML_CREATE_BIT_FIELD_OP
+ AML_CREATE_BYTE_FIELD_OP
+ AML_CREATE_WORD_FIELD_OP
+ AML_CREATE_DWORD_FIELD_OP
+ AML_CREATE_QWORD_FIELD_OP
+ AML_INT_NAMEDFIELD_OP
+ AML_INT_METHODCALL_OP
+ AML_INT_NAMEPATH_OP
+
+ Opcodes that are "namespace" opcodes
+
+ AML_SCOPE_OP
+ AML_DEVICE_OP
+ AML_THERMAL_ZONE_OP
+ AML_METHOD_OP
+ AML_POWER_RES_OP
+ AML_PROCESSOR_OP
+ AML_FIELD_OP
+ AML_INDEX_FIELD_OP
+ AML_BANK_FIELD_OP
+ AML_NAME_OP
+ AML_ALIAS_OP
+ AML_MUTEX_OP
+ AML_EVENT_OP
+ AML_REGION_OP
+ AML_INT_NAMEDFIELD_OP
+
+ Opcodes that have an associated namespace node
+
+ AML_SCOPE_OP
+ AML_DEVICE_OP
+ AML_THERMAL_ZONE_OP
+ AML_METHOD_OP
+ AML_POWER_RES_OP
+ AML_PROCESSOR_OP
+ AML_NAME_OP
+ AML_ALIAS_OP
+ AML_MUTEX_OP
+ AML_EVENT_OP
+ AML_REGION_OP
+ AML_CREATE_FIELD_OP
+ AML_CREATE_BIT_FIELD_OP
+ AML_CREATE_BYTE_FIELD_OP
+ AML_CREATE_WORD_FIELD_OP
+ AML_CREATE_DWORD_FIELD_OP
+ AML_CREATE_QWORD_FIELD_OP
+ AML_INT_NAMEDFIELD_OP
+ AML_INT_METHODCALL_OP
+ AML_INT_NAMEPATH_OP
+
+ Opcodes that define named ACPI objects
+
+ AML_SCOPE_OP
+ AML_DEVICE_OP
+ AML_THERMAL_ZONE_OP
+ AML_METHOD_OP
+ AML_POWER_RES_OP
+ AML_PROCESSOR_OP
+ AML_NAME_OP
+ AML_ALIAS_OP
+ AML_MUTEX_OP
+ AML_EVENT_OP
+ AML_REGION_OP
+ AML_INT_NAMEDFIELD_OP
+
+ Opcodes that contain executable AML as part of the definition that
+ must be deferred until needed
+
+ AML_METHOD_OP
+ AML_VAR_PACKAGE_OP
+ AML_CREATE_FIELD_OP
+ AML_CREATE_BIT_FIELD_OP
+ AML_CREATE_BYTE_FIELD_OP
+ AML_CREATE_WORD_FIELD_OP
+ AML_CREATE_DWORD_FIELD_OP
+ AML_CREATE_QWORD_FIELD_OP
+ AML_REGION_OP
+
+ Field opcodes
+
+ AML_CREATE_FIELD_OP
+ AML_FIELD_OP
+ AML_INDEX_FIELD_OP
+ AML_BANK_FIELD_OP
+
+ Field "Create" opcodes
+
+ AML_CREATE_FIELD_OP
+ AML_CREATE_BIT_FIELD_OP
+ AML_CREATE_BYTE_FIELD_OP
+ AML_CREATE_WORD_FIELD_OP
+ AML_CREATE_DWORD_FIELD_OP
+ AML_CREATE_QWORD_FIELD_OP
+
+******************************************************************************/
+
+
+/*
* Master Opcode information table. A summary of everything we know about each opcode, all in one place.
*/
-static ACPI_OPCODE_INFO AmlOpInfo[] =
+static const ACPI_OPCODE_INFO AmlOpInfo[] =
{
-/* Index Opcode Type Class Has Arguments? Name Parser Args Interpreter Args */
-
-/* 00 */ /* AML_ZERO_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "Zero", ARGP_ZERO_OP, ARGI_ZERO_OP),
-/* 01 */ /* AML_ONE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "One", ARGP_ONE_OP, ARGI_ONE_OP),
-/* 02 */ /* AML_ALIAS_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Alias", ARGP_ALIAS_OP, ARGI_ALIAS_OP),
-/* 03 */ /* AML_NAME_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Name", ARGP_NAME_OP, ARGI_NAME_OP),
-/* 04 */ /* AML_BYTE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "ByteConst", ARGP_BYTE_OP, ARGI_BYTE_OP),
-/* 05 */ /* AML_WORD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "WordConst", ARGP_WORD_OP, ARGI_WORD_OP),
-/* 06 */ /* AML_DWORD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "DwordConst", ARGP_DWORD_OP, ARGI_DWORD_OP),
-/* 07 */ /* AML_STRING_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "String", ARGP_STRING_OP, ARGI_STRING_OP),
-/* 08 */ /* AML_SCOPE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Scope", ARGP_SCOPE_OP, ARGI_SCOPE_OP),
-/* 09 */ /* AML_BUFFER_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DATA_TERM| AML_HAS_ARGS, "Buffer", ARGP_BUFFER_OP, ARGI_BUFFER_OP),
-/* 0A */ /* AML_PACKAGE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DATA_TERM| AML_HAS_ARGS, "Package", ARGP_PACKAGE_OP, ARGI_PACKAGE_OP),
-/* 0B */ /* AML_METHOD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Method", ARGP_METHOD_OP, ARGI_METHOD_OP),
-/* 0C */ /* AML_LOCAL0 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local0", ARGP_LOCAL0, ARGI_LOCAL0),
-/* 0D */ /* AML_LOCAL1 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local1", ARGP_LOCAL1, ARGI_LOCAL1),
-/* 0E */ /* AML_LOCAL2 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local2", ARGP_LOCAL2, ARGI_LOCAL2),
-/* 0F */ /* AML_LOCAL3 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local3", ARGP_LOCAL3, ARGI_LOCAL3),
-/* 10 */ /* AML_LOCAL4 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local4", ARGP_LOCAL4, ARGI_LOCAL4),
-/* 11 */ /* AML_LOCAL5 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local5", ARGP_LOCAL5, ARGI_LOCAL5),
-/* 12 */ /* AML_LOCAL6 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local6", ARGP_LOCAL6, ARGI_LOCAL6),
-/* 13 */ /* AML_LOCAL7 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS, "Local7", ARGP_LOCAL7, ARGI_LOCAL7),
-/* 14 */ /* AML_ARG0 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg0", ARGP_ARG0, ARGI_ARG0),
-/* 15 */ /* AML_ARG1 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg1", ARGP_ARG1, ARGI_ARG1),
-/* 16 */ /* AML_ARG2 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg2", ARGP_ARG2, ARGI_ARG2),
-/* 17 */ /* AML_ARG3 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg3", ARGP_ARG3, ARGI_ARG3),
-/* 18 */ /* AML_ARG4 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg4", ARGP_ARG4, ARGI_ARG4),
-/* 19 */ /* AML_ARG5 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg5", ARGP_ARG5, ARGI_ARG5),
-/* 1A */ /* AML_ARG6 */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS, "Arg6", ARGP_ARG6, ARGI_ARG6),
-/* 1B */ /* AML_STORE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "Store", ARGP_STORE_OP, ARGI_STORE_OP),
-/* 1C */ /* AML_REF_OF_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "RefOf", ARGP_REF_OF_OP, ARGI_REF_OF_OP),
-/* 1D */ /* AML_ADD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Add", ARGP_ADD_OP, ARGI_ADD_OP),
-/* 1E */ /* AML_CONCAT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Concatenate", ARGP_CONCAT_OP, ARGI_CONCAT_OP),
-/* 1F */ /* AML_SUBTRACT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Subtract", ARGP_SUBTRACT_OP, ARGI_SUBTRACT_OP),
-/* 20 */ /* AML_INCREMENT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "Increment", ARGP_INCREMENT_OP, ARGI_INCREMENT_OP),
-/* 21 */ /* AML_DECREMENT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "Decrement", ARGP_DECREMENT_OP, ARGI_DECREMENT_OP),
-/* 22 */ /* AML_MULTIPLY_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Multiply", ARGP_MULTIPLY_OP, ARGI_MULTIPLY_OP),
-/* 23 */ /* AML_DIVIDE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Divide", ARGP_DIVIDE_OP, ARGI_DIVIDE_OP),
-/* 24 */ /* AML_SHIFT_LEFT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "ShiftLeft", ARGP_SHIFT_LEFT_OP, ARGI_SHIFT_LEFT_OP),
-/* 25 */ /* AML_SHIFT_RIGHT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "ShiftRight", ARGP_SHIFT_RIGHT_OP, ARGI_SHIFT_RIGHT_OP),
-/* 26 */ /* AML_BIT_AND_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "And", ARGP_BIT_AND_OP, ARGI_BIT_AND_OP),
-/* 27 */ /* AML_BIT_NAND_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "NAnd", ARGP_BIT_NAND_OP, ARGI_BIT_NAND_OP),
-/* 28 */ /* AML_BIT_OR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Or", ARGP_BIT_OR_OP, ARGI_BIT_OR_OP),
-/* 29 */ /* AML_BIT_NOR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "NOr", ARGP_BIT_NOR_OP, ARGI_BIT_NOR_OP),
-/* 2A */ /* AML_BIT_XOR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "XOr", ARGP_BIT_XOR_OP, ARGI_BIT_XOR_OP),
-/* 2B */ /* AML_BIT_NOT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "Not", ARGP_BIT_NOT_OP, ARGI_BIT_NOT_OP),
-/* 2C */ /* AML_FIND_SET_LEFT_BIT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "FindSetLeftBit", ARGP_FIND_SET_LEFT_BIT_OP, ARGI_FIND_SET_LEFT_BIT_OP),
-/* 2D */ /* AML_FIND_SET_RIGHT_BIT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "FindSetRightBit", ARGP_FIND_SET_RIGHT_BIT_OP,ARGI_FIND_SET_RIGHT_BIT_OP),
-/* 2E */ /* AML_DEREF_OF_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "DerefOf", ARGP_DEREF_OF_OP, ARGI_DEREF_OF_OP),
-/* 2F */ /* AML_NOTIFY_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC1| AML_HAS_ARGS, "Notify", ARGP_NOTIFY_OP, ARGI_NOTIFY_OP),
-/* 30 */ /* AML_SIZE_OF_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "SizeOf", ARGP_SIZE_OF_OP, ARGI_SIZE_OF_OP),
-/* 31 */ /* AML_INDEX_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_TRIADIC| AML_HAS_ARGS, "Index", ARGP_INDEX_OP, ARGI_INDEX_OP),
-/* 32 */ /* AML_MATCH_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_HEXADIC| AML_HAS_ARGS, "Match", ARGP_MATCH_OP, ARGI_MATCH_OP),
-/* 33 */ /* AML_CREATE_DWORD_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS, "CreateDWordField", ARGP_CREATE_DWORD_FIELD_OP,ARGI_CREATE_DWORD_FIELD_OP),
-/* 34 */ /* AML_CREATE_WORD_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS, "CreateWordField", ARGP_CREATE_WORD_FIELD_OP, ARGI_CREATE_WORD_FIELD_OP),
-/* 35 */ /* AML_CREATE_BYTE_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS, "CreateByteField", ARGP_CREATE_BYTE_FIELD_OP, ARGI_CREATE_BYTE_FIELD_OP),
-/* 36 */ /* AML_CREATE_BIT_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS, "CreateBitField", ARGP_CREATE_BIT_FIELD_OP, ARGI_CREATE_BIT_FIELD_OP),
-/* 37 */ /* AML_TYPE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "ObjectType", ARGP_TYPE_OP, ARGI_TYPE_OP),
-/* 38 */ /* AML_LAND_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2| AML_HAS_ARGS, "LAnd", ARGP_LAND_OP, ARGI_LAND_OP),
-/* 39 */ /* AML_LOR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2| AML_HAS_ARGS, "LOr", ARGP_LOR_OP, ARGI_LOR_OP),
-/* 3A */ /* AML_LNOT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "LNot", ARGP_LNOT_OP, ARGI_LNOT_OP),
-/* 3B */ /* AML_LEQUAL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2| AML_HAS_ARGS, "LEqual", ARGP_LEQUAL_OP, ARGI_LEQUAL_OP),
-/* 3C */ /* AML_LGREATER_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2| AML_HAS_ARGS, "LGreater", ARGP_LGREATER_OP, ARGI_LGREATER_OP),
-/* 3D */ /* AML_LLESS_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2| AML_HAS_ARGS, "LLess", ARGP_LLESS_OP, ARGI_LLESS_OP),
-/* 3E */ /* AML_IF_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_HAS_ARGS, "If", ARGP_IF_OP, ARGI_IF_OP),
-/* 3F */ /* AML_ELSE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_HAS_ARGS, "Else", ARGP_ELSE_OP, ARGI_ELSE_OP),
-/* 40 */ /* AML_WHILE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_HAS_ARGS, "While", ARGP_WHILE_OP, ARGI_WHILE_OP),
-/* 41 */ /* AML_NOOP_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_NO_ARGS, "Noop", ARGP_NOOP_OP, ARGI_NOOP_OP),
-/* 42 */ /* AML_RETURN_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_HAS_ARGS, "Return", ARGP_RETURN_OP, ARGI_RETURN_OP),
-/* 43 */ /* AML_BREAK_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_NO_ARGS, "Break", ARGP_BREAK_OP, ARGI_BREAK_OP),
-/* 44 */ /* AML_BREAK_POINT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_NO_ARGS, "BreakPoint", ARGP_BREAK_POINT_OP, ARGI_BREAK_POINT_OP),
-/* 45 */ /* AML_ONES_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "Ones", ARGP_ONES_OP, ARGI_ONES_OP),
+/* Index Name Parser Args Interpreter Args Flags */
+
+/* 00 */ ACPI_OP ("Zero", ARGP_ZERO_OP, ARGI_ZERO_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS ),
+/* 01 */ ACPI_OP ("One", ARGP_ONE_OP, ARGI_ONE_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS ),
+/* 02 */ ACPI_OP ("Alias", ARGP_ALIAS_OP, ARGI_ALIAS_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS|AML_NSOBJECT|AML_NSOPCODE|AML_NSNODE|AML_NAMED),
+/* 03 */ ACPI_OP ("Name", ARGP_NAME_OP, ARGI_NAME_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS|AML_NSOBJECT|AML_NSOPCODE|AML_NSNODE|AML_NAMED),
+/* 04 */ ACPI_OP ("ByteConst", ARGP_BYTE_OP, ARGI_BYTE_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS ),
+/* 05 */ ACPI_OP ("WordConst", ARGP_WORD_OP, ARGI_WORD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS ),
+/* 06 */ ACPI_OP ("DwordConst", ARGP_DWORD_OP, ARGI_DWORD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS ),
+/* 07 */ ACPI_OP ("String", ARGP_STRING_OP, ARGI_STRING_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS ),
+/* 08 */ ACPI_OP ("Scope", ARGP_SCOPE_OP, ARGI_SCOPE_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS|AML_NSOBJECT|AML_NSOPCODE|AML_NSNODE|AML_NAMED),
+/* 09 */ ACPI_OP ("Buffer", ARGP_BUFFER_OP, ARGI_BUFFER_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DATA_TERM| AML_HAS_ARGS),
+/* 0A */ ACPI_OP ("Package", ARGP_PACKAGE_OP, ARGI_PACKAGE_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DATA_TERM| AML_HAS_ARGS),
+/* 0B */ ACPI_OP ("Method", ARGP_METHOD_OP, ARGI_METHOD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS|AML_NSOBJECT|AML_NSOPCODE|AML_NSNODE|AML_NAMED|AML_DEFER),
+/* 0C */ ACPI_OP ("Local0", ARGP_LOCAL0, ARGI_LOCAL0, ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS ),
+/* 0D */ ACPI_OP ("Local1", ARGP_LOCAL1, ARGI_LOCAL1, ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS ),
+/* 0E */ ACPI_OP ("Local2", ARGP_LOCAL2, ARGI_LOCAL2, ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS ),
+/* 0F */ ACPI_OP ("Local3", ARGP_LOCAL3, ARGI_LOCAL3, ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS ),
+/* 10 */ ACPI_OP ("Local4", ARGP_LOCAL4, ARGI_LOCAL4, ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS ),
+/* 11 */ ACPI_OP ("Local5", ARGP_LOCAL5, ARGI_LOCAL5, ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS ),
+/* 12 */ ACPI_OP ("Local6", ARGP_LOCAL6, ARGI_LOCAL6, ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS ),
+/* 13 */ ACPI_OP ("Local7", ARGP_LOCAL7, ARGI_LOCAL7, ACPI_OP_TYPE_OPCODE | OPTYPE_LOCAL_VARIABLE| AML_NO_ARGS ),
+/* 14 */ ACPI_OP ("Arg0", ARGP_ARG0, ARGI_ARG0, ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS ),
+/* 15 */ ACPI_OP ("Arg1", ARGP_ARG1, ARGI_ARG1, ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS ),
+/* 16 */ ACPI_OP ("Arg2", ARGP_ARG2, ARGI_ARG2, ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS ),
+/* 17 */ ACPI_OP ("Arg3", ARGP_ARG3, ARGI_ARG3, ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS ),
+/* 18 */ ACPI_OP ("Arg4", ARGP_ARG4, ARGI_ARG4, ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS ),
+/* 19 */ ACPI_OP ("Arg5", ARGP_ARG5, ARGI_ARG5, ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS ),
+/* 1A */ ACPI_OP ("Arg6", ARGP_ARG6, ARGI_ARG6, ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_ARGUMENT| AML_NO_ARGS ),
+/* 1B */ ACPI_OP ("Store", ARGP_STORE_OP, ARGI_STORE_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS),
+/* 1C */ ACPI_OP ("RefOf", ARGP_REF_OF_OP, ARGI_REF_OF_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS),
+/* 1D */ ACPI_OP ("Add", ARGP_ADD_OP, ARGI_ADD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS),
+/* 1E */ ACPI_OP ("Concatenate", ARGP_CONCAT_OP, ARGI_CONCAT_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS),
+/* 1F */ ACPI_OP ("Subtract", ARGP_SUBTRACT_OP, ARGI_SUBTRACT_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS),
+/* 20 */ ACPI_OP ("Increment", ARGP_INCREMENT_OP, ARGI_INCREMENT_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS),
+/* 21 */ ACPI_OP ("Decrement", ARGP_DECREMENT_OP, ARGI_DECREMENT_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS),
+/* 22 */ ACPI_OP ("Multiply", ARGP_MULTIPLY_OP, ARGI_MULTIPLY_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS),
+/* 23 */ ACPI_OP ("Divide", ARGP_DIVIDE_OP, ARGI_DIVIDE_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS),
+/* 24 */ ACPI_OP ("ShiftLeft", ARGP_SHIFT_LEFT_OP, ARGI_SHIFT_LEFT_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS),
+/* 25 */ ACPI_OP ("ShiftRight", ARGP_SHIFT_RIGHT_OP, ARGI_SHIFT_RIGHT_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS),
+/* 26 */ ACPI_OP ("And", ARGP_BIT_AND_OP, ARGI_BIT_AND_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS),
+/* 27 */ ACPI_OP ("NAnd", ARGP_BIT_NAND_OP, ARGI_BIT_NAND_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS),
+/* 28 */ ACPI_OP ("Or", ARGP_BIT_OR_OP, ARGI_BIT_OR_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS),
+/* 29 */ ACPI_OP ("NOr", ARGP_BIT_NOR_OP, ARGI_BIT_NOR_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS),
+/* 2A */ ACPI_OP ("XOr", ARGP_BIT_XOR_OP, ARGI_BIT_XOR_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS),
+/* 2B */ ACPI_OP ("Not", ARGP_BIT_NOT_OP, ARGI_BIT_NOT_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS),
+/* 2C */ ACPI_OP ("FindSetLeftBit", ARGP_FIND_SET_LEFT_BIT_OP, ARGI_FIND_SET_LEFT_BIT_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS),
+/* 2D */ ACPI_OP ("FindSetRightBit", ARGP_FIND_SET_RIGHT_BIT_OP,ARGI_FIND_SET_RIGHT_BIT_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS),
+/* 2E */ ACPI_OP ("DerefOf", ARGP_DEREF_OF_OP, ARGI_DEREF_OF_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS),
+/* 2F */ ACPI_OP ("Notify", ARGP_NOTIFY_OP, ARGI_NOTIFY_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC1| AML_HAS_ARGS),
+/* 30 */ ACPI_OP ("SizeOf", ARGP_SIZE_OF_OP, ARGI_SIZE_OF_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS),
+/* 31 */ ACPI_OP ("Index", ARGP_INDEX_OP, ARGI_INDEX_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_TRIADIC| AML_HAS_ARGS),
+/* 32 */ ACPI_OP ("Match", ARGP_MATCH_OP, ARGI_MATCH_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_HEXADIC| AML_HAS_ARGS),
+/* 33 */ ACPI_OP ("CreateDWordField", ARGP_CREATE_DWORD_FIELD_OP,ARGI_CREATE_DWORD_FIELD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS|AML_NSOBJECT|AML_NSNODE|AML_DEFER|AML_CREATE),
+/* 34 */ ACPI_OP ("CreateWordField", ARGP_CREATE_WORD_FIELD_OP, ARGI_CREATE_WORD_FIELD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS|AML_NSOBJECT|AML_NSNODE|AML_DEFER|AML_CREATE),
+/* 35 */ ACPI_OP ("CreateByteField", ARGP_CREATE_BYTE_FIELD_OP, ARGI_CREATE_BYTE_FIELD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS|AML_NSOBJECT|AML_NSNODE|AML_DEFER|AML_CREATE),
+/* 36 */ ACPI_OP ("CreateBitField", ARGP_CREATE_BIT_FIELD_OP, ARGI_CREATE_BIT_FIELD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS|AML_NSOBJECT|AML_NSNODE|AML_DEFER|AML_CREATE),
+/* 37 */ ACPI_OP ("ObjectType", ARGP_TYPE_OP, ARGI_TYPE_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS),
+/* 38 */ ACPI_OP ("LAnd", ARGP_LAND_OP, ARGI_LAND_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2| AML_HAS_ARGS),
+/* 39 */ ACPI_OP ("LOr", ARGP_LOR_OP, ARGI_LOR_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2| AML_HAS_ARGS),
+/* 3A */ ACPI_OP ("LNot", ARGP_LNOT_OP, ARGI_LNOT_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS),
+/* 3B */ ACPI_OP ("LEqual", ARGP_LEQUAL_OP, ARGI_LEQUAL_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2| AML_HAS_ARGS),
+/* 3C */ ACPI_OP ("LGreater", ARGP_LGREATER_OP, ARGI_LGREATER_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2| AML_HAS_ARGS),
+/* 3D */ ACPI_OP ("LLess", ARGP_LLESS_OP, ARGI_LLESS_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2| AML_HAS_ARGS),
+/* 3E */ ACPI_OP ("If", ARGP_IF_OP, ARGI_IF_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_HAS_ARGS),
+/* 3F */ ACPI_OP ("Else", ARGP_ELSE_OP, ARGI_ELSE_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_HAS_ARGS),
+/* 40 */ ACPI_OP ("While", ARGP_WHILE_OP, ARGI_WHILE_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_HAS_ARGS),
+/* 41 */ ACPI_OP ("Noop", ARGP_NOOP_OP, ARGI_NOOP_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_NO_ARGS ),
+/* 42 */ ACPI_OP ("Return", ARGP_RETURN_OP, ARGI_RETURN_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_HAS_ARGS),
+/* 43 */ ACPI_OP ("Break", ARGP_BREAK_OP, ARGI_BREAK_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_NO_ARGS ),
+/* 44 */ ACPI_OP ("BreakPoint", ARGP_BREAK_POINT_OP, ARGI_BREAK_POINT_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_NO_ARGS ),
+/* 45 */ ACPI_OP ("Ones", ARGP_ONES_OP, ARGI_ONES_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS ),
/* Prefixed opcodes (Two-byte opcodes with a prefix op) */
-/* 46 */ /* AML_MUTEX_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Mutex", ARGP_MUTEX_OP, ARGI_MUTEX_OP),
-/* 47 */ /* AML_EVENT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_NO_ARGS, "Event", ARGP_EVENT_OP, ARGI_EVENT_OP),
-/* 48 */ /* AML_COND_REF_OF_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "CondRefOf", ARGP_COND_REF_OF_OP, ARGI_COND_REF_OF_OP),
-/* 49 */ /* AML_CREATE_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS, "CreateField", ARGP_CREATE_FIELD_OP, ARGI_CREATE_FIELD_OP),
-/* 4A */ /* AML_LOAD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_RECONFIGURATION| AML_HAS_ARGS, "Load", ARGP_LOAD_OP, ARGI_LOAD_OP),
-/* 4B */ /* AML_STALL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC1| AML_HAS_ARGS, "Stall", ARGP_STALL_OP, ARGI_STALL_OP),
-/* 4C */ /* AML_SLEEP_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC1| AML_HAS_ARGS, "Sleep", ARGP_SLEEP_OP, ARGI_SLEEP_OP),
-/* 4D */ /* AML_ACQUIRE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2S| AML_HAS_ARGS, "Acquire", ARGP_ACQUIRE_OP, ARGI_ACQUIRE_OP),
-/* 4E */ /* AML_SIGNAL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC1| AML_HAS_ARGS, "Signal", ARGP_SIGNAL_OP, ARGI_SIGNAL_OP),
-/* 4F */ /* AML_WAIT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2S| AML_HAS_ARGS, "Wait", ARGP_WAIT_OP, ARGI_WAIT_OP),
-/* 50 */ /* AML_RESET_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC1| AML_HAS_ARGS, "Reset", ARGP_RESET_OP, ARGI_RESET_OP),
-/* 51 */ /* AML_RELEASE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC1| AML_HAS_ARGS, "Release", ARGP_RELEASE_OP, ARGI_RELEASE_OP),
-/* 52 */ /* AML_FROM_BCD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "FromBCD", ARGP_FROM_BCD_OP, ARGI_FROM_BCD_OP),
-/* 53 */ /* AML_TO_BCD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "ToBCD", ARGP_TO_BCD_OP, ARGI_TO_BCD_OP),
-/* 54 */ /* AML_UNLOAD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_RECONFIGURATION| AML_HAS_ARGS, "Unload", ARGP_UNLOAD_OP, ARGI_UNLOAD_OP),
-/* 55 */ /* AML_REVISION_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "Revision", ARGP_REVISION_OP, ARGI_REVISION_OP),
-/* 56 */ /* AML_DEBUG_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "Debug", ARGP_DEBUG_OP, ARGI_DEBUG_OP),
-/* 57 */ /* AML_FATAL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_TRIADIC| AML_HAS_ARGS, "Fatal", ARGP_FATAL_OP, ARGI_FATAL_OP),
-/* 58 */ /* AML_REGION_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "OpRegion", ARGP_REGION_OP, ARGI_REGION_OP),
-/* 59 */ /* AML_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Field", ARGP_FIELD_OP, ARGI_FIELD_OP),
-/* 5A */ /* AML_DEVICE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Device", ARGP_DEVICE_OP, ARGI_DEVICE_OP),
-/* 5B */ /* AML_PROCESSOR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Processor", ARGP_PROCESSOR_OP, ARGI_PROCESSOR_OP),
-/* 5C */ /* AML_POWER_RES_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "PowerResource", ARGP_POWER_RES_OP, ARGI_POWER_RES_OP),
-/* 5D */ /* AML_THERMAL_ZONE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "ThermalZone", ARGP_THERMAL_ZONE_OP, ARGI_THERMAL_ZONE_OP),
-/* 5E */ /* AML_INDEX_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "IndexField", ARGP_INDEX_FIELD_OP, ARGI_INDEX_FIELD_OP),
-/* 5F */ /* AML_BANK_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "BankField", ARGP_BANK_FIELD_OP, ARGI_BANK_FIELD_OP),
+/* 46 */ ACPI_OP ("Mutex", ARGP_MUTEX_OP, ARGI_MUTEX_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS|AML_NSOBJECT|AML_NSOPCODE|AML_NSNODE|AML_NAMED),
+/* 47 */ ACPI_OP ("Event", ARGP_EVENT_OP, ARGI_EVENT_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_NO_ARGS |AML_NSOBJECT|AML_NSOPCODE|AML_NSNODE|AML_NAMED ),
+/* 48 */ ACPI_OP ("CondRefOf", ARGP_COND_REF_OF_OP, ARGI_COND_REF_OF_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS),
+/* 49 */ ACPI_OP ("CreateField", ARGP_CREATE_FIELD_OP, ARGI_CREATE_FIELD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS|AML_NSOBJECT|AML_NSNODE|AML_DEFER|AML_FIELD|AML_CREATE),
+/* 4A */ ACPI_OP ("Load", ARGP_LOAD_OP, ARGI_LOAD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_RECONFIGURATION| AML_HAS_ARGS),
+/* 4B */ ACPI_OP ("Stall", ARGP_STALL_OP, ARGI_STALL_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC1| AML_HAS_ARGS),
+/* 4C */ ACPI_OP ("Sleep", ARGP_SLEEP_OP, ARGI_SLEEP_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC1| AML_HAS_ARGS),
+/* 4D */ ACPI_OP ("Acquire", ARGP_ACQUIRE_OP, ARGI_ACQUIRE_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2S| AML_HAS_ARGS),
+/* 4E */ ACPI_OP ("Signal", ARGP_SIGNAL_OP, ARGI_SIGNAL_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC1| AML_HAS_ARGS),
+/* 4F */ ACPI_OP ("Wait", ARGP_WAIT_OP, ARGI_WAIT_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2S| AML_HAS_ARGS),
+/* 50 */ ACPI_OP ("Reset", ARGP_RESET_OP, ARGI_RESET_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC1| AML_HAS_ARGS),
+/* 51 */ ACPI_OP ("Release", ARGP_RELEASE_OP, ARGI_RELEASE_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC1| AML_HAS_ARGS),
+/* 52 */ ACPI_OP ("FromBCD", ARGP_FROM_BCD_OP, ARGI_FROM_BCD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS),
+/* 53 */ ACPI_OP ("ToBCD", ARGP_TO_BCD_OP, ARGI_TO_BCD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS),
+/* 54 */ ACPI_OP ("Unload", ARGP_UNLOAD_OP, ARGI_UNLOAD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_RECONFIGURATION| AML_HAS_ARGS),
+/* 55 */ ACPI_OP ("Revision", ARGP_REVISION_OP, ARGI_REVISION_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS ),
+/* 56 */ ACPI_OP ("Debug", ARGP_DEBUG_OP, ARGI_DEBUG_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS ),
+/* 57 */ ACPI_OP ("Fatal", ARGP_FATAL_OP, ARGI_FATAL_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_TRIADIC| AML_HAS_ARGS),
+/* 58 */ ACPI_OP ("OpRegion", ARGP_REGION_OP, ARGI_REGION_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS|AML_NSOBJECT|AML_NSOPCODE|AML_NSNODE|AML_NAMED|AML_DEFER),
+/* 59 */ ACPI_OP ("Field", ARGP_FIELD_OP, ARGI_FIELD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS|AML_NSOBJECT|AML_NSOPCODE|AML_FIELD),
+/* 5A */ ACPI_OP ("Device", ARGP_DEVICE_OP, ARGI_DEVICE_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS|AML_NSOBJECT|AML_NSOPCODE|AML_NSNODE|AML_NAMED),
+/* 5B */ ACPI_OP ("Processor", ARGP_PROCESSOR_OP, ARGI_PROCESSOR_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS|AML_NSOBJECT|AML_NSOPCODE|AML_NSNODE|AML_NAMED),
+/* 5C */ ACPI_OP ("PowerResource", ARGP_POWER_RES_OP, ARGI_POWER_RES_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS|AML_NSOBJECT|AML_NSOPCODE|AML_NSNODE|AML_NAMED),
+/* 5D */ ACPI_OP ("ThermalZone", ARGP_THERMAL_ZONE_OP, ARGI_THERMAL_ZONE_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS|AML_NSOBJECT|AML_NSOPCODE|AML_NSNODE|AML_NAMED),
+/* 5E */ ACPI_OP ("IndexField", ARGP_INDEX_FIELD_OP, ARGI_INDEX_FIELD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS|AML_NSOBJECT|AML_NSOPCODE|AML_FIELD),
+/* 5F */ ACPI_OP ("BankField", ARGP_BANK_FIELD_OP, ARGI_BANK_FIELD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS|AML_NSOBJECT|AML_NSOPCODE|AML_FIELD),
/* Internal opcodes that map to invalid AML opcodes */
-/* 60 */ /* AML_LNOTEQUAL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_HAS_ARGS, "LNotEqual", ARGP_LNOTEQUAL_OP, ARGI_LNOTEQUAL_OP),
-/* 61 */ /* AML_LLESSEQUAL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_HAS_ARGS, "LLessEqual", ARGP_LLESSEQUAL_OP, ARGI_LLESSEQUAL_OP),
-/* 62 */ /* AML_LGREATEREQUAL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_HAS_ARGS, "LGreaterEqual", ARGP_LGREATEREQUAL_OP, ARGI_LGREATEREQUAL_OP),
-/* 63 */ /* AML_INT_NAMEPATH_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "NamePath", ARGP_NAMEPATH_OP, ARGI_NAMEPATH_OP),
-/* 64 */ /* AML_INT_METHODCALL_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_CALL| AML_HAS_ARGS, "MethodCall", ARGP_METHODCALL_OP, ARGI_METHODCALL_OP),
-/* 65 */ /* AML_INT_BYTELIST_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "ByteList", ARGP_BYTELIST_OP, ARGI_BYTELIST_OP),
-/* 66 */ /* AML_INT_RESERVEDFIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_NO_ARGS, "ReservedField", ARGP_RESERVEDFIELD_OP, ARGI_RESERVEDFIELD_OP),
-/* 67 */ /* AML_INT_NAMEDFIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_NO_ARGS, "NamedField", ARGP_NAMEDFIELD_OP, ARGI_NAMEDFIELD_OP),
-/* 68 */ /* AML_INT_ACCESSFIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_NO_ARGS, "AccessField", ARGP_ACCESSFIELD_OP, ARGI_ACCESSFIELD_OP),
-/* 69 */ /* AML_INT_STATICSTRING_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_NO_ARGS, "StaticString", ARGP_STATICSTRING_OP, ARGI_STATICSTRING_OP),
-/* 6A */ /* AML_INT_RETURN_VALUE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_RETURN| AML_HAS_ARGS, "[Return Value]", ARG_NONE, ARG_NONE),
-/* 6B */ /* UNKNOWN OPCODES */ OP_INFO_ENTRY (ACPI_OP_TYPE_UNKNOWN | OPTYPE_BOGUS| AML_HAS_ARGS, "UNKNOWN_OP!", ARG_NONE, ARG_NONE),
-/* 6C */ /* ASCII CHARACTERS */ OP_INFO_ENTRY (ACPI_OP_TYPE_ASCII | OPTYPE_BOGUS| AML_HAS_ARGS, "ASCII_ONLY!", ARG_NONE, ARG_NONE),
-/* 6D */ /* PREFIX CHARACTERS */ OP_INFO_ENTRY (ACPI_OP_TYPE_PREFIX | OPTYPE_BOGUS| AML_HAS_ARGS, "PREFIX_ONLY!", ARG_NONE, ARG_NONE),
+/* 60 */ ACPI_OP ("LNotEqual", ARGP_LNOTEQUAL_OP, ARGI_LNOTEQUAL_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_HAS_ARGS),
+/* 61 */ ACPI_OP ("LLessEqual", ARGP_LLESSEQUAL_OP, ARGI_LLESSEQUAL_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_HAS_ARGS),
+/* 62 */ ACPI_OP ("LGreaterEqual", ARGP_LGREATEREQUAL_OP, ARGI_LGREATEREQUAL_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_HAS_ARGS),
+/* 63 */ ACPI_OP ("[NamePath]", ARGP_NAMEPATH_OP, ARGI_NAMEPATH_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS|AML_NSOBJECT|AML_NSNODE ),
+/* 64 */ ACPI_OP ("[MethodCall]", ARGP_METHODCALL_OP, ARGI_METHODCALL_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_METHOD_CALL| AML_HAS_ARGS|AML_NSOBJECT|AML_NSNODE),
+/* 65 */ ACPI_OP ("[ByteList]", ARGP_BYTELIST_OP, ARGI_BYTELIST_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS ),
+/* 66 */ ACPI_OP ("[ReservedField]", ARGP_RESERVEDFIELD_OP, ARGI_RESERVEDFIELD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_NO_ARGS ),
+/* 67 */ ACPI_OP ("[NamedField]", ARGP_NAMEDFIELD_OP, ARGI_NAMEDFIELD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_NO_ARGS|AML_NSOBJECT|AML_NSOPCODE|AML_NSNODE|AML_NAMED ),
+/* 68 */ ACPI_OP ("[AccessField]", ARGP_ACCESSFIELD_OP, ARGI_ACCESSFIELD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_NO_ARGS ),
+/* 69 */ ACPI_OP ("[StaticString", ARGP_STATICSTRING_OP, ARGI_STATICSTRING_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_BOGUS| AML_NO_ARGS ),
+/* 6A */ ACPI_OP ("[Return Value]", ARG_NONE, ARG_NONE, ACPI_OP_TYPE_OPCODE | OPTYPE_RETURN| AML_HAS_ARGS),
+/* 6B */ ACPI_OP ("UNKNOWN_OP!", ARG_NONE, ARG_NONE, ACPI_OP_TYPE_UNKNOWN | OPTYPE_BOGUS| AML_HAS_ARGS),
+/* 6C */ ACPI_OP ("ASCII_ONLY!", ARG_NONE, ARG_NONE, ACPI_OP_TYPE_ASCII | OPTYPE_BOGUS| AML_HAS_ARGS),
+/* 6D */ ACPI_OP ("PREFIX_ONLY!", ARG_NONE, ARG_NONE, ACPI_OP_TYPE_PREFIX | OPTYPE_BOGUS| AML_HAS_ARGS),
/* ACPI 2.0 (new) opcodes */
-/* 6E */ /* AML_QWORD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "QwordConst", ARGP_QWORD_OP, ARGI_QWORD_OP),
-/* 6F */ /* AML_VAR_PACKAGE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DATA_TERM| AML_HAS_ARGS, "VarPackage", ARGP_VAR_PACKAGE_OP, ARGI_VAR_PACKAGE_OP),
-/* 70 */ /* AML_CONCAT_RES_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "ConcatRes", ARGP_CONCAT_RES_OP, ARGI_CONCAT_RES_OP),
-/* 71 */ /* AML_MOD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Mod", ARGP_MOD_OP, ARGI_MOD_OP),
-/* 72 */ /* AML_CREATE_QWORD_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS, "CreateQWordField", ARGP_CREATE_QWORD_FIELD_OP,ARGI_CREATE_QWORD_FIELD_OP),
-/* 73 */ /* AML_TO_BUFFER_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "ToBuffer", ARGP_TO_BUFFER_OP, ARGI_TO_BUFFER_OP),
-/* 74 */ /* AML_TO_DECSTR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "ToDecimalString", ARGP_TO_DEC_STR_OP, ARGI_TO_DEC_STR_OP),
-/* 75 */ /* AML_TO_HEXSTR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "ToHexString", ARGP_TO_HEX_STR_OP, ARGI_TO_HEX_STR_OP),
-/* 76 */ /* AML_TO_INTEGER_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "ToInteger", ARGP_TO_INTEGER_OP, ARGI_TO_INTEGER_OP),
-/* 77 */ /* AML_TO_STRING_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "ToString", ARGP_TO_STRING_OP, ARGI_TO_STRING_OP),
-/* 78 */ /* AML_COPY_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "CopyObject", ARGP_COPY_OP, ARGI_COPY_OP),
-/* 79 */ /* AML_MID_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "Mid", ARGP_MID_OP, ARGI_MID_OP),
-/* 7A */ /* AML_CONTINUE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_NO_ARGS, "Continue", ARGP_CONTINUE_OP, ARGI_CONTINUE_OP),
-/* 7B */ /* AML_LOAD_TABLE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "LoadTable", ARGP_LOAD_TABLE_OP, ARGI_LOAD_TABLE_OP),
-/* 7C */ /* AML_DATA_REGION_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "DataOpRegion", ARGP_DATA_REGION_OP, ARGI_DATA_REGION_OP),
+/* 6E */ ACPI_OP ("QwordConst", ARGP_QWORD_OP, ARGI_QWORD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS ),
+/* 6F */ ACPI_OP ("VarPackage", ARGP_VAR_PACKAGE_OP, ARGI_VAR_PACKAGE_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DATA_TERM| AML_HAS_ARGS|AML_DEFER),
+/* 70 */ ACPI_OP ("ConcatRes", ARGP_CONCAT_RES_OP, ARGI_CONCAT_RES_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS),
+/* 71 */ ACPI_OP ("Mod", ARGP_MOD_OP, ARGI_MOD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS),
+/* 72 */ ACPI_OP ("CreateQWordField", ARGP_CREATE_QWORD_FIELD_OP,ARGI_CREATE_QWORD_FIELD_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS|AML_NSOBJECT|AML_NSNODE|AML_DEFER|AML_CREATE),
+/* 73 */ ACPI_OP ("ToBuffer", ARGP_TO_BUFFER_OP, ARGI_TO_BUFFER_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS),
+/* 74 */ ACPI_OP ("ToDecimalString", ARGP_TO_DEC_STR_OP, ARGI_TO_DEC_STR_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS),
+/* 75 */ ACPI_OP ("ToHexString", ARGP_TO_HEX_STR_OP, ARGI_TO_HEX_STR_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS),
+/* 76 */ ACPI_OP ("ToInteger", ARGP_TO_INTEGER_OP, ARGI_TO_INTEGER_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS),
+/* 77 */ ACPI_OP ("ToString", ARGP_TO_STRING_OP, ARGI_TO_STRING_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS),
+/* 78 */ ACPI_OP ("CopyObject", ARGP_COPY_OP, ARGI_COPY_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS),
+/* 79 */ ACPI_OP ("Mid", ARGP_MID_OP, ARGI_MID_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS),
+/* 7A */ ACPI_OP ("Continue", ARGP_CONTINUE_OP, ARGI_CONTINUE_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_NO_ARGS ),
+/* 7B */ ACPI_OP ("LoadTable", ARGP_LOAD_TABLE_OP, ARGI_LOAD_TABLE_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS),
+/* 7C */ ACPI_OP ("DataOpRegion", ARGP_DATA_REGION_OP, ARGI_DATA_REGION_OP, ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS),
};
@@ -571,7 +683,7 @@ static ACPI_OPCODE_INFO AmlOpInfo[] =
* index into the table above
*/
-static UINT8 AmlShortOpInfoIndex[256] =
+static const UINT8 AmlShortOpInfoIndex[256] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
@@ -610,7 +722,7 @@ static UINT8 AmlShortOpInfoIndex[256] =
};
-static UINT8 AmlLongOpInfoIndex[NUM_EXTENDED_OPCODE] =
+static const UINT8 AmlLongOpInfoIndex[NUM_EXTENDED_OPCODE] =
{
/* 0 1 2 3 4 5 6 7 */
/* 8 9 A B C D E F */
@@ -649,11 +761,11 @@ static UINT8 AmlLongOpInfoIndex[NUM_EXTENDED_OPCODE] =
*
******************************************************************************/
-ACPI_OPCODE_INFO *
+const ACPI_OPCODE_INFO *
AcpiPsGetOpcodeInfo (
UINT16 Opcode)
{
- ACPI_OPCODE_INFO *OpInfo;
+ const ACPI_OPCODE_INFO *OpInfo;
UINT8 UpperOpcode;
UINT8 LowerOpcode;
@@ -735,7 +847,7 @@ NATIVE_CHAR *
AcpiPsGetOpcodeName (
UINT16 Opcode)
{
- ACPI_OPCODE_INFO *Op;
+ const ACPI_OPCODE_INFO *Op;
Op = AcpiPsGetOpcodeInfo (Opcode);
diff --git a/sys/contrib/dev/acpica/psparse.c b/sys/contrib/dev/acpica/psparse.c
index 9defbbefe193..47d3aa57eba6 100644
--- a/sys/contrib/dev/acpica/psparse.c
+++ b/sys/contrib/dev/acpica/psparse.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psparse - Parser top level AML parse routines
- * $Revision: 89 $
+ * $Revision: 96 $
*
*****************************************************************************/
@@ -142,13 +142,13 @@ extern UINT32 AcpiGbl_ScopeDepth;
/*******************************************************************************
*
- * FUNCTION: AcpiPsPeekOpcode
+ * FUNCTION: AcpiPsGetOpcodeSize
*
- * PARAMETERS: None
+ * PARAMETERS: Opcode - An AML opcode
*
- * RETURN: Status
+ * RETURN: Size of the opcode, in bytes (1 or 2)
*
- * DESCRIPTION: Get next AML opcode (without incrementing AML pointer)
+ * DESCRIPTION: Get the size of the current opcode.
*
******************************************************************************/
@@ -210,7 +210,6 @@ AcpiPsPeekOpcode (
*
* extended Opcode, !=, <=, or >=
*/
-
if (Opcode == AML_EXTOP)
{
/* Extended opcode */
@@ -293,11 +292,13 @@ AcpiPsFindObject (
ACPI_PARSE_OBJECT **OutOp)
{
NATIVE_CHAR *Path;
+ const ACPI_OPCODE_INFO *OpInfo;
/* We are only interested in opcodes that have an associated name */
- if (!AcpiPsIsNamedOp (Opcode))
+ OpInfo = AcpiPsGetOpcodeInfo (Opcode);
+ if (!(OpInfo->Flags & AML_NAMED))
{
*OutOp = Op;
return (AE_OK);
@@ -342,8 +343,8 @@ AcpiPsCompleteThisOp (
#ifndef PARSER_ONLY
ACPI_PARSE_OBJECT *Prev;
ACPI_PARSE_OBJECT *Next;
- ACPI_OPCODE_INFO *OpInfo;
- ACPI_OPCODE_INFO *ParentInfo;
+ const ACPI_OPCODE_INFO *OpInfo;
+ const ACPI_OPCODE_INFO *ParentInfo;
UINT32 OpcodeClass;
ACPI_PARSE_OBJECT *ReplacementOp = NULL;
@@ -373,7 +374,6 @@ AcpiPsCompleteThisOp (
* Check if we need to replace the operator and its subtree
* with a return value op (placeholder op)
*/
-
ParentInfo = AcpiPsGetOpcodeInfo (Op->Parent->Opcode);
switch (ACPI_GET_OP_CLASS (ParentInfo))
@@ -387,7 +387,6 @@ AcpiPsCompleteThisOp (
* These opcodes contain TermArg operands. The current
* op must be replace by a placeholder return op
*/
-
if ((Op->Parent->Opcode == AML_REGION_OP) ||
(Op->Parent->Opcode == AML_CREATE_FIELD_OP) ||
(Op->Parent->Opcode == AML_CREATE_BIT_FIELD_OP) ||
@@ -512,7 +511,6 @@ AcpiPsNextParseState (
* A control method was terminated via a RETURN statement.
* The walk of this method is complete.
*/
-
ParserState->Aml = ParserState->AmlEnd;
Status = AE_CTRL_TERMINATE;
break;
@@ -520,13 +518,11 @@ AcpiPsNextParseState (
case AE_CTRL_PENDING:
- /*
- * Predicate of a WHILE was true and the loop just completed an
- * execution. Go back to the start of the loop and reevaluate the
- * predicate.
- */
-/* WalkState->ControlState->Common.State =
- CONTROL_PREDICATE_EXECUTING;*/
+ /*
+ * Predicate of a WHILE was true and the loop just completed an
+ * execution. Go back to the start of the loop and reevaluate the
+ * predicate.
+ */
/* TBD: How to handle a break within a while. */
/* This code attempts it */
@@ -536,13 +532,13 @@ AcpiPsNextParseState (
case AE_CTRL_TRUE:
- /*
- * Predicate of an IF was true, and we are at the matching ELSE.
- * Just close out this package
- *
- * Note: ParserState->Aml is modified by the package length procedure
- * TBD: [Investigate] perhaps it shouldn't, too much trouble
- */
+ /*
+ * Predicate of an IF was true, and we are at the matching ELSE.
+ * Just close out this package
+ *
+ * Note: ParserState->Aml is modified by the package length procedure
+ * TBD: [Investigate] perhaps it shouldn't, too much trouble
+ */
Start = ParserState->Aml;
PackageLength = AcpiPsGetNextPackageLength (ParserState);
ParserState->Aml = Start + PackageLength;
@@ -558,7 +554,6 @@ AcpiPsNextParseState (
* this branch of the tree) and continue execution at the parent
* level.
*/
-
ParserState->Aml = ParserState->Scope->ParseScope.PkgEnd;
/* In the case of a BREAK, just force a predicate (if any) to FALSE */
@@ -593,7 +588,6 @@ AcpiPsNextParseState (
break;
}
-
return_ACPI_STATUS (Status);
}
@@ -617,7 +611,7 @@ AcpiPsParseLoop (
{
ACPI_STATUS Status = AE_OK;
ACPI_PARSE_OBJECT *Op = NULL; /* current op */
- ACPI_OPCODE_INFO *OpInfo;
+ const ACPI_OPCODE_INFO *OpInfo;
ACPI_PARSE_OBJECT *Arg = NULL;
ACPI_PARSE2_OBJECT *DeferredOp;
UINT32 ArgCount; /* push for fixed or var args */
@@ -657,7 +651,6 @@ AcpiPsParseLoop (
* A predicate was just completed, get the value of the
* predicate and branch based on that value
*/
-
Status = AcpiDsGetPredicateValue (WalkState, NULL, TRUE);
if (ACPI_FAILURE (Status) &&
((Status & AE_CODE_MASK) != AE_CODE_CONTROL))
@@ -710,7 +703,6 @@ AcpiPsParseLoop (
* 2) A name string
* 3) An unknown/invalid opcode
*/
-
OpInfo = AcpiPsGetOpcodeInfo (Opcode);
switch (ACPI_GET_OP_TYPE (OpInfo))
{
@@ -728,7 +720,6 @@ AcpiPsParseLoop (
* Starts with a valid prefix or ASCII char, this is a name
* string. Convert the bare name string to a namepath.
*/
-
Opcode = AML_INT_NAMEPATH_OP;
ArgTypes = ARGP_NAMESTRING;
break;
@@ -752,7 +743,7 @@ AcpiPsParseLoop (
/* Create Op structure and append to parent's argument list */
- if (AcpiPsIsNamedOp (Opcode))
+ if (OpInfo->Flags & AML_NAMED)
{
PreOp.Value.Arg = NULL;
PreOp.Opcode = Opcode;
@@ -801,25 +792,22 @@ AcpiPsParseLoop (
if (Op->Opcode == AML_REGION_OP)
{
- DeferredOp = AcpiPsToExtendedOp (Op);
- if (DeferredOp)
- {
- /*
- * Defer final parsing of an OperationRegion body,
- * because we don't have enough info in the first pass
- * to parse it correctly (i.e., there may be method
- * calls within the TermArg elements of the body.
- *
- * However, we must continue parsing because
- * the opregion is not a standalone package --
- * we don't know where the end is at this point.
- *
- * (Length is unknown until parse of the body complete)
- */
-
- DeferredOp->Data = AmlOpStart;
- DeferredOp->Length = 0;
- }
+ DeferredOp = (ACPI_PARSE2_OBJECT *) Op;
+
+ /*
+ * Defer final parsing of an OperationRegion body,
+ * because we don't have enough info in the first pass
+ * to parse it correctly (i.e., there may be method
+ * calls within the TermArg elements of the body.
+ *
+ * However, we must continue parsing because
+ * the opregion is not a standalone package --
+ * we don't know where the end is at this point.
+ *
+ * (Length is unknown until parse of the body complete)
+ */
+ DeferredOp->Data = AmlOpStart;
+ DeferredOp->Length = 0;
}
}
@@ -828,6 +816,7 @@ AcpiPsParseLoop (
{
/* Not a named opcode, just allocate Op and append to parent */
+ OpInfo = AcpiPsGetOpcodeInfo (Opcode);
Op = AcpiPsAllocOp (Opcode);
if (!Op)
{
@@ -835,13 +824,8 @@ AcpiPsParseLoop (
}
- if ((Op->Opcode == AML_CREATE_FIELD_OP) ||
- (Op->Opcode == AML_CREATE_BIT_FIELD_OP) ||
- (Op->Opcode == AML_CREATE_BYTE_FIELD_OP) ||
- (Op->Opcode == AML_CREATE_WORD_FIELD_OP) ||
- (Op->Opcode == AML_CREATE_DWORD_FIELD_OP) ||
- (Op->Opcode == AML_CREATE_QWORD_FIELD_OP))
- {
+ if (OpInfo->Flags & AML_CREATE)
+ {
/*
* Backup to beginning of CreateXXXfield declaration
* BodyLength is unknown until we parse the body
@@ -940,27 +924,24 @@ AcpiPsParseLoop (
if (Op->Opcode == AML_METHOD_OP)
{
- DeferredOp = AcpiPsToExtendedOp (Op);
- if (DeferredOp)
- {
- /*
- * Skip parsing of control method or opregion body,
- * because we don't have enough info in the first pass
- * to parse them correctly.
- */
-
- DeferredOp->Data = ParserState->Aml;
- DeferredOp->Length = (UINT32) (ParserState->PkgEnd -
- ParserState->Aml);
-
- /*
- * Skip body of method. For OpRegions, we must continue
- * parsing because the opregion is not a standalone
- * package (We don't know where the end is).
- */
- ParserState->Aml = ParserState->PkgEnd;
- ArgCount = 0;
- }
+ DeferredOp = (ACPI_PARSE2_OBJECT *) Op;
+
+ /*
+ * Skip parsing of control method or opregion body,
+ * because we don't have enough info in the first pass
+ * to parse them correctly.
+ */
+ DeferredOp->Data = ParserState->Aml;
+ DeferredOp->Length = (UINT32) (ParserState->PkgEnd -
+ ParserState->Aml);
+
+ /*
+ * Skip body of method. For OpRegions, we must continue
+ * parsing because the opregion is not a standalone
+ * package (We don't know where the end is).
+ */
+ ParserState->Aml = ParserState->PkgEnd;
+ ArgCount = 0;
}
break;
@@ -975,7 +956,8 @@ AcpiPsParseLoop (
{
/* completed Op, prepare for next */
- if (AcpiPsIsNamedOp (Op->Opcode))
+ OpInfo = AcpiPsGetOpcodeInfo (Op->Opcode);
+ if (OpInfo->Flags & AML_NAMED)
{
if (AcpiGbl_Depth)
{
@@ -984,30 +966,22 @@ AcpiPsParseLoop (
if (Op->Opcode == AML_REGION_OP)
{
- DeferredOp = AcpiPsToExtendedOp (Op);
- if (DeferredOp)
- {
- /*
- * Skip parsing of control method or opregion body,
- * because we don't have enough info in the first pass
- * to parse them correctly.
- *
- * Completed parsing an OpRegion declaration, we now
- * know the length.
- */
-
- DeferredOp->Length = (UINT32) (ParserState->Aml -
- DeferredOp->Data);
- }
+ DeferredOp = (ACPI_PARSE2_OBJECT *) Op;
+
+ /*
+ * Skip parsing of control method or opregion body,
+ * because we don't have enough info in the first pass
+ * to parse them correctly.
+ *
+ * Completed parsing an OpRegion declaration, we now
+ * know the length.
+ */
+ DeferredOp->Length = (UINT32) (ParserState->Aml -
+ DeferredOp->Data);
}
}
- if ((Op->Opcode == AML_CREATE_FIELD_OP) ||
- (Op->Opcode == AML_CREATE_BIT_FIELD_OP) ||
- (Op->Opcode == AML_CREATE_BYTE_FIELD_OP) ||
- (Op->Opcode == AML_CREATE_WORD_FIELD_OP) ||
- (Op->Opcode == AML_CREATE_DWORD_FIELD_OP) ||
- (Op->Opcode == AML_CREATE_QWORD_FIELD_OP))
+ if (OpInfo->Flags & AML_CREATE)
{
/*
* Backup to beginning of CreateXXXfield declaration (1 for
@@ -1115,7 +1089,6 @@ CloseThisOp:
break;
}
-
/* This scope complete? */
if (AcpiPsHasCompletedScope (ParserState))
@@ -1151,7 +1124,6 @@ CloseThisOp:
* of open scopes (such as when several AML blocks are closed with
* sequential closing braces). We want to terminate each one cleanly.
*/
-
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Package complete at Op %p\n", Op));
do
{
@@ -1213,6 +1185,7 @@ CloseThisOp:
* Aml - Pointer to the raw AML code to parse
* AmlSize - Length of the AML to parse
*
+ *
* RETURN: Status
*
* DESCRIPTION: Parse raw AML and return a tree of ops
@@ -1235,7 +1208,6 @@ AcpiPsParseAml (
ACPI_PARSE_STATE *ParserState;
ACPI_WALK_STATE *WalkState;
ACPI_WALK_LIST WalkList;
- ACPI_NAMESPACE_NODE *Node = NULL;
ACPI_WALK_LIST *PrevWalkList = AcpiGbl_CurrentWalkList;
ACPI_OPERAND_OBJECT *ReturnDesc;
ACPI_OPERAND_OBJECT *MthDesc = NULL;
@@ -1268,7 +1240,7 @@ AcpiPsParseAml (
WalkList.AcquiredMutexList.Prev = NULL;
WalkList.AcquiredMutexList.Next = NULL;
- WalkState = AcpiDsCreateWalkState (TABLE_ID_DSDT, ParserState->StartOp,
+ WalkState = AcpiDsCreateWalkState (TABLE_ID_DSDT, ParserState->StartOp,
MthDesc, &WalkList);
if (!WalkState)
{
@@ -1310,15 +1282,13 @@ AcpiPsParseAml (
{
/* Setup the current scope */
- Node = ParserState->StartOp->Node;
- ParserState->StartNode = Node;
-
- if (Node)
+ ParserState->StartNode = ParserState->StartOp->Node;
+ if (ParserState->StartNode)
{
/* Push start scope on scope stack and make it current */
- Status = AcpiDsScopeStackPush (Node, Node->Type,
- WalkState);
+ Status = AcpiDsScopeStackPush (ParserState->StartNode,
+ ParserState->StartNode->Type, WalkState);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -1327,16 +1297,13 @@ AcpiPsParseAml (
}
}
-
- Status = AE_OK;
-
/*
* Execute the walk loop as long as there is a valid Walk State. This
* handles nested control method invocations without recursion.
*/
-
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "State=%p\n", WalkState));
+ Status = AE_OK;
while (WalkState)
{
if (ACPI_SUCCESS (Status))
@@ -1344,7 +1311,7 @@ AcpiPsParseAml (
Status = AcpiPsParseLoop (WalkState);
}
- ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
"Completed one call to walk loop, State=%p\n", WalkState));
if (Status == AE_CTRL_TRANSFER)
@@ -1353,14 +1320,12 @@ AcpiPsParseAml (
* A method call was detected.
* Transfer control to the called control method
*/
-
Status = AcpiDsCallControlMethod (&WalkList, WalkState, NULL);
/*
* If the transfer to the new method method call worked, a new walk
* state was created -- get it
*/
-
WalkState = AcpiDsGetCurrentWalkState (&WalkList);
continue;
}
@@ -1372,7 +1337,6 @@ AcpiPsParseAml (
/* We are done with this walk, move on to the parent if any */
-
WalkState = AcpiDsPopWalkState (&WalkList);
/* Extract return value before we delete WalkState */
@@ -1390,19 +1354,18 @@ AcpiPsParseAml (
* If we just returned from the execution of a control method,
* there's lots of cleanup to do
*/
-
if ((WalkState->ParseFlags & ACPI_PARSE_MODE_MASK) == ACPI_PARSE_EXECUTE)
{
AcpiDsTerminateControlMethod (WalkState);
}
- /* Delete this walk state and all linked control states */
+ /* Delete this walk state and all linked control states */
AcpiPsCleanupScope (WalkState->ParserState);
ACPI_MEM_FREE (WalkState->ParserState);
AcpiDsDeleteWalkState (WalkState);
- /* Check if we have restarted a preempted walk */
+ /* Check if we have restarted a preempted walk */
WalkState = AcpiDsGetCurrentWalkState (&WalkList);
if (WalkState &&
@@ -1414,7 +1377,6 @@ AcpiPsParseAml (
* If the method returned value is not used by the parent,
* The object is deleted
*/
-
AcpiDsRestartControlMethod (WalkState, ReturnDesc);
WalkState->WalkType |= WALK_METHOD_RESTART;
}
@@ -1423,7 +1385,6 @@ AcpiPsParseAml (
* Just completed a 1st-level method, save the final internal return
* value (if any)
*/
-
else if (CallerReturnDesc)
{
*CallerReturnDesc = ReturnDesc; /* NULL if no return value */
diff --git a/sys/contrib/dev/acpica/psscope.c b/sys/contrib/dev/acpica/psscope.c
index b8211ebe3f80..6509f4a03bf8 100644
--- a/sys/contrib/dev/acpica/psscope.c
+++ b/sys/contrib/dev/acpica/psscope.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psscope - Parser scope stack management routines
- * $Revision: 28 $
+ * $Revision: 29 $
*
*****************************************************************************/
@@ -298,6 +298,7 @@ AcpiPsPopScope (
FUNCTION_TRACE ("PsPopScope");
+
/*
* Only pop the scope if there is in fact a next scope
*/
@@ -305,7 +306,6 @@ AcpiPsPopScope (
{
Scope = AcpiUtPopGenericState (&ParserState->Scope);
-
/* return to parsing previous op */
*Op = Scope->ParseScope.Op;
diff --git a/sys/contrib/dev/acpica/pstree.c b/sys/contrib/dev/acpica/pstree.c
index c6478b498f62..9798b8c08b5b 100644
--- a/sys/contrib/dev/acpica/pstree.c
+++ b/sys/contrib/dev/acpica/pstree.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: pstree - Parser op tree manipulation/traversal/search
- * $Revision: 30 $
+ * $Revision: 32 $
*
*****************************************************************************/
@@ -144,7 +144,10 @@ AcpiPsGetArg (
UINT32 Argn)
{
ACPI_PARSE_OBJECT *Arg = NULL;
- ACPI_OPCODE_INFO *OpInfo;
+ const ACPI_OPCODE_INFO *OpInfo;
+
+
+ FUNCTION_ENTRY ();
/* Get the info structure for this opcode */
@@ -198,7 +201,10 @@ AcpiPsAppendArg (
ACPI_PARSE_OBJECT *Arg)
{
ACPI_PARSE_OBJECT *PrevArg;
- ACPI_OPCODE_INFO *OpInfo;
+ const ACPI_OPCODE_INFO *OpInfo;
+
+
+ FUNCTION_ENTRY ();
if (!Op)
@@ -277,6 +283,9 @@ AcpiPsGetChild (
ACPI_PARSE_OBJECT *Child = NULL;
+ FUNCTION_ENTRY ();
+
+
switch (Op->Opcode)
{
case AML_SCOPE_OP:
@@ -343,6 +352,9 @@ AcpiPsGetDepthNext (
ACPI_PARSE_OBJECT *Arg;
+ FUNCTION_ENTRY ();
+
+
if (!Op)
{
return (NULL);
diff --git a/sys/contrib/dev/acpica/psutils.c b/sys/contrib/dev/acpica/psutils.c
index 39d7633868ac..bbdafa737d32 100644
--- a/sys/contrib/dev/acpica/psutils.c
+++ b/sys/contrib/dev/acpica/psutils.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psutils - Parser miscellaneous utilities (Parser only)
- * $Revision: 40 $
+ * $Revision: 43 $
*
*****************************************************************************/
@@ -149,7 +149,10 @@ AcpiPsInitOp (
ACPI_PARSE_OBJECT *Op,
UINT16 Opcode)
{
- ACPI_OPCODE_INFO *AmlOp;
+ const ACPI_OPCODE_INFO *AmlOp;
+
+
+ FUNCTION_ENTRY ();
Op->DataType = ACPI_DESC_TYPE_PARSER;
@@ -183,24 +186,29 @@ AcpiPsAllocOp (
ACPI_PARSE_OBJECT *Op = NULL;
UINT32 Size;
UINT8 Flags;
+ const ACPI_OPCODE_INFO *OpInfo;
+
+ FUNCTION_ENTRY ();
+ OpInfo = AcpiPsGetOpcodeInfo (Opcode);
+
/* Allocate the minimum required size object */
- if (AcpiPsIsDeferredOp (Opcode))
+ if (OpInfo->Flags & AML_DEFER)
{
Size = sizeof (ACPI_PARSE2_OBJECT);
Flags = PARSEOP_DEFERRED;
}
- else if (AcpiPsIsNamedOp (Opcode))
+ else if (OpInfo->Flags & AML_NAMED)
{
Size = sizeof (ACPI_PARSE2_OBJECT);
Flags = PARSEOP_NAMED;
}
- else if (AcpiPsIsBytelistOp (Opcode))
+ else if (Opcode == AML_INT_BYTELIST_OP)
{
Size = sizeof (ACPI_PARSE2_OBJECT);
Flags = PARSEOP_BYTELIST;
@@ -213,7 +221,6 @@ AcpiPsAllocOp (
}
-
if (Size == sizeof (ACPI_PARSE_OBJECT))
{
/*
@@ -227,7 +234,6 @@ AcpiPsAllocOp (
Op = AcpiUtAcquireFromCache (ACPI_MEM_LIST_PSNODE_EXT);
}
-
/* Initialize the Op */
if (Op)
@@ -306,11 +312,7 @@ AcpiPsDeleteParseCache (
*
* FUNCTION: Utility functions
*
- * DESCRIPTION: Low level functions
- *
- * TBD: [Restructure]
- * 1) Some of these functions should be macros
- * 2) Some can be simplified
+ * DESCRIPTION: Low level character and object functions
*
******************************************************************************/
@@ -318,8 +320,6 @@ AcpiPsDeleteParseCache (
/*
* Is "c" a namestring lead character?
*/
-
-
BOOLEAN
AcpiPsIsLeadingChar (
UINT32 c)
@@ -339,192 +339,6 @@ AcpiPsIsPrefixChar (
}
-BOOLEAN
-AcpiPsIsNamespaceObjectOp (
- UINT16 Opcode)
-{
- return ((BOOLEAN)
- (Opcode == AML_SCOPE_OP ||
- Opcode == AML_DEVICE_OP ||
- Opcode == AML_THERMAL_ZONE_OP ||
- Opcode == AML_METHOD_OP ||
- Opcode == AML_POWER_RES_OP ||
- Opcode == AML_PROCESSOR_OP ||
- Opcode == AML_FIELD_OP ||
- Opcode == AML_INDEX_FIELD_OP ||
- Opcode == AML_BANK_FIELD_OP ||
- Opcode == AML_INT_NAMEDFIELD_OP ||
- Opcode == AML_NAME_OP ||
- Opcode == AML_ALIAS_OP ||
- Opcode == AML_MUTEX_OP ||
- Opcode == AML_EVENT_OP ||
- Opcode == AML_REGION_OP ||
- Opcode == AML_CREATE_FIELD_OP ||
- Opcode == AML_CREATE_BIT_FIELD_OP ||
- Opcode == AML_CREATE_BYTE_FIELD_OP ||
- Opcode == AML_CREATE_WORD_FIELD_OP ||
- Opcode == AML_CREATE_DWORD_FIELD_OP ||
- Opcode == AML_CREATE_QWORD_FIELD_OP ||
- Opcode == AML_INT_METHODCALL_OP ||
- Opcode == AML_INT_NAMEPATH_OP));
-}
-
-BOOLEAN
-AcpiPsIsNamespaceOp (
- UINT16 Opcode)
-{
- return ((BOOLEAN)
- (Opcode == AML_SCOPE_OP ||
- Opcode == AML_DEVICE_OP ||
- Opcode == AML_THERMAL_ZONE_OP ||
- Opcode == AML_METHOD_OP ||
- Opcode == AML_POWER_RES_OP ||
- Opcode == AML_PROCESSOR_OP ||
- Opcode == AML_FIELD_OP ||
- Opcode == AML_INDEX_FIELD_OP ||
- Opcode == AML_BANK_FIELD_OP ||
- Opcode == AML_NAME_OP ||
- Opcode == AML_ALIAS_OP ||
- Opcode == AML_MUTEX_OP ||
- Opcode == AML_EVENT_OP ||
- Opcode == AML_REGION_OP ||
- Opcode == AML_INT_NAMEDFIELD_OP));
-}
-
-
-/*
- * Is opcode for a named object Op?
- * (Includes all named object opcodes)
- *
- * TBD: [Restructure] Need a better way than this brute force approach!
- */
-BOOLEAN
-AcpiPsIsNodeOp (
- UINT16 Opcode)
-{
- return ((BOOLEAN)
- (Opcode == AML_SCOPE_OP ||
- Opcode == AML_DEVICE_OP ||
- Opcode == AML_THERMAL_ZONE_OP ||
- Opcode == AML_METHOD_OP ||
- Opcode == AML_POWER_RES_OP ||
- Opcode == AML_PROCESSOR_OP ||
- Opcode == AML_INT_NAMEDFIELD_OP ||
- Opcode == AML_NAME_OP ||
- Opcode == AML_ALIAS_OP ||
- Opcode == AML_MUTEX_OP ||
- Opcode == AML_EVENT_OP ||
- Opcode == AML_REGION_OP ||
-
-
- Opcode == AML_CREATE_FIELD_OP ||
- Opcode == AML_CREATE_BIT_FIELD_OP ||
- Opcode == AML_CREATE_BYTE_FIELD_OP ||
- Opcode == AML_CREATE_WORD_FIELD_OP ||
- Opcode == AML_CREATE_DWORD_FIELD_OP ||
- Opcode == AML_CREATE_QWORD_FIELD_OP ||
- Opcode == AML_INT_METHODCALL_OP ||
- Opcode == AML_INT_NAMEPATH_OP));
-}
-
-
-/*
- * Is opcode for a named Op?
- */
-BOOLEAN
-AcpiPsIsNamedOp (
- UINT16 Opcode)
-{
- return ((BOOLEAN)
- (Opcode == AML_SCOPE_OP ||
- Opcode == AML_DEVICE_OP ||
- Opcode == AML_THERMAL_ZONE_OP ||
- Opcode == AML_METHOD_OP ||
- Opcode == AML_POWER_RES_OP ||
- Opcode == AML_PROCESSOR_OP ||
- Opcode == AML_NAME_OP ||
- Opcode == AML_ALIAS_OP ||
- Opcode == AML_MUTEX_OP ||
- Opcode == AML_EVENT_OP ||
- Opcode == AML_REGION_OP ||
- Opcode == AML_INT_NAMEDFIELD_OP));
-}
-
-
-BOOLEAN
-AcpiPsIsDeferredOp (
- UINT16 Opcode)
-{
- return ((BOOLEAN)
- (Opcode == AML_METHOD_OP ||
- Opcode == AML_VAR_PACKAGE_OP ||
- Opcode == AML_CREATE_FIELD_OP ||
- Opcode == AML_CREATE_BIT_FIELD_OP ||
- Opcode == AML_CREATE_BYTE_FIELD_OP ||
- Opcode == AML_CREATE_WORD_FIELD_OP ||
- Opcode == AML_CREATE_DWORD_FIELD_OP ||
- Opcode == AML_CREATE_QWORD_FIELD_OP ||
- Opcode == AML_REGION_OP));
-}
-
-
-/*
- * Is opcode for a bytelist?
- */
-BOOLEAN
-AcpiPsIsBytelistOp (
- UINT16 Opcode)
-{
- return ((BOOLEAN) (Opcode == AML_INT_BYTELIST_OP));
-}
-
-
-/*
- * Is opcode for a Field, IndexField, or BankField
- */
-BOOLEAN
-AcpiPsIsFieldOp (
- UINT16 Opcode)
-{
- return ((BOOLEAN)
- (Opcode == AML_CREATE_FIELD_OP
- || Opcode == AML_FIELD_OP
- || Opcode == AML_INDEX_FIELD_OP
- || Opcode == AML_BANK_FIELD_OP));
-}
-
-
-/*
- * Is field creation op
- */
-BOOLEAN
-AcpiPsIsCreateFieldOp (
- UINT16 Opcode)
-{
- return ((BOOLEAN)
- (Opcode == AML_CREATE_FIELD_OP ||
- Opcode == AML_CREATE_BIT_FIELD_OP ||
- Opcode == AML_CREATE_BYTE_FIELD_OP ||
- Opcode == AML_CREATE_WORD_FIELD_OP ||
- Opcode == AML_CREATE_DWORD_FIELD_OP ||
- Opcode == AML_CREATE_QWORD_FIELD_OP));
-}
-
-
-/*
- * Cast an acpi_op to an acpi_extended_op if possible
- */
-
-/* TBD: This is very inefficient, fix */
-ACPI_PARSE2_OBJECT *
-AcpiPsToExtendedOp (
- ACPI_PARSE_OBJECT *Op)
-{
- return ((AcpiPsIsDeferredOp (Op->Opcode) || AcpiPsIsNamedOp (Op->Opcode) || AcpiPsIsBytelistOp (Op->Opcode))
- ? ( (ACPI_PARSE2_OBJECT *) Op) : NULL);
-}
-
-
/*
* Get op's name (4-byte name segment) or 0 if unnamed
*/
@@ -532,9 +346,18 @@ UINT32
AcpiPsGetName (
ACPI_PARSE_OBJECT *Op)
{
- ACPI_PARSE2_OBJECT *Named = AcpiPsToExtendedOp (Op);
- return (Named ? Named->Name : 0);
+
+ /* The "generic" object has no name associated with it */
+
+ if (Op->Flags & PARSEOP_GENERIC)
+ {
+ return (0);
+ }
+
+ /* Only the "Extended" parse objects have a name */
+
+ return (((ACPI_PARSE2_OBJECT *) Op)->Name);
}
@@ -546,11 +369,14 @@ AcpiPsSetName (
ACPI_PARSE_OBJECT *Op,
UINT32 name)
{
- ACPI_PARSE2_OBJECT *Named = AcpiPsToExtendedOp (Op);
- if (Named)
+ /* The "generic" object has no name associated with it */
+
+ if (Op->Flags & PARSEOP_GENERIC)
{
- Named->Name = name;
+ return;
}
+
+ ((ACPI_PARSE2_OBJECT *) Op)->Name = name;
}
diff --git a/sys/contrib/dev/acpica/pswalk.c b/sys/contrib/dev/acpica/pswalk.c
index 8868ed065d54..784cbbec650c 100644
--- a/sys/contrib/dev/acpica/pswalk.c
+++ b/sys/contrib/dev/acpica/pswalk.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: pswalk - Parser routines to walk parsed op tree(s)
- * $Revision: 55 $
+ * $Revision: 56 $
*
*****************************************************************************/
@@ -178,7 +178,6 @@ AcpiPsGetNextWalkOp (
* No more children, this Op is complete. Save Next and Parent
* in case the Op object gets deleted by the callback routine
*/
-
Next = Op->Next;
Parent = Op->Parent;
@@ -201,7 +200,6 @@ AcpiPsGetNextWalkOp (
* Check for a sibling to the current op. A sibling means
* we are still going "downward" in the tree.
*/
-
if (Next)
{
/* There is a sibling, it will be next */
@@ -215,7 +213,6 @@ AcpiPsGetNextWalkOp (
return_ACPI_STATUS (Status);
}
-
/*
* Drop into the loop below because we are moving upwards in
* the tree
@@ -228,7 +225,6 @@ AcpiPsGetNextWalkOp (
* We are resuming a walk, and we were (are) going upward in the tree.
* So, we want to drop into the parent loop below.
*/
-
Parent = Op;
}
diff --git a/sys/contrib/dev/acpica/psxface.c b/sys/contrib/dev/acpica/psxface.c
index 2ba98ec9eca7..29cc24070461 100644
--- a/sys/contrib/dev/acpica/psxface.c
+++ b/sys/contrib/dev/acpica/psxface.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psxface - Parser external interfaces
- * $Revision: 46 $
+ * $Revision: 47 $
*
*****************************************************************************/
@@ -188,7 +188,6 @@ AcpiPsxExecute (
* The caller "owns" the parameters, so give each one an extra
* reference
*/
-
for (i = 0; Params[i]; i++)
{
AcpiUtAddReference (Params[i]);
diff --git a/sys/contrib/dev/acpica/rsaddr.c b/sys/contrib/dev/acpica/rsaddr.c
index 61bc5907ff58..fb32d6508f75 100644
--- a/sys/contrib/dev/acpica/rsaddr.c
+++ b/sys/contrib/dev/acpica/rsaddr.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsaddr - Address resource descriptors (16/32/64)
- * $Revision: 18 $
+ * $Revision: 19 $
*
******************************************************************************/
@@ -301,7 +301,7 @@ AcpiRsAddress16Resource (
/* Point the String pointer to the end of this structure */
- OutputStruct->Data.Address16.ResourceSource.StringPtr =
+ OutputStruct->Data.Address16.ResourceSource.StringPtr =
(NATIVE_CHAR *)((UINT8 * )OutputStruct + StructSize);
TempPtr = OutputStruct->Data.Address16.ResourceSource.StringPtr;
@@ -495,7 +495,7 @@ AcpiRsAddress16Stream (
/*
* Copy the string
*/
- STRCPY (TempPointer,
+ STRCPY (TempPointer,
LinkedList->Data.Address16.ResourceSource.StringPtr);
/*
@@ -707,7 +707,7 @@ AcpiRsAddress32Resource (
/* Point the String pointer to the end of this structure */
- OutputStruct->Data.Address32.ResourceSource.StringPtr =
+ OutputStruct->Data.Address32.ResourceSource.StringPtr =
(NATIVE_CHAR *)((UINT8 *)OutputStruct + StructSize);
TempPtr = OutputStruct->Data.Address32.ResourceSource.StringPtr;
@@ -902,7 +902,7 @@ AcpiRsAddress32Stream (
/*
* Copy the string
*/
- STRCPY (TempPointer,
+ STRCPY (TempPointer,
LinkedList->Data.Address32.ResourceSource.StringPtr);
/*
@@ -1112,7 +1112,7 @@ AcpiRsAddress64Resource (
/* Point the String pointer to the end of this structure */
- OutputStruct->Data.Address64.ResourceSource.StringPtr =
+ OutputStruct->Data.Address64.ResourceSource.StringPtr =
(NATIVE_CHAR *)((UINT8 *)OutputStruct + StructSize);
TempPtr = OutputStruct->Data.Address64.ResourceSource.StringPtr;
@@ -1176,7 +1176,7 @@ AcpiRsAddress64Resource (
* the number of bytes of the
* OutputBuffer used
*
- * RETURN: Status
+ * RETURN: Status
*
* DESCRIPTION: Take the linked list resource structure and fills in the
* the appropriate bytes in a byte stream
diff --git a/sys/contrib/dev/acpica/rscalc.c b/sys/contrib/dev/acpica/rscalc.c
index 79832e3667ce..9239d6e99dbc 100644
--- a/sys/contrib/dev/acpica/rscalc.c
+++ b/sys/contrib/dev/acpica/rscalc.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rscalc - Calculate stream and list lengths
- * $Revision: 30 $
+ * $Revision: 32 $
*
******************************************************************************/
@@ -327,7 +327,7 @@ AcpiRsCalculateByteStreamLength (
* Index + the length of the null terminated string
* Resource Source + 1 for the null.
*/
- SegmentSize = 9 +
+ SegmentSize = 9 +
((LinkedList->Data.ExtendedIrq.NumberOfInterrupts - 1) * 4);
if (NULL != ExIrq->ResourceSource.StringPtr)
@@ -355,7 +355,7 @@ AcpiRsCalculateByteStreamLength (
/*
* Point to the next object
*/
- LinkedList = POINTER_ADD (ACPI_RESOURCE,
+ LinkedList = POINTER_ADD (ACPI_RESOURCE,
LinkedList, LinkedList->Length);
}
@@ -608,7 +608,7 @@ AcpiRsCalculateListLength (
Temp8 = *Buffer;
/*
- * To compensate for multiple interrupt numbers, add 4 bytes for
+ * To compensate for multiple interrupt numbers, add 4 bytes for
* each additional interrupts greater than 1
*/
AdditionalBytes = (UINT8) ((Temp8 - 1) * 4);
@@ -859,7 +859,7 @@ AcpiRsCalculatePciRoutingTableLength (
UINT32 TableIndex;
- FUNCTION_TRACE ("AcpiRsCalculatePciRoutingTableLength");
+ FUNCTION_TRACE ("RsCalculatePciRoutingTableLength");
NumberOfElements = PackageObject->Package.Count;
diff --git a/sys/contrib/dev/acpica/rscreate.c b/sys/contrib/dev/acpica/rscreate.c
index a01a47bd1869..1081232a033d 100644
--- a/sys/contrib/dev/acpica/rscreate.c
+++ b/sys/contrib/dev/acpica/rscreate.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rscreate - Create resource lists/tables
- * $Revision: 35 $
+ * $Revision: 36 $
*
******************************************************************************/
@@ -166,7 +166,6 @@ AcpiRsCreateResourceList (
/*
* Params already validated, so we don't re-validate here
*/
-
ByteStreamBufferLength = ByteStreamBuffer->Buffer.Length;
ByteStreamStart = ByteStreamBuffer->Buffer.Pointer;
@@ -192,7 +191,6 @@ AcpiRsCreateResourceList (
* If the linked list will fit into the available buffer
* call to fill in the list
*/
-
if (ListSizeNeeded <= *OutputBufferLength)
{
/*
@@ -268,7 +266,6 @@ AcpiRsCreatePciRoutingTable (
/*
* Params already validated, so we don't re-validate here
*/
-
Status = AcpiRsCalculatePciRoutingTableLength (PackageObject,
&BufferSizeNeeded);
@@ -530,7 +527,6 @@ AcpiRsCreateByteStream (
* If the linked list will fit into the available buffer
* call to fill in the list
*/
-
if (ByteStreamSizeNeeded <= *OutputBufferLength)
{
/*
diff --git a/sys/contrib/dev/acpica/rsdump.c b/sys/contrib/dev/acpica/rsdump.c
index 6cf7e35ced43..9a0a29023633 100644
--- a/sys/contrib/dev/acpica/rsdump.c
+++ b/sys/contrib/dev/acpica/rsdump.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsdump - Functions to display the resource structures.
- * $Revision: 21 $
+ * $Revision: 23 $
*
******************************************************************************/
@@ -124,6 +124,8 @@
MODULE_NAME ("rsdump")
+#ifdef ACPI_DEBUG
+
/*******************************************************************************
*
* FUNCTION: AcpiRsDumpIrq
@@ -144,6 +146,9 @@ AcpiRsDumpIrq (
UINT8 Index = 0;
+ FUNCTION_ENTRY ();
+
+
AcpiOsPrintf ("IRQ Resource\n");
AcpiOsPrintf (" %s Triggered\n",
@@ -187,6 +192,9 @@ AcpiRsDumpDma (
UINT8 Index = 0;
+ FUNCTION_ENTRY ();
+
+
AcpiOsPrintf ("DMA Resource\n");
switch (DmaData->Type)
@@ -266,8 +274,10 @@ AcpiRsDumpStartDependentFunctions (
ACPI_RESOURCE_START_DPF *SdfData = (ACPI_RESOURCE_START_DPF *) Data;
- AcpiOsPrintf ("Start Dependent Functions Resource\n");
+ FUNCTION_ENTRY ();
+
+ AcpiOsPrintf ("Start Dependent Functions Resource\n");
switch (SdfData->CompatibilityPriority)
{
@@ -331,6 +341,9 @@ AcpiRsDumpIo (
ACPI_RESOURCE_IO *IoData = (ACPI_RESOURCE_IO *) Data;
+ FUNCTION_ENTRY ();
+
+
AcpiOsPrintf ("Io Resource\n");
AcpiOsPrintf (" %d bit decode\n",
@@ -371,6 +384,9 @@ AcpiRsDumpFixedIo (
ACPI_RESOURCE_FIXED_IO *FixedIoData = (ACPI_RESOURCE_FIXED_IO *) Data;
+ FUNCTION_ENTRY ();
+
+
AcpiOsPrintf ("Fixed Io Resource\n");
AcpiOsPrintf (" Range base address: %08X",
FixedIoData->BaseAddress);
@@ -402,6 +418,9 @@ AcpiRsDumpVendorSpecific (
UINT16 Index = 0;
+ FUNCTION_ENTRY ();
+
+
AcpiOsPrintf ("Vendor Specific Resource\n");
AcpiOsPrintf (" Length: %08X\n", VendorData->Length);
@@ -435,6 +454,9 @@ AcpiRsDumpMemory24 (
ACPI_RESOURCE_MEM24 *Memory24Data = (ACPI_RESOURCE_MEM24 *) Data;
+ FUNCTION_ENTRY ();
+
+
AcpiOsPrintf ("24-Bit Memory Range Resource\n");
AcpiOsPrintf (" Read%s\n",
@@ -477,6 +499,9 @@ AcpiRsDumpMemory32 (
ACPI_RESOURCE_MEM32 *Memory32Data = (ACPI_RESOURCE_MEM32 *) Data;
+ FUNCTION_ENTRY ();
+
+
AcpiOsPrintf ("32-Bit Memory Range Resource\n");
AcpiOsPrintf (" Read%s\n",
@@ -519,6 +544,9 @@ AcpiRsDumpFixedMemory32 (
ACPI_RESOURCE_FIXED_MEM32 *FixedMemory32Data = (ACPI_RESOURCE_FIXED_MEM32 *) Data;
+ FUNCTION_ENTRY ();
+
+
AcpiOsPrintf ("32-Bit Fixed Location Memory Range Resource\n");
AcpiOsPrintf (" Read%s\n",
@@ -555,6 +583,9 @@ AcpiRsDumpAddress16 (
ACPI_RESOURCE_ADDRESS16 *Address16Data = (ACPI_RESOURCE_ADDRESS16 *) Data;
+ FUNCTION_ENTRY ();
+
+
AcpiOsPrintf ("16-Bit Address Space Resource\n");
AcpiOsPrintf (" Resource Type: ");
@@ -699,6 +730,9 @@ AcpiRsDumpAddress32 (
ACPI_RESOURCE_ADDRESS32 *Address32Data = (ACPI_RESOURCE_ADDRESS32 *) Data;
+ FUNCTION_ENTRY ();
+
+
AcpiOsPrintf ("32-Bit Address Space Resource\n");
switch (Address32Data->ResourceType)
@@ -842,6 +876,9 @@ AcpiRsDumpAddress64 (
ACPI_RESOURCE_ADDRESS64 *Address64Data = (ACPI_RESOURCE_ADDRESS64 *) Data;
+ FUNCTION_ENTRY ();
+
+
AcpiOsPrintf ("64-Bit Address Space Resource\n");
switch (Address64Data->ResourceType)
@@ -986,6 +1023,9 @@ AcpiRsDumpExtendedIrq (
UINT8 Index = 0;
+ FUNCTION_ENTRY ();
+
+
AcpiOsPrintf ("Extended IRQ Resource\n");
AcpiOsPrintf (" Resource %s\n",
@@ -1046,6 +1086,9 @@ AcpiRsDumpResourceList (
BOOLEAN Done = FALSE;
+ FUNCTION_ENTRY ();
+
+
if (AcpiDbgLevel & ACPI_LV_RESOURCES && _COMPONENT & AcpiDbgLayer)
{
while (!Done)
@@ -1152,6 +1195,9 @@ AcpiRsDumpIrqList (
PCI_ROUTING_TABLE *PrtElement;
+ FUNCTION_ENTRY ();
+
+
if (AcpiDbgLevel & ACPI_LV_RESOURCES && _COMPONENT & AcpiDbgLayer)
{
PrtElement = (PCI_ROUTING_TABLE *) Buffer;
@@ -1184,3 +1230,5 @@ AcpiRsDumpIrqList (
return;
}
+#endif
+
diff --git a/sys/contrib/dev/acpica/rsirq.c b/sys/contrib/dev/acpica/rsirq.c
index ae7af71a2733..6aa1cf5ee0b9 100644
--- a/sys/contrib/dev/acpica/rsirq.c
+++ b/sys/contrib/dev/acpica/rsirq.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsirq - IRQ resource descriptors
- * $Revision: 17 $
+ * $Revision: 18 $
*
******************************************************************************/
@@ -505,10 +505,10 @@ AcpiRsExtendedIrqResource (
Buffer += 1;
- /*
+ /*
* Point the String pointer to the end of this structure.
*/
- OutputStruct->Data.ExtendedIrq.ResourceSource.StringPtr =
+ OutputStruct->Data.ExtendedIrq.ResourceSource.StringPtr =
(NATIVE_CHAR *)(OutputStruct + StructSize);
TempPtr = OutputStruct->Data.ExtendedIrq.ResourceSource.StringPtr;
@@ -654,7 +654,7 @@ AcpiRsExtendedIrqStream (
/*
* Copy the string
*/
- STRCPY (TempPointer,
+ STRCPY (TempPointer,
LinkedList->Data.ExtendedIrq.ResourceSource.StringPtr);
/*
diff --git a/sys/contrib/dev/acpica/rslist.c b/sys/contrib/dev/acpica/rslist.c
index d7ec0f961caf..1171f2bf4b97 100644
--- a/sys/contrib/dev/acpica/rslist.c
+++ b/sys/contrib/dev/acpica/rslist.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rslist - Linked list utilities
- * $Revision: 17 $
+ * $Revision: 19 $
*
******************************************************************************/
@@ -141,6 +141,9 @@ AcpiRsGetResourceType (
UINT8 ResourceStartByte)
{
+ FUNCTION_ENTRY ();
+
+
/*
* Determine if this is a small or large resource
*/
@@ -216,7 +219,7 @@ AcpiRsByteStreamToList (
/*
* 24-Bit Memory Resource
*/
- Status = AcpiRsMemory24Resource (ByteStreamBuffer,
+ Status = AcpiRsMemory24Resource (ByteStreamBuffer,
&BytesConsumed, Buffer, &StructureSize);
break;
@@ -435,6 +438,7 @@ AcpiRsListToByteStream (
FUNCTION_TRACE ("RsListToByteStream");
+
while (!Done)
{
switch (LinkedList->Id)
@@ -529,7 +533,7 @@ AcpiRsListToByteStream (
/*
* 16-Bit Address Descriptor Resource
*/
- Status = AcpiRsAddress16Stream (LinkedList, &Buffer,
+ Status = AcpiRsAddress16Stream (LinkedList, &Buffer,
&BytesConsumed);
break;
@@ -581,7 +585,7 @@ AcpiRsListToByteStream (
/*
* Point to the next object
*/
- LinkedList = POINTER_ADD (ACPI_RESOURCE,
+ LinkedList = POINTER_ADD (ACPI_RESOURCE,
LinkedList, LinkedList->Length);
}
diff --git a/sys/contrib/dev/acpica/rsmisc.c b/sys/contrib/dev/acpica/rsmisc.c
index 54d8656638ef..830991d40f3c 100644
--- a/sys/contrib/dev/acpica/rsmisc.c
+++ b/sys/contrib/dev/acpica/rsmisc.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsmisc - Miscellaneous resource descriptors
- * $Revision: 15 $
+ * $Revision: 16 $
*
******************************************************************************/
@@ -284,7 +284,7 @@ AcpiRsVendorResource (
{
/*
* Large Item
- * Point to the length field
+ * Point to the length field
*/
Buffer += 1;
@@ -305,7 +305,7 @@ AcpiRsVendorResource (
{
/*
* Small Item
- * Dereference the size
+ * Dereference the size
*/
Temp16 = (UINT8)(*Buffer & 0x07);
diff --git a/sys/contrib/dev/acpica/rsxface.c b/sys/contrib/dev/acpica/rsxface.c
index ea31fa2b9bc7..0d5265f9352c 100644
--- a/sys/contrib/dev/acpica/rsxface.c
+++ b/sys/contrib/dev/acpica/rsxface.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsxface - Public interfaces to the resource manager
- * $Revision: 13 $
+ * $Revision: 14 $
*
******************************************************************************/
@@ -220,7 +220,7 @@ AcpiGetCurrentResources (
FUNCTION_TRACE ("AcpiGetCurrentResources");
-
+
/* Ensure that ACPI has been initialized */
ACPI_IS_INITIALIZATION_COMPLETE (Status);
diff --git a/sys/contrib/dev/acpica/tbconvrt.c b/sys/contrib/dev/acpica/tbconvrt.c
index 5bdddc1262bf..84fa10659f9d 100644
--- a/sys/contrib/dev/acpica/tbconvrt.c
+++ b/sys/contrib/dev/acpica/tbconvrt.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbconvrt - ACPI Table conversion utilities
- * $Revision: 25 $
+ * $Revision: 27 $
*
*****************************************************************************/
@@ -134,7 +134,7 @@
*
* RETURN:
*
- * DESCRIPTION:
+ * DESCRIPTION: Calculate the number of tables
*
******************************************************************************/
@@ -146,6 +146,8 @@ AcpiTbGetTableCount (
UINT32 PointerSize;
+ FUNCTION_ENTRY ();
+
#ifndef _IA64
@@ -166,7 +168,6 @@ AcpiTbGetTableCount (
* pointers contained within the RSDT/XSDT. The size of the pointers
* is architecture-dependent.
*/
-
return ((RSDT->Length - sizeof (ACPI_TABLE_HEADER)) / PointerSize);
}
@@ -179,7 +180,7 @@ AcpiTbGetTableCount (
*
* RETURN:
*
- * DESCRIPTION:
+ * DESCRIPTION: Convert an RSDT to an XSDT (internal common format)
*
******************************************************************************/
@@ -193,6 +194,9 @@ AcpiTbConvertToXsdt (
XSDT_DESCRIPTOR *NewTable;
+ FUNCTION_ENTRY ();
+
+
*NumberOfTables = AcpiTbGetTableCount (AcpiGbl_RSDP, TableInfo->Pointer);
@@ -289,7 +293,7 @@ AcpiTbConvertTableFadt (void)
ACPI_TABLE_DESC *TableDesc;
- FUNCTION_TRACE ("AcpiTbConvertTableFadt");
+ FUNCTION_TRACE ("TbConvertTableFadt");
/* AcpiGbl_FADT is valid */
@@ -483,7 +487,6 @@ AcpiTbConvertTableFadt (void)
* entire 1.0 table can be copied first, then expand some
* fields to 64 bits.
*/
-
MEMCPY (FADT2, FADT1, sizeof (FADT_DESCRIPTOR_REV1));
@@ -609,7 +612,7 @@ AcpiTbBuildCommonFacs (
FACS_DESCRIPTOR_REV2 *FACS2;
- FUNCTION_TRACE ("AcpiTbBuildCommonFacs");
+ FUNCTION_TRACE ("TbBuildCommonFacs");
/* Allocate a common FACS */
diff --git a/sys/contrib/dev/acpica/tbget.c b/sys/contrib/dev/acpica/tbget.c
index 7b8aa878f230..0d186df215c5 100644
--- a/sys/contrib/dev/acpica/tbget.c
+++ b/sys/contrib/dev/acpica/tbget.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbget - ACPI Table get* routines
- * $Revision: 52 $
+ * $Revision: 55 $
*
*****************************************************************************/
@@ -240,6 +240,7 @@ AcpiTbGetTable (
FUNCTION_TRACE ("TbGetTable");
+
if (!TableInfo)
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
@@ -251,7 +252,6 @@ AcpiTbGetTable (
/*
* Getting data from a buffer, not BIOS tables
*/
-
TableHeader = BufferPtr;
Status = AcpiTbValidateTableHeader (TableHeader);
if (ACPI_FAILURE (Status))
@@ -345,7 +345,6 @@ AcpiTbGetAllTables (
* This will NOT include the FACS and DSDT - we must get
* them after the loop
*/
-
for (Index = 0; Index < NumberOfTables; Index++)
{
/* Clear the TableInfo each time */
@@ -382,7 +381,6 @@ AcpiTbGetAllTables (
* error. Just get as many tables as we can, later we will
* determine if there are enough tables to continue.
*/
-
AcpiTbUninstallTable (&TableInfo);
}
}
@@ -408,19 +406,16 @@ AcpiTbGetAllTables (
*
*/
-
/*
* Get the FACS (must have the FADT first, from loop above)
* AcpiTbGetTableFacs will fail if FADT pointer is not valid
*/
-
Status = AcpiTbGetTableFacs (TablePtr, &TableInfo);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
-
/* Install the FACS */
Status = AcpiTbInstallTable (TablePtr, &TableInfo);
@@ -433,7 +428,6 @@ AcpiTbGetAllTables (
* Create the common FACS pointer table
* (Contains pointers to the original table)
*/
-
Status = AcpiTbBuildCommonFacs (&TableInfo);
if (ACPI_FAILURE (Status))
{
@@ -444,7 +438,6 @@ AcpiTbGetAllTables (
/*
* Get the DSDT (We know that the FADT is valid now)
*/
-
Status = AcpiTbGetTable ((ACPI_PHYSICAL_ADDRESS) ACPI_GET_ADDRESS (AcpiGbl_FADT->XDsdt),
TablePtr, &TableInfo);
if (ACPI_FAILURE (Status))
@@ -508,7 +501,7 @@ AcpiTbVerifyRsdp (
UINT8 *TablePtr;
- FUNCTION_TRACE ("AcpiTbVerifyRsdp");
+ FUNCTION_TRACE ("TbVerifyRsdp");
/*
@@ -591,6 +584,9 @@ AcpiTbGetRsdtAddress (void)
ACPI_PHYSICAL_ADDRESS PhysicalAddress;
+ FUNCTION_ENTRY ();
+
+
/*
* For RSDP revision 0 or 1, we use the RSDT.
* For RSDP revision 2 (and above), we use the XSDT
@@ -611,14 +607,13 @@ AcpiTbGetRsdtAddress (void)
ACPI_GET_ADDRESS (AcpiGbl_RSDP->XsdtPhysicalAddress);
}
-
return (PhysicalAddress);
}
/*******************************************************************************
*
- * FUNCTION: AcpiTbValidateRsdt
+ * FUNCTION: AcpiTbValidateRsdt
*
* PARAMETERS: TablePtr - Addressable pointer to the RSDT.
*
@@ -634,6 +629,7 @@ AcpiTbValidateRsdt (
{
UINT32 NoMatch;
+
PROC_NAME ("TbValidateRsdt");
@@ -643,12 +639,12 @@ AcpiTbValidateRsdt (
*/
if (AcpiGbl_RSDP->Revision < 2)
{
- NoMatch = STRNCMP ((char *) TablePtr, RSDT_SIG,
+ NoMatch = STRNCMP ((char *) TablePtr, RSDT_SIG,
sizeof (RSDT_SIG) -1);
}
else
{
- NoMatch = STRNCMP ((char *) TablePtr, XSDT_SIG,
+ NoMatch = STRNCMP ((char *) TablePtr, XSDT_SIG,
sizeof (XSDT_SIG) -1);
}
@@ -696,6 +692,8 @@ AcpiTbGetTablePointer (
ACPI_STATUS Status;
+ FUNCTION_ENTRY ();
+
if ((Flags & ACPI_MEMORY_MODE) == ACPI_LOGICAL_ADDRESSING)
{
@@ -715,7 +713,6 @@ AcpiTbGetTablePointer (
}
-
/*******************************************************************************
*
* FUNCTION: AcpiTbGetTableRsdt
@@ -743,7 +740,6 @@ AcpiTbGetTableRsdt (
/*
* Get the RSDT from the RSDP
*/
-
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"RSDP located at %p, RSDT physical=%8.8lX%8.8lX \n",
AcpiGbl_RSDP, HIDWORD(AcpiGbl_RSDP->RsdtPhysicalAddress),
@@ -773,7 +769,7 @@ AcpiTbGetTableRsdt (
}
- /*
+ /*
* Valid RSDT signature, verify the checksum. If it fails, just
* print a warning and ignore it.
*/
diff --git a/sys/contrib/dev/acpica/tbinstal.c b/sys/contrib/dev/acpica/tbinstal.c
index 64c9e99c44ce..338c265d9771 100644
--- a/sys/contrib/dev/acpica/tbinstal.c
+++ b/sys/contrib/dev/acpica/tbinstal.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbinstal - ACPI table installation and removal
- * $Revision: 41 $
+ * $Revision: 42 $
*
*****************************************************************************/
@@ -155,7 +155,6 @@ AcpiTbInstallTable (
* Check the table signature and make sure it is recognized
* Also checks the header checksum
*/
-
Status = AcpiTbRecognizeTable (TablePtr, TableInfo);
if (ACPI_FAILURE (Status))
{
@@ -225,7 +224,6 @@ AcpiTbRecognizeTable (
* Search for a signature match among the known table types
* Start at index one -> Skip the RSDP
*/
-
Status = AE_SUPPORT;
for (i = 1; i < NUM_ACPI_TABLES; i++)
{
@@ -237,7 +235,6 @@ AcpiTbRecognizeTable (
* Found a signature match, get the pertinent info from the
* TableData structure
*/
-
TableType = i;
Status = AcpiGbl_AcpiTableData[i].Status;
@@ -257,7 +254,6 @@ AcpiTbRecognizeTable (
* Validate checksum for _most_ tables,
* even the ones whose signature we don't recognize
*/
-
if (TableType != ACPI_TABLE_FACS)
{
/* But don't abort if the checksum is wrong */
@@ -270,7 +266,6 @@ AcpiTbRecognizeTable (
* An AE_SUPPORT means that the table was not recognized.
* We basically ignore this; just print a debug message
*/
-
if (Status == AE_SUPPORT)
{
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
@@ -309,7 +304,6 @@ AcpiTbInitTableDescriptor (
/*
* Install the table into the global data structure
*/
-
ListHead = &AcpiGbl_AcpiTables[TableType];
TableDesc = ListHead;
@@ -319,14 +313,12 @@ AcpiTbInitTableDescriptor (
* includes most ACPI tables such as the DSDT. 2) Multiple instances of
* the table are allowed. This includes SSDT and PSDTs.
*/
-
if (IS_SINGLE_TABLE (AcpiGbl_AcpiTableData[TableType].Flags))
{
/*
* Only one table allowed, and a table has alread been installed
* at this location, so return an error.
*/
-
if (ListHead->Pointer)
{
return_ACPI_STATUS (AE_EXIST);
@@ -342,7 +334,6 @@ AcpiTbInitTableDescriptor (
* Multiple tables allowed for this table type, we must link
* the new table in to the list of tables of this type.
*/
-
if (ListHead->Pointer)
{
TableDesc = ACPI_MEM_CALLOCATE (sizeof (ACPI_TABLE_DESC));
@@ -390,7 +381,6 @@ AcpiTbInitTableDescriptor (
* Set the appropriate global pointer (if there is one) to point to the
* newly installed table
*/
-
if (AcpiGbl_AcpiTableData[TableType].GlobalPtr)
{
*(AcpiGbl_AcpiTableData[TableType].GlobalPtr) = TableInfo->Pointer;
@@ -428,7 +418,6 @@ AcpiTbDeleteAcpiTables (void)
* Free memory allocated for ACPI tables
* Memory can either be mapped or allocated
*/
-
for (Type = 0; Type < NUM_ACPI_TABLES; Type++)
{
AcpiTbDeleteAcpiTable (Type);
@@ -540,7 +529,6 @@ AcpiTbFreeAcpiTablesOfType (
* Walk the entire list, deleting both the allocated tables
* and the table descriptors
*/
-
for (i = 0; i < Count; i++)
{
TableDesc = AcpiTbUninstallTable (TableDesc);
diff --git a/sys/contrib/dev/acpica/tbutils.c b/sys/contrib/dev/acpica/tbutils.c
index a8252da87ad4..50dc4f2bd9f7 100644
--- a/sys/contrib/dev/acpica/tbutils.c
+++ b/sys/contrib/dev/acpica/tbutils.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbutils - Table manipulation utilities
- * $Revision: 39 $
+ * $Revision: 40 $
*
*****************************************************************************/
@@ -146,6 +146,7 @@ AcpiTbHandleToObject (
UINT32 i;
ACPI_TABLE_DESC *ListHead;
+
PROC_NAME ("TbHandleToObject");
@@ -375,7 +376,6 @@ AcpiTbMapAcpiTable (
* Validate the header and delete the mapping.
* We will create a mapping for the full table below.
*/
-
Status = AcpiTbValidateTableHeader (Table);
/* Always unmap the memory for the header */
diff --git a/sys/contrib/dev/acpica/tbxface.c b/sys/contrib/dev/acpica/tbxface.c
index 76f6ec893f61..6478264e86fb 100644
--- a/sys/contrib/dev/acpica/tbxface.c
+++ b/sys/contrib/dev/acpica/tbxface.c
@@ -2,7 +2,7 @@
*
* Module Name: tbxface - Public interfaces to the ACPI subsystem
* ACPI table oriented interfaces
- * $Revision: 42 $
+ * $Revision: 43 $
*
*****************************************************************************/
@@ -162,7 +162,7 @@ AcpiLoadTables (void)
/* Get the RSDP */
- Status = AcpiOsGetRootPointer (ACPI_LOGICAL_ADDRESSING,
+ Status = AcpiOsGetRootPointer (ACPI_LOGICAL_ADDRESSING,
&RsdpPhysicalAddress);
if (ACPI_FAILURE (Status))
{
diff --git a/sys/contrib/dev/acpica/tbxfroot.c b/sys/contrib/dev/acpica/tbxfroot.c
index f6e5f408f1de..229a099a8775 100644
--- a/sys/contrib/dev/acpica/tbxfroot.c
+++ b/sys/contrib/dev/acpica/tbxfroot.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbxfroot - Find the root ACPI table (RSDT)
- * $Revision: 47 $
+ * $Revision: 49 $
*
*****************************************************************************/
@@ -191,6 +191,7 @@ AcpiTbScanMemoryForRsdp (
FUNCTION_TRACE ("TbScanMemoryForRsdp");
+
/* Search from given start addr for the requested length */
for (Offset = 0, MemRover = StartAddress;
@@ -213,6 +214,7 @@ AcpiTbScanMemoryForRsdp (
}
/* Searched entire block, no RSDP was found */
+
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,"Searched entire block, no RSDP was found.\n"));
return_PTR (NULL);
@@ -252,7 +254,7 @@ AcpiTbFindRsdp (
FUNCTION_TRACE ("TbFindRsdp");
- /*
+ /*
* Scan supports either 1) Logical addressing or 2) Physical addressing
*/
if ((Flags & ACPI_MEMORY_MODE) == ACPI_LOGICAL_ADDRESSING)
@@ -281,7 +283,7 @@ AcpiTbFindRsdp (
return_ACPI_STATUS (AE_OK);
}
-
+
/*
* 2) Search upper memory: 16-byte boundaries in E0000h-F0000h
*/
@@ -317,7 +319,7 @@ AcpiTbFindRsdp (
/*
* 1) Search EBDA (low memory) paragraphs
*/
- MemRover = AcpiTbScanMemoryForRsdp ((UINT8 *) LO_RSDP_WINDOW_BASE,
+ MemRover = AcpiTbScanMemoryForRsdp ((UINT8 *) LO_RSDP_WINDOW_BASE,
LO_RSDP_WINDOW_SIZE);
if (MemRover)
{
@@ -330,7 +332,7 @@ AcpiTbFindRsdp (
/*
* 2) Search upper memory: 16-byte boundaries in E0000h-F0000h
*/
- MemRover = AcpiTbScanMemoryForRsdp ((UINT8 *) HI_RSDP_WINDOW_BASE,
+ MemRover = AcpiTbScanMemoryForRsdp ((UINT8 *) HI_RSDP_WINDOW_BASE,
HI_RSDP_WINDOW_SIZE);
if (MemRover)
{
@@ -391,12 +393,11 @@ AcpiGetFirmwareTable (
FUNCTION_TRACE ("AcpiGetFirmwareTable");
- /*
+ /*
* Ensure that at least the table manager is initialized. We don't
* require that the entire ACPI subsystem is up for this interface
*/
-
/*
* If we have a buffer, we must have a length too
*/
@@ -446,7 +447,7 @@ AcpiGetFirmwareTable (
/*
- * Search the RSDT/XSDT for the correct instance of the
+ * Search the RSDT/XSDT for the correct instance of the
* requested table
*/
for (i = 0, j = 0; i < TableCount; i++)
diff --git a/sys/contrib/dev/acpica/utalloc.c b/sys/contrib/dev/acpica/utalloc.c
index 7485797a0c83..c03de8507b26 100644
--- a/sys/contrib/dev/acpica/utalloc.c
+++ b/sys/contrib/dev/acpica/utalloc.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utalloc - local cache and memory allocation routines
- * $Revision: 95 $
+ * $Revision: 100 $
*
*****************************************************************************/
@@ -126,7 +126,6 @@
MODULE_NAME ("utalloc")
-
/******************************************************************************
*
* FUNCTION: AcpiUtReleaseToCache
@@ -149,6 +148,9 @@ AcpiUtReleaseToCache (
ACPI_MEMORY_LIST *CacheInfo;
+ FUNCTION_ENTRY ();
+
+
/* If walk cache is full, just free this wallkstate object */
CacheInfo = &AcpiGbl_MemoryLists[ListId];
@@ -185,7 +187,7 @@ AcpiUtReleaseToCache (
*
* PARAMETERS: ListId - Memory list ID
*
- * RETURN: A requested object. NULL if the object could not be
+ * RETURN: A requested object. NULL if the object could not be
* allocated.
*
* DESCRIPTION: Get an object from the specified cache. If cache is empty,
@@ -201,7 +203,8 @@ AcpiUtAcquireFromCache (
void *Object;
- PROC_NAME ("AcpiUtAcquireFromCache");
+ PROC_NAME ("UtAcquireFromCache");
+
CacheInfo = &AcpiGbl_MemoryLists[ListId];
AcpiUtAcquireMutex (ACPI_MTX_CACHES);
@@ -219,7 +222,10 @@ AcpiUtAcquireFromCache (
ACPI_MEM_TRACKING (CacheInfo->CacheHits++);
CacheInfo->CacheDepth--;
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Object %p from cache %d\n", Object, ListId));
+#ifdef ACPI_DBG_TRACK_ALLOCATIONS
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Object %p from %s\n",
+ Object, AcpiGbl_MemoryLists[ListId].ListName));
+#endif
AcpiUtReleaseMutex (ACPI_MTX_CACHES);
@@ -264,6 +270,9 @@ AcpiUtDeleteGenericCache (
char *Next;
+ FUNCTION_ENTRY ();
+
+
CacheInfo = &AcpiGbl_MemoryLists[ListId];
while (CacheInfo->ListHead)
{
@@ -278,7 +287,6 @@ AcpiUtDeleteGenericCache (
}
-
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
@@ -288,8 +296,8 @@ AcpiUtDeleteGenericCache (
*
* Each memory allocation is tracked via a doubly linked list. Each
* element contains the caller's component, module name, function name, and
- * line number. AcpiUtAllocate and AcpiUtCallocate call
- * AcpiUtAddElementToAllocList to add an element to the list; deletion
+ * line number. AcpiUtAllocate and AcpiUtCallocate call
+ * AcpiUtAddElementToAllocList to add an element to the list; deletion
* occurs in the body of AcpiUtFree.
*/
@@ -314,6 +322,9 @@ AcpiUtSearchAllocList (
ACPI_DEBUG_MEM_BLOCK *Element;
+ FUNCTION_ENTRY ();
+
+
if (ListId > ACPI_MEM_LIST_MAX)
{
return (NULL);
@@ -414,7 +425,7 @@ AcpiUtAddElementToAllocList (
Address->Next = MemList->ListHead;
Address->Previous = NULL;
-
+
MemList->ListHead = Address;
@@ -471,7 +482,7 @@ AcpiUtDeleteElementFromAllocList (
AcpiUtAcquireMutex (ACPI_MTX_MEMORY);
-
+
/* Unlink */
if (Address->Previous)
@@ -583,8 +594,8 @@ AcpiUtDumpCurrentAllocations (
FUNCTION_TRACE ("UtDumpCurrentAllocations");
- Element = AcpiGbl_MemoryLists[0].ListHead;
+ Element = AcpiGbl_MemoryLists[0].ListHead;
if (Element == NULL)
{
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS,
@@ -688,7 +699,7 @@ AcpiUtAllocate (
ACPI_STATUS Status;
- FUNCTION_TRACE_U32 ("AcpiUtAllocate", Size);
+ FUNCTION_TRACE_U32 ("UtAllocate", Size);
/* Check for an inadvertent size of zero bytes */
@@ -711,7 +722,7 @@ AcpiUtAllocate (
return_PTR (NULL);
}
- Status = AcpiUtAddElementToAllocList (ACPI_MEM_LIST_GLOBAL, Address, Size,
+ Status = AcpiUtAddElementToAllocList (ACPI_MEM_LIST_GLOBAL, Address, Size,
MEM_MALLOC, Component, Module, Line);
if (ACPI_FAILURE (Status))
{
@@ -754,7 +765,7 @@ AcpiUtCallocate (
ACPI_STATUS Status;
- FUNCTION_TRACE_U32 ("AcpiUtCallocate", Size);
+ FUNCTION_TRACE_U32 ("UtCallocate", Size);
/* Check for an inadvertent size of zero bytes */
@@ -777,7 +788,7 @@ AcpiUtCallocate (
return_PTR (NULL);
}
- Status = AcpiUtAddElementToAllocList (ACPI_MEM_LIST_GLOBAL, Address, Size,
+ Status = AcpiUtAddElementToAllocList (ACPI_MEM_LIST_GLOBAL, Address, Size,
MEM_CALLOC, Component, Module, Line);
if (ACPI_FAILURE (Status))
{
@@ -818,7 +829,7 @@ AcpiUtFree (
ACPI_DEBUG_MEM_BLOCK *DebugBlock;
- FUNCTION_TRACE_PTR ("AcpiUtFree", Address);
+ FUNCTION_TRACE_PTR ("UtFree", Address);
if (NULL == Address)
@@ -829,13 +840,13 @@ AcpiUtFree (
return_VOID;
}
- DebugBlock = (ACPI_DEBUG_MEM_BLOCK *)
+ DebugBlock = (ACPI_DEBUG_MEM_BLOCK *)
(((char *) Address) - sizeof (ACPI_DEBUG_MEM_HEADER));
AcpiGbl_MemoryLists[ACPI_MEM_LIST_GLOBAL].TotalFreed++;
AcpiGbl_MemoryLists[ACPI_MEM_LIST_GLOBAL].CurrentTotalSize -= DebugBlock->Size;
- AcpiUtDeleteElementFromAllocList (ACPI_MEM_LIST_GLOBAL, DebugBlock,
+ AcpiUtDeleteElementFromAllocList (ACPI_MEM_LIST_GLOBAL, DebugBlock,
Component, Module, Line);
AcpiOsFree (DebugBlock);
diff --git a/sys/contrib/dev/acpica/utcopy.c b/sys/contrib/dev/acpica/utcopy.c
index a3ee2763ce53..8f6777519408 100644
--- a/sys/contrib/dev/acpica/utcopy.c
+++ b/sys/contrib/dev/acpica/utcopy.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utcopy - Internal to external object translation utilities
- * $Revision: 77 $
+ * $Revision: 79 $
*
*****************************************************************************/
@@ -161,7 +161,6 @@ AcpiUtCopyIsimpleToEsimple (
* Check for NULL object case (could be an uninitialized
* package element
*/
-
if (!InternalObject)
{
*BufferSpaceUsed = 0;
@@ -176,7 +175,6 @@ AcpiUtCopyIsimpleToEsimple (
* In general, the external object will be the same type as
* the internal object
*/
-
ExternalObject->Type = InternalObject->Common.Type;
/* However, only a limited number of external types are supported */
@@ -213,7 +211,6 @@ AcpiUtCopyIsimpleToEsimple (
/*
* This is an object reference. Attempt to dereference it.
*/
-
switch (InternalObject->Reference.Opcode)
{
case AML_ZERO_OP:
@@ -318,6 +315,9 @@ AcpiUtCopyIelementToEelement (
ACPI_OBJECT *TargetObject;
+ FUNCTION_ENTRY ();
+
+
ThisIndex = State->Pkg.Index;
TargetObject = (ACPI_OBJECT *)
&((ACPI_OBJECT *)(State->Pkg.DestObject))->Package.Elements[ThisIndex];
@@ -428,7 +428,6 @@ AcpiUtCopyIpackageToEpackage (
* Build an array of ACPI_OBJECTS in the buffer
* and move the free space past it
*/
-
Info.FreeSpace += ExternalObject->Package.Count *
ROUND_UP_TO_NATIVE_WORD (sizeof (ACPI_OBJECT));
@@ -624,7 +623,6 @@ AcpiUtCopyEpackageToIpackage (
* Build an array of ACPI_OBJECTS in the buffer
* and move the free space past it
*/
-
FreeSpace += ExternalObject->Package.Count * sizeof(ACPI_OBJECT);
@@ -674,7 +672,7 @@ AcpiUtCopyEobjectToIobject (
RetBuffer->Pointer,
&RetBuffer->Length);
*/
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Packages as parameters not implemented!\n"));
return_ACPI_STATUS (AE_NOT_IMPLEMENTED);
@@ -721,6 +719,9 @@ AcpiUtCopyIelementToIelement (
ACPI_OPERAND_OBJECT *TargetObject;
+ FUNCTION_ENTRY ();
+
+
ThisIndex = State->Pkg.Index;
ThisTargetPtr = (ACPI_OPERAND_OBJECT **)
&State->Pkg.DestObject->Package.Elements[ThisIndex];
@@ -806,6 +807,7 @@ AcpiUtCopyIpackageToIpackage (
{
ACPI_STATUS Status = AE_OK;
+
FUNCTION_TRACE ("UtCopyIpackageToIpackage");
@@ -816,7 +818,6 @@ AcpiUtCopyIpackageToIpackage (
/*
* Create the object array and walk the source package tree
*/
-
DestObj->Package.Elements = ACPI_MEM_CALLOCATE ((SourceObj->Package.Count + 1) *
sizeof (void *));
DestObj->Package.NextElement = DestObj->Package.Elements;
diff --git a/sys/contrib/dev/acpica/utdebug.c b/sys/contrib/dev/acpica/utdebug.c
index 7a0393ddc469..9da1f9f6dbdb 100644
--- a/sys/contrib/dev/acpica/utdebug.c
+++ b/sys/contrib/dev/acpica/utdebug.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utdebug - Debug print routines
- * $Revision: 76 $
+ * $Revision: 87 $
*
*****************************************************************************/
@@ -122,32 +122,72 @@
MODULE_NAME ("utdebug")
-UINT32 PrevThreadId = 0xFFFFFFFF;
+UINT32 AcpiGbl_PrevThreadId = 0xFFFFFFFF;
+char *AcpiGbl_FnEntryStr = "----Entry";
+char *AcpiGbl_FnExitStr = "----Exit-";
+
+
+
+#ifdef ACPI_DEBUG
+
/*****************************************************************************
*
- * FUNCTION: Get/Set debug level
+ * FUNCTION: AcpiUtInitStackPtrTrace
+ *
+ * PARAMETERS: None
*
- * DESCRIPTION: Get or set value of the debug flag
+ * RETURN: None
*
- * These are used to allow user's to get/set the debug level
+ * DESCRIPTION: Save the current stack pointer
*
****************************************************************************/
-
-UINT32
-GetDebugLevel (void)
+void
+AcpiUtInitStackPtrTrace (
+ void)
{
+ UINT32 CurrentSp;
- return (AcpiDbgLevel);
+
+ AcpiGbl_EntryStackPointer = (UINT32) &CurrentSp;
}
+
+/*****************************************************************************
+ *
+ * FUNCTION: AcpiUtTrackStackPtr
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Save the current stack pointer
+ *
+ ****************************************************************************/
+
void
-SetDebugLevel (
- UINT32 NewDebugLevel)
+AcpiUtTrackStackPtr (
+ void)
{
+ UINT32 CurrentSp;
- AcpiDbgLevel = NewDebugLevel;
+ CurrentSp = (UINT32) &CurrentSp;
+
+ if (CurrentSp < AcpiGbl_LowestStackPointer)
+ {
+ AcpiGbl_LowestStackPointer = CurrentSp;
+ }
+
+ if (AcpiGbl_NestingLevel > AcpiGbl_DeepestNesting)
+ {
+ AcpiGbl_DeepestNesting = AcpiGbl_NestingLevel;
+
+ if (AcpiGbl_DeepestNesting == 34)
+ {
+ AcpiOsPrintf ("hit deepest nesting\n");
+ }
+ }
}
@@ -160,7 +200,7 @@ SetDebugLevel (
* ModuleName - Caller's module name (for error output)
* LineNumber - Caller's line number (for error output)
* ComponentId - Caller's component ID (for error output)
- *
+ *
* Format - Printf format field
* ... - Optional printf arguments
*
@@ -174,10 +214,8 @@ SetDebugLevel (
void
AcpiUtDebugPrint (
UINT32 RequestedDebugLevel,
- UINT32 ComponentId,
- NATIVE_CHAR *ProcName,
- NATIVE_CHAR *ModuleName,
UINT32 LineNumber,
+ ACPI_DEBUG_PRINT_INFO *DbgInfo,
char *Format,
...)
{
@@ -185,35 +223,44 @@ AcpiUtDebugPrint (
va_list args;
+ /*
+ * Stay silent if the debug level or component ID is disabled
+ */
if (!(RequestedDebugLevel & AcpiDbgLevel) ||
- !(ComponentId & AcpiDbgLayer))
+ !(DbgInfo->ComponentId & AcpiDbgLayer))
{
return;
}
+ /*
+ * Thread tracking and context switch notification
+ */
ThreadId = AcpiOsGetThreadId ();
- if (ThreadId != PrevThreadId)
+ if (ThreadId != AcpiGbl_PrevThreadId)
{
if (ACPI_LV_THREADS & AcpiDbgLevel)
{
AcpiOsPrintf ("\n**** Context Switch from TID %X to TID %X ****\n\n",
- PrevThreadId, ThreadId);
+ AcpiGbl_PrevThreadId, ThreadId);
}
- PrevThreadId = ThreadId;
+ AcpiGbl_PrevThreadId = ThreadId;
}
+ /*
+ * Display the module name, current line number, thread ID (if requested),
+ * current procedure nesting level, and the current procedure name
+ */
+ AcpiOsPrintf ("%8s-%04d ", DbgInfo->ModuleName, LineNumber);
+
if (ACPI_LV_THREADS & AcpiDbgLevel)
{
- AcpiOsPrintf ("%8s-%04d[%04X][%02d] %s: ", ModuleName, LineNumber, ThreadId, AcpiGbl_NestingLevel, ProcName);
- }
- else
- {
- AcpiOsPrintf ("%8s-%04d[%02d] %s: ", ModuleName, LineNumber, AcpiGbl_NestingLevel, ProcName);
+ AcpiOsPrintf ("[%04X] ", ThreadId, AcpiGbl_NestingLevel, DbgInfo->ProcName);
}
+ AcpiOsPrintf ("[%02d] %-22.22s: ", AcpiGbl_NestingLevel, DbgInfo->ProcName);
va_start (args, Format);
@@ -225,18 +272,18 @@ AcpiUtDebugPrint (
*
* FUNCTION: AcpiUtDebugPrintRaw
*
- * PARAMETERS: DebugLevel - Requested debug print level
- * ProcName - Caller's procedure name
- * ModuleName - Caller's module name (for error output)
- * LineNumber - Caller's line number (for error output)
- * ComponentId - Caller's component ID (for error output)
- *
+ * PARAMETERS: RequestedDebugLevel - Requested debug print level
+ * LineNumber - Caller's line number
+ * DbgInfo - Contains:
+ * ProcName - Caller's procedure name
+ * ModuleName - Caller's module name
+ * ComponentId - Caller's component ID
* Format - Printf format field
* ... - Optional printf arguments
*
* RETURN: None
*
- * DESCRIPTION: Print message with no headers. Has same interface as
+ * DESCRIPTION: Print message with no headers. Has same interface as
* DebugPrint so that the same macros can be used.
*
****************************************************************************/
@@ -244,19 +291,16 @@ AcpiUtDebugPrint (
void
AcpiUtDebugPrintRaw (
UINT32 RequestedDebugLevel,
- UINT32 ComponentId,
- NATIVE_CHAR *ProcName,
- NATIVE_CHAR *ModuleName,
UINT32 LineNumber,
+ ACPI_DEBUG_PRINT_INFO *DbgInfo,
char *Format,
...)
{
va_list args;
-
if (!(RequestedDebugLevel & AcpiDbgLevel) ||
- !(ComponentId & AcpiDbgLayer))
+ !(DbgInfo->ComponentId & AcpiDbgLayer))
{
return;
}
@@ -269,12 +313,13 @@ AcpiUtDebugPrintRaw (
/*****************************************************************************
*
- * FUNCTION: FunctionTrace
+ * FUNCTION: AcpiUtTrace
*
- * PARAMETERS: ModuleName - Caller's module name (for error output)
- * LineNumber - Caller's line number (for error output)
- * ComponentId - Caller's component ID (for error output)
- * FunctionName - Name of Caller's function
+ * PARAMETERS: LineNumber - Caller's line number
+ * DbgInfo - Contains:
+ * ProcName - Caller's procedure name
+ * ModuleName - Caller's module name
+ * ComponentId - Caller's component ID
*
* RETURN: None
*
@@ -284,28 +329,28 @@ AcpiUtDebugPrintRaw (
****************************************************************************/
void
-FunctionTrace (
- NATIVE_CHAR *ModuleName,
+AcpiUtTrace (
UINT32 LineNumber,
- UINT32 ComponentId,
- NATIVE_CHAR *FunctionName)
+ ACPI_DEBUG_PRINT_INFO *DbgInfo)
{
AcpiGbl_NestingLevel++;
+ AcpiUtTrackStackPtr ();
- AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, ComponentId, FunctionName,
- ModuleName, LineNumber, "----Entered Function----\n");
+ AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, LineNumber, DbgInfo,
+ "%s\n", AcpiGbl_FnEntryStr);
}
/*****************************************************************************
*
- * FUNCTION: FunctionTracePtr
+ * FUNCTION: AcpiUtTracePtr
*
- * PARAMETERS: ModuleName - Caller's module name (for error output)
- * LineNumber - Caller's line number (for error output)
- * ComponentId - Caller's component ID (for error output)
- * FunctionName - Name of Caller's function
+ * PARAMETERS: LineNumber - Caller's line number
+ * DbgInfo - Contains:
+ * ProcName - Caller's procedure name
+ * ModuleName - Caller's module name
+ * ComponentId - Caller's component ID
* Pointer - Pointer to display
*
* RETURN: None
@@ -316,28 +361,28 @@ FunctionTrace (
****************************************************************************/
void
-FunctionTracePtr (
- NATIVE_CHAR *ModuleName,
+AcpiUtTracePtr (
UINT32 LineNumber,
- UINT32 ComponentId,
- NATIVE_CHAR *FunctionName,
+ ACPI_DEBUG_PRINT_INFO *DbgInfo,
void *Pointer)
{
AcpiGbl_NestingLevel++;
- AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, ComponentId, FunctionName,
- ModuleName, LineNumber, "----Entered Function---- %p\n", Pointer);
-}
+ AcpiUtTrackStackPtr ();
+ AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, LineNumber, DbgInfo,
+ "%s %p\n", AcpiGbl_FnEntryStr, Pointer);
+}
/*****************************************************************************
*
- * FUNCTION: FunctionTraceStr
+ * FUNCTION: AcpiUtTraceStr
*
- * PARAMETERS: ModuleName - Caller's module name (for error output)
- * LineNumber - Caller's line number (for error output)
- * ComponentId - Caller's component ID (for error output)
- * FunctionName - Name of Caller's function
+ * PARAMETERS: LineNumber - Caller's line number
+ * DbgInfo - Contains:
+ * ProcName - Caller's procedure name
+ * ModuleName - Caller's module name
+ * ComponentId - Caller's component ID
* String - Additional string to display
*
* RETURN: None
@@ -348,28 +393,29 @@ FunctionTracePtr (
****************************************************************************/
void
-FunctionTraceStr (
- NATIVE_CHAR *ModuleName,
+AcpiUtTraceStr (
UINT32 LineNumber,
- UINT32 ComponentId,
- NATIVE_CHAR *FunctionName,
+ ACPI_DEBUG_PRINT_INFO *DbgInfo,
NATIVE_CHAR *String)
{
AcpiGbl_NestingLevel++;
- AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, ComponentId, FunctionName,
- ModuleName, LineNumber, "----Entered Function---- %s\n", String);
+ AcpiUtTrackStackPtr ();
+
+ AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, LineNumber, DbgInfo,
+ "%s %s\n", AcpiGbl_FnEntryStr, String);
}
/*****************************************************************************
*
- * FUNCTION: FunctionTraceU32
+ * FUNCTION: AcpiUtTraceU32
*
- * PARAMETERS: ModuleName - Caller's module name (for error output)
- * LineNumber - Caller's line number (for error output)
- * ComponentId - Caller's component ID (for error output)
- * FunctionName - Name of Caller's function
+ * PARAMETERS: LineNumber - Caller's line number
+ * DbgInfo - Contains:
+ * ProcName - Caller's procedure name
+ * ModuleName - Caller's module name
+ * ComponentId - Caller's component ID
* Integer - Integer to display
*
* RETURN: None
@@ -380,28 +426,29 @@ FunctionTraceStr (
****************************************************************************/
void
-FunctionTraceU32 (
- NATIVE_CHAR *ModuleName,
+AcpiUtTraceU32 (
UINT32 LineNumber,
- UINT32 ComponentId,
- NATIVE_CHAR *FunctionName,
+ ACPI_DEBUG_PRINT_INFO *DbgInfo,
UINT32 Integer)
{
AcpiGbl_NestingLevel++;
- AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, ComponentId, FunctionName,
- ModuleName, LineNumber, "----Entered Function---- %08X\n", Integer);
+ AcpiUtTrackStackPtr ();
+
+ AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, LineNumber, DbgInfo,
+ "%s %08X\n", AcpiGbl_FnEntryStr, Integer);
}
/*****************************************************************************
*
- * FUNCTION: FunctionExit
+ * FUNCTION: AcpiUtExit
*
- * PARAMETERS: ModuleName - Caller's module name (for error output)
- * LineNumber - Caller's line number (for error output)
- * ComponentId - Caller's component ID (for error output)
- * FunctionName - Name of Caller's function
+ * PARAMETERS: LineNumber - Caller's line number
+ * DbgInfo - Contains:
+ * ProcName - Caller's procedure name
+ * ModuleName - Caller's module name
+ * ComponentId - Caller's component ID
*
* RETURN: None
*
@@ -411,15 +458,13 @@ FunctionTraceU32 (
****************************************************************************/
void
-FunctionExit (
- NATIVE_CHAR *ModuleName,
+AcpiUtExit (
UINT32 LineNumber,
- UINT32 ComponentId,
- NATIVE_CHAR *FunctionName)
+ ACPI_DEBUG_PRINT_INFO *DbgInfo)
{
- AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, ComponentId, FunctionName,
- ModuleName, LineNumber, "----Exiting Function----\n");
+ AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, LineNumber, DbgInfo,
+ "%s\n", AcpiGbl_FnExitStr);
AcpiGbl_NestingLevel--;
}
@@ -427,12 +472,13 @@ FunctionExit (
/*****************************************************************************
*
- * FUNCTION: FunctionStatusExit
+ * FUNCTION: AcpiUtStatusExit
*
- * PARAMETERS: ModuleName - Caller's module name (for error output)
- * LineNumber - Caller's line number (for error output)
- * ComponentId - Caller's component ID (for error output)
- * FunctionName - Name of Caller's function
+ * PARAMETERS: LineNumber - Caller's line number
+ * DbgInfo - Contains:
+ * ProcName - Caller's procedure name
+ * ModuleName - Caller's module name
+ * ComponentId - Caller's component ID
* Status - Exit status code
*
* RETURN: None
@@ -443,17 +489,24 @@ FunctionExit (
****************************************************************************/
void
-FunctionStatusExit (
- NATIVE_CHAR *ModuleName,
+AcpiUtStatusExit (
UINT32 LineNumber,
- UINT32 ComponentId,
- NATIVE_CHAR *FunctionName,
+ ACPI_DEBUG_PRINT_INFO *DbgInfo,
ACPI_STATUS Status)
{
- AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, ComponentId, FunctionName,
- ModuleName, LineNumber, "----Exiting Function---- %s\n",
- AcpiFormatException (Status));
+ if (ACPI_SUCCESS (Status))
+ {
+ AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, LineNumber, DbgInfo,
+ "%s %s\n", AcpiGbl_FnExitStr,
+ AcpiFormatException (Status));
+ }
+ else
+ {
+ AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, LineNumber, DbgInfo,
+ "%s ****Exception****: %s\n", AcpiGbl_FnExitStr,
+ AcpiFormatException (Status));
+ }
AcpiGbl_NestingLevel--;
}
@@ -461,12 +514,13 @@ FunctionStatusExit (
/*****************************************************************************
*
- * FUNCTION: FunctionValueExit
+ * FUNCTION: AcpiUtValueExit
*
- * PARAMETERS: ModuleName - Caller's module name (for error output)
- * LineNumber - Caller's line number (for error output)
- * ComponentId - Caller's component ID (for error output)
- * FunctionName - Name of Caller's function
+ * PARAMETERS: LineNumber - Caller's line number
+ * DbgInfo - Contains:
+ * ProcName - Caller's procedure name
+ * ModuleName - Caller's module name
+ * ComponentId - Caller's component ID
* Value - Value to be printed with exit msg
*
* RETURN: None
@@ -477,17 +531,14 @@ FunctionStatusExit (
****************************************************************************/
void
-FunctionValueExit (
- NATIVE_CHAR *ModuleName,
+AcpiUtValueExit (
UINT32 LineNumber,
- UINT32 ComponentId,
- NATIVE_CHAR *FunctionName,
+ ACPI_DEBUG_PRINT_INFO *DbgInfo,
ACPI_INTEGER Value)
{
- AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, ComponentId, FunctionName,
- ModuleName, LineNumber, "----Exiting Function---- %08X\n",
- Value);
+ AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, LineNumber, DbgInfo,
+ "%s %08X\n", AcpiGbl_FnExitStr, Value);
AcpiGbl_NestingLevel--;
}
@@ -495,12 +546,13 @@ FunctionValueExit (
/*****************************************************************************
*
- * FUNCTION: FunctionPtrExit
+ * FUNCTION: AcpiUtPtrExit
*
- * PARAMETERS: ModuleName - Caller's module name (for error output)
- * LineNumber - Caller's line number (for error output)
- * ComponentId - Caller's component ID (for error output)
- * FunctionName - Name of Caller's function
+ * PARAMETERS: LineNumber - Caller's line number
+ * DbgInfo - Contains:
+ * ProcName - Caller's procedure name
+ * ModuleName - Caller's module name
+ * ComponentId - Caller's component ID
* Value - Value to be printed with exit msg
*
* RETURN: None
@@ -511,21 +563,22 @@ FunctionValueExit (
****************************************************************************/
void
-FunctionPtrExit (
- NATIVE_CHAR *ModuleName,
+AcpiUtPtrExit (
UINT32 LineNumber,
- UINT32 ComponentId,
- NATIVE_CHAR *FunctionName,
+ ACPI_DEBUG_PRINT_INFO *DbgInfo,
UINT8 *Ptr)
{
- AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, ComponentId, FunctionName,
- ModuleName, LineNumber, "----Exiting Function----, %p\n",
- Ptr);
+ AcpiUtDebugPrint (ACPI_LV_FUNCTIONS, LineNumber, DbgInfo,
+ "%s %p\n", AcpiGbl_FnExitStr, Ptr);
AcpiGbl_NestingLevel--;
}
+#endif
+
+
+
/*****************************************************************************
*
@@ -533,6 +586,7 @@ FunctionPtrExit (
*
* PARAMETERS: Buffer - Buffer to dump
* Count - Amount to dump, in bytes
+ * Display - BYTE, WORD, DWORD, or QWORD display
* ComponentID - Caller's component ID
*
* RETURN: None
@@ -665,4 +719,3 @@ AcpiUtDumpBuffer (
return;
}
-
diff --git a/sys/contrib/dev/acpica/utdelete.c b/sys/contrib/dev/acpica/utdelete.c
index e556bd14c329..b4c91043a4cc 100644
--- a/sys/contrib/dev/acpica/utdelete.c
+++ b/sys/contrib/dev/acpica/utdelete.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: utdelete - object deletion and reference count utilities
- * $Revision: 74 $
+ * $Revision: 75 $
*
******************************************************************************/
@@ -159,7 +159,6 @@ AcpiUtDeleteInternalObj (
* Must delete or free any pointers within the object that are not
* actual ACPI objects (for example, a raw buffer pointer).
*/
-
switch (Object->Common.Type)
{
@@ -345,7 +344,6 @@ AcpiUtDeleteInternalObjectList (
* Simple objects are simply stored in the array and do not
* need to be deleted separately.
*/
-
if (IS_THIS_OBJECT_TYPE ((*InternalObj), ACPI_TYPE_PACKAGE))
{
/* Delete the package */
@@ -403,7 +401,6 @@ AcpiUtUpdateRefCount (
/*
* Reference count action (increment, decrement, or force delete)
*/
-
switch (Action)
{
@@ -472,7 +469,6 @@ AcpiUtUpdateRefCount (
* Sanity check the reference count, for debug purposes only.
* (A deleted object will have a huge reference count)
*/
-
if (Count > MAX_REFERENCE_COUNT)
{
@@ -534,7 +530,6 @@ AcpiUtUpdateObjectReference (
/*
* Make sure that this isn't a namespace handle or an AML pointer
*/
-
if (VALID_DESCRIPTOR_TYPE (Object, ACPI_DESC_TYPE_NAMED))
{
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Object %p is NS handle\n", Object));
@@ -605,7 +600,6 @@ AcpiUtUpdateObjectReference (
* Note: There can be null elements within the package,
* these are simply ignored
*/
-
Status = AcpiUtCreateUpdateStateAndPush (
Object->Package.Elements[i], Action, &StateList);
if (ACPI_FAILURE (Status))
@@ -703,7 +697,6 @@ AcpiUtUpdateObjectReference (
* happen after we update the sub-objects in case this causes the
* main object to be deleted.
*/
-
AcpiUtUpdateRefCount (Object, Action);
@@ -741,7 +734,6 @@ AcpiUtAddReference (
/*
* Ensure that we have a valid object
*/
-
if (!AcpiUtValidInternalObject (Object))
{
return_VOID;
@@ -750,7 +742,6 @@ AcpiUtAddReference (
/*
* We have a valid ACPI internal object, now increment the reference count
*/
-
AcpiUtUpdateObjectReference (Object, REF_INCREMENT);
return_VOID;
@@ -780,7 +771,6 @@ AcpiUtRemoveReference (
/*
* Ensure that we have a valid object
*/
-
if (!AcpiUtValidInternalObject (Object))
{
return_VOID;
@@ -794,7 +784,6 @@ AcpiUtRemoveReference (
* if the reference count becomes 0. (Must also decrement the ref count
* of all subobjects!)
*/
-
AcpiUtUpdateObjectReference (Object, REF_DECREMENT);
return_VOID;
}
diff --git a/sys/contrib/dev/acpica/uteval.c b/sys/contrib/dev/acpica/uteval.c
index 57fbe7576b51..67a8427ad2ce 100644
--- a/sys/contrib/dev/acpica/uteval.c
+++ b/sys/contrib/dev/acpica/uteval.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: uteval - Object evaluation
- * $Revision: 29 $
+ * $Revision: 30 $
*
*****************************************************************************/
@@ -162,12 +162,12 @@ AcpiUtEvaluateNumericObject (
{
if (Status == AE_NOT_FOUND)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%s on %4.4s was not found\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%s on %4.4s was not found\n",
ObjectName, &DeviceNode->Name));
}
else
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "%s on %4.4s failed with status %s\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "%s on %4.4s failed with status %s\n",
ObjectName, &DeviceNode->Name,
AcpiFormatException (Status)));
}
@@ -180,7 +180,7 @@ AcpiUtEvaluateNumericObject (
if (!ObjDesc)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No object was returned from %s\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "No object was returned from %s\n",
ObjectName));
return_ACPI_STATUS (AE_TYPE);
}
@@ -190,7 +190,7 @@ AcpiUtEvaluateNumericObject (
if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
{
Status = AE_TYPE;
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Type returned from %s was not a number: %X \n",
ObjectName, ObjDesc->Common.Type));
}
diff --git a/sys/contrib/dev/acpica/utglobal.c b/sys/contrib/dev/acpica/utglobal.c
index 7a8ba8758836..44f6f36b3fd0 100644
--- a/sys/contrib/dev/acpica/utglobal.c
+++ b/sys/contrib/dev/acpica/utglobal.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utglobal - Global variables for the ACPI subsystem
- * $Revision: 127 $
+ * $Revision: 131 $
*
*****************************************************************************/
@@ -128,7 +128,6 @@
MODULE_NAME ("utglobal")
-
/******************************************************************************
*
* FUNCTION: AcpiFormatException
@@ -145,7 +144,7 @@ const char *
AcpiFormatException (
ACPI_STATUS Status)
{
- char *Exception = "UNKNOWN_STATUS_CODE";
+ const char *Exception = "UNKNOWN_STATUS_CODE";
ACPI_STATUS SubStatus;
@@ -239,10 +238,14 @@ UINT32 AcpiGbl_SystemFlags = 0;
UINT32 AcpiGbl_StartupFlags = 0;
/* System starts unitialized! */
+
BOOLEAN AcpiGbl_Shutdown = TRUE;
+const UINT8 AcpiGbl_DecodeTo8bit [8] = {1,2,4,8,16,32,64,128};
-UINT8 AcpiGbl_DecodeTo8bit [8] = {1,2,4,8,16,32,64,128};
+const NATIVE_CHAR *AcpiGbl_DbSleepStates[ACPI_NUM_SLEEP_STATES] = {
+ "\\_S0_","\\_S1_","\\_S2_","\\_S3_",
+ "\\_S4_","\\_S5_","\\_S4B"};
/******************************************************************************
@@ -263,7 +266,7 @@ UINT8 AcpiGbl_DecodeTo8bit [8] = {1,2,4,8,16,32,64,128};
* during the initialization sequence.
*/
-PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] =
+const PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] =
{
{"_GPE", INTERNAL_TYPE_DEF_ANY},
{"_PR_", INTERNAL_TYPE_DEF_ANY},
@@ -284,7 +287,7 @@ PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] =
* and the table is indexed by values of ACPI_OBJECT_TYPE
*/
-UINT8 AcpiGbl_NsProperties[] =
+const UINT8 AcpiGbl_NsProperties[] =
{
NSP_NORMAL, /* 00 Any */
NSP_NORMAL, /* 01 Number */
@@ -327,10 +330,24 @@ UINT8 AcpiGbl_NsProperties[] =
/* Hex to ASCII conversion table */
-NATIVE_CHAR AcpiGbl_HexToAscii[] =
+const NATIVE_CHAR AcpiGbl_HexToAscii[] =
{'0','1','2','3','4','5','6','7',
'8','9','A','B','C','D','E','F'};
+/*****************************************************************************
+ *
+ * FUNCTION: AcpiUtHexToAsciiChar
+ *
+ * PARAMETERS: Integer - Contains the hex digit
+ * Position - bit position of the digit within the
+ * integer
+ *
+ * RETURN: Ascii character
+ *
+ * DESCRIPTION: Convert a hex digit to an ascii character
+ *
+ ****************************************************************************/
+
UINT8
AcpiUtHexToAsciiChar (
ACPI_INTEGER Integer,
@@ -340,6 +357,7 @@ AcpiUtHexToAsciiChar (
return (AcpiGbl_HexToAscii[(Integer >> Position) & 0xF]);
}
+
/******************************************************************************
*
* Table globals
@@ -370,13 +388,10 @@ ACPI_TABLE_SUPPORT AcpiGbl_AcpiTableData[NUM_ACPI_TABLES] =
#ifdef ACPI_DEBUG
-/******************************************************************************
- *
+/*
* Strings and procedures used for debug only
*
- ******************************************************************************/
-
-NATIVE_CHAR *MsgAcpiErrorBreak = "*** Break on ACPI_ERROR ***\n";
+ */
/*****************************************************************************
@@ -414,10 +429,10 @@ AcpiUtGetMutexName (
* indicatewhat type is actually going to be stored for this entry.
*/
-static NATIVE_CHAR AcpiGbl_BadType[] = "UNDEFINED";
-#define TYPE_NAME_LENGTH 9 /* Maximum length of each string */
+static const NATIVE_CHAR AcpiGbl_BadType[] = "UNDEFINED";
+#define TYPE_NAME_LENGTH 9 /* Maximum length of each string */
-static NATIVE_CHAR *AcpiGbl_NsTypeNames[] = /* printable names of ACPI types */
+static const NATIVE_CHAR *AcpiGbl_NsTypeNames[] = /* printable names of ACPI types */
{
/* 00 */ "Untyped",
/* 01 */ "Integer",
@@ -477,16 +492,16 @@ AcpiUtGetTypeName (
if (Type > INTERNAL_TYPE_INVALID)
{
- return (AcpiGbl_BadType);
+ return ((NATIVE_CHAR *) AcpiGbl_BadType);
}
- return (AcpiGbl_NsTypeNames[Type]);
+ return ((NATIVE_CHAR *) AcpiGbl_NsTypeNames[Type]);
}
/* Region type decoding */
-NATIVE_CHAR *AcpiGbl_RegionTypes[NUM_REGION_TYPES] =
+const NATIVE_CHAR *AcpiGbl_RegionTypes[NUM_REGION_TYPES] =
{
"SystemMemory",
"SystemIO",
@@ -525,20 +540,20 @@ AcpiUtGetRegionName (
return ("InvalidSpaceID");
}
- return (AcpiGbl_RegionTypes[SpaceId]);
+ return ((NATIVE_CHAR *) AcpiGbl_RegionTypes[SpaceId]);
}
/* Data used in keeping track of fields */
-NATIVE_CHAR *AcpiGbl_FENames[NUM_FIELD_NAMES] =
+const NATIVE_CHAR *AcpiGbl_FENames[NUM_FIELD_NAMES] =
{
"skip",
"?access?"
}; /* FE = Field Element */
-NATIVE_CHAR *AcpiGbl_MatchOps[NUM_MATCH_OPS] =
+const NATIVE_CHAR *AcpiGbl_MatchOps[NUM_MATCH_OPS] =
{
"Error",
"MTR",
@@ -552,7 +567,7 @@ NATIVE_CHAR *AcpiGbl_MatchOps[NUM_MATCH_OPS] =
/* Access type decoding */
-NATIVE_CHAR *AcpiGbl_AccessTypes[NUM_ACCESS_TYPES] =
+const NATIVE_CHAR *AcpiGbl_AccessTypes[NUM_ACCESS_TYPES] =
{
"AnyAcc",
"ByteAcc",
@@ -566,7 +581,7 @@ NATIVE_CHAR *AcpiGbl_AccessTypes[NUM_ACCESS_TYPES] =
/* Update rule decoding */
-NATIVE_CHAR *AcpiGbl_UpdateRules[NUM_UPDATE_RULES] =
+const NATIVE_CHAR *AcpiGbl_UpdateRules[NUM_UPDATE_RULES] =
{
"Preserve",
"WriteAsOnes",
@@ -681,25 +696,22 @@ AcpiUtInitGlobals (
FUNCTION_TRACE ("UtInitGlobals");
-
-
/* Memory allocation and cache lists */
- MEMSET (AcpiGbl_MemoryLists, 0,
- sizeof (ACPI_MEMORY_LIST) * ACPI_NUM_MEM_LISTS);
+ MEMSET (AcpiGbl_MemoryLists, 0, sizeof (ACPI_MEMORY_LIST) * ACPI_NUM_MEM_LISTS);
- AcpiGbl_MemoryLists[ACPI_MEM_LIST_STATE].LinkOffset = (UINT16) (NATIVE_UINT) &(((ACPI_GENERIC_STATE *) NULL)->Common.Next);
- AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE].LinkOffset = (UINT16) (NATIVE_UINT) &(((ACPI_PARSE_OBJECT *) NULL)->Next);
- AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE_EXT].LinkOffset = (UINT16) (NATIVE_UINT) &(((ACPI_PARSE2_OBJECT *) NULL)->Next);
- AcpiGbl_MemoryLists[ACPI_MEM_LIST_OPERAND].LinkOffset = (UINT16) (NATIVE_UINT) &(((ACPI_OPERAND_OBJECT *) NULL)->Cache.Next);
- AcpiGbl_MemoryLists[ACPI_MEM_LIST_WALK].LinkOffset = (UINT16) (NATIVE_UINT) &(((ACPI_WALK_STATE *) NULL)->Next);
+ AcpiGbl_MemoryLists[ACPI_MEM_LIST_STATE].LinkOffset = (UINT16) (NATIVE_UINT) &(((ACPI_GENERIC_STATE *) NULL)->Common.Next);
+ AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE].LinkOffset = (UINT16) (NATIVE_UINT) &(((ACPI_PARSE_OBJECT *) NULL)->Next);
+ AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE_EXT].LinkOffset = (UINT16) (NATIVE_UINT) &(((ACPI_PARSE2_OBJECT *) NULL)->Next);
+ AcpiGbl_MemoryLists[ACPI_MEM_LIST_OPERAND].LinkOffset = (UINT16) (NATIVE_UINT) &(((ACPI_OPERAND_OBJECT *) NULL)->Cache.Next);
+ AcpiGbl_MemoryLists[ACPI_MEM_LIST_WALK].LinkOffset = (UINT16) (NATIVE_UINT) &(((ACPI_WALK_STATE *) NULL)->Next);
- AcpiGbl_MemoryLists[ACPI_MEM_LIST_NSNODE].ObjectSize = sizeof (ACPI_NAMESPACE_NODE);
- AcpiGbl_MemoryLists[ACPI_MEM_LIST_STATE].ObjectSize = sizeof (ACPI_GENERIC_STATE);
- AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE].ObjectSize = sizeof (ACPI_PARSE_OBJECT);
- AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE_EXT].ObjectSize = sizeof (ACPI_PARSE2_OBJECT);
- AcpiGbl_MemoryLists[ACPI_MEM_LIST_OPERAND].ObjectSize = sizeof (ACPI_OPERAND_OBJECT);
- AcpiGbl_MemoryLists[ACPI_MEM_LIST_WALK].ObjectSize = sizeof (ACPI_WALK_STATE);
+ AcpiGbl_MemoryLists[ACPI_MEM_LIST_NSNODE].ObjectSize = sizeof (ACPI_NAMESPACE_NODE);
+ AcpiGbl_MemoryLists[ACPI_MEM_LIST_STATE].ObjectSize = sizeof (ACPI_GENERIC_STATE);
+ AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE].ObjectSize = sizeof (ACPI_PARSE_OBJECT);
+ AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE_EXT].ObjectSize = sizeof (ACPI_PARSE2_OBJECT);
+ AcpiGbl_MemoryLists[ACPI_MEM_LIST_OPERAND].ObjectSize = sizeof (ACPI_OPERAND_OBJECT);
+ AcpiGbl_MemoryLists[ACPI_MEM_LIST_WALK].ObjectSize = sizeof (ACPI_WALK_STATE);
AcpiGbl_MemoryLists[ACPI_MEM_LIST_STATE].MaxCacheDepth = MAX_STATE_CACHE_DEPTH;
AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE].MaxCacheDepth = MAX_PARSE_CACHE_DEPTH;
@@ -707,14 +719,13 @@ AcpiUtInitGlobals (
AcpiGbl_MemoryLists[ACPI_MEM_LIST_OPERAND].MaxCacheDepth = MAX_OBJECT_CACHE_DEPTH;
AcpiGbl_MemoryLists[ACPI_MEM_LIST_WALK].MaxCacheDepth = MAX_WALK_CACHE_DEPTH;
-
- ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_GLOBAL].ListName = "Global Memory Allocation");
- ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_NSNODE].ListName = "Namespace Nodes");
- ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_STATE].ListName = "State Object Cache");
- ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE].ListName = "Parse Node Cache");
- ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE_EXT].ListName = "Extended Parse Node Cache");
- ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_OPERAND].ListName = "Operand Object Cache");
- ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_WALK].ListName = "Tree Walk Node Cache");
+ ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_GLOBAL].ListName = "Global Memory Allocation");
+ ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_NSNODE].ListName = "Namespace Nodes");
+ ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_STATE].ListName = "State Object Cache");
+ ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE].ListName = "Parse Node Cache");
+ ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE_EXT].ListName = "Extended Parse Node Cache");
+ ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_OPERAND].ListName = "Operand Object Cache");
+ ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_WALK].ListName = "Tree Walk Node Cache");
/* ACPI table structure */
@@ -759,7 +770,6 @@ AcpiUtInitGlobals (
AcpiGbl_FADT = NULL;
AcpiGbl_DSDT = NULL;
-
/* Global Lock support */
AcpiGbl_GlobalLockAcquired = FALSE;
@@ -780,7 +790,6 @@ AcpiUtInitGlobals (
AcpiGbl_NextMethodOwnerId = FIRST_METHOD_ID;
AcpiGbl_DebuggerConfiguration = DEBUGGER_THREADING;
-
/* Hardware oriented */
AcpiGbl_Gpe0EnableRegisterSave = NULL;
@@ -802,6 +811,10 @@ AcpiUtInitGlobals (
AcpiGbl_RootNodeStruct.Flags = ANOBJ_END_OF_PEER_LIST;
+#ifdef ACPI_DEBUG
+ AcpiGbl_LowestStackPointer = ACPI_UINT32_MAX;
+#endif
+
return_VOID;
}
diff --git a/sys/contrib/dev/acpica/utinit.c b/sys/contrib/dev/acpica/utinit.c
index 64e995f7b7c8..bf1511f35960 100644
--- a/sys/contrib/dev/acpica/utinit.c
+++ b/sys/contrib/dev/acpica/utinit.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utinit - Common ACPI subsystem initialization
- * $Revision: 99 $
+ * $Revision: 101 $
*
*****************************************************************************/
@@ -131,6 +131,7 @@
#define ACPI_OFFSET(d,o) ((UINT32) &(((d *)0)->o))
#define ACPI_FADT_OFFSET(o) ACPI_OFFSET (FADT_DESCRIPTOR, o)
+
/*******************************************************************************
*
* FUNCTION: AcpiUtFadtRegisterError
@@ -185,7 +186,6 @@ AcpiUtValidateFadt (
* Verify Fixed ACPI Description Table fields,
* but don't abort on any problems, just display error
*/
-
if (AcpiGbl_FADT->Pm1EvtLen < 4)
{
Status = AcpiUtFadtRegisterError ("PM1_EVT_LEN",
@@ -234,7 +234,6 @@ AcpiUtValidateFadt (
/* length of GPE blocks must be a multiple of 2 */
-
if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XGpe0Blk.Address) &&
(AcpiGbl_FADT->Gpe0BlkLen & 1))
{
diff --git a/sys/contrib/dev/acpica/utmisc.c b/sys/contrib/dev/acpica/utmisc.c
index dddbe27d3cf3..a9e9e45064dd 100644
--- a/sys/contrib/dev/acpica/utmisc.c
+++ b/sys/contrib/dev/acpica/utmisc.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: utmisc - common utility procedures
- * $Revision: 46 $
+ * $Revision: 50 $
*
******************************************************************************/
@@ -153,6 +153,9 @@ AcpiUtValidAcpiName (
UINT32 i;
+ FUNCTION_ENTRY ();
+
+
for (i = 0; i < ACPI_NAME_SIZE; i++)
{
if (!((NamePtr[i] == '_') ||
@@ -163,7 +166,6 @@ AcpiUtValidAcpiName (
}
}
-
return (TRUE);
}
@@ -185,11 +187,14 @@ AcpiUtValidAcpiCharacter (
NATIVE_CHAR Character)
{
+ FUNCTION_ENTRY ();
+
return ((BOOLEAN) ((Character == '_') ||
(Character >= 'A' && Character <= 'Z') ||
(Character >= '0' && Character <= '9')));
}
+
/*******************************************************************************
*
* FUNCTION: AcpiUtStrupr
@@ -209,6 +214,9 @@ AcpiUtStrupr (
NATIVE_CHAR *String;
+ FUNCTION_ENTRY ();
+
+
/* Walk entire string, uppercasing the letters */
for (String = SrcString; *String; )
@@ -576,6 +584,9 @@ AcpiUtCreateUpdateStateAndPush (
ACPI_GENERIC_STATE *State;
+ FUNCTION_ENTRY ();
+
+
/* Ignore null objects; these are expected */
if (!Object)
@@ -619,6 +630,9 @@ AcpiUtCreatePkgStateAndPush (
ACPI_GENERIC_STATE *State;
+ FUNCTION_ENTRY ();
+
+
State = AcpiUtCreatePkgState (InternalObject, ExternalObject, Index);
if (!State)
{
@@ -651,6 +665,7 @@ AcpiUtPushGenericState (
{
FUNCTION_TRACE ("UtPushGenericState");
+
/* Push the state object onto the front of the list (stack) */
State->Common.Next = *ListHead;
@@ -679,7 +694,7 @@ AcpiUtPopGenericState (
ACPI_GENERIC_STATE *State;
- FUNCTION_TRACE ("DsPopGenericState");
+ FUNCTION_TRACE ("UtPopGenericState");
/* Remove the state object at the head of the list (stack) */
@@ -715,6 +730,9 @@ AcpiUtCreateGenericState (void)
ACPI_GENERIC_STATE *State;
+ FUNCTION_ENTRY ();
+
+
State = AcpiUtAcquireFromCache (ACPI_MEM_LIST_STATE);
/* Initialize */
@@ -841,6 +859,7 @@ AcpiUtCreateControlState (
FUNCTION_TRACE ("UtCreateControlState");
+
/* Create the generic state object */
State = AcpiUtCreateGenericState ();
@@ -928,7 +947,7 @@ AcpiUtResolvePackageReferences (
ACPI_OPERAND_OBJECT *SubObject;
- FUNCTION_TRACE ("AcpiUtResolvePackageReferences");
+ FUNCTION_TRACE ("UtResolvePackageReferences");
if (ObjDesc->Common.Type != ACPI_TYPE_PACKAGE)
@@ -996,7 +1015,7 @@ AcpiUtDisplayInitPathname (
char Buffer[128];
- PROC_NAME ("AcpiUtDisplayInitPathname");
+ PROC_NAME ("UtDisplayInitPathname");
Status = AcpiNsHandleToPathname (ObjHandle, &Length, Buffer);
@@ -1040,7 +1059,7 @@ AcpiUtWalkPackageTree (
ACPI_OPERAND_OBJECT *ThisSourceObj;
- FUNCTION_TRACE ("AcpiUtWalkPackageTree");
+ FUNCTION_TRACE ("UtWalkPackageTree");
State = AcpiUtCreatePkgState (SourceObject, TargetObject, 0);
@@ -1149,13 +1168,12 @@ AcpiUtWalkPackageTree (
/* We should never get here */
return (AE_AML_INTERNAL);
-
}
/*******************************************************************************
*
- * FUNCTION: _ReportError
+ * FUNCTION: AcpiUtReportError
*
* PARAMETERS: ModuleName - Caller's module name (for error output)
* LineNumber - Caller's line number (for error output)
@@ -1169,7 +1187,7 @@ AcpiUtWalkPackageTree (
******************************************************************************/
void
-_ReportError (
+AcpiUtReportError (
NATIVE_CHAR *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId)
@@ -1182,7 +1200,7 @@ _ReportError (
/*******************************************************************************
*
- * FUNCTION: _ReportWarning
+ * FUNCTION: AcpiUtReportWarning
*
* PARAMETERS: ModuleName - Caller's module name (for error output)
* LineNumber - Caller's line number (for error output)
@@ -1196,7 +1214,7 @@ _ReportError (
******************************************************************************/
void
-_ReportWarning (
+AcpiUtReportWarning (
NATIVE_CHAR *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId)
@@ -1208,7 +1226,7 @@ _ReportWarning (
/*******************************************************************************
*
- * FUNCTION: _ReportInfo
+ * FUNCTION: AcpiUtReportInfo
*
* PARAMETERS: ModuleName - Caller's module name (for error output)
* LineNumber - Caller's line number (for error output)
@@ -1222,7 +1240,7 @@ _ReportWarning (
******************************************************************************/
void
-_ReportInfo (
+AcpiUtReportInfo (
NATIVE_CHAR *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId)
diff --git a/sys/contrib/dev/acpica/utobject.c b/sys/contrib/dev/acpica/utobject.c
index 9442bbdd3746..fcd214f2317c 100644
--- a/sys/contrib/dev/acpica/utobject.c
+++ b/sys/contrib/dev/acpica/utobject.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utobject - ACPI object create/delete/size/cache routines
- * $Revision: 51 $
+ * $Revision: 54 $
*
*****************************************************************************/
@@ -129,7 +129,7 @@
/*******************************************************************************
*
- * FUNCTION: _UtCreateInternalObject
+ * FUNCTION: AcpiUtCreateInternalObjectDbg
*
* PARAMETERS: Address - Address of the memory to deallocate
* Component - Component type of caller
@@ -150,7 +150,7 @@
******************************************************************************/
ACPI_OPERAND_OBJECT *
-_UtCreateInternalObject (
+AcpiUtCreateInternalObjectDbg (
NATIVE_CHAR *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId,
@@ -159,12 +159,12 @@ _UtCreateInternalObject (
ACPI_OPERAND_OBJECT *Object;
- FUNCTION_TRACE_STR ("UtCreateInternalObject", AcpiUtGetTypeName (Type));
+ FUNCTION_TRACE_STR ("UtCreateInternalObjectDbg", AcpiUtGetTypeName (Type));
/* Allocate the raw object descriptor */
- Object = _UtAllocateObjectDesc (ModuleName, LineNumber, ComponentId);
+ Object = AcpiUtAllocateObjectDescDbg (ModuleName, LineNumber, ComponentId);
if (!Object)
{
/* Allocation failure */
@@ -257,7 +257,7 @@ AcpiUtValidInternalObject (
/*******************************************************************************
*
- * FUNCTION: _UtAllocateObjectDesc
+ * FUNCTION: AcpiUtAllocateObjectDescDbg
*
* PARAMETERS: ModuleName - Caller's module name (for error output)
* LineNumber - Caller's line number (for error output)
@@ -272,7 +272,7 @@ AcpiUtValidInternalObject (
******************************************************************************/
void *
-_UtAllocateObjectDesc (
+AcpiUtAllocateObjectDescDbg (
NATIVE_CHAR *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId)
@@ -280,7 +280,7 @@ _UtAllocateObjectDesc (
ACPI_OPERAND_OBJECT *Object;
- FUNCTION_TRACE ("_AllocateObjectDesc");
+ FUNCTION_TRACE ("UtAllocateObjectDescDbg");
Object = AcpiUtAcquireFromCache (ACPI_MEM_LIST_OPERAND);
@@ -320,7 +320,7 @@ void
AcpiUtDeleteObjectDesc (
ACPI_OPERAND_OBJECT *Object)
{
- FUNCTION_TRACE_PTR ("AcpiUtDeleteObjectDesc", Object);
+ FUNCTION_TRACE_PTR ("UtDeleteObjectDesc", Object);
/* Object must be an ACPI_OPERAND_OBJECT */
@@ -674,6 +674,9 @@ AcpiUtGetObjectSize(
ACPI_STATUS Status;
+ FUNCTION_ENTRY ();
+
+
if ((VALID_DESCRIPTOR_TYPE (InternalObject, ACPI_DESC_TYPE_INTERNAL)) &&
(IS_THIS_OBJECT_TYPE (InternalObject, ACPI_TYPE_PACKAGE)))
{
diff --git a/sys/contrib/dev/acpica/utxface.c b/sys/contrib/dev/acpica/utxface.c
index 48d569bd9c0c..f74678ca662c 100644
--- a/sys/contrib/dev/acpica/utxface.c
+++ b/sys/contrib/dev/acpica/utxface.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utxface - External interfaces for "global" ACPI functions
- * $Revision: 77 $
+ * $Revision: 80 $
*
*****************************************************************************/
@@ -153,6 +153,9 @@ AcpiInitializeSubsystem (
FUNCTION_TRACE ("AcpiInitializeSubsystem");
+ DEBUG_EXEC(AcpiUtInitStackPtrTrace ());
+
+
/* Initialize all globals used by the subsystem */
AcpiUtInitGlobals ();
@@ -235,7 +238,6 @@ AcpiEnableSubsystem (
* installed unless other handlers have already been
* installed via the InstallAddressSpaceHandler interface
*/
-
if (!(Flags & ACPI_NO_ADDRESS_SPACE_INIT))
{
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Installing default address space handlers\n"));
@@ -250,7 +252,6 @@ AcpiEnableSubsystem (
/*
* We must initialize the hardware before we can enable ACPI.
*/
-
if (!(Flags & ACPI_NO_HARDWARE_INIT))
{
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Initializing ACPI hardware\n"));
@@ -265,7 +266,6 @@ AcpiEnableSubsystem (
/*
* Enable ACPI on this platform
*/
-
if (!(Flags & ACPI_NO_ACPI_ENABLE))
{
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Going into ACPI mode\n"));
@@ -284,7 +284,6 @@ AcpiEnableSubsystem (
* ANY control methods SAFELY. Any control method can require ACPI hardware
* support, so the hardware MUST be initialized before execution!
*/
-
if (!(Flags & ACPI_NO_EVENT_INIT))
{
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Initializing ACPI events\n"));
@@ -301,7 +300,6 @@ AcpiEnableSubsystem (
* Initialize all device objects in the namespace
* This runs the _STA and _INI methods.
*/
-
if (!(Flags & ACPI_NO_DEVICE_INIT))
{
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Initializing ACPI Devices\n"));
@@ -319,7 +317,6 @@ AcpiEnableSubsystem (
* runs the executable AML that is part of the declaration of OpRegions
* and Fields.
*/
-
if (!(Flags & ACPI_NO_OBJECT_INIT))
{
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Initializing ACPI Objects\n"));