summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2000-12-08 09:20:40 +0000
committermsmith <msmith@FreeBSD.org>2000-12-08 09:20:40 +0000
commita47afc72fbc5df95031c02741e10b8341508c00f (patch)
tree063bc72bbd9a7b7aefe25f3b97c3d02a4cd008e2 /sys/contrib/dev
parent1df9d8682fd2230b3856a99102f24934588ae500 (diff)
parentf4b6d0429cccf6d1c0e3d90a616abbeacd13ad15 (diff)
downloadFreeBSD-src-a47afc72fbc5df95031c02741e10b8341508c00f.zip
FreeBSD-src-a47afc72fbc5df95031c02741e10b8341508c00f.tar.gz
This commit was generated by cvs2svn to compensate for changes in r69746,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'sys/contrib/dev')
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Common/cmalloc.c16
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Common/cmcopy.c6
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Common/cmdebug.c10
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Common/cmdelete.c20
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Common/cmeval.c12
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Common/cmglobal.c115
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Common/cminit.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Common/cmobject.c10
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Common/cmxface.c6
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Debugger/dbcmds.c22
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Debugger/dbdisasm.c7
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Debugger/dbdisply.c54
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Debugger/dbexec.c8
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Debugger/dbfileio.c6
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Debugger/dbinput.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Debugger/dbstats.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Debugger/dbutils.c8
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Debugger/dbxface.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmethod.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmthdat.c13
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dsobject.c8
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dsopcode.c17
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dsutils.c44
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dswexec.c135
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dswload.c5
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dswscope.c6
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dswstate.c394
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Events/evevent.c135
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Events/evmisc.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Events/evregion.c22
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Events/evrgnini.c12
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Events/evxface.c6
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Events/evxfregn.c16
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Hardware/hwacpi.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Hardware/hwregs.c71
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/accommon.h11
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acdispat.h33
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acefi.h18
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acexcep.h6
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acinterp.h4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/aclocal.h33
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/actypes.h17
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/amlcode.h82
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amconfig.c6
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amcreate.c28
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amdump.c269
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amdyadic.c14
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amfield.c8
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amfldio.c57
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/ammisc.c8
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/ammonad.c16
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amprep.c6
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amregion.c10
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amresnte.c5
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amresolv.c10
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amresop.c361
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amstore.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amstoren.c12
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amstorob.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amutils.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nsaccess.c11
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nsalloc.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nsdump.c8
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nsinit.c114
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nsload.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nsnames.c13
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nssearch.c10
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nsutils.c31
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nsxfname.c11
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nsxfobj.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Parser/psfind.c5
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Parser/psscope.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Resources/rscalc.c1
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Resources/rscreate.c8
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Resources/rsdump.c84
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Tables/tbconvrt.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Tables/tbget.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Tables/tbinstal.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Tables/tbutils.c6
-rw-r--r--sys/contrib/dev/acpica/acdispat.h33
-rw-r--r--sys/contrib/dev/acpica/acefi.h18
-rw-r--r--sys/contrib/dev/acpica/acexcep.h6
-rw-r--r--sys/contrib/dev/acpica/acinterp.h4
-rw-r--r--sys/contrib/dev/acpica/aclocal.h33
-rw-r--r--sys/contrib/dev/acpica/actypes.h17
-rw-r--r--sys/contrib/dev/acpica/acutils.h11
-rw-r--r--sys/contrib/dev/acpica/amlcode.h82
-rw-r--r--sys/contrib/dev/acpica/dbcmds.c22
-rw-r--r--sys/contrib/dev/acpica/dbdisasm.c7
-rw-r--r--sys/contrib/dev/acpica/dbdisply.c54
-rw-r--r--sys/contrib/dev/acpica/dbexec.c8
-rw-r--r--sys/contrib/dev/acpica/dbfileio.c6
-rw-r--r--sys/contrib/dev/acpica/dbinput.c4
-rw-r--r--sys/contrib/dev/acpica/dbstats.c4
-rw-r--r--sys/contrib/dev/acpica/dbutils.c8
-rw-r--r--sys/contrib/dev/acpica/dbxface.c4
-rw-r--r--sys/contrib/dev/acpica/dsmethod.c4
-rw-r--r--sys/contrib/dev/acpica/dsmthdat.c13
-rw-r--r--sys/contrib/dev/acpica/dsobject.c8
-rw-r--r--sys/contrib/dev/acpica/dsopcode.c17
-rw-r--r--sys/contrib/dev/acpica/dsutils.c44
-rw-r--r--sys/contrib/dev/acpica/dswexec.c135
-rw-r--r--sys/contrib/dev/acpica/dswload.c5
-rw-r--r--sys/contrib/dev/acpica/dswscope.c6
-rw-r--r--sys/contrib/dev/acpica/dswstate.c394
-rw-r--r--sys/contrib/dev/acpica/evevent.c135
-rw-r--r--sys/contrib/dev/acpica/evmisc.c4
-rw-r--r--sys/contrib/dev/acpica/evregion.c22
-rw-r--r--sys/contrib/dev/acpica/evrgnini.c12
-rw-r--r--sys/contrib/dev/acpica/evxface.c6
-rw-r--r--sys/contrib/dev/acpica/evxfregn.c16
-rw-r--r--sys/contrib/dev/acpica/exconfig.c6
-rw-r--r--sys/contrib/dev/acpica/excreate.c28
-rw-r--r--sys/contrib/dev/acpica/exdump.c269
-rw-r--r--sys/contrib/dev/acpica/exdyadic.c14
-rw-r--r--sys/contrib/dev/acpica/exfield.c8
-rw-r--r--sys/contrib/dev/acpica/exfldio.c57
-rw-r--r--sys/contrib/dev/acpica/exmisc.c8
-rw-r--r--sys/contrib/dev/acpica/exmonad.c16
-rw-r--r--sys/contrib/dev/acpica/exprep.c6
-rw-r--r--sys/contrib/dev/acpica/exregion.c10
-rw-r--r--sys/contrib/dev/acpica/exresnte.c5
-rw-r--r--sys/contrib/dev/acpica/exresolv.c10
-rw-r--r--sys/contrib/dev/acpica/exresop.c361
-rw-r--r--sys/contrib/dev/acpica/exstore.c4
-rw-r--r--sys/contrib/dev/acpica/exstoren.c12
-rw-r--r--sys/contrib/dev/acpica/exstorob.c4
-rw-r--r--sys/contrib/dev/acpica/exutils.c4
-rw-r--r--sys/contrib/dev/acpica/hwacpi.c4
-rw-r--r--sys/contrib/dev/acpica/hwregs.c71
-rw-r--r--sys/contrib/dev/acpica/nsaccess.c11
-rw-r--r--sys/contrib/dev/acpica/nsalloc.c4
-rw-r--r--sys/contrib/dev/acpica/nsdump.c8
-rw-r--r--sys/contrib/dev/acpica/nsinit.c114
-rw-r--r--sys/contrib/dev/acpica/nsload.c4
-rw-r--r--sys/contrib/dev/acpica/nsnames.c13
-rw-r--r--sys/contrib/dev/acpica/nssearch.c10
-rw-r--r--sys/contrib/dev/acpica/nsutils.c31
-rw-r--r--sys/contrib/dev/acpica/nsxfname.c11
-rw-r--r--sys/contrib/dev/acpica/nsxfobj.c4
-rw-r--r--sys/contrib/dev/acpica/psfind.c5
-rw-r--r--sys/contrib/dev/acpica/psscope.c4
-rw-r--r--sys/contrib/dev/acpica/rscalc.c1
-rw-r--r--sys/contrib/dev/acpica/rscreate.c8
-rw-r--r--sys/contrib/dev/acpica/rsdump.c84
-rw-r--r--sys/contrib/dev/acpica/tbconvrt.c4
-rw-r--r--sys/contrib/dev/acpica/tbget.c4
-rw-r--r--sys/contrib/dev/acpica/tbinstal.c4
-rw-r--r--sys/contrib/dev/acpica/tbutils.c6
-rw-r--r--sys/contrib/dev/acpica/utalloc.c16
-rw-r--r--sys/contrib/dev/acpica/utcopy.c6
-rw-r--r--sys/contrib/dev/acpica/utdebug.c10
-rw-r--r--sys/contrib/dev/acpica/utdelete.c20
-rw-r--r--sys/contrib/dev/acpica/uteval.c12
-rw-r--r--sys/contrib/dev/acpica/utglobal.c115
-rw-r--r--sys/contrib/dev/acpica/utinit.c4
-rw-r--r--sys/contrib/dev/acpica/utobject.c10
-rw-r--r--sys/contrib/dev/acpica/utxface.c6
158 files changed, 2908 insertions, 2228 deletions
diff --git a/sys/contrib/dev/acpica/Subsystem/Common/cmalloc.c b/sys/contrib/dev/acpica/Subsystem/Common/cmalloc.c
index 8ac46c8..3b8564e 100644
--- a/sys/contrib/dev/acpica/Subsystem/Common/cmalloc.c
+++ b/sys/contrib/dev/acpica/Subsystem/Common/cmalloc.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmalloc - local memory allocation routines
- * $Revision: 78 $
+ * $Revision: 79 $
*
*****************************************************************************/
@@ -422,11 +422,11 @@ AcpiCmDeleteElementFromAllocList (
if (Size == sizeof (ACPI_OPERAND_OBJECT))
{
- DEBUG_PRINT (TRACE_ALLOCATIONS, ("CmDelete: Freeing size 0x%X (ACPI_OPERAND_OBJECT)\n", Size));
+ DEBUG_PRINT (TRACE_ALLOCATIONS, ("CmDelete: Freeing size %X (ACPI_OPERAND_OBJECT)\n", Size));
}
else
{
- DEBUG_PRINT (TRACE_ALLOCATIONS, ("CmDelete: Freeing size 0x%X\n", Size));
+ DEBUG_PRINT (TRACE_ALLOCATIONS, ("CmDelete: Freeing size %X\n", Size));
}
AcpiOsFree (Element);
@@ -611,7 +611,7 @@ AcpiCmDumpCurrentAllocations (
AcpiCmReleaseMutex (ACPI_MTX_MEMORY);
DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES,
- ("Total number of unfreed allocations = %d\n", i));
+ ("Total number of unfreed allocations = %d(%X)\n", i,i));
return_VOID;
}
@@ -664,7 +664,7 @@ _CmAllocate (
/* Report allocation error */
_REPORT_ERROR (Module, Line, Component,
- ("CmAllocate: Could not allocate size 0x%x\n", Size));
+ ("CmAllocate: Could not allocate size %X\n", Size));
return_VALUE (NULL);
}
@@ -679,7 +679,7 @@ _CmAllocate (
}
DEBUG_PRINT (TRACE_ALLOCATIONS,
- ("CmAllocate: %p Size 0x%x\n", Address, Size));
+ ("CmAllocate: %p Size %X\n", Address, Size));
#endif
return_PTR (Address);
@@ -733,7 +733,7 @@ _CmCallocate (
/* Report allocation error */
_REPORT_ERROR (Module, Line, Component,
- ("CmCallocate: Could not allocate size 0x%x\n", Size));
+ ("CmCallocate: Could not allocate size %X\n", Size));
return_VALUE (NULL);
}
@@ -748,7 +748,7 @@ _CmCallocate (
#endif
DEBUG_PRINT (TRACE_ALLOCATIONS,
- ("CmCallocate: %p Size 0x%x\n", Address, Size));
+ ("CmCallocate: %p Size %X\n", Address, Size));
return_PTR (Address);
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Common/cmcopy.c b/sys/contrib/dev/acpica/Subsystem/Common/cmcopy.c
index 88216c7..91405da 100644
--- a/sys/contrib/dev/acpica/Subsystem/Common/cmcopy.c
+++ b/sys/contrib/dev/acpica/Subsystem/Common/cmcopy.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmcopy - Internal to external object translation utilities
- * $Revision: 58 $
+ * $Revision: 59 $
*
*****************************************************************************/
@@ -445,7 +445,7 @@ AcpiCmBuildExternalPackageObject (
* for us to handle
*/
DEBUG_PRINT (ACPI_ERROR,
- ("CmBuildPackageObject: Pkg nested too deep (max %d)\n",
+ ("CmBuildPackageObject: Pkg nested too deep (max %X)\n",
MAX_PACKAGE_DEPTH));
return_ACPI_STATUS (AE_LIMIT);
}
@@ -701,7 +701,7 @@ AcpiCmBuildInternalPackageObject (
* Too many nested levels of packages for us to handle
*/
DEBUG_PRINT (ACPI_ERROR,
- ("CmBuildPackageObject: Pkg nested too deep (max %d)\n",
+ ("CmBuildPackageObject: Pkg nested too deep (max %X)\n",
MAX_PACKAGE_DEPTH));
return_ACPI_STATUS (AE_LIMIT);
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Common/cmdebug.c b/sys/contrib/dev/acpica/Subsystem/Common/cmdebug.c
index e9a4f5b..59ec1aa 100644
--- a/sys/contrib/dev/acpica/Subsystem/Common/cmdebug.c
+++ b/sys/contrib/dev/acpica/Subsystem/Common/cmdebug.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmdebug - Debug print routines
- * $Revision: 60 $
+ * $Revision: 61 $
*
*****************************************************************************/
@@ -210,7 +210,7 @@ FunctionTracePtr (
AcpiGbl_NestingLevel++;
DebugPrint (ModuleName, LineNumber, ComponentId, TRACE_FUNCTIONS,
- " %2.2ld Entered Function: %s, 0x%p\n",
+ " %2.2ld Entered Function: %s, %p\n",
AcpiGbl_NestingLevel, FunctionName, Pointer);
}
@@ -276,7 +276,7 @@ FunctionTraceU32 (
AcpiGbl_NestingLevel++;
DebugPrint (ModuleName, LineNumber, ComponentId, TRACE_FUNCTIONS,
- " %2.2ld Entered Function: %s, 0x%lX\n",
+ " %2.2ld Entered Function: %s, %lX\n",
AcpiGbl_NestingLevel, FunctionName, Integer);
}
@@ -377,7 +377,7 @@ FunctionValueExit (
{
DebugPrint (ModuleName, LineNumber, ComponentId, TRACE_FUNCTIONS,
- " %2.2ld Exiting Function: %s, 0x%X\n",
+ " %2.2ld Exiting Function: %s, %X\n",
AcpiGbl_NestingLevel, FunctionName, Value);
AcpiGbl_NestingLevel--;
@@ -411,7 +411,7 @@ FunctionPtrExit (
{
DebugPrint (ModuleName, LineNumber, ComponentId, TRACE_FUNCTIONS,
- " %2.2ld Exiting Function: %s, 0x%p\n",
+ " %2.2ld Exiting Function: %s, %p\n",
AcpiGbl_NestingLevel, FunctionName, Ptr);
AcpiGbl_NestingLevel--;
diff --git a/sys/contrib/dev/acpica/Subsystem/Common/cmdelete.c b/sys/contrib/dev/acpica/Subsystem/Common/cmdelete.c
index 1eefe19..055c71c 100644
--- a/sys/contrib/dev/acpica/Subsystem/Common/cmdelete.c
+++ b/sys/contrib/dev/acpica/Subsystem/Common/cmdelete.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: cmdelete - object deletion and reference count utilities
- * $Revision: 59 $
+ * $Revision: 60 $
*
******************************************************************************/
@@ -190,7 +190,7 @@ AcpiCmDeleteInternalObj (
case ACPI_TYPE_PACKAGE:
DEBUG_PRINT (ACPI_INFO,
- ("CmDeleteInternalObj: **** Package of count %d\n",
+ ("CmDeleteInternalObj: **** Package of count %X\n",
Object->Package.Count));
/*
@@ -423,7 +423,7 @@ AcpiCmUpdateRefCount (
Object->Common.ReferenceCount = NewCount;
DEBUG_PRINT (ACPI_INFO,
- ("CmUpdateRefCount: Obj %p Refs=%d, [Incremented]\n",
+ ("CmUpdateRefCount: Obj %p Refs=%X, [Incremented]\n",
Object, NewCount));
break;
@@ -433,7 +433,7 @@ AcpiCmUpdateRefCount (
if (Count < 1)
{
DEBUG_PRINT (ACPI_INFO,
- ("CmUpdateRefCount: Obj %p Refs=%d, can't decrement! (Set to 0)\n",
+ ("CmUpdateRefCount: Obj %p Refs=%X, can't decrement! (Set to 0)\n",
Object, NewCount));
NewCount = 0;
@@ -444,14 +444,14 @@ AcpiCmUpdateRefCount (
NewCount--;
DEBUG_PRINT (ACPI_INFO,
- ("CmUpdateRefCount: Obj %p Refs=%d, [Decremented]\n",
+ ("CmUpdateRefCount: Obj %p Refs=%X, [Decremented]\n",
Object, NewCount));
}
if (Object->Common.Type == ACPI_TYPE_METHOD)
{
DEBUG_PRINT (ACPI_INFO,
- ("CmUpdateRefCount: Method Obj %p Refs=%d, [Decremented]\n",
+ ("CmUpdateRefCount: Method Obj %p Refs=%X, [Decremented]\n",
Object, NewCount));
}
@@ -467,7 +467,7 @@ AcpiCmUpdateRefCount (
case REF_FORCE_DELETE:
DEBUG_PRINT (ACPI_INFO,
- ("CmUpdateRefCount: Obj %p Refs=%d, Force delete! (Set to 0)\n",
+ ("CmUpdateRefCount: Obj %p Refs=%X, Force delete! (Set to 0)\n",
Object, Count));
NewCount = 0;
@@ -479,7 +479,7 @@ AcpiCmUpdateRefCount (
default:
DEBUG_PRINT (ACPI_ERROR,
- ("CmUpdateRefCount: Unknown action (%d)\n", Action));
+ ("CmUpdateRefCount: Unknown action (%X)\n", Action));
break;
}
@@ -493,7 +493,7 @@ AcpiCmUpdateRefCount (
{
DEBUG_PRINT (ACPI_ERROR,
- ("CmUpdateRefCount: **** AE_ERROR **** Invalid Reference Count (0x%X) in object %p\n\n",
+ ("CmUpdateRefCount: **** AE_ERROR **** Invalid Reference Count (%X) in object %p\n\n",
Count, Object));
}
@@ -789,7 +789,7 @@ AcpiCmRemoveReference (
return_VOID;
}
- DEBUG_PRINT (ACPI_INFO, ("CmRemoveReference: Obj %p Refs=%d\n",
+ DEBUG_PRINT (ACPI_INFO, ("CmRemoveReference: Obj %p Refs=%X\n",
Object, Object->Common.ReferenceCount));
/*
diff --git a/sys/contrib/dev/acpica/Subsystem/Common/cmeval.c b/sys/contrib/dev/acpica/Subsystem/Common/cmeval.c
index 81be3df..7b9fefc 100644
--- a/sys/contrib/dev/acpica/Subsystem/Common/cmeval.c
+++ b/sys/contrib/dev/acpica/Subsystem/Common/cmeval.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmeval - Object evaluation
- * $Revision: 18 $
+ * $Revision: 19 $
*
*****************************************************************************/
@@ -193,7 +193,7 @@ AcpiCmEvaluateNumericObject (
{
Status = AE_TYPE;
DEBUG_PRINT (ACPI_ERROR,
- ("Type returned from %s was not a number: %d \n",
+ ("Type returned from %s was not a number: %X \n",
ObjectName, ObjDesc->Common.Type));
}
else
@@ -283,8 +283,8 @@ AcpiCmExecute_HID (
{
Status = AE_TYPE;
DEBUG_PRINT (ACPI_ERROR,
- ("Type returned from _HID was not a number or string: [0x%X] \n",
- ObjDesc->Common.Type));
+ ("Type returned from _HID not a number or string: %s(%X) \n",
+ AcpiCmGetTypeName (ObjDesc->Common.Type), ObjDesc->Common.Type));
}
else
@@ -380,7 +380,7 @@ AcpiCmExecute_UID (
{
Status = AE_TYPE;
DEBUG_PRINT (ACPI_ERROR,
- ("Type returned from _UID was not a number or string: %d \n",
+ ("Type returned from _UID was not a number or string: %X \n",
ObjDesc->Common.Type));
}
@@ -474,7 +474,7 @@ AcpiCmExecute_STA (
{
Status = AE_TYPE;
DEBUG_PRINT (ACPI_ERROR,
- ("Type returned from _STA was not a number: %d \n",
+ ("Type returned from _STA was not a number: %X \n",
ObjDesc->Common.Type));
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Common/cmglobal.c b/sys/contrib/dev/acpica/Subsystem/Common/cmglobal.c
index 508b01d..07757d5 100644
--- a/sys/contrib/dev/acpica/Subsystem/Common/cmglobal.c
+++ b/sys/contrib/dev/acpica/Subsystem/Common/cmglobal.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmglobal - Global variables for the ACPI subsystem
- * $Revision: 110 $
+ * $Revision: 112 $
*
*****************************************************************************/
@@ -121,6 +121,7 @@
#include "acevents.h"
#include "acnamesp.h"
#include "acinterp.h"
+#include "amlcode.h"
#define _COMPONENT MISCELLANEOUS
@@ -242,10 +243,8 @@ UINT8 AcpiGbl_NsProperties[] =
NSP_NORMAL, /* 30 While */
NSP_NEWSCOPE, /* 31 Scope */
NSP_LOCAL, /* 32 DefAny */
- NSP_NORMAL, /* 33 Method Arg */
- NSP_NORMAL, /* 34 Method Local */
- NSP_NORMAL, /* 35 Extra */
- NSP_NORMAL /* 36 Invalid */
+ NSP_NORMAL, /* 33 Extra */
+ NSP_NORMAL /* 34 Invalid */
};
@@ -288,6 +287,8 @@ ACPI_TABLE_SUPPORT AcpiGbl_AcpiTableData[NUM_ACPI_TABLES] =
NATIVE_CHAR *MsgAcpiErrorBreak = "*** Break on ACPI_ERROR ***\n";
+
+
/*****************************************************************************
*
* FUNCTION: AcpiCmGetMutexName
@@ -361,10 +362,8 @@ static NATIVE_CHAR *AcpiGbl_NsTypeNames[] = /* printable names of AC
/* 30 */ "While",
/* 31 */ "Scope",
/* 32 */ "DefAny",
- /* 33 */ "MethodArg",
- /* 34 */ "MethodLcl",
- /* 35 */ "Extra",
- /* 36 */ "Invalid"
+ /* 33 */ "Extra",
+ /* 34 */ "Invalid"
};
@@ -393,9 +392,107 @@ AcpiCmGetTypeName (
return (AcpiGbl_NsTypeNames[Type]);
}
+
+
+
+
+/* Region type decoding */
+
+NATIVE_CHAR *AcpiGbl_RegionTypes[NUM_REGION_TYPES] =
+{
+ "SystemMemory",
+ "SystemIO",
+ "PCIConfig",
+ "EmbeddedControl",
+ "SMBus",
+ "CMOS",
+ "PCIBarTarget",
+};
+
+
+/*****************************************************************************
+ *
+ * FUNCTION: AcpiCmGetRegionName
+ *
+ * PARAMETERS: None.
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Translate a Space ID into a name string (Debug only)
+ *
+ ****************************************************************************/
+
+NATIVE_CHAR *
+AcpiCmGetRegionName (
+ UINT8 SpaceId)
+{
+
+ if (SpaceId >= USER_REGION_BEGIN)
+ {
+ return ("UserDefinedRegion");
+ }
+
+ else if (SpaceId >= NUM_REGION_TYPES)
+ {
+ return ("InvalidSpaceID");
+ }
+
+ return (AcpiGbl_RegionTypes[SpaceId]);
+}
+
+
+
+
+
+/* Data used in keeping track of fields */
+
+NATIVE_CHAR *AcpiGbl_FENames[NUM_FIELD_NAMES] =
+{
+ "skip",
+ "?access?"
+}; /* FE = Field Element */
+
+
+
+NATIVE_CHAR *AcpiGbl_MatchOps[NUM_MATCH_OPS] =
+{
+ "Error",
+ "MTR",
+ "MEQ",
+ "MLE",
+ "MLT",
+ "MGE",
+ "MGT"
+};
+
+
+/* Access type decoding */
+
+NATIVE_CHAR *AcpiGbl_AccessTypes[NUM_ACCESS_TYPES] =
+{
+ "AnyAcc",
+ "ByteAcc",
+ "WordAcc",
+ "DWordAcc",
+ "BlockAcc",
+ "SMBSendRecvAcc",
+ "SMBQuickAcc"
+};
+
+
+/* Update rule decoding */
+
+NATIVE_CHAR *AcpiGbl_UpdateRules[NUM_UPDATE_RULES] =
+{
+ "Preserve",
+ "WriteAsOnes",
+ "WriteAsZeros"
+};
+
#endif
+
/*****************************************************************************
*
* FUNCTION: AcpiCmValidObjectType
diff --git a/sys/contrib/dev/acpica/Subsystem/Common/cminit.c b/sys/contrib/dev/acpica/Subsystem/Common/cminit.c
index bbc0878..1c5a0a9 100644
--- a/sys/contrib/dev/acpica/Subsystem/Common/cminit.c
+++ b/sys/contrib/dev/acpica/Subsystem/Common/cminit.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cminit - Common ACPI subsystem initialization
- * $Revision: 88 $
+ * $Revision: 89 $
*
*****************************************************************************/
@@ -150,7 +150,7 @@ AcpiCmFadtRegisterError (
{
REPORT_ERROR (
- ("Invalid FADT register value, %s = 0x%X (FADT=0x%X)\n",
+ ("Invalid FADT register value, %s=%X (FADT=%p)\n",
RegisterName, Value, AcpiGbl_FADT));
diff --git a/sys/contrib/dev/acpica/Subsystem/Common/cmobject.c b/sys/contrib/dev/acpica/Subsystem/Common/cmobject.c
index 83a2d0f..a1a8b0e 100644
--- a/sys/contrib/dev/acpica/Subsystem/Common/cmobject.c
+++ b/sys/contrib/dev/acpica/Subsystem/Common/cmobject.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmobject - ACPI object create/delete/size/cache routines
- * $Revision: 31 $
+ * $Revision: 32 $
*
*****************************************************************************/
@@ -334,7 +334,7 @@ _CmAllocateObjectDesc (
Object->Common.DataType = ACPI_DESC_TYPE_INTERNAL;
- DEBUG_PRINT (TRACE_ALLOCATIONS, ("AllocateObjectDesc: %p Size 0x%x\n",
+ DEBUG_PRINT (TRACE_ALLOCATIONS, ("AllocateObjectDesc: %p Size %X\n",
Object, sizeof (ACPI_OPERAND_OBJECT)));
return_PTR (Object);
@@ -605,7 +605,7 @@ AcpiCmGetSimpleObjectSize (
if (InternalObj->Reference.OpCode != AML_NAMEPATH_OP)
{
DEBUG_PRINT (ACPI_ERROR,
- ("CmGetSimpleObjectSize: Unsupported Reference opcode=0x%X in object %p\n",
+ ("CmGetSimpleObjectSize: Unsupported Reference opcode=%X in object %p\n",
InternalObj->Reference.OpCode, InternalObj));
Status = AE_TYPE;
}
@@ -615,7 +615,7 @@ AcpiCmGetSimpleObjectSize (
default:
DEBUG_PRINT (ACPI_ERROR,
- ("CmGetSimpleObjectSize: Unsupported type=0x%X in object %p\n",
+ ("CmGetSimpleObjectSize: Unsupported type=%X in object %p\n",
InternalObj->Common.Type, InternalObj));
Status = AE_TYPE;
break;
@@ -772,7 +772,7 @@ AcpiCmGetPackageObjectSize (
*/
DEBUG_PRINT (ACPI_ERROR,
- ("CmGetPackageObjectSize: Pkg nested too deep (max %d)\n",
+ ("CmGetPackageObjectSize: Pkg nested too deep (max %X)\n",
MAX_PACKAGE_DEPTH));
return_ACPI_STATUS (AE_LIMIT);
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Common/cmxface.c b/sys/contrib/dev/acpica/Subsystem/Common/cmxface.c
index 6add38b..e905921 100644
--- a/sys/contrib/dev/acpica/Subsystem/Common/cmxface.c
+++ b/sys/contrib/dev/acpica/Subsystem/Common/cmxface.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmxface - External interfaces for "global" ACPI functions
- * $Revision: 54 $
+ * $Revision: 55 $
*
*****************************************************************************/
@@ -277,7 +277,9 @@ AcpiEnableSubsystem (
Status = AcpiEnable ();
if (ACPI_FAILURE (Status))
{
- return_ACPI_STATUS (Status);
+ /* TBD: workaround. Old Lions don't enable properly */
+ DEBUG_PRINT(ACPI_WARN, ("AcpiEnable failed.\n"));
+ /*return_ACPI_STATUS (Status);*/
}
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Debugger/dbcmds.c b/sys/contrib/dev/acpica/Subsystem/Debugger/dbcmds.c
index bd357df..1eca624 100644
--- a/sys/contrib/dev/acpica/Subsystem/Debugger/dbcmds.c
+++ b/sys/contrib/dev/acpica/Subsystem/Debugger/dbcmds.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbcmds - debug commands and output routines
- * $Revision: 41 $
+ * $Revision: 42 $
*
******************************************************************************/
@@ -263,7 +263,7 @@ AcpiDbDisplayTableInfo (
{
if (AcpiGbl_AcpiTables[i].Pointer)
{
- AcpiOsPrintf ("%s at 0x%p length 0x%X\n", AcpiGbl_AcpiTableData[i].Name,
+ AcpiOsPrintf ("%s at %p length %X\n", AcpiGbl_AcpiTableData[i].Name,
AcpiGbl_AcpiTables[i].Pointer, AcpiGbl_AcpiTables[i].Length);
}
}
@@ -355,13 +355,13 @@ AcpiDbSetMethodBreakpoint (
Address = STRTOUL (Location, NULL, 16);
if (Address <= Op->AmlOffset)
{
- AcpiOsPrintf ("Breakpoint 0x%X is beyond current address 0x%X\n", Address, Op->AmlOffset);
+ AcpiOsPrintf ("Breakpoint %X is beyond current address %X\n", Address, Op->AmlOffset);
}
/* Save breakpoint in current walk */
WalkState->MethodBreakpoint = Address;
- AcpiOsPrintf ("Breakpoint set at AML offset 0x%X\n", Address);
+ AcpiOsPrintf ("Breakpoint set at AML offset %X\n", Address);
}
@@ -546,7 +546,7 @@ AcpiDbDumpNamespaceByOwner (
AcpiDbSetOutputDestination (DB_DUPLICATE_OUTPUT);
- AcpiOsPrintf ("ACPI Namespace by owner 0x%X:\n", OwnerId);
+ AcpiOsPrintf ("ACPI Namespace by owner %X:\n", OwnerId);
/* Display the subtree */
@@ -761,11 +761,11 @@ AcpiDbWalkForSpecificObjects (
switch (ObjDesc->Common.Type)
{
case ACPI_TYPE_METHOD:
- AcpiOsPrintf (" #Args %d Concurrency %d", ObjDesc->Method.ParamCount, ObjDesc->Method.Concurrency);
+ AcpiOsPrintf (" #Args %d Concurrency %X", ObjDesc->Method.ParamCount, ObjDesc->Method.Concurrency);
break;
case ACPI_TYPE_NUMBER:
- AcpiOsPrintf (" Value 0x%X", ObjDesc->Number.Value);
+ AcpiOsPrintf (" Value %X", ObjDesc->Number.Value);
break;
case ACPI_TYPE_STRING:
@@ -773,15 +773,15 @@ AcpiDbWalkForSpecificObjects (
break;
case ACPI_TYPE_REGION:
- AcpiOsPrintf (" SpaceId %d Address %X Length %X", ObjDesc->Region.SpaceId, ObjDesc->Region.Address, ObjDesc->Region.Length);
+ AcpiOsPrintf (" SpaceId %X Address %X Length %X", ObjDesc->Region.SpaceId, ObjDesc->Region.Address, ObjDesc->Region.Length);
break;
case ACPI_TYPE_PACKAGE:
- AcpiOsPrintf (" #Elements %d", ObjDesc->Package.Count);
+ AcpiOsPrintf (" #Elements %X", ObjDesc->Package.Count);
break;
case ACPI_TYPE_BUFFER:
- AcpiOsPrintf (" Length %d", ObjDesc->Buffer.Length);
+ AcpiOsPrintf (" Length %X", ObjDesc->Buffer.Length);
break;
}
}
@@ -909,7 +909,7 @@ AcpiDbWalkAndMatchName (
else
{
- AcpiOsPrintf ("%32s (0x%p) - %s\n", Buffer, ObjHandle,
+ AcpiOsPrintf ("%32s (%p) - %s\n", Buffer, ObjHandle,
AcpiCmGetTypeName (((ACPI_NAMESPACE_NODE *) ObjHandle)->Type));
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Debugger/dbdisasm.c b/sys/contrib/dev/acpica/Subsystem/Debugger/dbdisasm.c
index 4a7b32d..82c9539 100644
--- a/sys/contrib/dev/acpica/Subsystem/Debugger/dbdisasm.c
+++ b/sys/contrib/dev/acpica/Subsystem/Debugger/dbdisasm.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbdisasm - parser op tree display routines
- * $Revision: 33 $
+ * $Revision: 34 $
*
******************************************************************************/
@@ -778,9 +778,10 @@ AcpiDbDisplayOpcode (
#ifndef PARSER_ONLY
if ((Op->Opcode == AML_RETURN_VALUE_OP) &&
- (WalkState->NumResults))
+ (WalkState->Results) &&
+ (WalkState->Results->Results.NumResults))
{
- AcpiDbDecodeInternalObject (WalkState->Results [WalkState->NumResults-1]);
+ AcpiDbDecodeInternalObject (WalkState->Results->Results.ObjDesc [WalkState->Results->Results.NumResults-1]);
}
#endif
diff --git a/sys/contrib/dev/acpica/Subsystem/Debugger/dbdisply.c b/sys/contrib/dev/acpica/Subsystem/Debugger/dbdisply.c
index a5f2c47..2ae6eec 100644
--- a/sys/contrib/dev/acpica/Subsystem/Debugger/dbdisply.c
+++ b/sys/contrib/dev/acpica/Subsystem/Debugger/dbdisply.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbdisply - debug display commands
- * $Revision: 35 $
+ * $Revision: 38 $
*
******************************************************************************/
@@ -352,10 +352,13 @@ DumpNte:
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Could not convert name to pathname\n");
- return;
}
- AcpiOsPrintf ("Object Pathname: %s\n", RetBuf.Pointer);
+ else
+ {
+ AcpiOsPrintf ("Object Pathname: %s\n", RetBuf.Pointer);
+ }
+
if (!AcpiOsReadable (Node, sizeof (ACPI_NAMESPACE_NODE)))
{
AcpiOsPrintf ("Invalid Named object at address %p\n", Node);
@@ -367,7 +370,7 @@ DumpNte:
if (Node->Object)
{
- AcpiOsPrintf ("\nAttached Object (0x%p):\n", Node->Object);
+ AcpiOsPrintf ("\nAttached Object (%p):\n", Node->Object);
if (!AcpiOsReadable (Node->Object, sizeof (ACPI_OPERAND_OBJECT)))
{
AcpiOsPrintf ("Invalid internal ACPI Object at address %p\n", Node->Object);
@@ -407,7 +410,7 @@ AcpiDbDecodeInternalObject (
switch (ObjDesc->Common.Type)
{
case ACPI_TYPE_NUMBER:
- AcpiOsPrintf ("0x%.8X", ObjDesc->Number.Value);
+ AcpiOsPrintf ("%.8X", ObjDesc->Number.Value);
break;
case ACPI_TYPE_STRING:
@@ -456,8 +459,17 @@ AcpiDbDisplayInternalObject (
else if (VALID_DESCRIPTOR_TYPE (ObjDesc, ACPI_DESC_TYPE_NAMED))
{
- AcpiOsPrintf ("<Node> Name %4.4s Type %s", &((ACPI_NAMESPACE_NODE *)ObjDesc)->Name,
- AcpiCmGetTypeName (((ACPI_NAMESPACE_NODE *) ObjDesc)->Type));
+ AcpiOsPrintf ("<Node> Name %4.4s Type-%s",
+ &((ACPI_NAMESPACE_NODE *)ObjDesc)->Name,
+ AcpiCmGetTypeName (((ACPI_NAMESPACE_NODE *) ObjDesc)->Type));
+ if (((ACPI_NAMESPACE_NODE *) ObjDesc)->Flags & ANOBJ_METHOD_ARG)
+ {
+ AcpiOsPrintf (" [Method Arg]");
+ }
+ if (((ACPI_NAMESPACE_NODE *) ObjDesc)->Flags & ANOBJ_METHOD_LOCAL)
+ {
+ AcpiOsPrintf (" [Method Local]");
+ }
}
else if (VALID_DESCRIPTOR_TYPE (ObjDesc, ACPI_DESC_TYPE_INTERNAL))
@@ -478,15 +490,15 @@ AcpiDbDisplayInternalObject (
switch (ObjDesc->Reference.OpCode)
{
case AML_ZERO_OP:
- AcpiOsPrintf ("[Const] Number 0x%.8X", 0);
+ AcpiOsPrintf ("[Const] Number %.8X", 0);
break;
case AML_ONES_OP:
- AcpiOsPrintf ("[Const] Number 0x%.8X", ACPI_UINT32_MAX);
+ AcpiOsPrintf ("[Const] Number %.8X", ACPI_UINT32_MAX);
break;
case AML_ONE_OP:
- AcpiOsPrintf ("[Const] Number 0x%.8X", 1);
+ AcpiOsPrintf ("[Const] Number %.8X", 1);
break;
case AML_LOCAL_OP:
@@ -585,7 +597,7 @@ AcpiDbDisplayMethodInfo (
Concurrency = ObjDesc->Method.Concurrency;
AcpiOsPrintf ("Currently executing control method is [%4.4s]\n", &Node->Name);
- AcpiOsPrintf ("%d arguments, max concurrency = %d\n", NumArgs, Concurrency);
+ AcpiOsPrintf ("%X arguments, max concurrency = %X\n", NumArgs, Concurrency);
RootOp = StartOp;
@@ -649,10 +661,10 @@ AcpiDbDisplayMethodInfo (
Op = AcpiPsGetDepthNext (StartOp, Op);
}
- AcpiOsPrintf ("Method contains: %d AML Opcodes - %d Operators, %d Operands\n",
+ AcpiOsPrintf ("Method contains: %X AML Opcodes - %X Operators, %X Operands\n",
NumOps, NumOperators, NumOperands);
- AcpiOsPrintf ("Remaining to execute: %d AML Opcodes - %d Operators, %d Operands\n",
+ AcpiOsPrintf ("Remaining to execute: %X AML Opcodes - %X Operators, %X Operands\n",
NumRemainingOps, NumRemainingOperators, NumRemainingOperands);
}
@@ -736,7 +748,7 @@ AcpiDbDisplayArguments (void)
NumArgs = ObjDesc->Method.ParamCount;
Concurrency = ObjDesc->Method.Concurrency;
- AcpiOsPrintf ("Method [%4.4s] has %d arguments, max concurrency = %d\n", &Node->Name, NumArgs, Concurrency);
+ AcpiOsPrintf ("Method [%4.4s] has %X arguments, max concurrency = %X\n", &Node->Name, NumArgs, Concurrency);
for (i = 0; i < NumArgs; i++)
{
@@ -765,7 +777,7 @@ AcpiDbDisplayResults (void)
UINT32 i;
ACPI_WALK_STATE *WalkState;
ACPI_OPERAND_OBJECT *ObjDesc;
- UINT32 NumResults;
+ UINT32 NumResults = 0;
ACPI_NAMESPACE_NODE *Node;
@@ -778,13 +790,17 @@ AcpiDbDisplayResults (void)
ObjDesc = WalkState->MethodDesc;
Node = WalkState->MethodNode;
- NumResults = WalkState->NumResults - WalkState->CurrentResult;
- AcpiOsPrintf ("Method [%4.4s] has %d stacked result objects\n", &Node->Name, NumResults);
+ if (WalkState->Results)
+ {
+ NumResults = WalkState->Results->Results.NumResults;
+ }
+
+ AcpiOsPrintf ("Method [%4.4s] has %X stacked result objects\n", &Node->Name, NumResults);
- for (i = WalkState->CurrentResult; i < WalkState->NumResults; i++)
+ for (i = 0; i < NumResults; i++)
{
- ObjDesc = WalkState->Results[i];
+ ObjDesc = WalkState->Results->Results.ObjDesc[i];
AcpiOsPrintf ("Result%d: ", i);
AcpiDbDisplayInternalObject (ObjDesc, WalkState);
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Debugger/dbexec.c b/sys/contrib/dev/acpica/Subsystem/Debugger/dbexec.c
index 552d9ef..553a8f0 100644
--- a/sys/contrib/dev/acpica/Subsystem/Debugger/dbexec.c
+++ b/sys/contrib/dev/acpica/Subsystem/Debugger/dbexec.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbexec - debugger control method execution
- * $Revision: 18 $
+ * $Revision: 19 $
*
******************************************************************************/
@@ -428,7 +428,7 @@ AcpiDbCreateExecutionThreads (
if (!NumThreads || !NumLoops)
{
- AcpiOsPrintf ("Bad argument: Threads %d, Loops %d\n", NumThreads, NumLoops);
+ AcpiOsPrintf ("Bad argument: Threads %X, Loops %X\n", NumThreads, NumLoops);
return;
}
@@ -455,7 +455,7 @@ AcpiDbCreateExecutionThreads (
/* Create the threads */
- AcpiOsPrintf ("Creating %d threads to execute %d times each\n", NumThreads, NumLoops);
+ AcpiOsPrintf ("Creating %X threads to execute %X times each\n", NumThreads, NumLoops);
for (i = 0; i < (NumThreads); i++)
{
@@ -477,7 +477,7 @@ AcpiDbCreateExecutionThreads (
AcpiOsDeleteSemaphore (ThreadGate);
AcpiDbSetOutputDestination (DB_DUPLICATE_OUTPUT);
- AcpiOsPrintf ("All threads (%d) have completed\n", NumThreads);
+ AcpiOsPrintf ("All threads (%X) have completed\n", NumThreads);
AcpiDbSetOutputDestination (DB_CONSOLE_OUTPUT);
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Debugger/dbfileio.c b/sys/contrib/dev/acpica/Subsystem/Debugger/dbfileio.c
index 78499a9..71dd72a 100644
--- a/sys/contrib/dev/acpica/Subsystem/Debugger/dbfileio.c
+++ b/sys/contrib/dev/acpica/Subsystem/Debugger/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: 33 $
+ * $Revision: 34 $
*
******************************************************************************/
@@ -310,7 +310,7 @@ AcpiDbLoadTable(
*TablePtr = (ACPI_TABLE_HEADER *) AcpiCmAllocate ((size_t) *TableLength);
if (!*TablePtr)
{
- AcpiOsPrintf ("Could not allocate memory for the table (size=0x%X)\n", TableHeader.Length);
+ AcpiOsPrintf ("Could not allocate memory for the table (size=%X)\n", TableHeader.Length);
return (AE_NO_MEMORY);
}
@@ -332,7 +332,7 @@ AcpiDbLoadTable(
if (Actual > 0)
{
- AcpiOsPrintf ("Warning - reading table, asked for %d got %d\n", AmlLength, Actual);
+ AcpiOsPrintf ("Warning - reading table, asked for %X got %X\n", AmlLength, Actual);
return (AE_OK);
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Debugger/dbinput.c b/sys/contrib/dev/acpica/Subsystem/Debugger/dbinput.c
index d81e1ad..f73090a 100644
--- a/sys/contrib/dev/acpica/Subsystem/Debugger/dbinput.c
+++ b/sys/contrib/dev/acpica/Subsystem/Debugger/dbinput.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbinput - user front-end to the AML debugger
- * $Revision: 51 $
+ * $Revision: 52 $
*
******************************************************************************/
@@ -626,7 +626,7 @@ AcpiDbCommandDispatch (
Status = AcpiEnable();
if (ACPI_FAILURE(Status))
{
- AcpiOsPrintf("AcpiEnable failed (0x%x)\n", Status);
+ AcpiOsPrintf("AcpiEnable failed (Status=%X)\n", Status);
return (Status);
}
break;
diff --git a/sys/contrib/dev/acpica/Subsystem/Debugger/dbstats.c b/sys/contrib/dev/acpica/Subsystem/Debugger/dbstats.c
index afb8b44..0f297d3 100644
--- a/sys/contrib/dev/acpica/Subsystem/Debugger/dbstats.c
+++ b/sys/contrib/dev/acpica/Subsystem/Debugger/dbstats.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbstats - Generation and display of ACPI table statistics
- * $Revision: 34 $
+ * $Revision: 35 $
*
******************************************************************************/
@@ -418,7 +418,7 @@ AcpiDbDisplayStatistics (
AcpiOsPrintf ("ACPI Table Information:\n\n");
if (AcpiGbl_DSDT)
{
- AcpiOsPrintf ("DSDT Length:................% 7ld (0x%X)\n", AcpiGbl_DSDT->Length, AcpiGbl_DSDT->Length);
+ AcpiOsPrintf ("DSDT Length:................% 7ld (%X)\n", AcpiGbl_DSDT->Length, AcpiGbl_DSDT->Length);
}
break;
diff --git a/sys/contrib/dev/acpica/Subsystem/Debugger/dbutils.c b/sys/contrib/dev/acpica/Subsystem/Debugger/dbutils.c
index a520221..4af6b4e 100644
--- a/sys/contrib/dev/acpica/Subsystem/Debugger/dbutils.c
+++ b/sys/contrib/dev/acpica/Subsystem/Debugger/dbutils.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbutils - AML debugger utilities
- * $Revision: 32 $
+ * $Revision: 33 $
*
******************************************************************************/
@@ -183,7 +183,7 @@ AcpiDbDumpBuffer (
UINT32 Address)
{
- AcpiOsPrintf ("\nLocation 0x%X:\n", Address);
+ AcpiOsPrintf ("\nLocation %X:\n", Address);
AcpiDbgLevel |= TRACE_TABLES;
AcpiCmDumpBuffer ((UINT8 *) Address, 64, DB_BYTE_DISPLAY, ACPI_UINT32_MAX);
@@ -231,7 +231,7 @@ AcpiDbDumpObject (
case ACPI_TYPE_NUMBER:
- AcpiOsPrintf ("[Number] Value: %ld (0x%lX)\n", ObjDesc->Number.Value, ObjDesc->Number.Value);
+ AcpiOsPrintf ("[Number] Value: %ld (%lX)\n", ObjDesc->Number.Value, ObjDesc->Number.Value);
break;
@@ -278,7 +278,7 @@ AcpiDbDumpObject (
default:
- AcpiOsPrintf ("[Unknown Type] 0x%X \n", ObjDesc->Type);
+ AcpiOsPrintf ("[Unknown Type] %X \n", ObjDesc->Type);
break;
}
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Debugger/dbxface.c b/sys/contrib/dev/acpica/Subsystem/Debugger/dbxface.c
index 19cfafb..3a8792d 100644
--- a/sys/contrib/dev/acpica/Subsystem/Debugger/dbxface.c
+++ b/sys/contrib/dev/acpica/Subsystem/Debugger/dbxface.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbxface - AML Debugger external interfaces
- * $Revision: 31 $
+ * $Revision: 32 $
*
******************************************************************************/
@@ -167,7 +167,7 @@ AcpiDbSingleStep (
{
/* Hit the breakpoint, resume single step, reset breakpoint */
- AcpiOsPrintf ("***Break*** at AML offset 0x%X\n", Op->AmlOffset);
+ AcpiOsPrintf ("***Break*** at AML offset %X\n", Op->AmlOffset);
AcpiGbl_CmSingleStep = TRUE;
AcpiGbl_StepToNextCall = FALSE;
WalkState->MethodBreakpoint = 0;
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmethod.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmethod.c
index 98a4ed5..cbd5fcb 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmethod.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmethod.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsmethod - Parser/Interpreter interface - control method parsing
- * $Revision: 52 $
+ * $Revision: 53 $
*
*****************************************************************************/
@@ -524,7 +524,7 @@ AcpiDsRestartControlMethod (
* NULL if no return value
*/
- Status = AcpiDsResultStackPush (ReturnDesc, WalkState);
+ Status = AcpiDsResultPush (ReturnDesc, WalkState);
if (ACPI_FAILURE (Status))
{
AcpiCmRemoveReference (ReturnDesc);
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmthdat.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmthdat.c
index e6b5cec..10a538f 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmthdat.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmthdat.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dsmthdat - control method arguments and local variables
- * $Revision: 34 $
+ * $Revision: 36 $
*
******************************************************************************/
@@ -166,10 +166,10 @@ AcpiDsMethodDataInit (
{
MOVE_UNALIGNED32_TO_32 (&WalkState->Arguments[i].Name,
NAMEOF_ARG_NTE);
-
WalkState->Arguments[i].Name |= (i << 24);
WalkState->Arguments[i].DataType = ACPI_DESC_TYPE_NAMED;
- WalkState->Arguments[i].Type = INTERNAL_TYPE_METHOD_ARGUMENT;
+ WalkState->Arguments[i].Type = ACPI_TYPE_ANY;
+ WalkState->Arguments[i].Flags = ANOBJ_END_OF_PEER_LIST | ANOBJ_METHOD_ARG;
}
/* Init the method locals */
@@ -181,7 +181,8 @@ AcpiDsMethodDataInit (
WalkState->LocalVariables[i].Name |= (i << 24);
WalkState->LocalVariables[i].DataType = ACPI_DESC_TYPE_NAMED;
- WalkState->LocalVariables[i].Type = INTERNAL_TYPE_METHOD_LOCAL_VAR;
+ WalkState->LocalVariables[i].Type = ACPI_TYPE_ANY;
+ WalkState->LocalVariables[i].Flags = ANOBJ_END_OF_PEER_LIST | ANOBJ_METHOD_LOCAL;
}
return_ACPI_STATUS (AE_OK);
@@ -643,14 +644,14 @@ AcpiDsMethodDataGetValue (
{
case MTH_TYPE_ARG:
DEBUG_PRINT (ACPI_ERROR,
- ("DsMethodDataGetValue: Uninitialized Arg[%d] at entry %X\n",
+ ("DsMethodDataGetValue: Uninitialized Arg[%d] at entry %p\n",
Index, Entry));
return_ACPI_STATUS (AE_AML_UNINITIALIZED_ARG);
break;
case MTH_TYPE_LOCAL:
DEBUG_PRINT (ACPI_ERROR,
- ("DsMethodDataGetValue: Uninitialized Local[%d] at entry %X\n",
+ ("DsMethodDataGetValue: Uninitialized Local[%d] at entry %p\n",
Index, Entry));
return_ACPI_STATUS (AE_AML_UNINITIALIZED_LOCAL);
break;
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsobject.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsobject.c
index b148d51..fa3910f 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsobject.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsobject.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsobject - Dispatcher object management routines
- * $Revision: 51 $
+ * $Revision: 53 $
*
*****************************************************************************/
@@ -349,7 +349,7 @@ AcpiDsInitObjectFromOp (
/* First arg is a number */
- AcpiDsCreateOperand (WalkState, Op->Value.Arg);
+ AcpiDsCreateOperand (WalkState, Op->Value.Arg, 0);
ArgDesc = WalkState->Operands [WalkState->NumOperands - 1];
AcpiDsObjStackPop (1, WalkState);
@@ -559,13 +559,13 @@ AcpiDsBuildInternalSimpleObj (
if (Name)
{
- REPORT_WARNING (("Reference %s AML 0x%X not found\n",
+ REPORT_WARNING (("Reference %s AML %X not found\n",
Name, Op->AmlOffset));
AcpiCmFree (Name);
}
else
{
- REPORT_WARNING (("Reference %s AML 0x%X not found\n",
+ REPORT_WARNING (("Reference %s AML %X not found\n",
Op->Value.String, Op->AmlOffset));
}
*ObjDescPtr = NULL;
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsopcode.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsopcode.c
index 086f5c2..e8082b8 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsopcode.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsopcode.c
@@ -2,7 +2,7 @@
*
* Module Name: dsopcode - Dispatcher Op Region support and handling of
* "control" opcodes
- * $Revision: 25 $
+ * $Revision: 28 $
*
*****************************************************************************/
@@ -290,8 +290,8 @@ AcpiDsGetRegionArguments (
Node = ObjDesc->Region.Node;
DEBUG_PRINT (TRACE_EXEC,
- ("DsGetRegionArguments: [%4.4s] OpRegion JIT Init\n",
- &Node->Name));
+ ("DsGetRegionArguments: [%4.4s] OpRegion Init at AML %p[%x]\n",
+ &Node->Name, ExtraDesc->Extra.Pcode, *(UINT32*) ExtraDesc->Extra.Pcode));
/*
* Allocate a new parser op to be the root of the parsed
@@ -478,7 +478,7 @@ AcpiDsEvalFieldUnitOperands (
/* Invalid parameters on object stack */
DEBUG_PRINT (ACPI_ERROR,
- ("ExecCreateField/%s: bad operand(s) (0x%X)\n",
+ ("ExecCreateField/%s: bad operand(s) (%X)\n",
AcpiPsGetOpcodeName (Op->Opcode), Status));
goto Cleanup;
@@ -625,7 +625,7 @@ AcpiDsEvalFieldUnitOperands (
!AcpiCmValidObjectType (SrcDesc->Common.Type))
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlExecCreateField: Tried to create field in invalid object type - 0x%X\n",
+ ("AmlExecCreateField: Tried to create field in invalid object type %X\n",
SrcDesc->Common.Type));
}
@@ -988,7 +988,8 @@ AcpiDsExecEndControlOp (
WalkState->ReturnDesc = WalkState->Operands[0];
}
- else if (WalkState->NumResults > 0)
+ else if ((WalkState->Results) &&
+ (WalkState->Results->Results.NumResults > 0))
{
/*
* The return value has come from a previous calculation.
@@ -998,13 +999,13 @@ AcpiDsExecEndControlOp (
* cease to exist at the end of the method.
*/
- Status = AcpiAmlResolveToValue (&WalkState->Results [0], WalkState);
+ Status = AcpiAmlResolveToValue (&WalkState->Results->Results.ObjDesc [0], WalkState);
if (ACPI_FAILURE (Status))
{
return (Status);
}
- WalkState->ReturnDesc = WalkState->Results [0];
+ WalkState->ReturnDesc = WalkState->Results->Results.ObjDesc [0];
}
else
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsutils.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsutils.c
index 33f351a..825fa70 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsutils.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsutils.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dsutils - Dispatcher utilities
- * $Revision: 48 $
+ * $Revision: 50 $
*
******************************************************************************/
@@ -241,6 +241,24 @@ AcpiDsIsResultUsed (
case OPTYPE_NAMED_OBJECT: /* Scope, method, etc. */
+ /*
+ * These opcodes allow TermArg(s) as operands and therefore
+ * method calls. The result is used.
+ */
+ if ((Op->Parent->Opcode == AML_REGION_OP) ||
+ (Op->Parent->Opcode == AML_CREATE_FIELD_OP) ||
+ (Op->Parent->Opcode == AML_BIT_FIELD_OP) ||
+ (Op->Parent->Opcode == AML_BYTE_FIELD_OP) ||
+ (Op->Parent->Opcode == AML_WORD_FIELD_OP) ||
+ (Op->Parent->Opcode == AML_DWORD_FIELD_OP) ||
+ (Op->Parent->Opcode == AML_QWORD_FIELD_OP))
+ {
+ DEBUG_PRINT (TRACE_DISPATCH,
+ ("DsIsResultUsed: Result used, [Region or CreateField] opcode=%X Op=%X\n",
+ Op->Opcode, Op));
+ return_VALUE (TRUE);
+ }
+
DEBUG_PRINT (TRACE_DISPATCH,
("DsIsResultUsed: Result not used, Parent opcode=%X Op=%X\n",
Op->Opcode, Op));
@@ -311,7 +329,7 @@ AcpiDsDeleteResultIfNotUsed (
* to ResultObj)
*/
- Status = AcpiDsResultStackPop (&ObjDesc, WalkState);
+ Status = AcpiDsResultPop (&ObjDesc, WalkState);
if (ACPI_SUCCESS (Status))
{
AcpiCmRemoveReference (ResultObj);
@@ -341,7 +359,8 @@ AcpiDsDeleteResultIfNotUsed (
ACPI_STATUS
AcpiDsCreateOperand (
ACPI_WALK_STATE *WalkState,
- ACPI_PARSE_OBJECT *Arg)
+ ACPI_PARSE_OBJECT *Arg,
+ UINT32 ArgIndex)
{
ACPI_STATUS Status = AE_OK;
NATIVE_CHAR *NameString;
@@ -513,7 +532,7 @@ AcpiDsCreateOperand (
* by the evaluation of this argument
*/
- Status = AcpiDsResultStackPop (&ObjDesc, WalkState);
+ Status = AcpiDsResultPopFromBottom (&ObjDesc, WalkState);
if (ACPI_FAILURE (Status))
{
/*
@@ -584,20 +603,17 @@ AcpiDsCreateOperands (
{
ACPI_STATUS Status = AE_OK;
ACPI_PARSE_OBJECT *Arg;
- UINT32 ArgsPushed = 0;
+ UINT32 ArgCount = 0;
FUNCTION_TRACE_PTR ("DsCreateOperands", FirstArg);
- Arg = FirstArg;
-
-
/* For all arguments in the list... */
+ Arg = FirstArg;
while (Arg)
{
-
- Status = AcpiDsCreateOperand (WalkState, Arg);
+ Status = AcpiDsCreateOperand (WalkState, Arg, ArgCount);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -605,12 +621,12 @@ AcpiDsCreateOperands (
DEBUG_PRINT (TRACE_DISPATCH,
("DsCreateOperands: Arg #%d (%p) done, Arg1=%p\n",
- ArgsPushed, Arg, FirstArg));
+ ArgCount, Arg, FirstArg));
/* Move on to next argument, if any */
Arg = Arg->Next;
- ArgsPushed++;
+ ArgCount++;
}
return_ACPI_STATUS (Status);
@@ -623,11 +639,11 @@ Cleanup:
* objects
*/
- AcpiDsObjStackPopAndDelete (ArgsPushed, WalkState);
+ AcpiDsObjStackPopAndDelete (ArgCount, WalkState);
DEBUG_PRINT (ACPI_ERROR,
("DsCreateOperands: Error while creating Arg %d - %s\n",
- (ArgsPushed+1), AcpiCmFormatException (Status)));
+ (ArgCount + 1), AcpiCmFormatException (Status)));
return_ACPI_STATUS (Status);
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswexec.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswexec.c
index e23dc04..0ba3a08 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswexec.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswexec.c
@@ -2,7 +2,7 @@
*
* Module Name: dswexec - Dispatcher method execution callbacks;
* dispatch to interpreter.
- * $Revision: 48 $
+ * $Revision: 50 $
*
*****************************************************************************/
@@ -159,7 +159,7 @@ AcpiDsGetPredicateValue (
if (HasResultObj)
{
- Status = AcpiDsResultStackPop (&ObjDesc, WalkState);
+ Status = AcpiDsResultPop (&ObjDesc, WalkState);
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
@@ -172,7 +172,7 @@ AcpiDsGetPredicateValue (
else
{
- Status = AcpiDsCreateOperand (WalkState, Op);
+ Status = AcpiDsCreateOperand (WalkState, Op, 0);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -352,6 +352,12 @@ AcpiDsExecBeginOp (
{
case OPTYPE_CONTROL:
+ Status = AcpiDsResultStackPush (WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
Status = AcpiDsExecBeginControlOp (WalkState, Op);
break;
@@ -370,6 +376,34 @@ AcpiDsExecBeginOp (
Status = AcpiDsLoad2BeginOp (Op->Opcode, Op, WalkState, NULL);
}
+
+
+ if (Op->Opcode == AML_REGION_OP)
+ {
+ Status = AcpiDsResultStackPush (WalkState);
+ }
+
+ break;
+
+
+ /* most operators with arguments */
+
+ case OPTYPE_MONADIC1:
+ case OPTYPE_DYADIC1:
+ case OPTYPE_MONADIC2:
+ case OPTYPE_MONADIC2R:
+ case OPTYPE_DYADIC2:
+ case OPTYPE_DYADIC2R:
+ case OPTYPE_DYADIC2S:
+ case OPTYPE_RECONFIGURATION:
+ case OPTYPE_INDEX:
+ case OPTYPE_MATCH:
+ case OPTYPE_FATAL:
+ case OPTYPE_CREATE_FIELD:
+
+ /* Start a new result/operand state */
+
+ Status = AcpiDsResultStackPush (WalkState);
break;
@@ -486,6 +520,8 @@ AcpiDsExecEndOp (
case OPTYPE_FATAL:
+ /* Build resolved operand stack */
+
Status = AcpiDsCreateOperands (WalkState, FirstArg);
if (ACPI_FAILURE (Status))
{
@@ -494,9 +530,17 @@ AcpiDsExecEndOp (
OperandIndex = WalkState->NumOperands - 1;
- switch (Optype)
+
+ /* Done with this result state (Now that operand stack is built) */
+
+ Status = AcpiDsResultStackPop (WalkState);
+ if (ACPI_FAILURE (Status))
{
+ goto Cleanup;
+ }
+ switch (Optype)
+ {
case OPTYPE_MONADIC1:
/* 1 Operand, 0 ExternalResult, 0 InternalResult */
@@ -510,11 +554,6 @@ AcpiDsExecEndOp (
/* 1 Operand, 0 ExternalResult, 1 InternalResult */
Status = AcpiAmlExecMonadic2 (Opcode, WalkState, &ResultObj);
- if (ACPI_SUCCESS (Status))
- {
- Status = AcpiDsResultStackPush (ResultObj, WalkState);
- }
-
break;
@@ -523,11 +562,6 @@ AcpiDsExecEndOp (
/* 1 Operand, 1 ExternalResult, 1 InternalResult */
Status = AcpiAmlExecMonadic2R (Opcode, WalkState, &ResultObj);
- if (ACPI_SUCCESS (Status))
- {
- Status = AcpiDsResultStackPush (ResultObj, WalkState);
- }
-
break;
@@ -536,7 +570,6 @@ AcpiDsExecEndOp (
/* 2 Operands, 0 ExternalResult, 0 InternalResult */
Status = AcpiAmlExecDyadic1 (Opcode, WalkState);
-
break;
@@ -545,11 +578,6 @@ AcpiDsExecEndOp (
/* 2 Operands, 0 ExternalResult, 1 InternalResult */
Status = AcpiAmlExecDyadic2 (Opcode, WalkState, &ResultObj);
- if (ACPI_SUCCESS (Status))
- {
- Status = AcpiDsResultStackPush (ResultObj, WalkState);
- }
-
break;
@@ -557,18 +585,7 @@ AcpiDsExecEndOp (
/* 2 Operands, 1 or 2 ExternalResults, 1 InternalResult */
-
- /* NEW INTERFACE:
- * Pass in WalkState, keep result obj but let interpreter
- * push the result
- */
-
Status = AcpiAmlExecDyadic2R (Opcode, WalkState, &ResultObj);
- if (ACPI_SUCCESS (Status))
- {
- Status = AcpiDsResultStackPush (ResultObj, WalkState);
- }
-
break;
@@ -577,56 +594,51 @@ AcpiDsExecEndOp (
/* 2 Operands, 0 ExternalResult, 1 InternalResult */
Status = AcpiAmlExecDyadic2S (Opcode, WalkState, &ResultObj);
- if (ACPI_SUCCESS (Status))
- {
- Status = AcpiDsResultStackPush (ResultObj, WalkState);
- }
-
break;
- case OPTYPE_RECONFIGURATION:
+ case OPTYPE_INDEX: /* Type 2 opcode with 3 operands */
- /* 1 or 2 operands, 0 Internal Result */
+ /* 3 Operands, 1 ExternalResult, 1 InternalResult */
- Status = AcpiAmlExecReconfiguration (Opcode, WalkState);
+ Status = AcpiAmlExecIndex (WalkState, &ResultObj);
break;
- case OPTYPE_FATAL:
+ case OPTYPE_MATCH: /* Type 2 opcode with 6 operands */
- /* 3 Operands, 0 ExternalResult, 0 InternalResult */
+ /* 6 Operands, 0 ExternalResult, 1 InternalResult */
- Status = AcpiAmlExecFatal (WalkState);
+ Status = AcpiAmlExecMatch (WalkState, &ResultObj);
break;
- case OPTYPE_INDEX: /* Type 2 opcode with 3 operands */
-
- /* 3 Operands, 1 ExternalResult, 1 InternalResult */
+ case OPTYPE_RECONFIGURATION:
- Status = AcpiAmlExecIndex (WalkState, &ResultObj);
- if (ACPI_SUCCESS (Status))
- {
- Status = AcpiDsResultStackPush (ResultObj, WalkState);
- }
+ /* 1 or 2 operands, 0 Internal Result */
+ Status = AcpiAmlExecReconfiguration (Opcode, WalkState);
break;
- case OPTYPE_MATCH: /* Type 2 opcode with 6 operands */
-
- /* 6 Operands, 0 ExternalResult, 1 InternalResult */
+ case OPTYPE_FATAL:
- Status = AcpiAmlExecMatch (WalkState, &ResultObj);
- if (ACPI_SUCCESS (Status))
- {
- Status = AcpiDsResultStackPush (ResultObj, WalkState);
- }
+ /* 3 Operands, 0 ExternalResult, 0 InternalResult */
+ Status = AcpiAmlExecFatal (WalkState);
break;
}
+ /*
+ * If a result object was returned from above, push it on the
+ * current result stack
+ */
+ if (ACPI_SUCCESS (Status) &&
+ ResultObj)
+ {
+ Status = AcpiDsResultPush (ResultObj, WalkState);
+ }
+
break;
@@ -636,6 +648,7 @@ AcpiDsExecEndOp (
Status = AcpiDsExecEndControlOp (WalkState, Op);
+ AcpiDsResultStackPop (WalkState);
break;
@@ -726,12 +739,16 @@ AcpiDsExecEndOp (
Op));
Status = AcpiDsEvalRegionOperands (WalkState, Op);
+ if (ACPI_FAILURE (Status))
+ {
+ break;
+ }
+ Status = AcpiDsResultStackPop (WalkState);
break;
case AML_METHOD_OP:
-
break;
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswload.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswload.c
index c595c5d..0e560e1 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswload.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswload.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswload - Dispatcher namespace load callbacks
- * $Revision: 23 $
+ * $Revision: 24 $
*
*****************************************************************************/
@@ -860,7 +860,8 @@ AcpiDsLoad2EndOp (
Status = AcpiAmlExecCreateRegion (((ACPI_PARSE2_OBJECT *) Op)->Data,
((ACPI_PARSE2_OBJECT *) Op)->Length,
- Arg->Value.Integer, WalkState);
+ (ACPI_ADDRESS_SPACE_TYPE) Arg->Value.Integer,
+ WalkState);
DEBUG_PRINT (TRACE_DISPATCH,
("Completed OpRegion Init, Op=%p State=%p entry=%p\n",
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswscope.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswscope.c
index 9d7f1da..b24e1ba 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswscope.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswscope.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswscope - Scope stack manipulation
- * $Revision: 39 $
+ * $Revision: 40 $
*
*****************************************************************************/
@@ -154,7 +154,7 @@ AcpiDsScopeStackClear (
WalkState->ScopeInfo = ScopeInfo->Scope.Next;
DEBUG_PRINT (TRACE_EXEC,
- ("Popped object type 0x%X\n", ScopeInfo->Common.Value));
+ ("Popped object type %X\n", ScopeInfo->Common.Value));
AcpiCmDeleteGenericState (ScopeInfo);
}
}
@@ -258,7 +258,7 @@ AcpiDsScopeStackPop (
}
DEBUG_PRINT (TRACE_EXEC,
- ("Popped object type 0x%X\n", ScopeInfo->Common.Value));
+ ("Popped object type %X\n", ScopeInfo->Common.Value));
AcpiCmDeleteGenericState (ScopeInfo);
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswstate.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswstate.c
index 73d2973..9ec067b 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswstate.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswstate.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswstate - Dispatcher parse tree walk management routines
- * $Revision: 34 $
+ * $Revision: 35 $
*
*****************************************************************************/
@@ -142,20 +142,20 @@
******************************************************************************/
ACPI_STATUS
-AcpiDsResultStackClear (
+xxxAcpiDsResultStackClear (
ACPI_WALK_STATE *WalkState)
{
-
+/*
WalkState->NumResults = 0;
WalkState->CurrentResult = 0;
-
+*/
return (AE_OK);
}
/*******************************************************************************
*
- * FUNCTION: AcpiDsResultStackPush
+ * FUNCTION: AcpiDsResultInsert
*
* PARAMETERS: Object - Object to push
* WalkState - Current Walk state
@@ -167,34 +167,55 @@ AcpiDsResultStackClear (
******************************************************************************/
ACPI_STATUS
-AcpiDsResultStackPush (
+AcpiDsResultInsert (
void *Object,
+ UINT32 Index,
ACPI_WALK_STATE *WalkState)
{
+ ACPI_GENERIC_STATE *State;
- if (WalkState->NumResults >= OBJ_NUM_OPERANDS)
+ State = WalkState->Results;
+ if (!State)
{
DEBUG_PRINT (ACPI_ERROR,
- ("DsResultStackPush: overflow! Obj=%p State=%p Num=%X\n",
- Object, WalkState, WalkState->NumResults));
- return (AE_STACK_OVERFLOW);
+ ("DsResultInsert: No result object pushed! State=%p\n",
+ WalkState));
+ return (AE_NOT_EXIST);
+ }
+
+ if (Index >= OBJ_NUM_OPERANDS)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultInsert: Index out of range: %X Obj=%p State=%p Num=%X\n",
+ Index, Object, WalkState, State->Results.NumResults));
+ return (AE_BAD_PARAMETER);
+ }
+
+ if (!Object)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultInsert: Null Object! Index=%X Obj=%p State=%p Num=%X\n",
+ Index, Object, WalkState, State->Results.NumResults));
+ return (AE_BAD_PARAMETER);
}
- WalkState->Results [WalkState->NumResults] = Object;
- WalkState->NumResults++;
+ State->Results.ObjDesc [Index] = Object;
+ State->Results.NumResults++;
DEBUG_PRINT (TRACE_EXEC,
- ("DsResultStackPush: Obj=%p State=%p Num=%X Cur=%X\n",
- Object, WalkState, WalkState->NumResults, WalkState->CurrentResult));
+ ("DsResultStackPush: Obj=%p [%s] State=%p Num=%X Cur=%X\n",
+ Object, Object ? AcpiCmGetTypeName (((ACPI_OPERAND_OBJECT *) Object)->Common.Type) : "NULL",
+ WalkState, State->Results.NumResults, WalkState->CurrentResult));
return (AE_OK);
}
+
/*******************************************************************************
*
- * FUNCTION: AcpiDsResultStackPop
+ * FUNCTION: AcpiDsResultRemove
*
* PARAMETERS: Object - Where to return the popped object
* WalkState - Current Walk state
@@ -207,48 +228,339 @@ AcpiDsResultStackPush (
******************************************************************************/
ACPI_STATUS
-AcpiDsResultStackPop (
+AcpiDsResultRemove (
ACPI_OPERAND_OBJECT **Object,
+ UINT32 Index,
ACPI_WALK_STATE *WalkState)
{
+ ACPI_GENERIC_STATE *State;
- /* Check for stack underflow */
+ State = WalkState->Results;
+ if (!State)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultRemove: No result object pushed! State=%p\n",
+ WalkState));
+ return (AE_NOT_EXIST);
+ }
- if (WalkState->NumResults == 0)
+ if (Index >= OBJ_NUM_OPERANDS)
{
- DEBUG_PRINT (TRACE_EXEC,
- ("DsResultStackPop: Underflow - State=%p Cur=%X Num=%X\n",
- WalkState, WalkState->CurrentResult, WalkState->NumResults));
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultRemove: Index out of range: %X State=%p Num=%X\n",
+ Index, WalkState, State->Results.NumResults));
+ }
+
+
+ /* Check for a valid result object */
+
+ if (!State->Results.ObjDesc [Index])
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultStackRemove: Null operand! State=%p #Ops=%X, Index=%X\n",
+ WalkState, State->Results.NumResults, Index));
return (AE_AML_NO_OPERAND);
}
+ /* Remove the object */
- /* Pop the stack */
+ State->Results.NumResults--;
+
+ *Object = State->Results.ObjDesc [Index];
+ State->Results.ObjDesc [Index] = NULL;
+
+ DEBUG_PRINT (TRACE_EXEC,
+ ("DsResultStackRemove: Obj=%p [%s] Index=%X State=%p Num=%X\n",
+ *Object, (*Object) ? AcpiCmGetTypeName ((*Object)->Common.Type) : "NULL",
+ Index, WalkState, State->Results.NumResults));
+
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDsResultPop
+ *
+ * PARAMETERS: Object - Where to return the popped object
+ * WalkState - Current Walk state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Pop an object off the bottom of this walk's result stack. In
+ * other words, this is a FIFO.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDsResultPop (
+ ACPI_OPERAND_OBJECT **Object,
+ ACPI_WALK_STATE *WalkState)
+{
+ UINT32 Index;
+ ACPI_GENERIC_STATE *State;
+
+
+ State = WalkState->Results;
+ if (!State)
+ {
+ return (AE_OK);
+ }
+
+
+ if (!State->Results.NumResults)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultPop: No result objects! State=%p\n",
+ WalkState));
+ return (AE_STACK_UNDERFLOW);
+ }
+
+ /* Remove top element */
+
+ State->Results.NumResults--;
+
+ for (Index = OBJ_NUM_OPERANDS; Index; Index--)
+ {
+ /* Check for a valid result object */
+
+ if (State->Results.ObjDesc [Index -1])
+ {
+ *Object = State->Results.ObjDesc [Index -1];
+ State->Results.ObjDesc [Index -1] = NULL;
+
+ DEBUG_PRINT (TRACE_EXEC,
+ ("DsResultStackRemove: Obj=%p [%s] Index=%X State=%p Num=%X\n",
+ *Object, (*Object) ? AcpiCmGetTypeName ((*Object)->Common.Type) : "NULL",
+ Index -1, WalkState, State->Results.NumResults));
+
+ return (AE_OK);
+ }
+ }
+
+
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultPop: No result objects! State=%p\n",
+ WalkState));
+ return (AE_STACK_UNDERFLOW);
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDsResultPop
+ *
+ * PARAMETERS: Object - Where to return the popped object
+ * WalkState - Current Walk state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Pop an object off the bottom of this walk's result stack. In
+ * other words, this is a FIFO.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDsResultPopFromBottom (
+ ACPI_OPERAND_OBJECT **Object,
+ ACPI_WALK_STATE *WalkState)
+{
+ UINT32 Index;
+ ACPI_GENERIC_STATE *State;
+
+
+ State = WalkState->Results;
+ if (!State)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultPopFromBottom: Warning: No result object pushed! State=%p\n",
+ WalkState));
+ return (AE_NOT_EXIST);
+ }
+
+
+ if (!State->Results.NumResults)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultPopFromBottom: No result objects! State=%p\n",
+ WalkState));
+ return (AE_STACK_UNDERFLOW);
+ }
+
+ /* Remove Bottom element */
+
+ *Object = State->Results.ObjDesc [0];
+
+
+ /* Push entire stack down one element */
+
+ for (Index = 0; Index < State->Results.NumResults; Index++)
+ {
+ State->Results.ObjDesc [Index] = State->Results.ObjDesc [Index + 1];
+ }
- WalkState->NumResults--;
+ State->Results.NumResults--;
/* Check for a valid result object */
- if (!WalkState->Results [WalkState->NumResults])
+ if (!*Object)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultPopFromBottom: Null operand! State=%p #Ops=%X, Index=%X\n",
+ WalkState, State->Results.NumResults, Index));
+ return (AE_AML_NO_OPERAND);
+ }
+
+ DEBUG_PRINT (TRACE_EXEC,
+ ("DsResultPopFromBottom: Obj=%p [%s], Results=%p State=%p\n",
+ *Object, (*Object) ? AcpiCmGetTypeName ((*Object)->Common.Type) : "NULL",
+ State, WalkState));
+
+
+ return (AE_OK);
+}
+
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDsResultPop
+ *
+ * PARAMETERS: Object - Where to return the popped object
+ * WalkState - Current Walk state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Pop an object off the bottom of this walk's result stack. In
+ * other words, this is a FIFO.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDsResultPush (
+ ACPI_OPERAND_OBJECT *Object,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_GENERIC_STATE *State;
+
+
+ State = WalkState->Results;
+ if (!State)
+ {
+ return (AE_OK);
+ }
+
+ if (State->Results.NumResults == OBJ_NUM_OPERANDS)
{
DEBUG_PRINT (ACPI_ERROR,
- ("DsResultStackPop: Null operand! State=%p #Ops=%X\n",
- WalkState, WalkState->NumResults));
+ ("DsResultPush: Result stack overflow: Obj=%p State=%p Num=%X\n",
+ Object, WalkState, State->Results.NumResults));
+ return (AE_STACK_OVERFLOW);
+ }
+
+ if (!Object)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultPush: Null Object! Obj=%p State=%p Num=%X\n",
+ Object, WalkState, State->Results.NumResults));
+ return (AE_BAD_PARAMETER);
+ }
+
+
+ State->Results.ObjDesc [State->Results.NumResults] = Object;
+ State->Results.NumResults++;
+
+ DEBUG_PRINT (TRACE_EXEC,
+ ("DsResultPush: Obj=%p [%s] State=%p Num=%X Cur=%X\n",
+ Object, Object ? AcpiCmGetTypeName (((ACPI_OPERAND_OBJECT *) Object)->Common.Type) : "NULL",
+ WalkState, State->Results.NumResults, WalkState->CurrentResult));
+
+ return (AE_OK);
+}
+
+
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDsResultStackPush
+ *
+ * PARAMETERS: Object - Object to push
+ * WalkState - Current Walk state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION:
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDsResultStackPush (
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_GENERIC_STATE *State;
+
+
+ State = AcpiCmCreateGenericState ();
+ if (!State)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ AcpiCmPushGenericState (&WalkState->Results, State);
+
+ DEBUG_PRINT (TRACE_EXEC,
+ ("DsResultStackPush: Results=%p State=%p\n",
+ State, WalkState));
+
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDsResultStackPop
+ *
+ * PARAMETERS: WalkState - Current Walk state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION:
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDsResultStackPop (
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_GENERIC_STATE *State;
+
+
+ /* Check for stack underflow */
+
+ if (WalkState->Results == NULL)
+ {
+ DEBUG_PRINT (TRACE_EXEC,
+ ("DsResultStackPop: Underflow - State=%p\n",
+ WalkState));
return (AE_AML_NO_OPERAND);
}
- *Object = WalkState->Results [WalkState->NumResults];
- WalkState->Results [WalkState->NumResults] = NULL;
+
+ State = AcpiCmPopGenericState (&WalkState->Results);
DEBUG_PRINT (TRACE_EXEC,
- ("DsResultStackPop: Obj=%p State=%p Num=%X Cur=%X\n",
- *Object, WalkState, WalkState->NumResults, WalkState->CurrentResult));
+ ("DsResultStackPop: Result=%p RemainingResults=%X State=%p\n",
+ State, State->Results.NumResults, WalkState));
+
+ AcpiCmDeleteGenericState (State);
return (AE_OK);
}
+
+
/*******************************************************************************
*
* FUNCTION: AcpiDsObjStackDeleteAll
@@ -322,8 +634,9 @@ AcpiDsObjStackPush (
WalkState->Operands [WalkState->NumOperands] = Object;
WalkState->NumOperands++;
- DEBUG_PRINT (TRACE_EXEC, ("DsObjStackPush: Obj=%p State=%p #Ops=%X\n",
- Object, WalkState, WalkState->NumOperands));
+ DEBUG_PRINT (TRACE_EXEC, ("DsObjStackPush: Obj=%p [%s] State=%p #Ops=%X\n",
+ Object, AcpiCmGetTypeName (((ACPI_OPERAND_OBJECT *) Object)->Common.Type),
+ WalkState, WalkState->NumOperands));
return (AE_OK);
}
@@ -380,7 +693,8 @@ AcpiDsObjStackPopObject (
*Object = WalkState->Operands [WalkState->NumOperands];
WalkState->Operands [WalkState->NumOperands] = NULL;
- DEBUG_PRINT (TRACE_EXEC, ("DsObjStackPopObject: State=%p #Ops=%X\n",
+ DEBUG_PRINT (TRACE_EXEC, ("DsObjStackPopObject: Obj=%p [%s] State=%p #Ops=%X\n",
+ *Object, AcpiCmGetTypeName ((*Object)->Common.Type),
WalkState, WalkState->NumOperands));
return (AE_OK);
@@ -749,6 +1063,7 @@ AcpiDsDeleteWalkState (
return;
}
+
/* Always must free any linked control states */
while (WalkState->ControlState)
@@ -759,7 +1074,6 @@ AcpiDsDeleteWalkState (
AcpiCmDeleteGenericState (State);
}
-
/* Always must free any linked parse states */
while (WalkState->ScopeInfo)
@@ -770,6 +1084,18 @@ AcpiDsDeleteWalkState (
AcpiCmDeleteGenericState (State);
}
+ /* Always must free any stacked result states */
+
+ while (WalkState->Results)
+ {
+ State = WalkState->Results;
+ WalkState->Results = State->Common.Next;
+
+ AcpiCmDeleteGenericState (State);
+ }
+
+
+
/* If walk cache is full, just free this wallkstate object */
if (AcpiGbl_WalkStateCacheDepth >= MAX_WALK_CACHE_DEPTH)
diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evevent.c b/sys/contrib/dev/acpica/Subsystem/Events/evevent.c
index 5cdfb7f..2e836c0 100644
--- a/sys/contrib/dev/acpica/Subsystem/Events/evevent.c
+++ b/sys/contrib/dev/acpica/Subsystem/Events/evevent.c
@@ -2,7 +2,7 @@
*
* Module Name: evevent - Fixed and General Purpose AcpiEvent
* handling and dispatch
- * $Revision: 26 $
+ * $Revision: 30 $
*
*****************************************************************************/
@@ -393,7 +393,7 @@ AcpiEvFixedEventDispatch (
RegisterId, 0);
REPORT_ERROR (
- ("EvGpeDispatch: No installed handler for fixed event [0x%08X]\n",
+ ("EvGpeDispatch: No installed handler for fixed event [%08X]\n",
Event));
return (INTERRUPT_NOT_HANDLED);
@@ -559,7 +559,7 @@ AcpiEvGpeInitialize (void)
}
DEBUG_PRINT (ACPI_INFO,
- ("GPE registers: %d@%p (Blk0) %d@%p (Blk1)\n",
+ ("GPE registers: %X@%p (Blk0) %X@%p (Blk1)\n",
Gpe0RegisterCount, AcpiGbl_FADT->XGpe0Blk.Address, Gpe1RegisterCount,
AcpiGbl_FADT->XGpe1Blk.Address));
@@ -665,7 +665,7 @@ AcpiEvSaveMethodInfo (
AcpiHwEnableGpe (GpeNumber);
DEBUG_PRINT (ACPI_INFO,
- ("EvSaveMethodInfo: Registered GPE method %s as GPE number %d\n",
+ ("EvSaveMethodInfo: Registered GPE method %s as GPE number %X\n",
Name, GpeNumber));
return (AE_OK);
}
@@ -812,9 +812,9 @@ AcpiEvAsynchExecuteGpeMethod (
FUNCTION_TRACE ("EvAsynchExecuteGpeMethod");
-
- /* Take a snapshot of the GPE info for this level */
-
+ /*
+ * Take a snapshot of the GPE info for this level
+ */
AcpiCmAcquireMutex (ACPI_MTX_EVENTS);
GpeInfo = AcpiGbl_GpeInfo [GpeNumber];
AcpiCmReleaseMutex (ACPI_MTX_EVENTS);
@@ -822,7 +822,7 @@ AcpiEvAsynchExecuteGpeMethod (
/*
* Method Handler (_Lxx, _Exx):
* ----------------------------
- * AcpiEvaluate the _Lxx/_Exx control method that corresponds to this GPE.
+ * Evaluate the _Lxx/_Exx control method that corresponds to this GPE.
*/
if (GpeInfo.MethodHandle)
{
@@ -832,9 +832,7 @@ AcpiEvAsynchExecuteGpeMethod (
/*
* Level-Triggered?
* ----------------
- * If level-triggered, clear the GPE status bit after execution. Note
- * that edge-triggered events are cleared prior to calling (via DPC)
- * this function.
+ * If level-triggered we clear the GPE status bit after handling the event.
*/
if (GpeInfo.Type & ACPI_EVENT_LEVEL_TRIGGERED)
{
@@ -873,18 +871,18 @@ UINT32
AcpiEvGpeDispatch (
UINT32 GpeNumber)
{
- FUNCTION_TRACE ("EvGpeDispatch");
-
+ ACPI_GPE_LEVEL_INFO GpeInfo;
- DEBUG_PRINT (ACPI_INFO, ("GPE [%d] event occurred.\n", GpeNumber));
+ FUNCTION_TRACE ("EvGpeDispatch");
/*DEBUG_INCREMENT_EVENT_COUNT (EVENT_GENERAL);*/
- /* Ensure that we have a valid GPE number */
-
+ /*
+ * Valid GPE number?
+ */
if (AcpiGbl_GpeValid[GpeNumber] == ACPI_GPE_INVALID)
{
- DEBUG_PRINT (ACPI_ERROR, ("Invalid GPE [%d].\n", GpeNumber));
+ DEBUG_PRINT (ACPI_ERROR, ("Invalid GPE bit [%X].\n", GpeNumber));
return_VALUE (INTERRUPT_NOT_HANDLED);
}
@@ -893,70 +891,65 @@ AcpiEvGpeDispatch (
*/
AcpiHwDisableGpe (GpeNumber);
- /*
- * Edge-Triggered?
- * ---------------
- * If edge-triggered, clear the GPE status bit now. Note that
- * level-triggered events are cleared after the GPE is serviced
- * (see AcpiEvAsynchExecuteGpeMethod).
- */
- if (AcpiGbl_GpeInfo[GpeNumber].Type & ACPI_EVENT_EDGE_TRIGGERED)
+ GpeInfo = AcpiGbl_GpeInfo [GpeNumber];
+
+ /*
+ * Edge-Triggered?
+ * ---------------
+ * If edge-triggered, clear the GPE status bit now. Note that
+ * level-triggered events are cleared after the GPE is serviced.
+ */
+ if (GpeInfo.Type & ACPI_EVENT_EDGE_TRIGGERED)
{
- AcpiHwClearGpe (GpeNumber);
- }
+ AcpiHwClearGpe (GpeNumber);
+ }
- /*
- * Queue-up the Handler:
- * ---------------------
- * Queue the handler, which is either an installable function handler
- * (e.g. EC) or a control method (e.g. _Lxx/_Exx) for later execution.
- */
- if (AcpiGbl_GpeInfo[GpeNumber].MethodHandle)
+ /*
+ * Function Handler (e.g. EC)?
+ */
+ if (GpeInfo.Handler)
{
- if (ACPI_FAILURE (AcpiOsQueueForExecution (OSD_PRIORITY_GPE,
- AcpiEvAsynchExecuteGpeMethod,
- (void*)(NATIVE_UINT)GpeNumber)))
+ /* Invoke function handler (at interrupt level). */
+ GpeInfo.Handler (GpeInfo.Context);
+
+ /* Level-Triggered? */
+ if (GpeInfo.Type & ACPI_EVENT_LEVEL_TRIGGERED)
{
- /*
- * Shoudn't occur, but if it does report an error. Note that
- * the GPE will remain disabled until the ACPI Core Subsystem
- * is restarted, or the handler is removed/reinstalled.
- */
- REPORT_ERROR (
- ("EvGpeDispatch: Unable to queue the handler for GPE [0x%08X]\n",
- GpeNumber));
+ AcpiHwClearGpe (GpeNumber);
+ }
+
+ /* Enable GPE */
+ AcpiHwEnableGpe (GpeNumber);
}
- }
- else if (AcpiGbl_GpeInfo[GpeNumber].Handler)
- {
- ACPI_GPE_LEVEL_INFO GpeInfo;
/*
- * Function Handler (e.g. EC):
- * ---------------------------
- * Execute the installed function handler to handle this event.
- * Without queueing.
+ * Method Handler (e.g. _Exx/_Lxx)?
*/
- AcpiCmAcquireMutex (ACPI_MTX_EVENTS);
- GpeInfo = AcpiGbl_GpeInfo [GpeNumber];
- AcpiCmReleaseMutex (ACPI_MTX_EVENTS);
+ else if (GpeInfo.MethodHandle)
+ {
+ if (ACPI_FAILURE(AcpiOsQueueForExecution (OSD_PRIORITY_GPE,
+ AcpiEvAsynchExecuteGpeMethod, (void*)(NATIVE_UINT)GpeNumber)))
+ {
+ /*
+ * Shoudn't occur, but if it does report an error. Note that
+ * the GPE will remain disabled until the ACPI Core Subsystem
+ * is restarted, or the handler is removed/reinstalled.
+ */
+ REPORT_ERROR (("AcpiEvGpeDispatch: Unable to queue handler for GPE bit [%X]\n", GpeNumber));
+ }
+ }
+ /*
+ * No Handler? Report an error and leave the GPE disabled.
+ */
+ else
+ {
+ REPORT_ERROR (("AcpiEvGpeDispatch: No installed handler for GPE [%X]\n", GpeNumber));
- if (GpeInfo.Handler)
+ /* Level-Triggered? */
+ if (GpeInfo.Type & ACPI_EVENT_LEVEL_TRIGGERED)
{
- GpeInfo.Handler (GpeInfo.Context);
+ AcpiHwClearGpe (GpeNumber);
+ }
}
- }
- /*
- * Non Handled GPEs:
- * -----------------
- * GPEs without handlers are disabled and kept that way until a handler
- * is registered for them.
- */
- else
- {
- REPORT_ERROR (
- ("EvGpeDispatch: No installed handler for GPE [0x%08X]\n",
- GpeNumber));
- }
return_VALUE (INTERRUPT_HANDLED);
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evmisc.c b/sys/contrib/dev/acpica/Subsystem/Events/evmisc.c
index 92fe7a27..0ecb991 100644
--- a/sys/contrib/dev/acpica/Subsystem/Events/evmisc.c
+++ b/sys/contrib/dev/acpica/Subsystem/Events/evmisc.c
@@ -2,7 +2,7 @@
*
* Module Name: evmisc - ACPI device notification handler dispatch
* and ACPI Global Lock support
- * $Revision: 19 $
+ * $Revision: 20 $
*
*****************************************************************************/
@@ -157,7 +157,7 @@ AcpiEvNotifyDispatch (
DEBUG_PRINT (ACPI_INFO,
- ("Dispatching Notify(%d) on device %p\n", NotifyValue, Device));
+ ("Dispatching Notify(%X) on device %p\n", NotifyValue, Device));
switch (NotifyValue)
{
diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evregion.c b/sys/contrib/dev/acpica/Subsystem/Events/evregion.c
index 79ff3e7..0039c070 100644
--- a/sys/contrib/dev/acpica/Subsystem/Events/evregion.c
+++ b/sys/contrib/dev/acpica/Subsystem/Events/evregion.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evregion - ACPI AddressSpace (OpRegion) handler dispatch
- * $Revision: 88 $
+ * $Revision: 90 $
*
*****************************************************************************/
@@ -311,7 +311,7 @@ AcpiEvAddressSpaceDispatch (
if (!HandlerDesc)
{
DEBUG_PRINT (TRACE_OPREGION,
- ("Dispatch address access region 0x%p, no handler\n", RegionObj));
+ ("Dispatch address access region %p, no handler\n", RegionObj));
return_ACPI_STATUS(AE_NOT_EXIST);
}
@@ -356,7 +356,7 @@ AcpiEvAddressSpaceDispatch (
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("EvAddressSpaceDispatch: %s from region init, SpaceID %d\n",
+ ("EvAddressSpaceDispatch: %s from region init, SpaceID %X\n",
AcpiCmFormatException (Status), RegionObj->Region.SpaceId));
return_ACPI_STATUS(Status);
}
@@ -376,7 +376,7 @@ AcpiEvAddressSpaceDispatch (
Handler = HandlerDesc->AddrHandler.Handler;
DEBUG_PRINT ((TRACE_OPREGION | VERBOSE_INFO),
- ("Addrhandler 0x%p (0x%p), Address 0x%p\n",
+ ("Addrhandler %p (%p), Address %p\n",
&RegionObj->Region.AddrHandler->AddrHandler, Handler, Address));
if (!(HandlerDesc->AddrHandler.Flags & ADDR_HANDLER_DEFAULT_INSTALLED))
@@ -399,7 +399,7 @@ AcpiEvAddressSpaceDispatch (
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("EvAddressSpaceDispatch: %s from handler, SpaceID %d\n",
+ ("EvAddressSpaceDispatch: %s from handler, SpaceID %X\n",
AcpiCmFormatException (Status), RegionObj->Region.SpaceId));
}
@@ -473,7 +473,7 @@ AcpiEvDisassociateRegionFromHandler(
if (ObjDesc == RegionObj)
{
DEBUG_PRINT (TRACE_OPREGION,
- ("Removing Region 0x%p from address handler 0x%p\n",
+ ("Removing Region %p from address handler %p\n",
RegionObj, HandlerObj));
/*
* This is it, remove it from the handler's list
@@ -500,7 +500,7 @@ AcpiEvDisassociateRegionFromHandler(
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("EvDisassociateRegionFromHandler: %s from region init, SpaceID %d\n",
+ ("EvDisassociateRegionFromHandler: %s from region init, SpaceID %X\n",
AcpiCmFormatException (Status), RegionObj->Region.SpaceId));
}
@@ -535,7 +535,7 @@ AcpiEvDisassociateRegionFromHandler(
* If we get here, the region was not in the handler's region list
*/
DEBUG_PRINT (TRACE_OPREGION,
- ("Cannot remove region 0x%p from address handler 0x%p\n",
+ ("Cannot remove region %p from address handler %p\n",
RegionObj, HandlerObj));
return_VOID;
@@ -568,7 +568,7 @@ AcpiEvAssociateRegionAndHandler (
FUNCTION_TRACE ("EvAssociateRegionAndHandler");
- DEBUG_PRINT (TRACE_OPREGION, ("Adding Region 0x%p to address handler 0x%p\n",
+ DEBUG_PRINT (TRACE_OPREGION, ("Adding Region %p to address handler %p\n",
RegionObj, HandlerObj));
ACPI_ASSERT (RegionObj->Region.SpaceId == HandlerObj->AddrHandler.SpaceId);
@@ -705,8 +705,8 @@ AcpiEvAddrHandlerHelper (
*/
DEBUG_PRINT (TRACE_OPREGION,
- ("Found handler for %s in device 0x%p (0x%p) handler 0x%p\n",
- AcpiGbl_RegionTypes[HandlerObj->AddrHandler.SpaceId], ObjDesc, TmpObj, HandlerObj));
+ ("Found handler for region %s in device %p(%p) handler %p\n",
+ AcpiCmGetRegionName (HandlerObj->AddrHandler.SpaceId), ObjDesc, TmpObj, HandlerObj));
/*
* Since the object we found it on was a device, then it
diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evrgnini.c b/sys/contrib/dev/acpica/Subsystem/Events/evrgnini.c
index 3522e77..c344b9f 100644
--- a/sys/contrib/dev/acpica/Subsystem/Events/evrgnini.c
+++ b/sys/contrib/dev/acpica/Subsystem/Events/evrgnini.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evrgnini- ACPI AddressSpace (OpRegion) init
- * $Revision: 29 $
+ * $Revision: 31 $
*
*****************************************************************************/
@@ -255,7 +255,7 @@ AcpiEvPciConfigRegionSetup (
* routine checks before we get here, but we check again just in case.
*/
DEBUG_PRINT (TRACE_OPREGION,
- ("Attempting to init a region 0x%X, with no handler\n", RegionObj));
+ ("Attempting to init a region %X, with no handler\n", RegionObj));
return_ACPI_STATUS(AE_NOT_EXIST);
}
@@ -440,7 +440,7 @@ AcpiEvInitializeRegion (
{
ACPI_OPERAND_OBJECT *HandlerObj;
ACPI_OPERAND_OBJECT *ObjDesc;
- UINT32 SpaceId;
+ ACPI_ADDRESS_SPACE_TYPE SpaceId;
ACPI_NAMESPACE_NODE *Node;
ACPI_STATUS Status;
ACPI_NAMESPACE_NODE *MethodNode;
@@ -522,7 +522,7 @@ AcpiEvInitializeRegion (
if (HandlerObj->AddrHandler.SpaceId == SpaceId)
{
DEBUG_PRINT (TRACE_OPREGION,
- ("Found handler (0x%X) for region 0x%X in obj 0x%X\n",
+ ("Found handler %p for region %p in obj %p\n",
HandlerObj, RegionObj, ObjDesc));
/*
@@ -549,8 +549,8 @@ AcpiEvInitializeRegion (
* If we get here, there is no handler for this region
*/
DEBUG_PRINT (TRACE_OPREGION,
- ("No handler currently for SpaceId[%d] (Initializing region 0x%X)\n",
- SpaceId, RegionObj));
+ ("No handler for RegionType %s(%X) (RegionObj %p)\n",
+ AcpiCmGetRegionName (SpaceId), SpaceId, RegionObj));
return_ACPI_STATUS (AE_NOT_EXIST);
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evxface.c b/sys/contrib/dev/acpica/Subsystem/Events/evxface.c
index 4a508e2..df51333 100644
--- a/sys/contrib/dev/acpica/Subsystem/Events/evxface.c
+++ b/sys/contrib/dev/acpica/Subsystem/Events/evxface.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evxface - External interfaces for ACPI events
- * $Revision: 96 $
+ * $Revision: 97 $
*
*****************************************************************************/
@@ -195,7 +195,7 @@ AcpiInstallFixedEventHandler (
}
DEBUG_PRINT (ACPI_INFO,
- ("Enabled fixed event %d. Handler: %x\n", Event, Handler));
+ ("Enabled fixed event %X, Handler=%p\n", Event, Handler));
Cleanup:
@@ -256,7 +256,7 @@ AcpiRemoveFixedEventHandler (
AcpiGbl_FixedEventHandlers[Event].Handler = NULL;
AcpiGbl_FixedEventHandlers[Event].Context = NULL;
- DEBUG_PRINT (ACPI_INFO, ("Disabled fixed event %d.\n", Event));
+ DEBUG_PRINT (ACPI_INFO, ("Disabled fixed event %X.\n", Event));
AcpiCmReleaseMutex (ACPI_MTX_EVENTS);
return_ACPI_STATUS (Status);
diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evxfregn.c b/sys/contrib/dev/acpica/Subsystem/Events/evxfregn.c
index fad4040..4f4b089 100644
--- a/sys/contrib/dev/acpica/Subsystem/Events/evxfregn.c
+++ b/sys/contrib/dev/acpica/Subsystem/Events/evxfregn.c
@@ -2,7 +2,7 @@
*
* Module Name: evxfregn - External Interfaces, ACPI Operation Regions and
* Address Spaces.
- * $Revision: 22 $
+ * $Revision: 24 $
*
*****************************************************************************/
@@ -270,7 +270,7 @@ AcpiInstallAddressSpaceHandler (
else
{
DEBUG_PRINT (TRACE_OPREGION,
- ("Creating object on Device 0x%X while installing handler\n",
+ ("Creating object on Device %p while installing handler\n",
Node));
/* ObjDesc does not exist, create one */
@@ -307,8 +307,8 @@ AcpiInstallAddressSpaceHandler (
}
DEBUG_PRINT (TRACE_OPREGION,
- ("Installing address handler for %s on Device 0x%p (0x%p)\n",
- AcpiGbl_RegionTypes[SpaceId], Node, ObjDesc));
+ ("Installing address handler for region %s(%X) on Device %p(%p)\n",
+ AcpiCmGetRegionName (SpaceId), SpaceId, Node, ObjDesc));
/*
* Now we can install the handler
@@ -447,8 +447,8 @@ AcpiRemoveAddressSpaceHandler (
* Got it, first dereference this in the Regions
*/
DEBUG_PRINT (TRACE_OPREGION,
- ("Removing address handler 0x%p (0x%p) for %s on Device 0x%p (0x%p)\n",
- HandlerObj, Handler, AcpiGbl_RegionTypes[SpaceId],
+ ("Removing address handler %p(%p) for region %s on Device %p(%p)\n",
+ HandlerObj, Handler, AcpiCmGetRegionName (SpaceId),
Node, ObjDesc));
RegionObj = HandlerObj->AddrHandler.RegionList;
@@ -501,8 +501,8 @@ AcpiRemoveAddressSpaceHandler (
* The handler does not exist
*/
DEBUG_PRINT (TRACE_OPREGION,
- ("Unable to remove address handler 0x%p for %s, DeviceNode 0x%p, obj 0x%p\n",
- Handler, AcpiGbl_RegionTypes[SpaceId], Node, ObjDesc));
+ ("Unable to remove address handler %p for %s(%X), DevNode %p, obj %p\n",
+ Handler, AcpiCmGetRegionName (SpaceId), SpaceId, Node, ObjDesc));
Status = AE_NOT_EXIST;
diff --git a/sys/contrib/dev/acpica/Subsystem/Hardware/hwacpi.c b/sys/contrib/dev/acpica/Subsystem/Hardware/hwacpi.c
index 2238108..f0b5577 100644
--- a/sys/contrib/dev/acpica/Subsystem/Hardware/hwacpi.c
+++ b/sys/contrib/dev/acpica/Subsystem/Hardware/hwacpi.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: hwacpi - ACPI hardware functions - mode and timer
- * $Revision: 31 $
+ * $Revision: 32 $
*
*****************************************************************************/
@@ -339,7 +339,7 @@ AcpiHwSetMode (
if (AcpiHwGetMode () == Mode)
{
- DEBUG_PRINT (ACPI_INFO, ("Mode %d successfully enabled\n", Mode));
+ DEBUG_PRINT (ACPI_INFO, ("Mode %X successfully enabled\n", Mode));
Status = AE_OK;
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Hardware/hwregs.c b/sys/contrib/dev/acpica/Subsystem/Hardware/hwregs.c
index 1a04596..77deaec 100644
--- a/sys/contrib/dev/acpica/Subsystem/Hardware/hwregs.c
+++ b/sys/contrib/dev/acpica/Subsystem/Hardware/hwregs.c
@@ -3,7 +3,7 @@
*
* Module Name: hwregs - Read/write access functions for the various ACPI
* control and status registers.
- * $Revision: 81 $
+ * $Revision: 84 $
*
******************************************************************************/
@@ -533,7 +533,7 @@ AcpiHwRegisterBitAccess (
*/
RegisterValue = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK, PM1_CONTROL);
- DEBUG_PRINT (TRACE_IO, ("PM1 control: Read 0x%X\n", RegisterValue));
+ DEBUG_PRINT (TRACE_IO, ("PM1 control: Read %X\n", RegisterValue));
if (ReadWrite == ACPI_WRITE)
{
@@ -547,10 +547,13 @@ AcpiHwRegisterBitAccess (
* than any other control Registers with
* respect to A and B Registers. The value
* for A may be different than the value for B
+ *
+ * Therefore, pass the RegisterId, not just generic PM1_CONTROL,
+ * because we need to do different things. Yuck.
*/
AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
- PM1_CONTROL, (UINT16) RegisterValue);
+ RegisterId, (UINT16) RegisterValue);
}
break;
@@ -570,7 +573,7 @@ AcpiHwRegisterBitAccess (
RegisterValue = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK, PM2_CONTROL);
- DEBUG_PRINT (TRACE_IO, ("PM2 control: Read 0x%X from 0x%X\n",
+ DEBUG_PRINT (TRACE_IO, ("PM2 control: Read %X from %p\n",
RegisterValue, AcpiGbl_FADT->XPm2CntBlk.Address));
if (ReadWrite == ACPI_WRITE)
@@ -581,7 +584,7 @@ AcpiHwRegisterBitAccess (
RegisterValue |= Value;
DEBUG_PRINT (TRACE_IO,
- ("About to write %04X to %04X\n", RegisterValue,
+ ("About to write %04X to %p\n", RegisterValue,
AcpiGbl_FADT->XPm2CntBlk.Address));
AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
@@ -595,7 +598,7 @@ AcpiHwRegisterBitAccess (
Mask = TMR_VAL_MASK;
RegisterValue = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK,
PM_TIMER);
- DEBUG_PRINT (TRACE_IO, ("PM_TIMER: Read 0x%X from 0x%X\n",
+ DEBUG_PRINT (TRACE_IO, ("PM_TIMER: Read %X from %p\n",
RegisterValue, AcpiGbl_FADT->XPmTmrBlk.Address));
break;
@@ -637,7 +640,7 @@ AcpiHwRegisterBitAccess (
/* Now get the current Enable Bits in the selected Reg */
RegisterValue = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK, RegisterId);
- DEBUG_PRINT (TRACE_IO, ("GPE Enable bits: Read 0x%X from 0x%X\n",
+ DEBUG_PRINT (TRACE_IO, ("GPE Enable bits: Read %X from %X\n",
RegisterValue, RegisterId));
if (ReadWrite == ACPI_WRITE)
@@ -676,7 +679,7 @@ AcpiHwRegisterBitAccess (
RegisterValue &= Mask;
RegisterValue >>= AcpiHwGetBitShift (Mask);
- DEBUG_PRINT (TRACE_IO, ("Register I/O: returning 0x%X\n", RegisterValue));
+ DEBUG_PRINT (TRACE_IO, ("Register I/O: returning %X\n", RegisterValue));
return_VALUE (RegisterValue);
}
@@ -701,7 +704,6 @@ AcpiHwRegisterRead (
UINT32 RegisterId)
{
UINT32 Value = 0;
- UINT32 Offset = REGISTER_OFFSET (RegisterId);
UINT32 BankOffset;
FUNCTION_TRACE ("AcpiHwRegisterRead");
@@ -716,16 +718,16 @@ AcpiHwRegisterRead (
{
case PM1_STS: /* 16-bit access */
- Value = AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1aEvtBlk, Offset);
- Value |= AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1bEvtBlk, Offset);
+ Value = AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1aEvtBlk, 0);
+ Value |= AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1bEvtBlk, 0);
break;
case PM1_EN: /* 16-bit access*/
BankOffset = DIV_2 (AcpiGbl_FADT->Pm1EvtLen);
- Value = AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1aEvtBlk, BankOffset + Offset);
- Value |= AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1bEvtBlk, BankOffset + Offset);
+ Value = AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1aEvtBlk, BankOffset);
+ Value |= AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1bEvtBlk, BankOffset);
break;
@@ -745,39 +747,39 @@ AcpiHwRegisterRead (
case PM2_CONTROL: /* 8-bit access */
- Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XPm2CntBlk, Offset);
+ Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XPm2CntBlk, 0);
break;
case PM_TIMER: /* 32-bit access */
- Value = AcpiHwLowLevelRead (32, &AcpiGbl_FADT->XPmTmrBlk, Offset);
+ Value = AcpiHwLowLevelRead (32, &AcpiGbl_FADT->XPmTmrBlk, 0);
break;
case GPE0_STS_BLOCK: /* 8-bit access */
- Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XGpe0Blk, Offset);
+ Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XGpe0Blk, 0);
break;
case GPE0_EN_BLOCK: /* 8-bit access */
BankOffset = DIV_2 (AcpiGbl_FADT->Gpe0BlkLen);
- Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XGpe0Blk, BankOffset + Offset);
+ Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XGpe0Blk, BankOffset);
break;
case GPE1_STS_BLOCK: /* 8-bit access */
- Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XGpe1Blk, Offset);
+ Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XGpe1Blk, 0);
break;
case GPE1_EN_BLOCK: /* 8-bit access */
BankOffset = DIV_2 (AcpiGbl_FADT->Gpe1BlkLen);
- Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XGpe1Blk, BankOffset + Offset);
+ Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XGpe1Blk, BankOffset);
break;
@@ -822,7 +824,6 @@ AcpiHwRegisterWrite (
UINT32 RegisterId,
UINT32 Value)
{
- UINT32 Offset = REGISTER_OFFSET (RegisterId);
UINT32 BankOffset;
FUNCTION_TRACE ("AcpiHwRegisterWrite");
@@ -838,16 +839,16 @@ AcpiHwRegisterWrite (
{
case PM1_STS: /* 16-bit access */
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aEvtBlk, Offset);
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bEvtBlk, Offset);
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aEvtBlk, 0);
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bEvtBlk, 0);
break;
case PM1_EN: /* 16-bit access*/
BankOffset = DIV_2 (AcpiGbl_FADT->Pm1EvtLen);
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aEvtBlk, BankOffset + Offset);
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bEvtBlk, BankOffset + Offset);
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aEvtBlk, BankOffset);
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bEvtBlk, BankOffset);
break;
@@ -859,11 +860,11 @@ AcpiHwRegisterWrite (
*/
if (RegisterId == SLP_TYPE_A)
{
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aCntBlk, Offset);
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aCntBlk, 0);
}
else if (RegisterId == SLP_TYPE_B)
{
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bCntBlk, Offset);
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bCntBlk, 0);
}
else
{
@@ -873,8 +874,8 @@ AcpiHwRegisterWrite (
disable();
}
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aCntBlk, Offset);
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bCntBlk, Offset);
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aCntBlk, 0);
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bCntBlk, 0);
if (RegisterId == SLP_EN)
{
@@ -887,39 +888,39 @@ AcpiHwRegisterWrite (
case PM2_CONTROL: /* 8-bit access */
- AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XPm2CntBlk, Offset);
+ AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XPm2CntBlk, 0);
break;
case PM_TIMER: /* 32-bit access */
- AcpiHwLowLevelWrite (32, Value, &AcpiGbl_FADT->XPmTmrBlk, Offset);
+ AcpiHwLowLevelWrite (32, Value, &AcpiGbl_FADT->XPmTmrBlk, 0);
break;
case GPE0_STS_BLOCK: /* 8-bit access */
- AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XGpe0Blk, Offset);
+ AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XGpe0Blk, 0);
break;
case GPE0_EN_BLOCK: /* 8-bit access */
BankOffset = DIV_2 (AcpiGbl_FADT->Gpe0BlkLen);
- AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XGpe0Blk, BankOffset + Offset);
+ AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XGpe0Blk, BankOffset);
break;
case GPE1_STS_BLOCK: /* 8-bit access */
- AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XGpe1Blk, Offset);
+ AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XGpe1Blk, 0);
break;
case GPE1_EN_BLOCK: /* 8-bit access */
BankOffset = DIV_2 (AcpiGbl_FADT->Gpe1BlkLen);
- AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XGpe1Blk, BankOffset + Offset);
+ AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XGpe1Blk, BankOffset);
break;
@@ -1159,5 +1160,3 @@ AcpiHwLowLevelWrite (
break;
}
}
-
-
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/accommon.h b/sys/contrib/dev/acpica/Subsystem/Include/accommon.h
index bf5ffef..3cec257 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/accommon.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/accommon.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: accommon.h -- prototypes for the common (subsystem-wide) procedures
- * $Revision: 81 $
+ * $Revision: 82 $
*
*****************************************************************************/
@@ -161,6 +161,8 @@ AcpiCmValidateFadt (
* CmGlobal - Global data structures and procedures
*/
+#ifdef ACPI_DEBUG
+
NATIVE_CHAR *
AcpiCmGetMutexName (
UINT32 MutexId);
@@ -169,6 +171,13 @@ NATIVE_CHAR *
AcpiCmGetTypeName (
UINT32 Type);
+NATIVE_CHAR *
+AcpiCmGetRegionName (
+ UINT8 SpaceId);
+
+#endif
+
+
BOOLEAN
AcpiCmValidObjectType (
UINT32 Type);
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acdispat.h b/sys/contrib/dev/acpica/Subsystem/Include/acdispat.h
index 88e21ff..6224621 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acdispat.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acdispat.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acdispat.h - dispatcher (parser to interpreter interface)
- * $Revision: 32 $
+ * $Revision: 33 $
*
*****************************************************************************/
@@ -428,7 +428,8 @@ AcpiDsDeleteResultIfNotUsed (
ACPI_STATUS
AcpiDsCreateOperand (
ACPI_WALK_STATE *WalkState,
- ACPI_PARSE_OBJECT *Arg);
+ ACPI_PARSE_OBJECT *Arg,
+ UINT32 ArgsRemaining);
ACPI_STATUS
AcpiDsCreateOperands (
@@ -497,12 +498,10 @@ AcpiDsPopWalkState (
ACPI_STATUS
AcpiDsResultStackPop (
- ACPI_OPERAND_OBJECT **Object,
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
AcpiDsResultStackPush (
- void *Object,
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
@@ -517,5 +516,31 @@ void
AcpiDsDeleteWalkStateCache (
void);
+ACPI_STATUS
+AcpiDsResultInsert (
+ void *Object,
+ UINT32 Index,
+ ACPI_WALK_STATE *WalkState);
+
+ACPI_STATUS
+AcpiDsResultRemove (
+ ACPI_OPERAND_OBJECT **Object,
+ UINT32 Index,
+ ACPI_WALK_STATE *WalkState);
+
+ACPI_STATUS
+AcpiDsResultPop (
+ ACPI_OPERAND_OBJECT **Object,
+ ACPI_WALK_STATE *WalkState);
+
+ACPI_STATUS
+AcpiDsResultPush (
+ ACPI_OPERAND_OBJECT *Object,
+ ACPI_WALK_STATE *WalkState);
+
+ACPI_STATUS
+AcpiDsResultPopFromBottom (
+ ACPI_OPERAND_OBJECT **Object,
+ ACPI_WALK_STATE *WalkState);
#endif /* _ACDISPAT_H_ */
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acefi.h b/sys/contrib/dev/acpica/Subsystem/Include/acefi.h
index 58bd46a..dcab301 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acefi.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acefi.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acefi.h - OS specific defines, etc.
- * $Revision: 3 $
+ * $Revision: 4 $
*
*****************************************************************************/
@@ -123,14 +123,14 @@
#include <efistdarg.h>
#include <efilib.h>
-#undef UINT8
-#undef BOOLEAN
-#undef UCHAR
-#undef UINT16
-#undef INT32
-#undef UINT32
-#undef INT64
-#undef UINT64
+
+/* _int64 works for both IA32 and IA64 */
+
+#define COMPILER_DEPENDENT_UINT64 unsigned __int64
+
+/* warn C4142: redefinition of type */
+
+#pragma warning(disable:4142)
#endif /* __ACEFI_H__ */
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acexcep.h b/sys/contrib/dev/acpica/Subsystem/Include/acexcep.h
index 87b2ecc..f1acea1 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acexcep.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acexcep.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acexcep.h - Exception codes returned by the ACPI subsystem
- * $Revision: 36 $
+ * $Revision: 37 $
*
*****************************************************************************/
@@ -206,8 +206,9 @@
#define AE_AML_BAD_NAME (ACPI_STATUS) (0x000F | AE_CODE_AML)
#define AE_AML_NAME_NOT_FOUND (ACPI_STATUS) (0x0010 | AE_CODE_AML)
#define AE_AML_INTERNAL (ACPI_STATUS) (0x0011 | AE_CODE_AML)
+#define AE_AML_INVALID_SPACE_ID (ACPI_STATUS) (0x0012 | AE_CODE_AML)
-#define AE_CODE_AML_MAX 0x0011
+#define AE_CODE_AML_MAX 0x0012
/*
* Internal exceptions used for control
@@ -291,6 +292,7 @@ static NATIVE_CHAR *AcpiGbl_ExceptionNames_Aml[] =
"AE_AML_BAD_NAME",
"AE_AML_NAME_NOT_FOUND",
"AE_AML_INTERNAL",
+ "AE_AML_INVALID_SPACE_ID",
};
static NATIVE_CHAR *AcpiGbl_ExceptionNames_Ctrl[] =
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acinterp.h b/sys/contrib/dev/acpica/Subsystem/Include/acinterp.h
index 73ccc37..274ddc0 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acinterp.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acinterp.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acinterp.h - Interpreter subcomponent prototypes and defines
- * $Revision: 85 $
+ * $Revision: 86 $
*
*****************************************************************************/
@@ -253,7 +253,7 @@ ACPI_STATUS
AcpiAmlExecCreateRegion (
UINT8 *AmlPtr,
UINT32 AcpiAmlLength,
- UINT32 RegionSpace,
+ UINT8 RegionSpace,
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/aclocal.h b/sys/contrib/dev/acpica/Subsystem/Include/aclocal.h
index 2378345..e6d1ddb 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/aclocal.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/aclocal.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: aclocal.h - Internal data types used across the ACPI subsystem
- * $Revision: 89 $
+ * $Revision: 93 $
*
*****************************************************************************/
@@ -266,10 +266,11 @@ typedef struct acpi_node
/* Node flags */
-#define ANOBJ_AML_ATTACHMENT 0x1
-#define ANOBJ_END_OF_PEER_LIST 0x2
-#define ANOBJ_DATA_WIDTH_32 0x4 /* Parent table is 64-bits */
-
+#define ANOBJ_AML_ATTACHMENT 0x01
+#define ANOBJ_END_OF_PEER_LIST 0x02
+#define ANOBJ_DATA_WIDTH_32 0x04 /* Parent table is 64-bits */
+#define ANOBJ_METHOD_ARG 0x40
+#define ANOBJ_METHOD_LOCAL 0x80
/*
* ACPI Table Descriptor. One per ACPI table
@@ -492,6 +493,22 @@ typedef struct acpi_pscope_state
} ACPI_PSCOPE_STATE;
+/*
+ * Result values - used to accumulate the results of nested
+ * AML arguments
+ */
+typedef struct acpi_result_values
+{
+ ACPI_STATE_COMMON
+ union acpi_operand_obj *ObjDesc [OBJ_NUM_OPERANDS];
+ UINT8 NumResults;
+ UINT8 LastInsert;
+
+} ACPI_RESULT_VALUES;
+
+
+/* Generic state is union of structs above */
+
typedef union acpi_gen_state
{
ACPI_COMMON_STATE Common;
@@ -499,6 +516,7 @@ typedef union acpi_gen_state
ACPI_UPDATE_STATE Update;
ACPI_SCOPE_STATE Scope;
ACPI_PSCOPE_STATE ParseScope;
+ ACPI_RESULT_VALUES Results;
} ACPI_GENERIC_STATE;
@@ -646,7 +664,6 @@ typedef struct acpi_walk_state
BOOLEAN LastPredicate; /* Result of last predicate */
UINT8 NextOpInfo; /* Info about NextOp */
UINT8 NumOperands; /* Stack pointer for Operands[] array */
- UINT8 NumResults; /* Stack pointer for Results[] array */
UINT8 CurrentResult; /* */
struct acpi_walk_state *Next; /* Next WalkState in list */
@@ -657,6 +674,7 @@ typedef struct acpi_walk_state
ACPI_PARSE_OBJECT *NextOp; /* next op to be processed */
+ ACPI_GENERIC_STATE *Results; /* Stack of accumulated results */
ACPI_GENERIC_STATE *ControlState; /* List of control states (nested IFs) */
ACPI_GENERIC_STATE *ScopeInfo; /* Stack of nested scopes */
ACPI_PARSE_STATE *ParserState; /* Current state of parser */
@@ -670,7 +688,6 @@ typedef struct acpi_walk_state
ACPI_PARSE_OBJECT *MethodCallOp; /* MethodCall Op if running a method */
struct acpi_node *MethodCallNode; /* Called method Node*/
union acpi_operand_obj *Operands[OBJ_NUM_OPERANDS]; /* Operands passed to the interpreter */
- union acpi_operand_obj *Results[OBJ_NUM_OPERANDS]; /* Accumulated results */
struct acpi_node Arguments[MTH_NUM_ARGS]; /* Control method arguments */
struct acpi_node LocalVariables[MTH_NUM_LOCALS]; /* Control method locals */
UINT32 ParseFlags;
@@ -721,8 +738,6 @@ typedef struct acpi_device_walk_info
UINT16 DeviceCount;
UINT16 Num_STA;
UINT16 Num_INI;
- UINT16 Num_HID;
- UINT16 Num_PCI;
ACPI_TABLE_DESC *TableDesc;
} ACPI_DEVICE_WALK_INFO;
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/actypes.h b/sys/contrib/dev/acpica/Subsystem/Include/actypes.h
index cd01bae..e51e0e2 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/actypes.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/actypes.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actypes.h - Common data types for the entire ACPI subsystem
- * $Revision: 152 $
+ * $Revision: 155 $
*
*****************************************************************************/
@@ -150,8 +150,7 @@ typedef unsigned char UCHAR;
typedef unsigned short UINT16;
typedef int INT32;
typedef unsigned int UINT32;
-typedef long INT64;
-typedef unsigned long UINT64;
+typedef COMPILER_DEPENDENT_UINT64 UINT64;
typedef UINT64 NATIVE_UINT;
typedef INT64 NATIVE_INT;
@@ -416,13 +415,11 @@ typedef UINT8 OBJECT_TYPE_INTERNAL;
#define INTERNAL_TYPE_WHILE 30 /* 0x1E OpCode, multiple Code */
#define INTERNAL_TYPE_SCOPE 31 /* 0x1F Name, multiple Node */
#define INTERNAL_TYPE_DEF_ANY 32 /* 0x20 type is Any, suppress search of enclosing scopes */
-#define INTERNAL_TYPE_METHOD_ARGUMENT 33 /* 0x21 */
-#define INTERNAL_TYPE_METHOD_LOCAL_VAR 34 /* 0x22 */
-#define INTERNAL_TYPE_EXTRA 35 /* 0x23 */
+#define INTERNAL_TYPE_EXTRA 33 /* 0x21 */
-#define INTERNAL_TYPE_MAX 35
+#define INTERNAL_TYPE_MAX 33
-#define INTERNAL_TYPE_INVALID 36
+#define INTERNAL_TYPE_INVALID 34
#define ACPI_TYPE_NOT_FOUND 0xFF
/*
@@ -493,13 +490,15 @@ typedef UINT32 ACPI_EVENT_STATUS;
/* Address Space (Operation Region) Types */
-typedef UINT32 ACPI_ADDRESS_SPACE_TYPE;
+typedef UINT8 ACPI_ADDRESS_SPACE_TYPE;
#define ADDRESS_SPACE_SYSTEM_MEMORY (ACPI_ADDRESS_SPACE_TYPE) 0
#define ADDRESS_SPACE_SYSTEM_IO (ACPI_ADDRESS_SPACE_TYPE) 1
#define ADDRESS_SPACE_PCI_CONFIG (ACPI_ADDRESS_SPACE_TYPE) 2
#define ADDRESS_SPACE_EC (ACPI_ADDRESS_SPACE_TYPE) 3
#define ADDRESS_SPACE_SMBUS (ACPI_ADDRESS_SPACE_TYPE) 4
+#define ADDRESS_SPACE_CMOS (ACPI_ADDRESS_SPACE_TYPE) 5
+#define ADDRESS_SPACE_PCI_BAR_TARGET (ACPI_ADDRESS_SPACE_TYPE) 6
/*
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/amlcode.h b/sys/contrib/dev/acpica/Subsystem/Include/amlcode.h
index 7a3674c..37d3b54 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/amlcode.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/amlcode.h
@@ -3,7 +3,7 @@
* Name: amlcode.h - Definitions for AML, as included in "definition blocks"
* Declarations and definitions contained herein are derived
* directly from the ACPI specification.
- * $Revision: 40 $
+ * $Revision: 42 $
*
*****************************************************************************/
@@ -201,10 +201,11 @@
#define AML_LEQUAL_OP (UINT16) 0x93
#define AML_LGREATER_OP (UINT16) 0x94
#define AML_LLESS_OP (UINT16) 0x95
-#define AML_BUFF_OP (UINT16) 0x96 /* ACPI 2.0 */
-#define AML_DEC_STR_OP (UINT16) 0x97 /* ACPI 2.0 */
-#define AML_HEX_STR_OP (UINT16) 0x98 /* ACPI 2.0 */
-#define AML_INT_OP (UINT16) 0x99 /* ACPI 2.0 */
+#define AML_TO_BUFFER_OP (UINT16) 0x96 /* ACPI 2.0 */
+#define AML_TO_DECSTRING_OP (UINT16) 0x97 /* ACPI 2.0 */
+#define AML_TO_HEXSTRING_OP (UINT16) 0x98 /* ACPI 2.0 */
+#define AML_TO_INTEGER_OP (UINT16) 0x99 /* ACPI 2.0 */
+#define AML_TO_STRING_OP (UINT16) 0x9c /* ACPI 2.0 */
#define AML_COPY_OP (UINT16) 0x9d /* ACPI 2.0 */
#define AML_MID_OP (UINT16) 0x9e /* ACPI 2.0 */
#define AML_CONTINUE_OP (UINT16) 0x9f /* ACPI 2.0 */
@@ -465,25 +466,19 @@ typedef enum
#define METHOD_FLAGS_SERIALIZED 0x08
+
+
/* Array sizes. Used for range checking also */
-#define NUM_REGION_TYPES 5
+#define NUM_REGION_TYPES 7
#define NUM_ACCESS_TYPES 7
#define NUM_UPDATE_RULES 3
#define NUM_MATCH_OPS 7
#define NUM_OPCODES 256
#define NUM_FIELD_NAMES 2
-/* External declarations of the AML tables */
-
-extern UINT8 AcpiGbl_Aml [NUM_OPCODES];
-extern UINT16 AcpiGbl_Pfx [NUM_OPCODES];
-extern NATIVE_CHAR *AcpiGbl_RegionTypes [NUM_REGION_TYPES];
-extern NATIVE_CHAR *AcpiGbl_MatchOps [NUM_MATCH_OPS];
-extern NATIVE_CHAR *AcpiGbl_AccessTypes [NUM_ACCESS_TYPES];
-extern NATIVE_CHAR *AcpiGbl_UpdateRules [NUM_UPDATE_RULES];
-extern NATIVE_CHAR *AcpiGbl_FENames [NUM_FIELD_NAMES];
+#define USER_REGION_BEGIN 0x80
/*
* AML tables
@@ -491,61 +486,10 @@ extern NATIVE_CHAR *AcpiGbl_FENames [NUM_FIELD_NAMES];
#ifdef DEFINE_AML_GLOBALS
-/* Data used in keeping track of fields */
-
-NATIVE_CHAR *AcpiGbl_FENames[NUM_FIELD_NAMES] =
-{
- "skip",
- "?access?"
-}; /* FE = Field Element */
-
-
-/* Region type decoding */
-
-NATIVE_CHAR *AcpiGbl_RegionTypes[NUM_REGION_TYPES] =
-{
- "SystemMemory",
- "SystemIO",
- "PCIConfig",
- "EmbeddedControl",
- "SMBus"
-};
-
-
-NATIVE_CHAR *AcpiGbl_MatchOps[NUM_MATCH_OPS] =
-{
- "Error",
- "MTR",
- "MEQ",
- "MLE",
- "MLT",
- "MGE",
- "MGT"
-};
-
-
-/* Access type decoding */
-
-NATIVE_CHAR *AcpiGbl_AccessTypes[NUM_ACCESS_TYPES] =
-{
- "AnyAcc",
- "ByteAcc",
- "WordAcc",
- "DWordAcc",
- "BlockAcc",
- "SMBSendRecvAcc",
- "SMBQuickAcc"
-};
-
-
-/* Update rule decoding */
+/* External declarations of the AML tables */
-NATIVE_CHAR *AcpiGbl_UpdateRules[NUM_UPDATE_RULES] =
-{
- "Preserve",
- "WriteAsOnes",
- "WriteAsZeros"
-};
+extern UINT8 AcpiGbl_Aml [NUM_OPCODES];
+extern UINT16 AcpiGbl_Pfx [NUM_OPCODES];
#endif /* DEFINE_AML_GLOBALS */
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amconfig.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amconfig.c
index cbb7a1e..db3c767 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amconfig.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amconfig.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amconfig - Namespace reconfiguration (Load/Unload opcodes)
- * $Revision: 25 $
+ * $Revision: 26 $
*
*****************************************************************************/
@@ -392,7 +392,7 @@ AcpiAmlExecReconfiguration (
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("ExecReconfiguration/AML_LOAD_OP: bad operand(s) (0x%X)\n",
+ ("ExecReconfiguration/AML_LOAD_OP: bad operand(s) (%X)\n",
Status));
AcpiCmRemoveReference (RegionDesc);
@@ -408,7 +408,7 @@ AcpiAmlExecReconfiguration (
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("ExecReconfiguration/AML_UNLOAD_OP: bad operand(s) (0x%X)\n",
+ ("ExecReconfiguration/AML_UNLOAD_OP: bad operand(s) (%X)\n",
Status));
return_ACPI_STATUS (Status);
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amcreate.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amcreate.c
index 5099cfb..4826be9 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amcreate.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amcreate.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amcreate - Named object creation
- * $Revision: 50 $
+ * $Revision: 51 $
*
*****************************************************************************/
@@ -520,7 +520,7 @@ ACPI_STATUS
AcpiAmlExecCreateRegion (
UINT8 *AmlPtr,
UINT32 AmlLength,
- UINT32 RegionSpace,
+ UINT8 RegionSpace,
ACPI_WALK_STATE *WalkState)
{
ACPI_STATUS Status;
@@ -531,21 +531,19 @@ AcpiAmlExecCreateRegion (
FUNCTION_TRACE ("AmlExecCreateRegion");
- if (RegionSpace >= NUM_REGION_TYPES)
+ /*
+ * Space ID must be one of the predefined IDs, or in the user-defined
+ * range
+ */
+ if ((RegionSpace >= NUM_REGION_TYPES) &&
+ (RegionSpace < USER_REGION_BEGIN))
{
- /* TBD: [Future] In ACPI 2.0, valid region space
- * includes types 0-6 (Adding CMOS and PCIBARTarget).
- * Also, types 0x80-0xff are defined as "OEM Region
- * Space handler"
- *
- * Should this return an error, or should we just keep
- * going? How do we handle the OEM region handlers?
- */
- REPORT_WARNING (("Invalid AddressSpace type %X\n", RegionSpace));
+ REPORT_ERROR (("Invalid AddressSpace type %X\n", RegionSpace));
+ return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID);
}
- DEBUG_PRINT (TRACE_LOAD, ("AmlDoNode: Region Type [%s]\n",
- AcpiGbl_RegionTypes[RegionSpace]));
+ DEBUG_PRINT (TRACE_LOAD, ("AmlExecCreateRegion: Region Type - %s (%X)\n",
+ AcpiCmGetRegionName (RegionSpace), RegionSpace));
/* Get the Node from the object stack */
@@ -583,7 +581,7 @@ AcpiAmlExecCreateRegion (
/* Init the region from the operands */
- ObjDesc->Region.SpaceId = (UINT8) RegionSpace;
+ ObjDesc->Region.SpaceId = RegionSpace;
ObjDesc->Region.Address = 0;
ObjDesc->Region.Length = 0;
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amdump.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amdump.c
index a3662d7..bdab038 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amdump.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amdump.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amdump - Interpreter debug output routines
- * $Revision: 94 $
+ * $Revision: 96 $
*
*****************************************************************************/
@@ -384,8 +384,8 @@ AcpiAmlDumpOperand (
case ACPI_TYPE_BUFFER:
- DEBUG_PRINT_RAW (ACPI_INFO, ("Buffer[%d] seq %lx @ %p \n",
- EntryDesc->Buffer.Length, EntryDesc->Buffer.Sequence,
+ DEBUG_PRINT_RAW (ACPI_INFO, ("Buffer len %X @ %p \n",
+ EntryDesc->Buffer.Length,
EntryDesc->Buffer.Pointer));
Length = EntryDesc->Buffer.Length;
@@ -414,28 +414,28 @@ AcpiAmlDumpOperand (
case ACPI_TYPE_NUMBER:
- DEBUG_PRINT_RAW (ACPI_INFO, ("Number 0x%lx\n",
+ DEBUG_PRINT_RAW (ACPI_INFO, ("Number %lX\n",
EntryDesc->Number.Value));
break;
case INTERNAL_TYPE_IF:
- DEBUG_PRINT_RAW (ACPI_INFO, ("If [Number] 0x%lx\n",
+ DEBUG_PRINT_RAW (ACPI_INFO, ("If [Number] %lX\n",
EntryDesc->Number.Value));
break;
case INTERNAL_TYPE_WHILE:
- DEBUG_PRINT_RAW (ACPI_INFO, ("While [Number] 0x%lx\n",
+ DEBUG_PRINT_RAW (ACPI_INFO, ("While [Number] %lX\n",
EntryDesc->Number.Value));
break;
case ACPI_TYPE_PACKAGE:
- DEBUG_PRINT_RAW (ACPI_INFO, ("Package[%d] @ %p\n",
+ DEBUG_PRINT_RAW (ACPI_INFO, ("Package count %X @ %p\n",
EntryDesc->Package.Count, EntryDesc->Package.Elements));
@@ -465,16 +465,9 @@ AcpiAmlDumpOperand (
case ACPI_TYPE_REGION:
- if (EntryDesc->Region.SpaceId >= NUM_REGION_TYPES)
- {
- DEBUG_PRINT_RAW (ACPI_INFO, ("Region **** Unknown ID=0x%X",
- EntryDesc->Region.SpaceId));
- }
- else
- {
- DEBUG_PRINT_RAW (ACPI_INFO, ("Region %s",
- AcpiGbl_RegionTypes[EntryDesc->Region.SpaceId]));
- }
+ DEBUG_PRINT_RAW (ACPI_INFO, ("Region %s (%X)",
+ AcpiCmGetRegionName (EntryDesc->Region.SpaceId),
+ EntryDesc->Region.SpaceId));
/*
* If the address and length have not been evaluated,
@@ -486,7 +479,7 @@ AcpiAmlDumpOperand (
}
else
{
- DEBUG_PRINT_RAW (ACPI_INFO, (" base %p Length 0x%X\n",
+ DEBUG_PRINT_RAW (ACPI_INFO, (" base %p Length %X\n",
EntryDesc->Region.Address, EntryDesc->Region.Length));
}
break;
@@ -494,7 +487,7 @@ AcpiAmlDumpOperand (
case ACPI_TYPE_STRING:
- DEBUG_PRINT_RAW (ACPI_INFO, ("String[%d] @ %p\n\n",
+ DEBUG_PRINT_RAW (ACPI_INFO, ("String length %X @ %p\n\n",
EntryDesc->String.Length, EntryDesc->String.Pointer));
for (i=0; i < EntryDesc->String.Length; i++)
@@ -516,7 +509,7 @@ AcpiAmlDumpOperand (
case INTERNAL_TYPE_DEF_FIELD:
DEBUG_PRINT_RAW (ACPI_INFO,
- ("DefField: bits=%d acc=%d lock=%d update=%d at byte=%lx bit=%d of below:\n",
+ ("DefField: bits=%X acc=%X lock=%X update=%X at byte=%lX bit=%X of below:\n",
EntryDesc->Field.Length, EntryDesc->Field.Access,
EntryDesc->Field.LockRule, EntryDesc->Field.UpdateRule,
EntryDesc->Field.Offset, EntryDesc->Field.BitOffset));
@@ -533,7 +526,7 @@ AcpiAmlDumpOperand (
case ACPI_TYPE_FIELD_UNIT:
DEBUG_PRINT_RAW (ACPI_INFO,
- ("FieldUnit: %d bits acc %d lock %d update %d at byte %lx bit %d of \n",
+ ("FieldUnit: %X bits acc %X lock %X update %X at byte %lX bit %X of \n",
EntryDesc->FieldUnit.Length, EntryDesc->FieldUnit.Access,
EntryDesc->FieldUnit.LockRule, EntryDesc->FieldUnit.UpdateRule,
EntryDesc->FieldUnit.Offset, EntryDesc->FieldUnit.BitOffset));
@@ -566,7 +559,7 @@ AcpiAmlDumpOperand (
case ACPI_TYPE_METHOD:
DEBUG_PRINT_RAW (ACPI_INFO,
- ("Method(%d) @ %p:%lx\n",
+ ("Method(%X) @ %p:%lX\n",
EntryDesc->Method.ParamCount,
EntryDesc->Method.Pcode, EntryDesc->Method.PcodeLength));
break;
@@ -605,7 +598,7 @@ AcpiAmlDumpOperand (
default:
/* unknown EntryDesc->Common.Type value */
- DEBUG_PRINT_RAW (ACPI_INFO, ("Unknown Type 0x%X\n",
+ DEBUG_PRINT_RAW (ACPI_INFO, ("Unknown Type %X\n",
EntryDesc->Common.Type));
/* Back up to previous entry */
@@ -716,15 +709,15 @@ AcpiAmlDumpNode (
}
- AcpiOsPrintf ("%20s : %4.4s\n", "Name", &Node->Name);
- AcpiOsPrintf ("%20s : %s\n", "Type", AcpiCmGetTypeName (Node->Type));
- AcpiOsPrintf ("%20s : 0x%X\n", "Flags", Node->Flags);
- AcpiOsPrintf ("%20s : 0x%X\n", "Owner Id", Node->OwnerId);
- AcpiOsPrintf ("%20s : 0x%X\n", "Reference Count", Node->ReferenceCount);
- AcpiOsPrintf ("%20s : 0x%p\n", "Attached Object", Node->Object);
- AcpiOsPrintf ("%20s : 0x%p\n", "ChildList", Node->Child);
- AcpiOsPrintf ("%20s : 0x%p\n", "NextPeer", Node->Peer);
- AcpiOsPrintf ("%20s : 0x%p\n", "Parent", AcpiNsGetParentObject (Node));
+ AcpiOsPrintf ("%20s : %4.4s\n", "Name", &Node->Name);
+ AcpiOsPrintf ("%20s : %s\n", "Type", AcpiCmGetTypeName (Node->Type));
+ AcpiOsPrintf ("%20s : %X\n", "Flags", Node->Flags);
+ AcpiOsPrintf ("%20s : %X\n", "Owner Id", Node->OwnerId);
+ AcpiOsPrintf ("%20s : %X\n", "Reference Count", Node->ReferenceCount);
+ AcpiOsPrintf ("%20s : %p\n", "Attached Object", Node->Object);
+ AcpiOsPrintf ("%20s : %p\n", "ChildList", Node->Child);
+ AcpiOsPrintf ("%20s : %p\n", "NextPeer", Node->Peer);
+ AcpiOsPrintf ("%20s : %p\n", "Parent", AcpiNsGetParentObject (Node));
}
@@ -757,14 +750,14 @@ AcpiAmlDumpObjectDescriptor (
if (!(VALID_DESCRIPTOR_TYPE (ObjDesc, ACPI_DESC_TYPE_INTERNAL)))
{
- AcpiOsPrintf ("0x%p is not a valid ACPI object\n", ObjDesc);
+ AcpiOsPrintf ("%p is not a valid ACPI object\n", ObjDesc);
return;
}
/* Common Fields */
- AcpiOsPrintf ("%20s : 0x%X\n", "Reference Count", ObjDesc->Common.ReferenceCount);
- AcpiOsPrintf ("%20s : 0x%X\n", "Flags", ObjDesc->Common.Flags);
+ AcpiOsPrintf ("%20s : %X\n", "Reference Count", ObjDesc->Common.ReferenceCount);
+ AcpiOsPrintf ("%20s : %X\n", "Flags", ObjDesc->Common.Flags);
/* Object-specific Fields */
@@ -772,195 +765,195 @@ AcpiAmlDumpObjectDescriptor (
{
case ACPI_TYPE_NUMBER:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Number");
- AcpiOsPrintf ("%20s : 0x%X\n", "Value", ObjDesc->Number.Value);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Number");
+ AcpiOsPrintf ("%20s : %X\n", "Value", ObjDesc->Number.Value);
break;
case ACPI_TYPE_STRING:
- AcpiOsPrintf ("%20s : %s\n", "Type", "String");
- AcpiOsPrintf ("%20s : 0x%X\n", "Length", ObjDesc->String.Length);
- AcpiOsPrintf ("%20s : 0x%p\n", "Pointer", ObjDesc->String.Pointer);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "String");
+ AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->String.Length);
+ AcpiOsPrintf ("%20s : %p\n", "Pointer", ObjDesc->String.Pointer);
break;
case ACPI_TYPE_BUFFER:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Buffer");
- AcpiOsPrintf ("%20s : 0x%X\n", "Length", ObjDesc->Buffer.Length);
- AcpiOsPrintf ("%20s : 0x%X\n", "Sequence", ObjDesc->Buffer.Sequence);
- AcpiOsPrintf ("%20s : 0x%p\n", "Pointer", ObjDesc->Buffer.Pointer);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Buffer");
+ AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->Buffer.Length);
+ AcpiOsPrintf ("%20s : %X\n", "Sequence", ObjDesc->Buffer.Sequence);
+ AcpiOsPrintf ("%20s : %p\n", "Pointer", ObjDesc->Buffer.Pointer);
break;
case ACPI_TYPE_PACKAGE:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Package");
- AcpiOsPrintf ("%20s : 0x%X\n", "Count", ObjDesc->Package.Count);
- AcpiOsPrintf ("%20s : 0x%p\n", "Elements", ObjDesc->Package.Elements);
- AcpiOsPrintf ("%20s : 0x%p\n", "NextElement", ObjDesc->Package.NextElement);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Package");
+ AcpiOsPrintf ("%20s : %X\n", "Count", ObjDesc->Package.Count);
+ AcpiOsPrintf ("%20s : %p\n", "Elements", ObjDesc->Package.Elements);
+ AcpiOsPrintf ("%20s : %p\n", "NextElement", ObjDesc->Package.NextElement);
break;
case ACPI_TYPE_FIELD_UNIT:
- AcpiOsPrintf ("%20s : %s\n", "Type", "FieldUnit");
- AcpiOsPrintf ("%20s : 0x%X\n", "Access", ObjDesc->FieldUnit.Access);
- AcpiOsPrintf ("%20s : 0x%X\n", "LockRule", ObjDesc->FieldUnit.LockRule);
- AcpiOsPrintf ("%20s : 0x%X\n", "UpdateRule", ObjDesc->FieldUnit.UpdateRule);
- AcpiOsPrintf ("%20s : 0x%X\n", "Length", ObjDesc->FieldUnit.Length);
- AcpiOsPrintf ("%20s : 0x%X\n", "BitOffset", ObjDesc->FieldUnit.BitOffset);
- AcpiOsPrintf ("%20s : 0x%X\n", "Offset", ObjDesc->FieldUnit.Offset);
- AcpiOsPrintf ("%20s : 0x%p\n", "Container", ObjDesc->FieldUnit.Container);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "FieldUnit");
+ AcpiOsPrintf ("%20s : %X\n", "Access", ObjDesc->FieldUnit.Access);
+ AcpiOsPrintf ("%20s : %X\n", "LockRule", ObjDesc->FieldUnit.LockRule);
+ AcpiOsPrintf ("%20s : %X\n", "UpdateRule", ObjDesc->FieldUnit.UpdateRule);
+ AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->FieldUnit.Length);
+ AcpiOsPrintf ("%20s : %X\n", "BitOffset", ObjDesc->FieldUnit.BitOffset);
+ AcpiOsPrintf ("%20s : %X\n", "Offset", ObjDesc->FieldUnit.Offset);
+ AcpiOsPrintf ("%20s : %p\n", "Container", ObjDesc->FieldUnit.Container);
break;
case ACPI_TYPE_DEVICE:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Device");
- AcpiOsPrintf ("%20s : 0x%p\n", "AddrHandler", ObjDesc->Device.AddrHandler);
- AcpiOsPrintf ("%20s : 0x%p\n", "SysHandler", ObjDesc->Device.SysHandler);
- AcpiOsPrintf ("%20s : 0x%p\n", "DrvHandler", ObjDesc->Device.DrvHandler);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Device");
+ AcpiOsPrintf ("%20s : %p\n", "AddrHandler", ObjDesc->Device.AddrHandler);
+ AcpiOsPrintf ("%20s : %p\n", "SysHandler", ObjDesc->Device.SysHandler);
+ AcpiOsPrintf ("%20s : %p\n", "DrvHandler", ObjDesc->Device.DrvHandler);
break;
case ACPI_TYPE_EVENT:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Event");
- AcpiOsPrintf ("%20s : 0x%X\n", "Semaphore", ObjDesc->Event.Semaphore);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Event");
+ AcpiOsPrintf ("%20s : %X\n", "Semaphore", ObjDesc->Event.Semaphore);
break;
case ACPI_TYPE_METHOD:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Method");
- AcpiOsPrintf ("%20s : 0x%X\n", "ParamCount", ObjDesc->Method.ParamCount);
- AcpiOsPrintf ("%20s : 0x%X\n", "Concurrency", ObjDesc->Method.Concurrency);
- AcpiOsPrintf ("%20s : 0x%p\n", "Semaphore", ObjDesc->Method.Semaphore);
- AcpiOsPrintf ("%20s : 0x%X\n", "PcodeLength", ObjDesc->Method.PcodeLength);
- AcpiOsPrintf ("%20s : 0x%X\n", "Pcode", ObjDesc->Method.Pcode);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Method");
+ AcpiOsPrintf ("%20s : %X\n", "ParamCount", ObjDesc->Method.ParamCount);
+ AcpiOsPrintf ("%20s : %X\n", "Concurrency", ObjDesc->Method.Concurrency);
+ AcpiOsPrintf ("%20s : %p\n", "Semaphore", ObjDesc->Method.Semaphore);
+ AcpiOsPrintf ("%20s : %X\n", "PcodeLength", ObjDesc->Method.PcodeLength);
+ AcpiOsPrintf ("%20s : %X\n", "Pcode", ObjDesc->Method.Pcode);
break;
case ACPI_TYPE_MUTEX:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Mutex");
- AcpiOsPrintf ("%20s : 0x%X\n", "SyncLevel", ObjDesc->Mutex.SyncLevel);
- AcpiOsPrintf ("%20s : 0x%p\n", "Semaphore", ObjDesc->Mutex.Semaphore);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Mutex");
+ AcpiOsPrintf ("%20s : %X\n", "SyncLevel", ObjDesc->Mutex.SyncLevel);
+ AcpiOsPrintf ("%20s : %p\n", "Semaphore", ObjDesc->Mutex.Semaphore);
break;
case ACPI_TYPE_REGION:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Region");
- AcpiOsPrintf ("%20s : 0x%X\n", "SpaceId", ObjDesc->Region.SpaceId);
- AcpiOsPrintf ("%20s : 0x%X\n", "Flags", ObjDesc->Region.Flags);
- AcpiOsPrintf ("%20s : 0x%X\n", "Address", ObjDesc->Region.Address);
- AcpiOsPrintf ("%20s : 0x%X\n", "Length", ObjDesc->Region.Length);
- AcpiOsPrintf ("%20s : 0x%p\n", "AddrHandler", ObjDesc->Region.AddrHandler);
- AcpiOsPrintf ("%20s : 0x%p\n", "Next", ObjDesc->Region.Next);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Region");
+ AcpiOsPrintf ("%20s : %X\n", "SpaceId", ObjDesc->Region.SpaceId);
+ AcpiOsPrintf ("%20s : %X\n", "Flags", ObjDesc->Region.Flags);
+ AcpiOsPrintf ("%20s : %X\n", "Address", ObjDesc->Region.Address);
+ AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->Region.Length);
+ AcpiOsPrintf ("%20s : %p\n", "AddrHandler", ObjDesc->Region.AddrHandler);
+ AcpiOsPrintf ("%20s : %p\n", "Next", ObjDesc->Region.Next);
break;
case ACPI_TYPE_POWER:
- AcpiOsPrintf ("%20s : %s\n", "Type", "PowerResource");
- AcpiOsPrintf ("%20s : 0x%X\n", "SystemLevel", ObjDesc->PowerResource.SystemLevel);
- AcpiOsPrintf ("%20s : 0x%X\n", "ResourceOrder", ObjDesc->PowerResource.ResourceOrder);
- AcpiOsPrintf ("%20s : 0x%p\n", "SysHandler", ObjDesc->PowerResource.SysHandler);
- AcpiOsPrintf ("%20s : 0x%p\n", "DrvHandler", ObjDesc->PowerResource.DrvHandler);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "PowerResource");
+ AcpiOsPrintf ("%20s : %X\n", "SystemLevel", ObjDesc->PowerResource.SystemLevel);
+ AcpiOsPrintf ("%20s : %X\n", "ResourceOrder", ObjDesc->PowerResource.ResourceOrder);
+ AcpiOsPrintf ("%20s : %p\n", "SysHandler", ObjDesc->PowerResource.SysHandler);
+ AcpiOsPrintf ("%20s : %p\n", "DrvHandler", ObjDesc->PowerResource.DrvHandler);
break;
case ACPI_TYPE_PROCESSOR:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Processor");
- AcpiOsPrintf ("%20s : 0x%X\n", "Processor ID", ObjDesc->Processor.ProcId);
- AcpiOsPrintf ("%20s : 0x%X\n", "Length", ObjDesc->Processor.Length);
- AcpiOsPrintf ("%20s : 0x%X\n", "Address", ObjDesc->Processor.Address);
- AcpiOsPrintf ("%20s : 0x%p\n", "SysHandler", ObjDesc->Processor.SysHandler);
- AcpiOsPrintf ("%20s : 0x%p\n", "DrvHandler", ObjDesc->Processor.DrvHandler);
- AcpiOsPrintf ("%20s : 0x%p\n", "AddrHandler", ObjDesc->Processor.AddrHandler);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Processor");
+ AcpiOsPrintf ("%20s : %X\n", "Processor ID", ObjDesc->Processor.ProcId);
+ AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->Processor.Length);
+ AcpiOsPrintf ("%20s : %X\n", "Address", ObjDesc->Processor.Address);
+ AcpiOsPrintf ("%20s : %p\n", "SysHandler", ObjDesc->Processor.SysHandler);
+ AcpiOsPrintf ("%20s : %p\n", "DrvHandler", ObjDesc->Processor.DrvHandler);
+ AcpiOsPrintf ("%20s : %p\n", "AddrHandler", ObjDesc->Processor.AddrHandler);
break;
case ACPI_TYPE_THERMAL:
- AcpiOsPrintf ("%20s : %s\n", "Type", "ThermalZone");
- AcpiOsPrintf ("%20s : 0x%p\n", "SysHandler", ObjDesc->ThermalZone.SysHandler);
- AcpiOsPrintf ("%20s : 0x%p\n", "DrvHandler", ObjDesc->ThermalZone.DrvHandler);
- AcpiOsPrintf ("%20s : 0x%p\n", "AddrHandler", ObjDesc->ThermalZone.AddrHandler);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "ThermalZone");
+ AcpiOsPrintf ("%20s : %p\n", "SysHandler", ObjDesc->ThermalZone.SysHandler);
+ AcpiOsPrintf ("%20s : %p\n", "DrvHandler", ObjDesc->ThermalZone.DrvHandler);
+ AcpiOsPrintf ("%20s : %p\n", "AddrHandler", ObjDesc->ThermalZone.AddrHandler);
break;
case INTERNAL_TYPE_BANK_FIELD:
- AcpiOsPrintf ("%20s : %s\n", "Type", "BankField");
- AcpiOsPrintf ("%20s : 0x%X\n", "Access", ObjDesc->BankField.Access);
- AcpiOsPrintf ("%20s : 0x%X\n", "LockRule", ObjDesc->BankField.LockRule);
- AcpiOsPrintf ("%20s : 0x%X\n", "UpdateRule", ObjDesc->BankField.UpdateRule);
- AcpiOsPrintf ("%20s : 0x%X\n", "Length", ObjDesc->BankField.Length);
- AcpiOsPrintf ("%20s : 0x%X\n", "BitOffset", ObjDesc->BankField.BitOffset);
- AcpiOsPrintf ("%20s : 0x%X\n", "Offset", ObjDesc->BankField.Offset);
- AcpiOsPrintf ("%20s : 0x%X\n", "Value", ObjDesc->BankField.Value);
- AcpiOsPrintf ("%20s : 0x%p\n", "Container", ObjDesc->BankField.Container);
- AcpiOsPrintf ("%20s : 0x%X\n", "BankSelect", ObjDesc->BankField.BankSelect);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "BankField");
+ AcpiOsPrintf ("%20s : %X\n", "Access", ObjDesc->BankField.Access);
+ AcpiOsPrintf ("%20s : %X\n", "LockRule", ObjDesc->BankField.LockRule);
+ AcpiOsPrintf ("%20s : %X\n", "UpdateRule", ObjDesc->BankField.UpdateRule);
+ AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->BankField.Length);
+ AcpiOsPrintf ("%20s : %X\n", "BitOffset", ObjDesc->BankField.BitOffset);
+ AcpiOsPrintf ("%20s : %X\n", "Offset", ObjDesc->BankField.Offset);
+ AcpiOsPrintf ("%20s : %X\n", "Value", ObjDesc->BankField.Value);
+ AcpiOsPrintf ("%20s : %p\n", "Container", ObjDesc->BankField.Container);
+ AcpiOsPrintf ("%20s : %X\n", "BankSelect", ObjDesc->BankField.BankSelect);
break;
case INTERNAL_TYPE_INDEX_FIELD:
- AcpiOsPrintf ("%20s : %s\n", "Type", "IndexField");
- AcpiOsPrintf ("%20s : 0x%X\n", "Access", ObjDesc->IndexField.Access);
- AcpiOsPrintf ("%20s : 0x%X\n", "LockRule", ObjDesc->IndexField.LockRule);
- AcpiOsPrintf ("%20s : 0x%X\n", "UpdateRule", ObjDesc->IndexField.UpdateRule);
- AcpiOsPrintf ("%20s : 0x%X\n", "Length", ObjDesc->IndexField.Length);
- AcpiOsPrintf ("%20s : 0x%X\n", "BitOffset", ObjDesc->IndexField.BitOffset);
- AcpiOsPrintf ("%20s : 0x%X\n", "Value", ObjDesc->IndexField.Value);
- AcpiOsPrintf ("%20s : 0x%X\n", "Index", ObjDesc->IndexField.Index);
- AcpiOsPrintf ("%20s : 0x%X\n", "Data", ObjDesc->IndexField.Data);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "IndexField");
+ AcpiOsPrintf ("%20s : %X\n", "Access", ObjDesc->IndexField.Access);
+ AcpiOsPrintf ("%20s : %X\n", "LockRule", ObjDesc->IndexField.LockRule);
+ AcpiOsPrintf ("%20s : %X\n", "UpdateRule", ObjDesc->IndexField.UpdateRule);
+ AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->IndexField.Length);
+ AcpiOsPrintf ("%20s : %X\n", "BitOffset", ObjDesc->IndexField.BitOffset);
+ AcpiOsPrintf ("%20s : %X\n", "Value", ObjDesc->IndexField.Value);
+ AcpiOsPrintf ("%20s : %X\n", "Index", ObjDesc->IndexField.Index);
+ AcpiOsPrintf ("%20s : %X\n", "Data", ObjDesc->IndexField.Data);
break;
case INTERNAL_TYPE_REFERENCE:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Reference");
- AcpiOsPrintf ("%20s : 0x%X\n", "TargetType", ObjDesc->Reference.TargetType);
- AcpiOsPrintf ("%20s : 0x%X\n", "OpCode", ObjDesc->Reference.OpCode);
- AcpiOsPrintf ("%20s : 0x%X\n", "Offset", ObjDesc->Reference.Offset);
- AcpiOsPrintf ("%20s : 0x%p\n", "ObjDesc", ObjDesc->Reference.Object);
- AcpiOsPrintf ("%20s : 0x%p\n", "Node", ObjDesc->Reference.Node);
- AcpiOsPrintf ("%20s : 0x%p\n", "Where", ObjDesc->Reference.Where);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Reference");
+ AcpiOsPrintf ("%20s : %X\n", "TargetType", ObjDesc->Reference.TargetType);
+ AcpiOsPrintf ("%20s : %X\n", "OpCode", ObjDesc->Reference.OpCode);
+ AcpiOsPrintf ("%20s : %X\n", "Offset", ObjDesc->Reference.Offset);
+ AcpiOsPrintf ("%20s : %p\n", "ObjDesc", ObjDesc->Reference.Object);
+ AcpiOsPrintf ("%20s : %p\n", "Node", ObjDesc->Reference.Node);
+ AcpiOsPrintf ("%20s : %p\n", "Where", ObjDesc->Reference.Where);
break;
case INTERNAL_TYPE_ADDRESS_HANDLER:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Address Handler");
- AcpiOsPrintf ("%20s : 0x%X\n", "SpaceId", ObjDesc->AddrHandler.SpaceId);
- AcpiOsPrintf ("%20s : 0x%p\n", "Next", ObjDesc->AddrHandler.Next);
- AcpiOsPrintf ("%20s : 0x%p\n", "RegionList", ObjDesc->AddrHandler.RegionList);
- AcpiOsPrintf ("%20s : 0x%p\n", "Node", ObjDesc->AddrHandler.Node);
- AcpiOsPrintf ("%20s : 0x%p\n", "Handler", ObjDesc->AddrHandler.Handler);
- AcpiOsPrintf ("%20s : 0x%p\n", "Context", ObjDesc->AddrHandler.Context);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Address Handler");
+ AcpiOsPrintf ("%20s : %X\n", "SpaceId", ObjDesc->AddrHandler.SpaceId);
+ AcpiOsPrintf ("%20s : %p\n", "Next", ObjDesc->AddrHandler.Next);
+ AcpiOsPrintf ("%20s : %p\n", "RegionList", ObjDesc->AddrHandler.RegionList);
+ AcpiOsPrintf ("%20s : %p\n", "Node", ObjDesc->AddrHandler.Node);
+ AcpiOsPrintf ("%20s : %p\n", "Handler", ObjDesc->AddrHandler.Handler);
+ AcpiOsPrintf ("%20s : %p\n", "Context", ObjDesc->AddrHandler.Context);
break;
case INTERNAL_TYPE_NOTIFY:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Notify Handler");
- AcpiOsPrintf ("%20s : 0x%p\n", "Node", ObjDesc->NotifyHandler.Node);
- AcpiOsPrintf ("%20s : 0x%p\n", "Handler", ObjDesc->NotifyHandler.Handler);
- AcpiOsPrintf ("%20s : 0x%p\n", "Context", ObjDesc->NotifyHandler.Context);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Notify Handler");
+ AcpiOsPrintf ("%20s : %p\n", "Node", ObjDesc->NotifyHandler.Node);
+ AcpiOsPrintf ("%20s : %p\n", "Handler", ObjDesc->NotifyHandler.Handler);
+ AcpiOsPrintf ("%20s : %p\n", "Context", ObjDesc->NotifyHandler.Context);
break;
case INTERNAL_TYPE_DEF_FIELD:
- AcpiOsPrintf ("%20s : 0x%p\n", "Granularity", ObjDesc->Field.Granularity);
- AcpiOsPrintf ("%20s : 0x%p\n", "Length", ObjDesc->Field.Length);
- AcpiOsPrintf ("%20s : 0x%p\n", "Offset", ObjDesc->Field.Offset);
- AcpiOsPrintf ("%20s : 0x%p\n", "BitOffset", ObjDesc->Field.BitOffset);
- AcpiOsPrintf ("%20s : 0x%p\n", "Container", ObjDesc->Field.Container);
+ AcpiOsPrintf ("%20s : %p\n", "Granularity", ObjDesc->Field.Granularity);
+ AcpiOsPrintf ("%20s : %p\n", "Length", ObjDesc->Field.Length);
+ AcpiOsPrintf ("%20s : %p\n", "Offset", ObjDesc->Field.Offset);
+ AcpiOsPrintf ("%20s : %p\n", "BitOffset", ObjDesc->Field.BitOffset);
+ AcpiOsPrintf ("%20s : %p\n", "Container", ObjDesc->Field.Container);
break;
@@ -974,14 +967,14 @@ AcpiAmlDumpObjectDescriptor (
case INTERNAL_TYPE_SCOPE:
case INTERNAL_TYPE_DEF_ANY:
- AcpiOsPrintf ("*** Structure display not implemented for type 0x%X! ***\n",
+ AcpiOsPrintf ("*** Structure display not implemented for type %X! ***\n",
ObjDesc->Common.Type);
break;
default:
- AcpiOsPrintf ("*** Cannot display unknown type 0x%X! ***\n", ObjDesc->Common.Type);
+ AcpiOsPrintf ("*** Cannot display unknown type %X! ***\n", ObjDesc->Common.Type);
break;
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amdyadic.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amdyadic.c
index a29a655..57b0730 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amdyadic.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amdyadic.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amdyadic - ACPI AML (p-code) execution for dyadic operators
- * $Revision: 67 $
+ * $Revision: 68 $
*
*****************************************************************************/
@@ -174,7 +174,7 @@ AcpiAmlExecDyadic1 (
/* Invalid parameters on object stack */
DEBUG_PRINT (ACPI_ERROR,
- ("ExecDyadic1/%s: bad operand(s) (0x%X)\n",
+ ("ExecDyadic1/%s: bad operand(s) (Status=%X)\n",
AcpiPsGetOpcodeName (Opcode), Status));
goto Cleanup;
@@ -216,7 +216,7 @@ AcpiAmlExecDyadic1 (
default:
DEBUG_PRINT (ACPI_ERROR,
- ("AmlExecDyadic1/NotifyOp: unexpected notify object type %d\n",
+ ("AmlExecDyadic1/NotifyOp: unexpected notify object type %X\n",
ObjDesc->Common.Type));
Status = AE_AML_OPERAND_TYPE;
@@ -299,7 +299,7 @@ AcpiAmlExecDyadic2R (
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("ExecDyadic2R/%s: bad operand(s) (0x%X)\n",
+ ("ExecDyadic2R/%s: bad operand(s) (Status=%X)\n",
AcpiPsGetOpcodeName (Opcode), Status));
goto Cleanup;
@@ -469,7 +469,7 @@ AcpiAmlExecDyadic2R (
if (ObjDesc2->Common.Type != ObjDesc->Common.Type)
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlExecDyadic2R/ConcatOp: operand type mismatch %d %d\n",
+ ("AmlExecDyadic2R/ConcatOp: operand type mismatch %X != %X\n",
ObjDesc->Common.Type, ObjDesc2->Common.Type));
Status = AE_AML_OPERAND_TYPE;
goto Cleanup;
@@ -656,7 +656,7 @@ AcpiAmlExecDyadic2S (
/* Invalid parameters on object stack */
DEBUG_PRINT (ACPI_ERROR,
- ("ExecDyadic2S/%s: bad operand(s) (0x%X)\n",
+ ("ExecDyadic2S/%s: bad operand(s) (Status=%X)\n",
AcpiPsGetOpcodeName (Opcode), Status));
goto Cleanup;
@@ -789,7 +789,7 @@ AcpiAmlExecDyadic2 (
/* Invalid parameters on object stack */
DEBUG_PRINT (ACPI_ERROR,
- ("ExecDyadic2/%s: bad operand(s) (0x%X)\n",
+ ("ExecDyadic2/%s: bad operand(s) (Status=%X)\n",
AcpiPsGetOpcodeName (Opcode), Status));
goto Cleanup;
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amfield.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amfield.c
index d450fbf..646af1c 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amfield.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amfield.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amfield - ACPI AML (p-code) execution - field manipulation
- * $Revision: 73 $
+ * $Revision: 74 $
*
*****************************************************************************/
@@ -367,7 +367,7 @@ AcpiAmlAccessNamedField (
if (BufferLength > ByteFieldLength)
{
DEBUG_PRINT (ACPI_INFO,
- ("AmlAccessNamedField: Byte length %d too large, truncated to %x\n",
+ ("AmlAccessNamedField: Byte length %X truncated to %X\n",
ActualByteLength, ByteFieldLength));
ActualByteLength = ByteFieldLength;
@@ -378,7 +378,7 @@ AcpiAmlAccessNamedField (
if (DIV_8(BitGranularity) > ByteFieldLength)
{
DEBUG_PRINT (ACPI_INFO,
- ("AmlAccessNamedField: Bit granularity %d too large, truncated to %x\n",
+ ("AmlAccessNamedField: Bit granularity %X truncated to %X\n",
BitGranularity, MUL_8(ByteFieldLength)));
BitGranularity = MUL_8(ByteFieldLength);
@@ -387,7 +387,7 @@ AcpiAmlAccessNamedField (
if (ByteGranularity > ByteFieldLength)
{
DEBUG_PRINT (ACPI_INFO,
- ("AmlAccessNamedField: Byte granularity %d too large, truncated to %x\n",
+ ("AmlAccessNamedField: Byte granularity %X truncated to %X\n",
ByteGranularity, ByteFieldLength));
ByteGranularity = ByteFieldLength;
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amfldio.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amfldio.c
index 91aedda..766d55c 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amfldio.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amfldio.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amfldio - Aml Field I/O
- * $Revision: 30 $
+ * $Revision: 32 $
*
*****************************************************************************/
@@ -191,21 +191,11 @@ AcpiAmlReadFieldData (
(ObjDesc->Field.Offset * FieldByteWidth) +
FieldByteOffset;
-
- if (RgnDesc->Region.SpaceId >= NUM_REGION_TYPES)
- {
- DEBUG_PRINT (TRACE_OPREGION,
- ("AmlReadFieldData: **** Unknown OpRegion SpaceID %d at %08lx width %d\n",
- RgnDesc->Region.SpaceId, Address, FieldBitWidth));
- }
-
- else
- {
- DEBUG_PRINT (TRACE_OPREGION,
- ("AmlReadFieldData: OpRegion %s at %08lx width %d\n",
- AcpiGbl_RegionTypes[RgnDesc->Region.SpaceId], Address,
- FieldBitWidth));
- }
+ DEBUG_PRINT (TRACE_OPREGION,
+ ("AmlReadFieldData: Region %s(%X) at %08lx width %X\n",
+ AcpiCmGetRegionName (RgnDesc->Region.SpaceId),
+ RgnDesc->Region.SpaceId, Address,
+ FieldBitWidth));
/* Invoke the appropriate AddressSpace/OpRegion handler */
@@ -216,14 +206,16 @@ AcpiAmlReadFieldData (
if (Status == AE_NOT_IMPLEMENTED)
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlReadFieldData: **** OpRegion type %s not implemented\n",
- AcpiGbl_RegionTypes[RgnDesc->Region.SpaceId]));
+ ("AmlReadFieldData: **** Region %s(%X) not implemented\n",
+ AcpiCmGetRegionName (RgnDesc->Region.SpaceId),
+ RgnDesc->Region.SpaceId));
}
else if (Status == AE_NOT_EXIST)
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlReadFieldData: **** Unknown OpRegion SpaceID %d\n",
+ ("AmlReadFieldData: **** Region %s(%X) has no handler\n",
+ AcpiCmGetRegionName (RgnDesc->Region.SpaceId),
RgnDesc->Region.SpaceId));
}
@@ -493,20 +485,11 @@ AcpiAmlWriteFieldData (
(ObjDesc->Field.Offset * FieldByteWidth) +
FieldByteOffset;
-
- if (RgnDesc->Region.SpaceId >= NUM_REGION_TYPES)
- {
- DEBUG_PRINT (TRACE_OPREGION,
- ("AmlWriteField: **** Store %lx in unknown OpRegion SpaceID %d at %p width %d ** \n",
- Value, RgnDesc->Region.SpaceId, Address, FieldBitWidth));
- }
- else
- {
- DEBUG_PRINT (TRACE_OPREGION,
- ("AmlWriteField: Store %lx in OpRegion %s at %p width %d\n",
- Value, AcpiGbl_RegionTypes[RgnDesc->Region.SpaceId], Address,
- FieldBitWidth));
- }
+ DEBUG_PRINT (TRACE_OPREGION,
+ ("AmlWriteField: Store %lx in Region %s(%X) at %p width %X\n",
+ Value, AcpiCmGetRegionName (RgnDesc->Region.SpaceId),
+ RgnDesc->Region.SpaceId, Address,
+ FieldBitWidth));
/* Invoke the appropriate AddressSpace/OpRegion handler */
@@ -516,14 +499,16 @@ AcpiAmlWriteFieldData (
if (Status == AE_NOT_IMPLEMENTED)
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlWriteField: **** OpRegion type %s not implemented\n",
- AcpiGbl_RegionTypes[RgnDesc->Region.SpaceId]));
+ ("AmlWriteField: **** Region type %s(%X) not implemented\n",
+ AcpiCmGetRegionName (RgnDesc->Region.SpaceId),
+ RgnDesc->Region.SpaceId));
}
else if (Status == AE_NOT_EXIST)
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlWriteField: **** Unknown OpRegion SpaceID %x\n",
+ ("AmlWriteField: **** Region type %s(%X) does not have a handler\n",
+ AcpiCmGetRegionName (RgnDesc->Region.SpaceId),
RgnDesc->Region.SpaceId));
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/ammisc.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/ammisc.c
index 7decf64..5884acd 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/ammisc.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/ammisc.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: ammisc - ACPI AML (p-code) execution - specific opcodes
- * $Revision: 70 $
+ * $Revision: 71 $
*
*****************************************************************************/
@@ -178,7 +178,7 @@ AcpiAmlExecFatal (
/* Invalid parameters on object stack */
DEBUG_PRINT (ACPI_ERROR,
- ("AcpiAmlExecFatal/AML_FATAL_OP: bad operand(s) (0x%X)\n",
+ ("AcpiAmlExecFatal/AML_FATAL_OP: bad operand(s) (Status=%X)\n",
Status));
goto Cleanup;
@@ -271,7 +271,7 @@ AcpiAmlExecIndex (
/* Invalid parameters on object stack */
DEBUG_PRINT (ACPI_ERROR,
- ("AcpiAmlExecIndex/AML_INDEX_OP: bad operand(s) (0x%X)\n",
+ ("AcpiAmlExecIndex/AML_INDEX_OP: bad operand(s) (Status=%X)\n",
Status));
goto Cleanup;
@@ -452,7 +452,7 @@ AcpiAmlExecMatch (
/* Invalid parameters on object stack */
DEBUG_PRINT (ACPI_ERROR,
- ("ExecMatch/AML_MATCH_OP: bad operand(s) (0x%X)\n",
+ ("ExecMatch/AML_MATCH_OP: bad operand(s) (Status=%X)\n",
Status));
goto Cleanup;
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/ammonad.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/ammonad.c
index 4b2b172..a899d63 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/ammonad.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/ammonad.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: ammonad - ACPI AML (p-code) execution for monadic operators
- * $Revision: 83 $
+ * $Revision: 85 $
*
*****************************************************************************/
@@ -256,8 +256,8 @@ AcpiAmlExecMonadic1 (
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("ExecMonadic1/%s: bad operand(s) (0x%X)\n",
- AcpiPsGetOpcodeName (Opcode), Status));
+ ("ExecMonadic1/%s: bad operand(s) (Status=%s)\n",
+ AcpiPsGetOpcodeName (Opcode), AcpiCmFormatException(Status)));
goto Cleanup;
}
@@ -378,8 +378,8 @@ AcpiAmlExecMonadic2R (
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("ExecMonadic2R/%s: bad operand(s) (0x%X)\n",
- AcpiPsGetOpcodeName (Opcode), Status));
+ ("ExecMonadic2R/%s: bad operand(s) (Status=%s)\n",
+ AcpiPsGetOpcodeName (Opcode), AcpiCmFormatException(Status)));
goto Cleanup;
}
@@ -783,8 +783,8 @@ AcpiAmlExecMonadic2 (
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("ExecMonadic2/%s: bad operand(s) (0x%X)\n",
- AcpiPsGetOpcodeName (Opcode), Status));
+ ("ExecMonadic2/%s: bad operand(s) (Status=%s)\n",
+ AcpiPsGetOpcodeName (Opcode), AcpiCmFormatException(Status)));
goto Cleanup;
}
@@ -947,7 +947,7 @@ AcpiAmlExecMonadic2 (
default:
DEBUG_PRINT (ACPI_ERROR,
- ("AmlExecMonadic2: Not Buf/Str/Pkg - found type 0x%X\n",
+ ("AmlExecMonadic2: Not Buf/Str/Pkg - found type %X\n",
ObjDesc->Common.Type));
Status = AE_AML_OPERAND_TYPE;
goto Cleanup;
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amprep.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amprep.c
index b0c39ad..63b7c0b 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amprep.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amprep.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amprep - ACPI AML (p-code) execution - field prep utilities
- * $Revision: 68 $
+ * $Revision: 69 $
*
*****************************************************************************/
@@ -294,7 +294,7 @@ AcpiAmlPrepDefFieldValue (
if (Type != ACPI_TYPE_REGION)
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlPrepDefFieldValue: Needed Region, found %d %s\n",
+ ("AmlPrepDefFieldValue: Needed Region, found type %X %s\n",
Type, AcpiCmGetTypeName (Type)));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
@@ -415,7 +415,7 @@ AcpiAmlPrepBankFieldValue (
if (Type != ACPI_TYPE_REGION)
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlPrepBankFieldValue: Needed Region, found %d %s\n",
+ ("AmlPrepBankFieldValue: Needed Region, found type %X %s\n",
Type, AcpiCmGetTypeName (Type)));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amregion.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amregion.c
index dd9327d..7ae052f 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amregion.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amregion.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amregion - ACPI default OpRegion (address space) handlers
- * $Revision: 40 $
+ * $Revision: 41 $
*
*****************************************************************************/
@@ -250,7 +250,7 @@ AcpiAmlSystemMemorySpaceHandler (
case ADDRESS_SPACE_READ:
DEBUG_PRINT ((TRACE_OPREGION | VERBOSE_INFO),
- ("Read (%d width) Address:0x%X\n", BitWidth, Address));
+ ("Read (%d width) Address=%p\n", BitWidth, Address));
switch (BitWidth)
{
@@ -273,7 +273,7 @@ AcpiAmlSystemMemorySpaceHandler (
case ADDRESS_SPACE_WRITE:
DEBUG_PRINT ((TRACE_OPREGION | VERBOSE_INFO),
- ("Write (%d width) Address:0x%p Value 0x%X\n",
+ ("Write (%d width) Address=%p Value %X\n",
BitWidth, Address, *Value));
switch (BitWidth)
@@ -344,7 +344,7 @@ AcpiAmlSystemIoSpaceHandler (
case ADDRESS_SPACE_READ:
DEBUG_PRINT ((TRACE_OPREGION | VERBOSE_INFO),
- ("Read(%d width) Address:0x%08x\n", BitWidth, Address));
+ ("Read(%d width) Address=%p\n", BitWidth, Address));
switch (BitWidth)
{
@@ -375,7 +375,7 @@ AcpiAmlSystemIoSpaceHandler (
case ADDRESS_SPACE_WRITE:
DEBUG_PRINT ((TRACE_OPREGION | VERBOSE_INFO),
- ("Write(%d width) Address:0x%08x Value 0x%08x\n",
+ ("Write(%d width) Address=%p Value %X\n",
BitWidth, Address, *Value));
switch (BitWidth)
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amresnte.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amresnte.c
index 59f45a8..cd232e5 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amresnte.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amresnte.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amresnte - AML Interpreter object resolution
- * $Revision: 24 $
+ * $Revision: 25 $
*
*****************************************************************************/
@@ -218,8 +218,7 @@ AcpiAmlResolveNodeToValue (
* and Method locals and arguments have a pseudo-Node
*/
if (EntryType == ACPI_TYPE_DEVICE ||
- EntryType == INTERNAL_TYPE_METHOD_ARGUMENT ||
- EntryType == INTERNAL_TYPE_METHOD_LOCAL_VAR)
+ (Node->Flags & (ANOBJ_METHOD_ARG | ANOBJ_METHOD_LOCAL)))
{
return_ACPI_STATUS (AE_OK);
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amresolv.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amresolv.c
index 39a764c..bd50719 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amresolv.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amresolv.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amresolv - AML Interpreter object resolution
- * $Revision: 77 $
+ * $Revision: 78 $
*
*****************************************************************************/
@@ -424,7 +424,7 @@ AcpiAmlResolveObjectToValue (
/* Value is a Number */
DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveObjectToValue: [Local%d] value is [0x%X] \n",
+ ("AmlResolveObjectToValue: [Local%d] value=%X \n",
Index, ObjDesc->Number.Value));
}
@@ -465,7 +465,7 @@ AcpiAmlResolveObjectToValue (
/* Value is a Number */
DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveObjectToValue: [Arg%d] value is [0x%X] \n",
+ ("AmlResolveObjectToValue: [Arg%d] value=%X\n",
Index, ObjDesc->Number.Value));
}
@@ -543,7 +543,7 @@ AcpiAmlResolveObjectToValue (
/* Invalid reference OBJ*/
DEBUG_PRINT (ACPI_ERROR,
- ("AmlResolveObjectToValue: Unknown TargetType %d in Index/Reference obj %p\n",
+ ("AmlResolveObjectToValue: Unknown TargetType %X in Index/Reference obj %p\n",
StackDesc->Reference.TargetType, StackDesc));
Status = AE_AML_INTERNAL;
break;
@@ -561,7 +561,7 @@ AcpiAmlResolveObjectToValue (
default:
DEBUG_PRINT (ACPI_ERROR,
- ("AmlResolveObjectToValue: Unknown Reference object subtype %02x in %p\n",
+ ("AmlResolveObjectToValue: Unknown Reference object subtype %02X in %p\n",
Opcode, StackDesc));
Status = AE_AML_INTERNAL;
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amresop.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amresop.c
index 02a13d4..0fe9b8c 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amresop.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amresop.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amresop - AML Interpreter operand/object resolution
- * $Revision: 15 $
+ * $Revision: 18 $
*
*****************************************************************************/
@@ -131,6 +131,52 @@
MODULE_NAME ("amresop")
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlCheckObjectType
+ *
+ * PARAMETERS: TypeNeeded Object type needed
+ * ThisType Actual object type
+ * Object Object pointer
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Check required type against actual type
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlCheckObjectType (
+ ACPI_OBJECT_TYPE TypeNeeded,
+ ACPI_OBJECT_TYPE ThisType,
+ void *Object)
+{
+
+
+ if (TypeNeeded == ACPI_TYPE_ANY)
+ {
+ /* All types OK, so we don't perform any typechecks */
+
+ return (AE_OK);
+ }
+
+
+ if (TypeNeeded != ThisType)
+ {
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlResolveOperands: Needed [%s], found [%s] %p\n",
+ AcpiCmGetTypeName (TypeNeeded),
+ AcpiCmGetTypeName (ThisType), Object));
+
+ return (AE_AML_OPERAND_TYPE);
+ }
+
+
+ return (AE_OK);
+}
+
+
/*******************************************************************************
*
* FUNCTION: AcpiAmlResolveOperands
@@ -163,6 +209,7 @@ AcpiAmlResolveOperands (
UINT32 ArgTypes;
ACPI_OPCODE_INFO *OpInfo;
UINT32 ThisArgType;
+ ACPI_OBJECT_TYPE TypeNeeded;
FUNCTION_TRACE_U32 ("AmlResolveOperands", Opcode);
@@ -179,9 +226,9 @@ AcpiAmlResolveOperands (
if (ArgTypes == ARGI_INVALID_OPCODE)
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlResolveOperands: Internal error - %X is not a runtime opcode\n", Opcode));
- Status = AE_AML_INTERNAL;
- goto Cleanup;
+ ("AmlResolveOperands: Internal error - %X is not a valid AML opcode\n", Opcode));
+
+ return_ACPI_STATUS (AE_AML_INTERNAL);
}
DEBUG_PRINT (TRACE_EXEC,
@@ -203,8 +250,8 @@ AcpiAmlResolveOperands (
{
DEBUG_PRINT (ACPI_ERROR,
("AmlResolveOperands: Internal error - null stack entry at %X\n", StackPtr));
- Status = AE_AML_INTERNAL;
- goto Cleanup;
+
+ return_ACPI_STATUS (AE_AML_INTERNAL);
}
/* Extract useful items */
@@ -231,10 +278,10 @@ AcpiAmlResolveOperands (
if (!AcpiAmlValidateObjectType (ObjectType))
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlResolveOperands: Bad operand object type [0x%x]\n",
+ ("AmlResolveOperands: Bad operand object type [%X]\n",
ObjectType));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
+
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
if (ObjectType == (UINT8) INTERNAL_TYPE_REFERENCE)
@@ -270,12 +317,10 @@ AcpiAmlResolveOperands (
("Reference Opcode: Unknown [%02x]\n",
ObjDesc->Reference.OpCode));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
break;
}
}
-
}
else
@@ -283,22 +328,26 @@ AcpiAmlResolveOperands (
/* Invalid descriptor */
DEBUG_PRINT (ACPI_ERROR,
- ("Bad descriptor type 0x%X in Obj %p\n",
+ ("Bad descriptor type %X in Obj %p\n",
ObjDesc->Common.DataType, ObjDesc));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
/*
- * Decode a character from the type string
+ * Get one argument type, point to the next
*/
ThisArgType = GET_CURRENT_ARG_TYPE (ArgTypes);
INCREMENT_ARG_LIST (ArgTypes);
+ /*
+ * Handle cases where the object does not need to be
+ * resolved to a value
+ */
+
switch (ThisArgType)
{
@@ -309,18 +358,17 @@ AcpiAmlResolveOperands (
if (VALID_DESCRIPTOR_TYPE (ObjDesc, ACPI_DESC_TYPE_NAMED)) /* direct name ptr OK as-is */
{
- break;
+ goto NextOperand;
}
- if (INTERNAL_TYPE_REFERENCE != ObjectType)
+ Status = AcpiAmlCheckObjectType (INTERNAL_TYPE_REFERENCE,
+ ObjectType, ObjDesc);
+ if (ACPI_FAILURE (Status))
{
- DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed Reference, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
+ return_ACPI_STATUS (Status);
}
+
if (AML_NAME_OP == ObjDesc->Reference.OpCode)
{
/*
@@ -332,198 +380,126 @@ AcpiAmlResolveOperands (
AcpiCmRemoveReference (ObjDesc);
(*StackPtr) = TempHandle;
}
+
+ goto NextOperand;
break;
- case ARGI_NUMBER: /* Number */
-
- /* Need an operand of type ACPI_TYPE_NUMBER */
+ case ARGI_ANYTYPE:
- Status = AcpiAmlResolveToValue (StackPtr, WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
+ /*
+ * We don't want to resolve IndexOp reference objects during
+ * a store because this would be an implicit DeRefOf operation.
+ * Instead, we just want to store the reference object.
+ * -- All others must be resolved below.
+ */
- if (ACPI_TYPE_NUMBER != (*StackPtr)->Common.Type)
+ if ((Opcode == AML_STORE_OP) &&
+ ((*StackPtr)->Common.Type == INTERNAL_TYPE_REFERENCE) &&
+ ((*StackPtr)->Reference.OpCode == AML_INDEX_OP))
{
- DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed Number, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
+ goto NextOperand;
}
break;
+ }
- case ARGI_STRING:
- /* Need an operand of type ACPI_TYPE_STRING or ACPI_TYPE_BUFFER */
+ /*
+ * Resolve this object to a value
+ */
- Status = AcpiAmlResolveToValue (StackPtr, WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
+ Status = AcpiAmlResolveToValue (StackPtr, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
- if ((ACPI_TYPE_STRING != (*StackPtr)->Common.Type) &&
- (ACPI_TYPE_BUFFER != (*StackPtr)->Common.Type))
- {
- DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed String or Buffer, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
- }
- break;
+ /*
+ * Check the resulting object (value) type
+ */
+ switch (ThisArgType)
+ {
+ /*
+ * For the simple cases, only one type of resolved object
+ * is allowed
+ */
+ case ARGI_NUMBER: /* Number */
+
+ /* Need an operand of type ACPI_TYPE_NUMBER */
+
+ TypeNeeded = ACPI_TYPE_NUMBER;
+ break;
case ARGI_BUFFER:
/* Need an operand of type ACPI_TYPE_BUFFER */
- Status = AcpiAmlResolveToValue (StackPtr, WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
-
- if (ACPI_TYPE_BUFFER != (*StackPtr)->Common.Type)
- {
- DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed Buffer, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
- }
+ TypeNeeded = ACPI_TYPE_BUFFER;
break;
-
case ARGI_MUTEX:
/* Need an operand of type ACPI_TYPE_MUTEX */
- Status = AcpiAmlResolveToValue (StackPtr, WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
-
- if (ACPI_TYPE_MUTEX != (*StackPtr)->Common.Type)
- {
- DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed Mutex, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
- }
+ TypeNeeded = ACPI_TYPE_MUTEX;
break;
-
case ARGI_EVENT:
/* Need an operand of type ACPI_TYPE_EVENT */
- Status = AcpiAmlResolveToValue (StackPtr, WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
-
- if (ACPI_TYPE_EVENT != (*StackPtr)->Common.Type)
- {
- DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed AcpiEvent, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
- }
+ TypeNeeded = ACPI_TYPE_EVENT;
break;
-
case ARGI_REGION:
/* Need an operand of type ACPI_TYPE_REGION */
- Status = AcpiAmlResolveToValue (StackPtr, WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
-
- if (ACPI_TYPE_REGION != (*StackPtr)->Common.Type)
- {
- DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed Region, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
- }
+ TypeNeeded = ACPI_TYPE_REGION;
break;
-
- case ARGI_IF: /* If */
+ case ARGI_IF: /* If */
/* Need an operand of type INTERNAL_TYPE_IF */
- if (INTERNAL_TYPE_IF != (*StackPtr)->Common.Type)
- {
- DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed If, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
- }
+ TypeNeeded = INTERNAL_TYPE_IF;
break;
-
case ARGI_PACKAGE: /* Package */
/* Need an operand of type ACPI_TYPE_PACKAGE */
- Status = AcpiAmlResolveToValue (StackPtr, WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
-
- if (ACPI_TYPE_PACKAGE != (*StackPtr)->Common.Type)
- {
- DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed Package, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
- }
+ TypeNeeded = ACPI_TYPE_PACKAGE;
break;
-
case ARGI_ANYTYPE:
+ /* Any operand type will do */
- /*
- * We don't want to resolve IndexOp reference objects during
- * a store because this would be an implicit DeRefOf operation.
- * Instead, we just want to store the reference object.
- */
+ TypeNeeded = ACPI_TYPE_ANY;
+ break;
- if ((Opcode == AML_STORE_OP) &&
- ((*StackPtr)->Common.Type == INTERNAL_TYPE_REFERENCE) &&
- ((*StackPtr)->Reference.OpCode == AML_INDEX_OP))
- {
- break;
- }
- /* All others must be resolved */
+ /*
+ * The more complex cases allow multiple resolved object types
+ */
- Status = AcpiAmlResolveToValue (StackPtr, WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
+ case ARGI_STRING:
- /* All types OK, so we don't perform any typechecks */
+ /* Need an operand of type ACPI_TYPE_STRING or ACPI_TYPE_BUFFER */
+
+ if ((ACPI_TYPE_STRING != (*StackPtr)->Common.Type) &&
+ (ACPI_TYPE_BUFFER != (*StackPtr)->Common.Type))
+ {
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlResolveOperands: Needed [String or Buffer], found [%s] %p\n",
+ AcpiCmGetTypeName ((*StackPtr)->Common.Type), *StackPtr));
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
+ }
+ goto NextOperand;
break;
@@ -537,12 +513,6 @@ AcpiAmlResolveOperands (
* error with a size of 4.
*/
- Status = AcpiAmlResolveToValue (StackPtr, WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
-
/* Need a buffer, string, package or Node reference */
if (((*StackPtr)->Common.Type != ACPI_TYPE_BUFFER) &&
@@ -551,10 +521,10 @@ AcpiAmlResolveOperands (
((*StackPtr)->Common.Type != INTERNAL_TYPE_REFERENCE))
{
DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed Buf/Str/Pkg, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
+ ("AmlResolveOperands: Needed [Buf/Str/Pkg/Ref], found [%s] %p\n",
+ AcpiCmGetTypeName ((*StackPtr)->Common.Type), *StackPtr));
+
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
/*
@@ -565,53 +535,63 @@ AcpiAmlResolveOperands (
if (!(*StackPtr)->Reference.Node)
{
DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed Node reference, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
+ ("AmlResolveOperands: Needed [Node Reference], found [%p]\n",
+ *StackPtr));
+
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
}
-
+ goto NextOperand;
break;
case ARGI_COMPLEXOBJ:
- Status = AcpiAmlResolveToValue (StackPtr, WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
-
/* Need a buffer or package */
if (((*StackPtr)->Common.Type != ACPI_TYPE_BUFFER) &&
((*StackPtr)->Common.Type != ACPI_TYPE_PACKAGE))
{
DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed Package, Buf/Pkg %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
+ ("AmlResolveOperands: Needed [Buf/Pkg], found [%s] %p\n",
+ AcpiCmGetTypeName ((*StackPtr)->Common.Type), *StackPtr));
+
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
+ goto NextOperand;
break;
- /* Unknown abbreviation passed in */
-
default:
+
+ /* Unknown type */
+
DEBUG_PRINT (ACPI_ERROR,
- ("AmlResolveOperands: Internal error - Unknown arg type %X\n",
+ ("AmlResolveOperands: Internal error - Unknown ARGI type %X\n",
ThisArgType));
- Status = AE_BAD_PARAMETER;
- goto Cleanup;
- } /* switch (*Types++) */
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
+
+
+ /*
+ * Make sure that the original object was resolved to the
+ * required object type (Simple cases only).
+ */
+ Status = AcpiAmlCheckObjectType (TypeNeeded,
+ (*StackPtr)->Common.Type, *StackPtr);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+
+NextOperand:
/*
* If more operands needed, decrement StackPtr to point
- * to next operand on stack (after checking for underflow).
+ * to next operand on stack
*/
if (GET_CURRENT_ARG_TYPE (ArgTypes))
{
@@ -621,9 +601,8 @@ AcpiAmlResolveOperands (
} /* while (*Types) */
-Cleanup:
- return_ACPI_STATUS (Status);
+ return_ACPI_STATUS (Status);
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amstore.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amstore.c
index 976ecc7..7d9285f 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amstore.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amstore.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amstore - AML Interpreter object store support
- * $Revision: 116 $
+ * $Revision: 117 $
*
*****************************************************************************/
@@ -430,7 +430,7 @@ AcpiAmlExecStore (
*/
default:
DEBUG_PRINT (ACPI_ERROR,
- ("AmlExecStore/Index: Source must be Number/Buffer/String type, not 0x%x\n",
+ ("AmlExecStore/Index: Source must be Number/Buffer/String type, not %X\n",
ValDesc->Common.Type));
Status = AE_AML_OPERAND_TYPE;
break;
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amstoren.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amstoren.c
index e9736b6..3458a84 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amstoren.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amstoren.c
@@ -3,7 +3,7 @@
*
* Module Name: amstoren - AML Interpreter object store support,
* Store to Node (namespace object)
- * $Revision: 23 $
+ * $Revision: 24 $
*
*****************************************************************************/
@@ -328,7 +328,7 @@ AcpiAmlStoreObjectToNode (
* There is no existing object attached to this Node
*/
DEBUG_PRINT (ACPI_ERROR,
- ("AmlStoreObjectToNte: Internal error - no destination object for %4.4s type %d\n",
+ ("AmlStoreObjectToNte: Internal error - no destination object for %4.4s type %X\n",
&Node->Name, DestinationType));
Status = AE_AML_INTERNAL;
goto CleanUpAndBailOut;
@@ -340,7 +340,7 @@ AcpiAmlStoreObjectToNode (
if (DestDesc->Common.Type != (UINT8) DestinationType)
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlStoreObjectToNte: Internal error - Name %4.4s type %d does not match value-type %d at %p\n",
+ ("AmlStoreObjectToNte: Internal error - Name %4.4s type %X does not match value-type %X at %p\n",
&Node->Name, AcpiNsGetType (Node),
DestDesc->Common.Type, DestDesc));
Status = AE_AML_INTERNAL;
@@ -531,7 +531,7 @@ AcpiAmlStoreObjectToNode (
*/
MEMCPY(DestDesc->Buffer.Pointer, Buffer, DestDesc->Buffer.Length);
DEBUG_PRINT (ACPI_INFO,
- ("AmlStoreObjectToNte: Truncating src buffer from %d to %d\n",
+ ("AmlStoreObjectToNte: Truncating src buffer from %X to %X\n",
Length, DestDesc->Buffer.Length));
}
break;
@@ -601,7 +601,7 @@ AcpiAmlStoreObjectToNode (
if (DestDesc->FieldUnit.Container)
{
- DEBUG_PRINT_RAW (ACPI_ERROR, (" Type %d",
+ DEBUG_PRINT_RAW (ACPI_ERROR, (" Type %X",
DestDesc->FieldUnit.Container->Common.Type));
}
DEBUG_PRINT_RAW (ACPI_ERROR, ("\n"));
@@ -641,7 +641,7 @@ AcpiAmlStoreObjectToNode (
<< DestDesc->FieldUnit.BitOffset);
DEBUG_PRINT (TRACE_EXEC,
- ("** Store %lx in buffer %p byte %ld bit %d width %d addr %p mask %08lx\n",
+ ("** Store %lx in buffer %p byte %ld bit %X width %d addr %p mask %08lx\n",
ValDesc->Number.Value,
DestDesc->FieldUnit.Container->Buffer.Pointer,
DestDesc->FieldUnit.Offset, DestDesc->FieldUnit.BitOffset,
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amstorob.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amstorob.c
index d93b719..c9d96c6 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amstorob.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amstorob.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amstorob - AML Interpreter object store support, store to object
- * $Revision: 17 $
+ * $Revision: 18 $
*
*****************************************************************************/
@@ -408,7 +408,7 @@ AcpiAmlStoreObjectToObject (
*/
MEMCPY(DestDesc->Buffer.Pointer, Buffer, DestDesc->Buffer.Length);
DEBUG_PRINT (ACPI_INFO,
- ("AmlStoreObjectToObject: Truncating src buffer from %d to %d\n",
+ ("AmlStoreObjectToObject: Truncating src buffer from %X to %X\n",
Length, DestDesc->Buffer.Length));
}
break;
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amutils.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amutils.c
index 3e044b5..9304b5a 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amutils.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amutils.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amutils - interpreter/scanner utilities
- * $Revision: 63 $
+ * $Revision: 64 $
*
*****************************************************************************/
@@ -591,7 +591,7 @@ AcpiAmlBuildCopyInternalPackageObject (
* Too many nested levels of packages for us to handle
*/
DEBUG_PRINT (ACPI_ERROR,
- ("AmlBuildCopyInternalPackageObject: Pkg nested too deep (max %d)\n",
+ ("AmlBuildCopyInternalPackageObject: Pkg nested too deep (max %X)\n",
MAX_PACKAGE_DEPTH));
return_ACPI_STATUS (AE_LIMIT);
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nsaccess.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nsaccess.c
index 87ee4f3..c2f2183 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nsaccess.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nsaccess.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nsaccess - Top-level functions for accessing ACPI namespace
- * $Revision: 113 $
+ * $Revision: 115 $
*
******************************************************************************/
@@ -392,6 +392,9 @@ AcpiNsLookup (
if ((!ScopeInfo) ||
(!ScopeInfo->Scope.Node))
{
+ DEBUG_PRINT (TRACE_NAMES,
+ ("NsLookup: Null scope prefix, using root node (%p)\n", AcpiGbl_RootNode));
+
PrefixNode = AcpiGbl_RootNode;
}
else
@@ -604,7 +607,7 @@ AcpiNsLookup (
ThisSearchType = Type;
}
- /* Pluck and ACPI name from the front of the pathname */
+ /* Pluck one ACPI name from the front of the pathname */
MOVE_UNALIGNED32_TO_32 (&SimpleName, Pathname);
@@ -655,7 +658,7 @@ AcpiNsLookup (
/* Complain about a type mismatch */
REPORT_WARNING (
- ("NsLookup: %4.4s, type 0x%X, checking for type 0x%X\n",
+ ("NsLookup: %4.4s, type %X, checking for type %X\n",
&SimpleName, ThisNode->Type, TypeToCheckFor));
}
@@ -679,7 +682,7 @@ AcpiNsLookup (
*/
DEBUG_PRINT (ACPI_INFO,
- ("NsLookup: Load mode=%d ThisNode=%x\n",
+ ("NsLookup: Load mode=%X ThisNode=%X\n",
InterpreterMode, ThisNode));
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nsalloc.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nsalloc.c
index ef92cb32..9dbaf96 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nsalloc.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nsalloc.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nsalloc - Namespace allocation and deletion utilities
- * $Revision: 42 $
+ * $Revision: 43 $
*
******************************************************************************/
@@ -427,7 +427,7 @@ AcpiNsDeleteChildren (
DECREMENT_NAME_TABLE_METRICS (sizeof (ACPI_NAMESPACE_NODE));
DEBUG_PRINT (ACPI_INFO,
- ("AcpiNsDeleteChildren: Object %p, Remaining %d\n",
+ ("AcpiNsDeleteChildren: Object %p, Remaining %X\n",
ChildNode, AcpiGbl_CurrentNodeCount));
/*
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nsdump.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nsdump.c
index dbef828..960a0ce 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nsdump.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nsdump.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsdump - table dumping routines for debug
- * $Revision: 81 $
+ * $Revision: 82 $
*
*****************************************************************************/
@@ -305,7 +305,7 @@ AcpiNsDumpOneObject (
if (!AcpiCmValidAcpiName (ThisNode->Name))
{
- REPORT_WARNING (("Invalid ACPI Name 0x%X\n", ThisNode->Name));
+ REPORT_WARNING (("Invalid ACPI Name %08X\n", ThisNode->Name));
}
/*
@@ -409,13 +409,13 @@ AcpiNsDumpOneObject (
if (ObjType > INTERNAL_TYPE_MAX)
{
- DEBUG_PRINT_RAW (TRACE_TABLES, ("(Ptr to ACPI Object type 0x%X [UNKNOWN])\n", ObjType));
+ DEBUG_PRINT_RAW (TRACE_TABLES, ("(Ptr to ACPI Object type %X [UNKNOWN])\n", ObjType));
BytesToDump = 32;
}
else
{
- DEBUG_PRINT_RAW (TRACE_TABLES, ("(Ptr to ACPI Object type 0x%X [%s])\n",
+ DEBUG_PRINT_RAW (TRACE_TABLES, ("(Ptr to ACPI Object type %X [%s])\n",
ObjType, AcpiCmGetTypeName (ObjType)));
BytesToDump = sizeof (ACPI_OPERAND_OBJECT);
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nsinit.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nsinit.c
index 655a0d0..34f7cf3 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nsinit.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nsinit.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsinit - namespace initialization
- * $Revision: 5 $
+ * $Revision: 9 $
*
*****************************************************************************/
@@ -216,8 +216,6 @@ AcpiNsInitializeDevices (
Info.DeviceCount = 0;
Info.Num_STA = 0;
Info.Num_INI = 0;
- Info.Num_HID = 0;
- Info.Num_PCI = 0;
DEBUG_PRINT_RAW (ACPI_OK, ("Executing device _INI methods:"));
@@ -233,9 +231,8 @@ AcpiNsInitializeDevices (
DEBUG_PRINT_RAW (ACPI_OK,
- ("\n%d Devices found: %d _STA, %d _INI, %d _HID, %d PCIRoot\n",
- Info.DeviceCount, Info.Num_STA, Info.Num_INI,
- Info.Num_HID, Info.Num_PCI));
+ ("\n%d Devices found: %d _STA, %d _INI\n",
+ Info.DeviceCount, Info.Num_STA, Info.Num_INI));
return_ACPI_STATUS (Status);
}
@@ -300,6 +297,13 @@ AcpiNsInitOneObject (
Info->OpRegionInit++;
Status = AcpiDsGetRegionArguments (ObjDesc);
+ if (ACPI_FAILURE (Status))
+ {
+ DEBUG_PRINT_RAW (ACPI_ERROR, ("\n"));
+ DEBUG_PRINT (ACPI_ERROR, ("%s while getting region arguments [%4.4s]\n",
+ AcpiCmFormatException (Status), &Node->Name));
+ }
+
DEBUG_PRINT_RAW (ACPI_OK, ("."));
break;
@@ -314,6 +318,12 @@ AcpiNsInitOneObject (
Info->FieldInit++;
Status = AcpiDsGetFieldUnitArguments (ObjDesc);
+ if (ACPI_FAILURE (Status))
+ {
+ DEBUG_PRINT_RAW (ACPI_ERROR, ("\n"));
+ DEBUG_PRINT (ACPI_ERROR, ("%s while getting field arguments [%4.4s]\n",
+ AcpiCmFormatException (Status), &Node->Name));
+ }
DEBUG_PRINT_RAW (ACPI_OK, ("."));
break;
@@ -352,7 +362,6 @@ AcpiNsInitOneDevice (
void **ReturnValue)
{
ACPI_STATUS Status;
- ACPI_OPERAND_OBJECT *RetObj = NULL;
ACPI_NAMESPACE_NODE *Node;
UINT32 Flags;
ACPI_DEVICE_WALK_INFO *Info = (ACPI_DEVICE_WALK_INFO *) Context;
@@ -400,7 +409,8 @@ AcpiNsInitOneDevice (
Status = AcpiNsEvaluateRelative (ObjHandle, "_INI", NULL, NULL);
if (AE_NOT_FOUND == Status)
{
- /* No _INI means device requires no initialization */
+ /* No _INI means device requires no initialization */
+ Status = AE_OK;
}
else if (ACPI_FAILURE (Status))
@@ -421,93 +431,5 @@ AcpiNsInitOneDevice (
Info->Num_INI++;
}
-
- /*
- * Examine the HID of the device. _HID can be an executable
- * control method -- it simply has to return a string or number
- * containing the HID.
- */
-
- if (RetObj)
- {
- AcpiCmRemoveReference (RetObj);
- }
-
- RetObj = NULL;
- Status = AcpiNsEvaluateRelative (ObjHandle, "_HID", NULL, &RetObj);
- if (AE_NOT_FOUND == Status)
- {
- /* No _HID --> Can't be a PCI root bridge */
- return_ACPI_STATUS (AE_OK);
- }
-
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- Info->Num_HID++;
-
-
- /*
- * Found an _HID object.
- * Check for a PCI Root Bridge. We need to install the PCI_CONFIG space
- * handler on all PCI Root Bridges found within the namespace
- *
- * A PCI Root Bridge has an HID with the value EISAID("PNP0A03")
- * The HID can be either a number or a string.
- */
-
- switch (RetObj->Common.Type)
- {
- case ACPI_TYPE_NUMBER:
-
- if (RetObj->Number.Value != PCI_ROOT_HID_VALUE)
- {
- goto Cleanup;
- }
-
- break;
-
- case ACPI_TYPE_STRING:
-
- if (STRNCMP (RetObj->String.Pointer, PCI_ROOT_HID_STRING,
- sizeof (PCI_ROOT_HID_STRING)))
- {
- goto Cleanup;
- }
-
- break;
-
- default:
-
- goto Cleanup;
- }
-
-
- /*
- * We found a valid PCI_ROOT_HID.
- * The parent of the HID entry is the PCI device; Install the default PCI
- * handler for this PCI device.
- */
-
- Info->Num_PCI++;
-
- if (!(Info->Flags & ACPI_NO_PCI_INIT))
- {
- Status = AcpiInstallAddressSpaceHandler (ObjHandle,
- ADDRESS_SPACE_PCI_CONFIG,
- ACPI_DEFAULT_HANDLER, NULL, NULL);
- }
-
-Cleanup:
-
- if (RetObj)
- {
- AcpiCmRemoveReference (RetObj);
- }
-
return_ACPI_STATUS (Status);
}
-
-
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nsload.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nsload.c
index 523d94f..e49a8b7 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nsload.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nsload.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsload - namespace loading/expanding/contracting procedures
- * $Revision: 32 $
+ * $Revision: 33 $
*
*****************************************************************************/
@@ -179,7 +179,7 @@ AcpiNsLoadNamespace (
DEBUG_PRINT_RAW (ACPI_OK,
- ("ACPI Namespace successfully loaded at root 0x%p\n",
+ ("ACPI Namespace successfully loaded at root %p\n",
AcpiGbl_RootNode));
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nsnames.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nsnames.c
index 795c811..5990ff5 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nsnames.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nsnames.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nsnames - Name manipulation and search
- * $Revision: 49 $
+ * $Revision: 51 $
*
******************************************************************************/
@@ -210,7 +210,7 @@ AcpiNsGetTablePathname (
if (Size != 0)
{
DEBUG_PRINT (ACPI_ERROR,
- ("NsGetTablePathname: Bad pointer returned; size = %d\n", Size));
+ ("NsGetTablePathname: Bad pointer returned; size=%X\n", Size));
}
return_PTR (NameBuffer);
@@ -278,6 +278,13 @@ AcpiNsHandleToPathname (
Size += PATH_SEGMENT_LENGTH;
}
+ /* Special case for size still 0 - no parent for "special" nodes */
+
+ if (!Size)
+ {
+ Size = PATH_SEGMENT_LENGTH;
+ }
+
/* Set return length to the required path length */
PathLength = Size + 1;
@@ -324,7 +331,7 @@ AcpiNsHandleToPathname (
UserBuffer[Size] = '\\';
DEBUG_PRINT (TRACE_EXEC,
- ("NsHandleToPathname: Len=%d, %s \n",
+ ("NsHandleToPathname: Len=%X, %s \n",
PathLength, UserBuffer));
Exit:
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nssearch.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nssearch.c
index 880bc5f..57bb9f5 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nssearch.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nssearch.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nssearch - Namespace search
- * $Revision: 59 $
+ * $Revision: 60 $
*
******************************************************************************/
@@ -170,7 +170,7 @@ AcpiNsSearchNode (
("NsSearchNode: Searching %s [%p]\n",
ScopeName, Node));
DEBUG_PRINT (TRACE_NAMES,
- ("NsSearchNode: For %4.4s (type 0x%X)\n",
+ ("NsSearchNode: For %4.4s (type %X)\n",
&TargetName, Type));
DEBUG_EXEC (AcpiCmFree (ScopeName));
}
@@ -223,7 +223,7 @@ AcpiNsSearchNode (
}
DEBUG_PRINT (TRACE_NAMES,
- ("NsSearchNode: Name %4.4s (actual type 0x%X) found at %p\n",
+ ("NsSearchNode: Name %4.4s (actual type %X) found at %p\n",
&TargetName, NextNode->Type, NextNode));
*ReturnNode = NextNode;
@@ -251,7 +251,7 @@ AcpiNsSearchNode (
/* Searched entire table, not found */
DEBUG_PRINT (TRACE_NAMES,
- ("NsSearchNode: Name %4.4s (type 0x%X) not found at %p\n",
+ ("NsSearchNode: Name %4.4s (type %X) not found at %p\n",
&TargetName, Type, NextNode));
@@ -317,7 +317,7 @@ AcpiNsSearchParentTree (
if (AcpiNsLocal (Type))
{
DEBUG_PRINT (TRACE_NAMES,
- ("NsSearchParentTree: [%4.4s] (type 0x%X) is local (no search)\n",
+ ("NsSearchParentTree: [%4.4s] (type %X) is local (no search)\n",
&TargetName, Type));
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nsutils.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nsutils.c
index 79f3e08..835afa6 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nsutils.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nsutils.c
@@ -2,7 +2,7 @@
*
* Module Name: nsutils - Utilities for accessing ACPI namespace, accessing
* parents and siblings and Scope manipulation
- * $Revision: 72 $
+ * $Revision: 74 $
*
*****************************************************************************/
@@ -825,10 +825,9 @@ AcpiNsGetNode (
NATIVE_CHAR *InternalPath = NULL;
- FUNCTION_TRACE_PTR ("NsGetNte", Pathname);
+ FUNCTION_TRACE_PTR ("NsGetNode", Pathname);
- ScopeInfo.Scope.Node = StartNode;
/* Ensure that the namespace has been initialized */
@@ -854,22 +853,9 @@ AcpiNsGetNode (
AcpiCmAcquireMutex (ACPI_MTX_NAMESPACE);
- /* NS_ALL means start from the root */
-
- if (NS_ALL == ScopeInfo.Scope.Node)
- {
- ScopeInfo.Scope.Node = AcpiGbl_RootNode;
- }
+ /* Setup lookup scope (search starting point) */
- else
- {
- ScopeInfo.Scope.Node = StartNode;
- if (!ScopeInfo.Scope.Node)
- {
- Status = AE_BAD_PARAMETER;
- goto UnlockAndExit;
- }
- }
+ ScopeInfo.Scope.Node = StartNode;
/* Lookup the name in the namespace */
@@ -880,13 +866,11 @@ AcpiNsGetNode (
if (ACPI_FAILURE (Status))
{
- DEBUG_PRINT (ACPI_INFO, ("NsGetNte: %s, %s\n",
+ DEBUG_PRINT (ACPI_INFO, ("NsGetNode: %s, %s\n",
InternalPath, AcpiCmFormatException (Status)));
}
-UnlockAndExit:
-
AcpiCmReleaseMutex (ACPI_MTX_NAMESPACE);
/* Cleanup */
@@ -1007,6 +991,11 @@ AcpiNsGetParentObject (
{
+ if (!Node)
+ {
+ return (NULL);
+ }
+
/*
* Walk to the end of this peer list.
* The last entry is marked with a flag and the peer
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nsxfname.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nsxfname.c
index faab487..fca363b 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nsxfname.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nsxfname.c
@@ -2,7 +2,7 @@
*
* Module Name: nsxfname - Public interfaces to the ACPI subsystem
* ACPI Namespace oriented interfaces
- * $Revision: 72 $
+ * $Revision: 73 $
*
*****************************************************************************/
@@ -164,6 +164,8 @@ AcpiGetHandle (
return (AE_BAD_PARAMETER);
}
+ /* Convert a parent handle to a prefix node */
+
if (Parent)
{
AcpiCmAcquireMutex (ACPI_MTX_NAMESPACE);
@@ -179,7 +181,6 @@ AcpiGetHandle (
}
/* Special case for root, since we can't search for it */
- /* TBD: [Investigate] Check for both forward and backslash?? */
if (STRCMP (Pathname, NS_ROOT_PATH) == 0)
{
@@ -188,12 +189,12 @@ AcpiGetHandle (
}
/*
- * Find the Node and convert to the user format
+ * Find the Node and convert to a handle
*/
- Status = AcpiNsGetNode (Pathname, Node, &Node);
+ Status = AcpiNsGetNode (Pathname, PrefixNode, &Node);
*RetHandle = NULL;
- if(ACPI_SUCCESS(Status))
+ if (ACPI_SUCCESS (Status))
{
*RetHandle = AcpiNsConvertEntryToHandle (Node);
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nsxfobj.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nsxfobj.c
index bdb0c2c..d9201e3 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nsxfobj.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nsxfobj.c
@@ -2,7 +2,7 @@
*
* Module Name: nsxfobj - Public interfaces to the ACPI subsystem
* ACPI Object oriented interfaces
- * $Revision: 74 $
+ * $Revision: 75 $
*
******************************************************************************/
@@ -350,7 +350,7 @@ AcpiEvaluateObject (
*/
DEBUG_PRINT (ACPI_INFO,
- ("AcpiEvaluateObject: Needed buffer size %d, received %d\n",
+ ("AcpiEvaluateObject: Needed buffer size %X, received %X\n",
BufferSpaceNeeded, UserBufferLength));
ReturnBuffer->Length = BufferSpaceNeeded;
diff --git a/sys/contrib/dev/acpica/Subsystem/Parser/psfind.c b/sys/contrib/dev/acpica/Subsystem/Parser/psfind.c
index 44b7dec..7b8529d 100644
--- a/sys/contrib/dev/acpica/Subsystem/Parser/psfind.c
+++ b/sys/contrib/dev/acpica/Subsystem/Parser/psfind.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: psfind - Parse tree search routine
- * $Revision: 18 $
+ * $Revision: 19 $
*
*****************************************************************************/
@@ -374,7 +374,8 @@ AcpiPsFind (
break;
}
- DEBUG_PRINT (TRACE_PARSE, ("PsFind: Search scope %p Segs=%d Opcode=%4.4X Create=%d\n", Scope, SegCount, Opcode, Create));
+ DEBUG_PRINT (TRACE_PARSE, ("PsFind: Search scope %p Segs=%d Opcode=%4.4X Create=%d\n",
+ Scope, SegCount, Opcode, Create));
/* match each name segment */
diff --git a/sys/contrib/dev/acpica/Subsystem/Parser/psscope.c b/sys/contrib/dev/acpica/Subsystem/Parser/psscope.c
index 47b61dc..7e70f60 100644
--- a/sys/contrib/dev/acpica/Subsystem/Parser/psscope.c
+++ b/sys/contrib/dev/acpica/Subsystem/Parser/psscope.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psscope - Parser scope stack management routines
- * $Revision: 21 $
+ * $Revision: 22 $
*
*****************************************************************************/
@@ -329,7 +329,7 @@ AcpiPsPopScope (
DEBUG_PRINT (TRACE_PARSE,
- ("PsPopScope: Popped Op %p Args %d\n", *Op, *ArgCount));
+ ("PsPopScope: Popped Op %p Args %X\n", *Op, *ArgCount));
return_VOID;
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Resources/rscalc.c b/sys/contrib/dev/acpica/Subsystem/Resources/rscalc.c
index 8d02ee8..633d206 100644
--- a/sys/contrib/dev/acpica/Subsystem/Resources/rscalc.c
+++ b/sys/contrib/dev/acpica/Subsystem/Resources/rscalc.c
@@ -989,4 +989,3 @@ AcpiRsCalculatePciRoutingTableLength (
return_ACPI_STATUS (AE_OK);
}
-
diff --git a/sys/contrib/dev/acpica/Subsystem/Resources/rscreate.c b/sys/contrib/dev/acpica/Subsystem/Resources/rscreate.c
index ceec373..9b4f5fb 100644
--- a/sys/contrib/dev/acpica/Subsystem/Resources/rscreate.c
+++ b/sys/contrib/dev/acpica/Subsystem/Resources/rscreate.c
@@ -3,7 +3,7 @@
* Module Name: rscreate - AcpiRsCreateResourceList
* AcpiRsCreatePciRoutingTable
* AcpiRsCreateByteStream
- * $Revision: 21 $
+ * $Revision: 22 $
*
******************************************************************************/
@@ -181,7 +181,7 @@ AcpiRsCreateResourceList (
&ListSizeNeeded);
DEBUG_PRINT (VERBOSE_INFO,
- ("RsCreateResourceList: Status=%d ListSizeNeeded=%d\n",
+ ("RsCreateResourceList: Status=%X ListSizeNeeded=%X\n",
Status, ListSizeNeeded));
/*
@@ -280,7 +280,7 @@ AcpiRsCreatePciRoutingTable (
&BufferSizeNeeded);
DEBUG_PRINT (VERBOSE_INFO,
- ("RsCreatePciRoutingTable: BufferSizeNeeded = %d\n",
+ ("RsCreatePciRoutingTable: BufferSizeNeeded = %X\n",
BufferSizeNeeded));
/*
@@ -500,7 +500,7 @@ AcpiRsCreateByteStream (
&ByteStreamSizeNeeded);
DEBUG_PRINT (VERBOSE_INFO,
- ("RsCreateByteStream: ByteStreamSizeNeeded=%d, %s\n",
+ ("RsCreateByteStream: ByteStreamSizeNeeded=%X, %s\n",
ByteStreamSizeNeeded,
AcpiCmFormatException (Status)));
diff --git a/sys/contrib/dev/acpica/Subsystem/Resources/rsdump.c b/sys/contrib/dev/acpica/Subsystem/Resources/rsdump.c
index 91cf28b..e01abf0 100644
--- a/sys/contrib/dev/acpica/Subsystem/Resources/rsdump.c
+++ b/sys/contrib/dev/acpica/Subsystem/Resources/rsdump.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsdump - Functions do dump out the resource structures.
- * $Revision: 12 $
+ * $Revision: 13 $
*
******************************************************************************/
@@ -158,12 +158,12 @@ AcpiRsDumpIrq (
SHARED == IrqData->SharedExclusive ?
"Shared" : "Exclusive");
- AcpiOsPrintf ("\t\t%d Interrupts ( ",
+ AcpiOsPrintf ("\t\t%X Interrupts ( ",
IrqData->NumberOfInterrupts);
for (Index = 0; Index < IrqData->NumberOfInterrupts; Index++)
{
- AcpiOsPrintf ("%d ", IrqData->Interrupts[Index]);
+ AcpiOsPrintf ("%X ", IrqData->Interrupts[Index]);
}
AcpiOsPrintf (")\n");
@@ -239,12 +239,12 @@ AcpiRsDumpDma (
break;
}
- AcpiOsPrintf ("\t\tNumber of Channels: %d ( ",
+ AcpiOsPrintf ("\t\tNumber of Channels: %X ( ",
DmaData->NumberOfChannels);
for (Index = 0; Index < DmaData->NumberOfChannels; Index++)
{
- AcpiOsPrintf ("%d ", DmaData->Channels[Index]);
+ AcpiOsPrintf ("%X ", DmaData->Channels[Index]);
}
AcpiOsPrintf (")\n");
@@ -341,16 +341,16 @@ AcpiRsDumpIo (
AcpiOsPrintf ("\t\t%d bit decode\n",
DECODE_16 == IoData->IoDecode ? 16 : 10);
- AcpiOsPrintf ("\t\tRange minimum base: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange minimum base: %08X\n",
IoData->MinBaseAddress);
- AcpiOsPrintf ("\t\tRange maximum base: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange maximum base: %08X\n",
IoData->MaxBaseAddress);
- AcpiOsPrintf ("\t\tAlignment: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAlignment: %08X\n",
IoData->Alignment);
- AcpiOsPrintf ("\t\tRange Length: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange Length: %08X\n",
IoData->RangeLength);
return;
@@ -377,10 +377,10 @@ AcpiRsDumpFixedIo (
AcpiOsPrintf ("\tFixed Io Resource\n");
- AcpiOsPrintf ("\t\tRange base address: 0x%08x",
+ AcpiOsPrintf ("\t\tRange base address: %08X",
FixedIoData->BaseAddress);
- AcpiOsPrintf ("\t\tRange length: 0x%08x",
+ AcpiOsPrintf ("\t\tRange length: %08X",
FixedIoData->RangeLength);
return;
@@ -409,11 +409,11 @@ AcpiRsDumpVendorSpecific (
AcpiOsPrintf ("\tVendor Specific Resource\n");
- AcpiOsPrintf ("\t\tLength: 0x%08x\n", VendorData->Length);
+ AcpiOsPrintf ("\t\tLength: %08X\n", VendorData->Length);
for (Index = 0; Index < VendorData->Length; Index++)
{
- AcpiOsPrintf ("\t\tByte %d: 0x%08x\n",
+ AcpiOsPrintf ("\t\tByte %X: %08X\n",
Index, VendorData->Reserved[Index]);
}
@@ -447,16 +447,16 @@ AcpiRsDumpMemory24 (
Memory24Data->ReadWriteAttribute ?
"/Write" : " only");
- AcpiOsPrintf ("\t\tRange minimum base: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange minimum base: %08X\n",
Memory24Data->MinBaseAddress);
- AcpiOsPrintf ("\t\tRange maximum base: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange maximum base: %08X\n",
Memory24Data->MaxBaseAddress);
- AcpiOsPrintf ("\t\tAlignment: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAlignment: %08X\n",
Memory24Data->Alignment);
- AcpiOsPrintf ("\t\tRange length: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange length: %08X\n",
Memory24Data->RangeLength);
return;
@@ -489,16 +489,16 @@ AcpiRsDumpMemory32 (
Memory32Data->ReadWriteAttribute ?
"/Write" : " only");
- AcpiOsPrintf ("\t\tRange minimum base: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange minimum base: %08X\n",
Memory32Data->MinBaseAddress);
- AcpiOsPrintf ("\t\tRange maximum base: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange maximum base: %08X\n",
Memory32Data->MaxBaseAddress);
- AcpiOsPrintf ("\t\tAlignment: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAlignment: %08X\n",
Memory32Data->Alignment);
- AcpiOsPrintf ("\t\tRange length: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange length: %08X\n",
Memory32Data->RangeLength);
return;
@@ -531,10 +531,10 @@ AcpiRsDumpFixedMemory32 (
FixedMemory32Data->ReadWriteAttribute ?
"/Write" : " Only");
- AcpiOsPrintf ("\t\tRange base address: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange base address: %08X\n",
FixedMemory32Data->RangeBaseAddress);
- AcpiOsPrintf ("\t\tRange length: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange length: %08X\n",
FixedMemory32Data->RangeLength);
return;
@@ -658,24 +658,24 @@ AcpiRsDumpAddress16 (
ADDRESS_FIXED == Address16Data->MaxAddressFixed ?
"" : "not");
- AcpiOsPrintf ("\t\tGranularity: 0x%08x\n",
+ AcpiOsPrintf ("\t\tGranularity: %08X\n",
Address16Data->Granularity);
- AcpiOsPrintf ("\t\tAddress range min: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAddress range min: %08X\n",
Address16Data->MinAddressRange);
- AcpiOsPrintf ("\t\tAddress range max: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAddress range max: %08X\n",
Address16Data->MaxAddressRange);
- AcpiOsPrintf ("\t\tAddress translation offset: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAddress translation offset: %08X\n",
Address16Data->AddressTranslationOffset);
- AcpiOsPrintf ("\t\tAddress Length: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAddress Length: %08X\n",
Address16Data->AddressLength);
if (0xFF != Address16Data->ResourceSourceIndex)
{
- AcpiOsPrintf ("\t\tResource Source Index: %d\n",
+ AcpiOsPrintf ("\t\tResource Source Index: %X\n",
Address16Data->ResourceSourceIndex);
AcpiOsPrintf ("\t\tResource Source: %s\n",
Address16Data->ResourceSource);
@@ -801,24 +801,24 @@ AcpiRsDumpAddress32 (
ADDRESS_FIXED == Address32Data->MaxAddressFixed ?
"" : "not ");
- AcpiOsPrintf ("\t\tGranularity: 0x%08x\n",
+ AcpiOsPrintf ("\t\tGranularity: %08X\n",
Address32Data->Granularity);
- AcpiOsPrintf ("\t\tAddress range min: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAddress range min: %08X\n",
Address32Data->MinAddressRange);
- AcpiOsPrintf ("\t\tAddress range max: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAddress range max: %08X\n",
Address32Data->MaxAddressRange);
- AcpiOsPrintf ("\t\tAddress translation offset: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAddress translation offset: %08X\n",
Address32Data->AddressTranslationOffset);
- AcpiOsPrintf ("\t\tAddress Length: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAddress Length: %08X\n",
Address32Data->AddressLength);
if(0xFF != Address32Data->ResourceSourceIndex)
{
- AcpiOsPrintf ("\t\tResource Source Index: %d\n",
+ AcpiOsPrintf ("\t\tResource Source Index: %X\n",
Address32Data->ResourceSourceIndex);
AcpiOsPrintf ("\t\tResource Source: %s\n",
Address32Data->ResourceSource);
@@ -866,19 +866,19 @@ AcpiRsDumpExtendedIrq (
SHARED == ExtIrqData->SharedExclusive ?
"Shared" : "Exclusive");
- AcpiOsPrintf ("\t\tInterrupts : %d ( ",
+ AcpiOsPrintf ("\t\tInterrupts : %X ( ",
ExtIrqData->NumberOfInterrupts);
for (Index = 0; Index < ExtIrqData->NumberOfInterrupts; Index++)
{
- AcpiOsPrintf ("%d ", ExtIrqData->Interrupts[Index]);
+ AcpiOsPrintf ("%X ", ExtIrqData->Interrupts[Index]);
}
AcpiOsPrintf (")\n");
if(0xFF != ExtIrqData->ResourceSourceIndex)
{
- AcpiOsPrintf ("\t\tResource Source Index: %d",
+ AcpiOsPrintf ("\t\tResource Source Index: %X",
ExtIrqData->ResourceSourceIndex);
AcpiOsPrintf ("\t\tResource Source: %s",
ExtIrqData->ResourceSource);
@@ -1017,16 +1017,16 @@ AcpiRsDumpIrqList (
while (!Done)
{
- AcpiOsPrintf ("\tPCI IRQ Routing Table structure %x.\n", Count++);
+ AcpiOsPrintf ("\tPCI IRQ Routing Table structure %X.\n", Count++);
- AcpiOsPrintf ("\t\tAddress: 0x%x\n",
+ AcpiOsPrintf ("\t\tAddress: %X\n",
PrtElement->Data.Address);
- AcpiOsPrintf ("\t\tPin: 0x%x\n", PrtElement->Data.Pin);
+ AcpiOsPrintf ("\t\tPin: %X\n", PrtElement->Data.Pin);
AcpiOsPrintf ("\t\tSource: %s\n", PrtElement->Data.Source);
- AcpiOsPrintf ("\t\tSourceIndex: 0x%x\n",
+ AcpiOsPrintf ("\t\tSourceIndex: %X\n",
PrtElement->Data.SourceIndex);
Buffer += PrtElement->Length;
diff --git a/sys/contrib/dev/acpica/Subsystem/Tables/tbconvrt.c b/sys/contrib/dev/acpica/Subsystem/Tables/tbconvrt.c
index 647243c..2f67eb0 100644
--- a/sys/contrib/dev/acpica/Subsystem/Tables/tbconvrt.c
+++ b/sys/contrib/dev/acpica/Subsystem/Tables/tbconvrt.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbconvrt - ACPI Table conversion utilities
- * $Revision: 14 $
+ * $Revision: 15 $
*
*****************************************************************************/
@@ -576,7 +576,7 @@ AcpiTbConvertTableFadt (void)
/* Dump the entire FADT */
DEBUG_PRINT (TRACE_TABLES,
- ("Hex dump of FADT (After header), size %d (0x%x)\n",
+ ("Hex dump of FADT (After header), size %d (%X)\n",
AcpiGbl_FADT->header.Length, AcpiGbl_FADT->header.Length));
DUMP_BUFFER ((UINT8 *) (&AcpiGbl_FADT->V1_FirmwareCtrl), AcpiGbl_FADT->header.Length);
diff --git a/sys/contrib/dev/acpica/Subsystem/Tables/tbget.c b/sys/contrib/dev/acpica/Subsystem/Tables/tbget.c
index a72431b..581417b 100644
--- a/sys/contrib/dev/acpica/Subsystem/Tables/tbget.c
+++ b/sys/contrib/dev/acpica/Subsystem/Tables/tbget.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbget - ACPI Table get* routines
- * $Revision: 39 $
+ * $Revision: 40 $
*
*****************************************************************************/
@@ -469,7 +469,7 @@ AcpiTbGetAllTables (
/* Dump the entire DSDT */
DEBUG_PRINT (TRACE_TABLES,
- ("Hex dump of DSDT (After header), size %d (0x%x)\n",
+ ("Hex dump of DSDT (After header), size %d (%x)\n",
AcpiGbl_DSDT->Length, AcpiGbl_DSDT->Length));
DUMP_BUFFER ((UINT8 *) (AcpiGbl_DSDT + 1), AcpiGbl_DSDT->Length);
diff --git a/sys/contrib/dev/acpica/Subsystem/Tables/tbinstal.c b/sys/contrib/dev/acpica/Subsystem/Tables/tbinstal.c
index 7554c26..3357379 100644
--- a/sys/contrib/dev/acpica/Subsystem/Tables/tbinstal.c
+++ b/sys/contrib/dev/acpica/Subsystem/Tables/tbinstal.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbinstal - ACPI table installation and removal
- * $Revision: 33 $
+ * $Revision: 34 $
*
*****************************************************************************/
@@ -275,7 +275,7 @@ AcpiTbRecognizeTable (
if (Status == AE_SUPPORT)
{
DEBUG_PRINT (ACPI_INFO,
- ("Unsupported table %s (Type %d) was found and discarded\n",
+ ("Unsupported table %s (Type %X) was found and discarded\n",
AcpiGbl_AcpiTableData[TableType].Name, TableType));
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Tables/tbutils.c b/sys/contrib/dev/acpica/Subsystem/Tables/tbutils.c
index 5c48165..654568f 100644
--- a/sys/contrib/dev/acpica/Subsystem/Tables/tbutils.c
+++ b/sys/contrib/dev/acpica/Subsystem/Tables/tbutils.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbutils - Table manipulation utilities
- * $Revision: 30 $
+ * $Revision: 31 $
*
*****************************************************************************/
@@ -164,7 +164,7 @@ AcpiTbHandleToObject (
}
- DEBUG_PRINT (ACPI_ERROR, ("TableId=0x%X does not exist\n", TableId));
+ DEBUG_PRINT (ACPI_ERROR, ("TableId=%X does not exist\n", TableId));
return (AE_BAD_PARAMETER);
}
@@ -392,7 +392,7 @@ AcpiTbMapAcpiTable (
}
DEBUG_PRINT (ACPI_INFO,
- ("Mapped memory for ACPI table, length=%d(0x%X) at %p\n",
+ ("Mapped memory for ACPI table, length=%d(%X) at %p\n",
TableSize, TableSize, Table));
*Size = TableSize;
diff --git a/sys/contrib/dev/acpica/acdispat.h b/sys/contrib/dev/acpica/acdispat.h
index 88e21ff..6224621 100644
--- a/sys/contrib/dev/acpica/acdispat.h
+++ b/sys/contrib/dev/acpica/acdispat.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acdispat.h - dispatcher (parser to interpreter interface)
- * $Revision: 32 $
+ * $Revision: 33 $
*
*****************************************************************************/
@@ -428,7 +428,8 @@ AcpiDsDeleteResultIfNotUsed (
ACPI_STATUS
AcpiDsCreateOperand (
ACPI_WALK_STATE *WalkState,
- ACPI_PARSE_OBJECT *Arg);
+ ACPI_PARSE_OBJECT *Arg,
+ UINT32 ArgsRemaining);
ACPI_STATUS
AcpiDsCreateOperands (
@@ -497,12 +498,10 @@ AcpiDsPopWalkState (
ACPI_STATUS
AcpiDsResultStackPop (
- ACPI_OPERAND_OBJECT **Object,
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
AcpiDsResultStackPush (
- void *Object,
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
@@ -517,5 +516,31 @@ void
AcpiDsDeleteWalkStateCache (
void);
+ACPI_STATUS
+AcpiDsResultInsert (
+ void *Object,
+ UINT32 Index,
+ ACPI_WALK_STATE *WalkState);
+
+ACPI_STATUS
+AcpiDsResultRemove (
+ ACPI_OPERAND_OBJECT **Object,
+ UINT32 Index,
+ ACPI_WALK_STATE *WalkState);
+
+ACPI_STATUS
+AcpiDsResultPop (
+ ACPI_OPERAND_OBJECT **Object,
+ ACPI_WALK_STATE *WalkState);
+
+ACPI_STATUS
+AcpiDsResultPush (
+ ACPI_OPERAND_OBJECT *Object,
+ ACPI_WALK_STATE *WalkState);
+
+ACPI_STATUS
+AcpiDsResultPopFromBottom (
+ ACPI_OPERAND_OBJECT **Object,
+ ACPI_WALK_STATE *WalkState);
#endif /* _ACDISPAT_H_ */
diff --git a/sys/contrib/dev/acpica/acefi.h b/sys/contrib/dev/acpica/acefi.h
index 58bd46a..dcab301 100644
--- a/sys/contrib/dev/acpica/acefi.h
+++ b/sys/contrib/dev/acpica/acefi.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acefi.h - OS specific defines, etc.
- * $Revision: 3 $
+ * $Revision: 4 $
*
*****************************************************************************/
@@ -123,14 +123,14 @@
#include <efistdarg.h>
#include <efilib.h>
-#undef UINT8
-#undef BOOLEAN
-#undef UCHAR
-#undef UINT16
-#undef INT32
-#undef UINT32
-#undef INT64
-#undef UINT64
+
+/* _int64 works for both IA32 and IA64 */
+
+#define COMPILER_DEPENDENT_UINT64 unsigned __int64
+
+/* warn C4142: redefinition of type */
+
+#pragma warning(disable:4142)
#endif /* __ACEFI_H__ */
diff --git a/sys/contrib/dev/acpica/acexcep.h b/sys/contrib/dev/acpica/acexcep.h
index 87b2ecc..f1acea1 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: 36 $
+ * $Revision: 37 $
*
*****************************************************************************/
@@ -206,8 +206,9 @@
#define AE_AML_BAD_NAME (ACPI_STATUS) (0x000F | AE_CODE_AML)
#define AE_AML_NAME_NOT_FOUND (ACPI_STATUS) (0x0010 | AE_CODE_AML)
#define AE_AML_INTERNAL (ACPI_STATUS) (0x0011 | AE_CODE_AML)
+#define AE_AML_INVALID_SPACE_ID (ACPI_STATUS) (0x0012 | AE_CODE_AML)
-#define AE_CODE_AML_MAX 0x0011
+#define AE_CODE_AML_MAX 0x0012
/*
* Internal exceptions used for control
@@ -291,6 +292,7 @@ static NATIVE_CHAR *AcpiGbl_ExceptionNames_Aml[] =
"AE_AML_BAD_NAME",
"AE_AML_NAME_NOT_FOUND",
"AE_AML_INTERNAL",
+ "AE_AML_INVALID_SPACE_ID",
};
static NATIVE_CHAR *AcpiGbl_ExceptionNames_Ctrl[] =
diff --git a/sys/contrib/dev/acpica/acinterp.h b/sys/contrib/dev/acpica/acinterp.h
index 73ccc37..274ddc0 100644
--- a/sys/contrib/dev/acpica/acinterp.h
+++ b/sys/contrib/dev/acpica/acinterp.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acinterp.h - Interpreter subcomponent prototypes and defines
- * $Revision: 85 $
+ * $Revision: 86 $
*
*****************************************************************************/
@@ -253,7 +253,7 @@ ACPI_STATUS
AcpiAmlExecCreateRegion (
UINT8 *AmlPtr,
UINT32 AcpiAmlLength,
- UINT32 RegionSpace,
+ UINT8 RegionSpace,
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
diff --git a/sys/contrib/dev/acpica/aclocal.h b/sys/contrib/dev/acpica/aclocal.h
index 2378345..e6d1ddb 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: 89 $
+ * $Revision: 93 $
*
*****************************************************************************/
@@ -266,10 +266,11 @@ typedef struct acpi_node
/* Node flags */
-#define ANOBJ_AML_ATTACHMENT 0x1
-#define ANOBJ_END_OF_PEER_LIST 0x2
-#define ANOBJ_DATA_WIDTH_32 0x4 /* Parent table is 64-bits */
-
+#define ANOBJ_AML_ATTACHMENT 0x01
+#define ANOBJ_END_OF_PEER_LIST 0x02
+#define ANOBJ_DATA_WIDTH_32 0x04 /* Parent table is 64-bits */
+#define ANOBJ_METHOD_ARG 0x40
+#define ANOBJ_METHOD_LOCAL 0x80
/*
* ACPI Table Descriptor. One per ACPI table
@@ -492,6 +493,22 @@ typedef struct acpi_pscope_state
} ACPI_PSCOPE_STATE;
+/*
+ * Result values - used to accumulate the results of nested
+ * AML arguments
+ */
+typedef struct acpi_result_values
+{
+ ACPI_STATE_COMMON
+ union acpi_operand_obj *ObjDesc [OBJ_NUM_OPERANDS];
+ UINT8 NumResults;
+ UINT8 LastInsert;
+
+} ACPI_RESULT_VALUES;
+
+
+/* Generic state is union of structs above */
+
typedef union acpi_gen_state
{
ACPI_COMMON_STATE Common;
@@ -499,6 +516,7 @@ typedef union acpi_gen_state
ACPI_UPDATE_STATE Update;
ACPI_SCOPE_STATE Scope;
ACPI_PSCOPE_STATE ParseScope;
+ ACPI_RESULT_VALUES Results;
} ACPI_GENERIC_STATE;
@@ -646,7 +664,6 @@ typedef struct acpi_walk_state
BOOLEAN LastPredicate; /* Result of last predicate */
UINT8 NextOpInfo; /* Info about NextOp */
UINT8 NumOperands; /* Stack pointer for Operands[] array */
- UINT8 NumResults; /* Stack pointer for Results[] array */
UINT8 CurrentResult; /* */
struct acpi_walk_state *Next; /* Next WalkState in list */
@@ -657,6 +674,7 @@ typedef struct acpi_walk_state
ACPI_PARSE_OBJECT *NextOp; /* next op to be processed */
+ ACPI_GENERIC_STATE *Results; /* Stack of accumulated results */
ACPI_GENERIC_STATE *ControlState; /* List of control states (nested IFs) */
ACPI_GENERIC_STATE *ScopeInfo; /* Stack of nested scopes */
ACPI_PARSE_STATE *ParserState; /* Current state of parser */
@@ -670,7 +688,6 @@ typedef struct acpi_walk_state
ACPI_PARSE_OBJECT *MethodCallOp; /* MethodCall Op if running a method */
struct acpi_node *MethodCallNode; /* Called method Node*/
union acpi_operand_obj *Operands[OBJ_NUM_OPERANDS]; /* Operands passed to the interpreter */
- union acpi_operand_obj *Results[OBJ_NUM_OPERANDS]; /* Accumulated results */
struct acpi_node Arguments[MTH_NUM_ARGS]; /* Control method arguments */
struct acpi_node LocalVariables[MTH_NUM_LOCALS]; /* Control method locals */
UINT32 ParseFlags;
@@ -721,8 +738,6 @@ typedef struct acpi_device_walk_info
UINT16 DeviceCount;
UINT16 Num_STA;
UINT16 Num_INI;
- UINT16 Num_HID;
- UINT16 Num_PCI;
ACPI_TABLE_DESC *TableDesc;
} ACPI_DEVICE_WALK_INFO;
diff --git a/sys/contrib/dev/acpica/actypes.h b/sys/contrib/dev/acpica/actypes.h
index cd01bae..e51e0e2 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: 152 $
+ * $Revision: 155 $
*
*****************************************************************************/
@@ -150,8 +150,7 @@ typedef unsigned char UCHAR;
typedef unsigned short UINT16;
typedef int INT32;
typedef unsigned int UINT32;
-typedef long INT64;
-typedef unsigned long UINT64;
+typedef COMPILER_DEPENDENT_UINT64 UINT64;
typedef UINT64 NATIVE_UINT;
typedef INT64 NATIVE_INT;
@@ -416,13 +415,11 @@ typedef UINT8 OBJECT_TYPE_INTERNAL;
#define INTERNAL_TYPE_WHILE 30 /* 0x1E OpCode, multiple Code */
#define INTERNAL_TYPE_SCOPE 31 /* 0x1F Name, multiple Node */
#define INTERNAL_TYPE_DEF_ANY 32 /* 0x20 type is Any, suppress search of enclosing scopes */
-#define INTERNAL_TYPE_METHOD_ARGUMENT 33 /* 0x21 */
-#define INTERNAL_TYPE_METHOD_LOCAL_VAR 34 /* 0x22 */
-#define INTERNAL_TYPE_EXTRA 35 /* 0x23 */
+#define INTERNAL_TYPE_EXTRA 33 /* 0x21 */
-#define INTERNAL_TYPE_MAX 35
+#define INTERNAL_TYPE_MAX 33
-#define INTERNAL_TYPE_INVALID 36
+#define INTERNAL_TYPE_INVALID 34
#define ACPI_TYPE_NOT_FOUND 0xFF
/*
@@ -493,13 +490,15 @@ typedef UINT32 ACPI_EVENT_STATUS;
/* Address Space (Operation Region) Types */
-typedef UINT32 ACPI_ADDRESS_SPACE_TYPE;
+typedef UINT8 ACPI_ADDRESS_SPACE_TYPE;
#define ADDRESS_SPACE_SYSTEM_MEMORY (ACPI_ADDRESS_SPACE_TYPE) 0
#define ADDRESS_SPACE_SYSTEM_IO (ACPI_ADDRESS_SPACE_TYPE) 1
#define ADDRESS_SPACE_PCI_CONFIG (ACPI_ADDRESS_SPACE_TYPE) 2
#define ADDRESS_SPACE_EC (ACPI_ADDRESS_SPACE_TYPE) 3
#define ADDRESS_SPACE_SMBUS (ACPI_ADDRESS_SPACE_TYPE) 4
+#define ADDRESS_SPACE_CMOS (ACPI_ADDRESS_SPACE_TYPE) 5
+#define ADDRESS_SPACE_PCI_BAR_TARGET (ACPI_ADDRESS_SPACE_TYPE) 6
/*
diff --git a/sys/contrib/dev/acpica/acutils.h b/sys/contrib/dev/acpica/acutils.h
index bf5ffef..3cec257 100644
--- a/sys/contrib/dev/acpica/acutils.h
+++ b/sys/contrib/dev/acpica/acutils.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: accommon.h -- prototypes for the common (subsystem-wide) procedures
- * $Revision: 81 $
+ * $Revision: 82 $
*
*****************************************************************************/
@@ -161,6 +161,8 @@ AcpiCmValidateFadt (
* CmGlobal - Global data structures and procedures
*/
+#ifdef ACPI_DEBUG
+
NATIVE_CHAR *
AcpiCmGetMutexName (
UINT32 MutexId);
@@ -169,6 +171,13 @@ NATIVE_CHAR *
AcpiCmGetTypeName (
UINT32 Type);
+NATIVE_CHAR *
+AcpiCmGetRegionName (
+ UINT8 SpaceId);
+
+#endif
+
+
BOOLEAN
AcpiCmValidObjectType (
UINT32 Type);
diff --git a/sys/contrib/dev/acpica/amlcode.h b/sys/contrib/dev/acpica/amlcode.h
index 7a3674c..37d3b54 100644
--- a/sys/contrib/dev/acpica/amlcode.h
+++ b/sys/contrib/dev/acpica/amlcode.h
@@ -3,7 +3,7 @@
* Name: amlcode.h - Definitions for AML, as included in "definition blocks"
* Declarations and definitions contained herein are derived
* directly from the ACPI specification.
- * $Revision: 40 $
+ * $Revision: 42 $
*
*****************************************************************************/
@@ -201,10 +201,11 @@
#define AML_LEQUAL_OP (UINT16) 0x93
#define AML_LGREATER_OP (UINT16) 0x94
#define AML_LLESS_OP (UINT16) 0x95
-#define AML_BUFF_OP (UINT16) 0x96 /* ACPI 2.0 */
-#define AML_DEC_STR_OP (UINT16) 0x97 /* ACPI 2.0 */
-#define AML_HEX_STR_OP (UINT16) 0x98 /* ACPI 2.0 */
-#define AML_INT_OP (UINT16) 0x99 /* ACPI 2.0 */
+#define AML_TO_BUFFER_OP (UINT16) 0x96 /* ACPI 2.0 */
+#define AML_TO_DECSTRING_OP (UINT16) 0x97 /* ACPI 2.0 */
+#define AML_TO_HEXSTRING_OP (UINT16) 0x98 /* ACPI 2.0 */
+#define AML_TO_INTEGER_OP (UINT16) 0x99 /* ACPI 2.0 */
+#define AML_TO_STRING_OP (UINT16) 0x9c /* ACPI 2.0 */
#define AML_COPY_OP (UINT16) 0x9d /* ACPI 2.0 */
#define AML_MID_OP (UINT16) 0x9e /* ACPI 2.0 */
#define AML_CONTINUE_OP (UINT16) 0x9f /* ACPI 2.0 */
@@ -465,25 +466,19 @@ typedef enum
#define METHOD_FLAGS_SERIALIZED 0x08
+
+
/* Array sizes. Used for range checking also */
-#define NUM_REGION_TYPES 5
+#define NUM_REGION_TYPES 7
#define NUM_ACCESS_TYPES 7
#define NUM_UPDATE_RULES 3
#define NUM_MATCH_OPS 7
#define NUM_OPCODES 256
#define NUM_FIELD_NAMES 2
-/* External declarations of the AML tables */
-
-extern UINT8 AcpiGbl_Aml [NUM_OPCODES];
-extern UINT16 AcpiGbl_Pfx [NUM_OPCODES];
-extern NATIVE_CHAR *AcpiGbl_RegionTypes [NUM_REGION_TYPES];
-extern NATIVE_CHAR *AcpiGbl_MatchOps [NUM_MATCH_OPS];
-extern NATIVE_CHAR *AcpiGbl_AccessTypes [NUM_ACCESS_TYPES];
-extern NATIVE_CHAR *AcpiGbl_UpdateRules [NUM_UPDATE_RULES];
-extern NATIVE_CHAR *AcpiGbl_FENames [NUM_FIELD_NAMES];
+#define USER_REGION_BEGIN 0x80
/*
* AML tables
@@ -491,61 +486,10 @@ extern NATIVE_CHAR *AcpiGbl_FENames [NUM_FIELD_NAMES];
#ifdef DEFINE_AML_GLOBALS
-/* Data used in keeping track of fields */
-
-NATIVE_CHAR *AcpiGbl_FENames[NUM_FIELD_NAMES] =
-{
- "skip",
- "?access?"
-}; /* FE = Field Element */
-
-
-/* Region type decoding */
-
-NATIVE_CHAR *AcpiGbl_RegionTypes[NUM_REGION_TYPES] =
-{
- "SystemMemory",
- "SystemIO",
- "PCIConfig",
- "EmbeddedControl",
- "SMBus"
-};
-
-
-NATIVE_CHAR *AcpiGbl_MatchOps[NUM_MATCH_OPS] =
-{
- "Error",
- "MTR",
- "MEQ",
- "MLE",
- "MLT",
- "MGE",
- "MGT"
-};
-
-
-/* Access type decoding */
-
-NATIVE_CHAR *AcpiGbl_AccessTypes[NUM_ACCESS_TYPES] =
-{
- "AnyAcc",
- "ByteAcc",
- "WordAcc",
- "DWordAcc",
- "BlockAcc",
- "SMBSendRecvAcc",
- "SMBQuickAcc"
-};
-
-
-/* Update rule decoding */
+/* External declarations of the AML tables */
-NATIVE_CHAR *AcpiGbl_UpdateRules[NUM_UPDATE_RULES] =
-{
- "Preserve",
- "WriteAsOnes",
- "WriteAsZeros"
-};
+extern UINT8 AcpiGbl_Aml [NUM_OPCODES];
+extern UINT16 AcpiGbl_Pfx [NUM_OPCODES];
#endif /* DEFINE_AML_GLOBALS */
diff --git a/sys/contrib/dev/acpica/dbcmds.c b/sys/contrib/dev/acpica/dbcmds.c
index bd357df..1eca624 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: 41 $
+ * $Revision: 42 $
*
******************************************************************************/
@@ -263,7 +263,7 @@ AcpiDbDisplayTableInfo (
{
if (AcpiGbl_AcpiTables[i].Pointer)
{
- AcpiOsPrintf ("%s at 0x%p length 0x%X\n", AcpiGbl_AcpiTableData[i].Name,
+ AcpiOsPrintf ("%s at %p length %X\n", AcpiGbl_AcpiTableData[i].Name,
AcpiGbl_AcpiTables[i].Pointer, AcpiGbl_AcpiTables[i].Length);
}
}
@@ -355,13 +355,13 @@ AcpiDbSetMethodBreakpoint (
Address = STRTOUL (Location, NULL, 16);
if (Address <= Op->AmlOffset)
{
- AcpiOsPrintf ("Breakpoint 0x%X is beyond current address 0x%X\n", Address, Op->AmlOffset);
+ AcpiOsPrintf ("Breakpoint %X is beyond current address %X\n", Address, Op->AmlOffset);
}
/* Save breakpoint in current walk */
WalkState->MethodBreakpoint = Address;
- AcpiOsPrintf ("Breakpoint set at AML offset 0x%X\n", Address);
+ AcpiOsPrintf ("Breakpoint set at AML offset %X\n", Address);
}
@@ -546,7 +546,7 @@ AcpiDbDumpNamespaceByOwner (
AcpiDbSetOutputDestination (DB_DUPLICATE_OUTPUT);
- AcpiOsPrintf ("ACPI Namespace by owner 0x%X:\n", OwnerId);
+ AcpiOsPrintf ("ACPI Namespace by owner %X:\n", OwnerId);
/* Display the subtree */
@@ -761,11 +761,11 @@ AcpiDbWalkForSpecificObjects (
switch (ObjDesc->Common.Type)
{
case ACPI_TYPE_METHOD:
- AcpiOsPrintf (" #Args %d Concurrency %d", ObjDesc->Method.ParamCount, ObjDesc->Method.Concurrency);
+ AcpiOsPrintf (" #Args %d Concurrency %X", ObjDesc->Method.ParamCount, ObjDesc->Method.Concurrency);
break;
case ACPI_TYPE_NUMBER:
- AcpiOsPrintf (" Value 0x%X", ObjDesc->Number.Value);
+ AcpiOsPrintf (" Value %X", ObjDesc->Number.Value);
break;
case ACPI_TYPE_STRING:
@@ -773,15 +773,15 @@ AcpiDbWalkForSpecificObjects (
break;
case ACPI_TYPE_REGION:
- AcpiOsPrintf (" SpaceId %d Address %X Length %X", ObjDesc->Region.SpaceId, ObjDesc->Region.Address, ObjDesc->Region.Length);
+ AcpiOsPrintf (" SpaceId %X Address %X Length %X", ObjDesc->Region.SpaceId, ObjDesc->Region.Address, ObjDesc->Region.Length);
break;
case ACPI_TYPE_PACKAGE:
- AcpiOsPrintf (" #Elements %d", ObjDesc->Package.Count);
+ AcpiOsPrintf (" #Elements %X", ObjDesc->Package.Count);
break;
case ACPI_TYPE_BUFFER:
- AcpiOsPrintf (" Length %d", ObjDesc->Buffer.Length);
+ AcpiOsPrintf (" Length %X", ObjDesc->Buffer.Length);
break;
}
}
@@ -909,7 +909,7 @@ AcpiDbWalkAndMatchName (
else
{
- AcpiOsPrintf ("%32s (0x%p) - %s\n", Buffer, ObjHandle,
+ AcpiOsPrintf ("%32s (%p) - %s\n", Buffer, ObjHandle,
AcpiCmGetTypeName (((ACPI_NAMESPACE_NODE *) ObjHandle)->Type));
}
diff --git a/sys/contrib/dev/acpica/dbdisasm.c b/sys/contrib/dev/acpica/dbdisasm.c
index 4a7b32d..82c9539 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: 33 $
+ * $Revision: 34 $
*
******************************************************************************/
@@ -778,9 +778,10 @@ AcpiDbDisplayOpcode (
#ifndef PARSER_ONLY
if ((Op->Opcode == AML_RETURN_VALUE_OP) &&
- (WalkState->NumResults))
+ (WalkState->Results) &&
+ (WalkState->Results->Results.NumResults))
{
- AcpiDbDecodeInternalObject (WalkState->Results [WalkState->NumResults-1]);
+ AcpiDbDecodeInternalObject (WalkState->Results->Results.ObjDesc [WalkState->Results->Results.NumResults-1]);
}
#endif
diff --git a/sys/contrib/dev/acpica/dbdisply.c b/sys/contrib/dev/acpica/dbdisply.c
index a5f2c47..2ae6eec 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: 35 $
+ * $Revision: 38 $
*
******************************************************************************/
@@ -352,10 +352,13 @@ DumpNte:
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Could not convert name to pathname\n");
- return;
}
- AcpiOsPrintf ("Object Pathname: %s\n", RetBuf.Pointer);
+ else
+ {
+ AcpiOsPrintf ("Object Pathname: %s\n", RetBuf.Pointer);
+ }
+
if (!AcpiOsReadable (Node, sizeof (ACPI_NAMESPACE_NODE)))
{
AcpiOsPrintf ("Invalid Named object at address %p\n", Node);
@@ -367,7 +370,7 @@ DumpNte:
if (Node->Object)
{
- AcpiOsPrintf ("\nAttached Object (0x%p):\n", Node->Object);
+ AcpiOsPrintf ("\nAttached Object (%p):\n", Node->Object);
if (!AcpiOsReadable (Node->Object, sizeof (ACPI_OPERAND_OBJECT)))
{
AcpiOsPrintf ("Invalid internal ACPI Object at address %p\n", Node->Object);
@@ -407,7 +410,7 @@ AcpiDbDecodeInternalObject (
switch (ObjDesc->Common.Type)
{
case ACPI_TYPE_NUMBER:
- AcpiOsPrintf ("0x%.8X", ObjDesc->Number.Value);
+ AcpiOsPrintf ("%.8X", ObjDesc->Number.Value);
break;
case ACPI_TYPE_STRING:
@@ -456,8 +459,17 @@ AcpiDbDisplayInternalObject (
else if (VALID_DESCRIPTOR_TYPE (ObjDesc, ACPI_DESC_TYPE_NAMED))
{
- AcpiOsPrintf ("<Node> Name %4.4s Type %s", &((ACPI_NAMESPACE_NODE *)ObjDesc)->Name,
- AcpiCmGetTypeName (((ACPI_NAMESPACE_NODE *) ObjDesc)->Type));
+ AcpiOsPrintf ("<Node> Name %4.4s Type-%s",
+ &((ACPI_NAMESPACE_NODE *)ObjDesc)->Name,
+ AcpiCmGetTypeName (((ACPI_NAMESPACE_NODE *) ObjDesc)->Type));
+ if (((ACPI_NAMESPACE_NODE *) ObjDesc)->Flags & ANOBJ_METHOD_ARG)
+ {
+ AcpiOsPrintf (" [Method Arg]");
+ }
+ if (((ACPI_NAMESPACE_NODE *) ObjDesc)->Flags & ANOBJ_METHOD_LOCAL)
+ {
+ AcpiOsPrintf (" [Method Local]");
+ }
}
else if (VALID_DESCRIPTOR_TYPE (ObjDesc, ACPI_DESC_TYPE_INTERNAL))
@@ -478,15 +490,15 @@ AcpiDbDisplayInternalObject (
switch (ObjDesc->Reference.OpCode)
{
case AML_ZERO_OP:
- AcpiOsPrintf ("[Const] Number 0x%.8X", 0);
+ AcpiOsPrintf ("[Const] Number %.8X", 0);
break;
case AML_ONES_OP:
- AcpiOsPrintf ("[Const] Number 0x%.8X", ACPI_UINT32_MAX);
+ AcpiOsPrintf ("[Const] Number %.8X", ACPI_UINT32_MAX);
break;
case AML_ONE_OP:
- AcpiOsPrintf ("[Const] Number 0x%.8X", 1);
+ AcpiOsPrintf ("[Const] Number %.8X", 1);
break;
case AML_LOCAL_OP:
@@ -585,7 +597,7 @@ AcpiDbDisplayMethodInfo (
Concurrency = ObjDesc->Method.Concurrency;
AcpiOsPrintf ("Currently executing control method is [%4.4s]\n", &Node->Name);
- AcpiOsPrintf ("%d arguments, max concurrency = %d\n", NumArgs, Concurrency);
+ AcpiOsPrintf ("%X arguments, max concurrency = %X\n", NumArgs, Concurrency);
RootOp = StartOp;
@@ -649,10 +661,10 @@ AcpiDbDisplayMethodInfo (
Op = AcpiPsGetDepthNext (StartOp, Op);
}
- AcpiOsPrintf ("Method contains: %d AML Opcodes - %d Operators, %d Operands\n",
+ AcpiOsPrintf ("Method contains: %X AML Opcodes - %X Operators, %X Operands\n",
NumOps, NumOperators, NumOperands);
- AcpiOsPrintf ("Remaining to execute: %d AML Opcodes - %d Operators, %d Operands\n",
+ AcpiOsPrintf ("Remaining to execute: %X AML Opcodes - %X Operators, %X Operands\n",
NumRemainingOps, NumRemainingOperators, NumRemainingOperands);
}
@@ -736,7 +748,7 @@ AcpiDbDisplayArguments (void)
NumArgs = ObjDesc->Method.ParamCount;
Concurrency = ObjDesc->Method.Concurrency;
- AcpiOsPrintf ("Method [%4.4s] has %d arguments, max concurrency = %d\n", &Node->Name, NumArgs, Concurrency);
+ AcpiOsPrintf ("Method [%4.4s] has %X arguments, max concurrency = %X\n", &Node->Name, NumArgs, Concurrency);
for (i = 0; i < NumArgs; i++)
{
@@ -765,7 +777,7 @@ AcpiDbDisplayResults (void)
UINT32 i;
ACPI_WALK_STATE *WalkState;
ACPI_OPERAND_OBJECT *ObjDesc;
- UINT32 NumResults;
+ UINT32 NumResults = 0;
ACPI_NAMESPACE_NODE *Node;
@@ -778,13 +790,17 @@ AcpiDbDisplayResults (void)
ObjDesc = WalkState->MethodDesc;
Node = WalkState->MethodNode;
- NumResults = WalkState->NumResults - WalkState->CurrentResult;
- AcpiOsPrintf ("Method [%4.4s] has %d stacked result objects\n", &Node->Name, NumResults);
+ if (WalkState->Results)
+ {
+ NumResults = WalkState->Results->Results.NumResults;
+ }
+
+ AcpiOsPrintf ("Method [%4.4s] has %X stacked result objects\n", &Node->Name, NumResults);
- for (i = WalkState->CurrentResult; i < WalkState->NumResults; i++)
+ for (i = 0; i < NumResults; i++)
{
- ObjDesc = WalkState->Results[i];
+ ObjDesc = WalkState->Results->Results.ObjDesc[i];
AcpiOsPrintf ("Result%d: ", i);
AcpiDbDisplayInternalObject (ObjDesc, WalkState);
}
diff --git a/sys/contrib/dev/acpica/dbexec.c b/sys/contrib/dev/acpica/dbexec.c
index 552d9ef..553a8f0 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: 18 $
+ * $Revision: 19 $
*
******************************************************************************/
@@ -428,7 +428,7 @@ AcpiDbCreateExecutionThreads (
if (!NumThreads || !NumLoops)
{
- AcpiOsPrintf ("Bad argument: Threads %d, Loops %d\n", NumThreads, NumLoops);
+ AcpiOsPrintf ("Bad argument: Threads %X, Loops %X\n", NumThreads, NumLoops);
return;
}
@@ -455,7 +455,7 @@ AcpiDbCreateExecutionThreads (
/* Create the threads */
- AcpiOsPrintf ("Creating %d threads to execute %d times each\n", NumThreads, NumLoops);
+ AcpiOsPrintf ("Creating %X threads to execute %X times each\n", NumThreads, NumLoops);
for (i = 0; i < (NumThreads); i++)
{
@@ -477,7 +477,7 @@ AcpiDbCreateExecutionThreads (
AcpiOsDeleteSemaphore (ThreadGate);
AcpiDbSetOutputDestination (DB_DUPLICATE_OUTPUT);
- AcpiOsPrintf ("All threads (%d) have completed\n", NumThreads);
+ AcpiOsPrintf ("All threads (%X) have completed\n", NumThreads);
AcpiDbSetOutputDestination (DB_CONSOLE_OUTPUT);
}
diff --git a/sys/contrib/dev/acpica/dbfileio.c b/sys/contrib/dev/acpica/dbfileio.c
index 78499a9..71dd72a 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: 33 $
+ * $Revision: 34 $
*
******************************************************************************/
@@ -310,7 +310,7 @@ AcpiDbLoadTable(
*TablePtr = (ACPI_TABLE_HEADER *) AcpiCmAllocate ((size_t) *TableLength);
if (!*TablePtr)
{
- AcpiOsPrintf ("Could not allocate memory for the table (size=0x%X)\n", TableHeader.Length);
+ AcpiOsPrintf ("Could not allocate memory for the table (size=%X)\n", TableHeader.Length);
return (AE_NO_MEMORY);
}
@@ -332,7 +332,7 @@ AcpiDbLoadTable(
if (Actual > 0)
{
- AcpiOsPrintf ("Warning - reading table, asked for %d got %d\n", AmlLength, Actual);
+ AcpiOsPrintf ("Warning - reading table, asked for %X got %X\n", AmlLength, Actual);
return (AE_OK);
}
diff --git a/sys/contrib/dev/acpica/dbinput.c b/sys/contrib/dev/acpica/dbinput.c
index d81e1ad..f73090a 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: 51 $
+ * $Revision: 52 $
*
******************************************************************************/
@@ -626,7 +626,7 @@ AcpiDbCommandDispatch (
Status = AcpiEnable();
if (ACPI_FAILURE(Status))
{
- AcpiOsPrintf("AcpiEnable failed (0x%x)\n", Status);
+ AcpiOsPrintf("AcpiEnable failed (Status=%X)\n", Status);
return (Status);
}
break;
diff --git a/sys/contrib/dev/acpica/dbstats.c b/sys/contrib/dev/acpica/dbstats.c
index afb8b44..0f297d3 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: 34 $
+ * $Revision: 35 $
*
******************************************************************************/
@@ -418,7 +418,7 @@ AcpiDbDisplayStatistics (
AcpiOsPrintf ("ACPI Table Information:\n\n");
if (AcpiGbl_DSDT)
{
- AcpiOsPrintf ("DSDT Length:................% 7ld (0x%X)\n", AcpiGbl_DSDT->Length, AcpiGbl_DSDT->Length);
+ AcpiOsPrintf ("DSDT Length:................% 7ld (%X)\n", AcpiGbl_DSDT->Length, AcpiGbl_DSDT->Length);
}
break;
diff --git a/sys/contrib/dev/acpica/dbutils.c b/sys/contrib/dev/acpica/dbutils.c
index a520221..4af6b4e 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: 32 $
+ * $Revision: 33 $
*
******************************************************************************/
@@ -183,7 +183,7 @@ AcpiDbDumpBuffer (
UINT32 Address)
{
- AcpiOsPrintf ("\nLocation 0x%X:\n", Address);
+ AcpiOsPrintf ("\nLocation %X:\n", Address);
AcpiDbgLevel |= TRACE_TABLES;
AcpiCmDumpBuffer ((UINT8 *) Address, 64, DB_BYTE_DISPLAY, ACPI_UINT32_MAX);
@@ -231,7 +231,7 @@ AcpiDbDumpObject (
case ACPI_TYPE_NUMBER:
- AcpiOsPrintf ("[Number] Value: %ld (0x%lX)\n", ObjDesc->Number.Value, ObjDesc->Number.Value);
+ AcpiOsPrintf ("[Number] Value: %ld (%lX)\n", ObjDesc->Number.Value, ObjDesc->Number.Value);
break;
@@ -278,7 +278,7 @@ AcpiDbDumpObject (
default:
- AcpiOsPrintf ("[Unknown Type] 0x%X \n", ObjDesc->Type);
+ AcpiOsPrintf ("[Unknown Type] %X \n", ObjDesc->Type);
break;
}
}
diff --git a/sys/contrib/dev/acpica/dbxface.c b/sys/contrib/dev/acpica/dbxface.c
index 19cfafb..3a8792d 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: 31 $
+ * $Revision: 32 $
*
******************************************************************************/
@@ -167,7 +167,7 @@ AcpiDbSingleStep (
{
/* Hit the breakpoint, resume single step, reset breakpoint */
- AcpiOsPrintf ("***Break*** at AML offset 0x%X\n", Op->AmlOffset);
+ AcpiOsPrintf ("***Break*** at AML offset %X\n", Op->AmlOffset);
AcpiGbl_CmSingleStep = TRUE;
AcpiGbl_StepToNextCall = FALSE;
WalkState->MethodBreakpoint = 0;
diff --git a/sys/contrib/dev/acpica/dsmethod.c b/sys/contrib/dev/acpica/dsmethod.c
index 98a4ed5..cbd5fcb 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: 52 $
+ * $Revision: 53 $
*
*****************************************************************************/
@@ -524,7 +524,7 @@ AcpiDsRestartControlMethod (
* NULL if no return value
*/
- Status = AcpiDsResultStackPush (ReturnDesc, WalkState);
+ Status = AcpiDsResultPush (ReturnDesc, WalkState);
if (ACPI_FAILURE (Status))
{
AcpiCmRemoveReference (ReturnDesc);
diff --git a/sys/contrib/dev/acpica/dsmthdat.c b/sys/contrib/dev/acpica/dsmthdat.c
index e6b5cec..10a538f 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: 34 $
+ * $Revision: 36 $
*
******************************************************************************/
@@ -166,10 +166,10 @@ AcpiDsMethodDataInit (
{
MOVE_UNALIGNED32_TO_32 (&WalkState->Arguments[i].Name,
NAMEOF_ARG_NTE);
-
WalkState->Arguments[i].Name |= (i << 24);
WalkState->Arguments[i].DataType = ACPI_DESC_TYPE_NAMED;
- WalkState->Arguments[i].Type = INTERNAL_TYPE_METHOD_ARGUMENT;
+ WalkState->Arguments[i].Type = ACPI_TYPE_ANY;
+ WalkState->Arguments[i].Flags = ANOBJ_END_OF_PEER_LIST | ANOBJ_METHOD_ARG;
}
/* Init the method locals */
@@ -181,7 +181,8 @@ AcpiDsMethodDataInit (
WalkState->LocalVariables[i].Name |= (i << 24);
WalkState->LocalVariables[i].DataType = ACPI_DESC_TYPE_NAMED;
- WalkState->LocalVariables[i].Type = INTERNAL_TYPE_METHOD_LOCAL_VAR;
+ WalkState->LocalVariables[i].Type = ACPI_TYPE_ANY;
+ WalkState->LocalVariables[i].Flags = ANOBJ_END_OF_PEER_LIST | ANOBJ_METHOD_LOCAL;
}
return_ACPI_STATUS (AE_OK);
@@ -643,14 +644,14 @@ AcpiDsMethodDataGetValue (
{
case MTH_TYPE_ARG:
DEBUG_PRINT (ACPI_ERROR,
- ("DsMethodDataGetValue: Uninitialized Arg[%d] at entry %X\n",
+ ("DsMethodDataGetValue: Uninitialized Arg[%d] at entry %p\n",
Index, Entry));
return_ACPI_STATUS (AE_AML_UNINITIALIZED_ARG);
break;
case MTH_TYPE_LOCAL:
DEBUG_PRINT (ACPI_ERROR,
- ("DsMethodDataGetValue: Uninitialized Local[%d] at entry %X\n",
+ ("DsMethodDataGetValue: Uninitialized Local[%d] at entry %p\n",
Index, Entry));
return_ACPI_STATUS (AE_AML_UNINITIALIZED_LOCAL);
break;
diff --git a/sys/contrib/dev/acpica/dsobject.c b/sys/contrib/dev/acpica/dsobject.c
index b148d51..fa3910f 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: 51 $
+ * $Revision: 53 $
*
*****************************************************************************/
@@ -349,7 +349,7 @@ AcpiDsInitObjectFromOp (
/* First arg is a number */
- AcpiDsCreateOperand (WalkState, Op->Value.Arg);
+ AcpiDsCreateOperand (WalkState, Op->Value.Arg, 0);
ArgDesc = WalkState->Operands [WalkState->NumOperands - 1];
AcpiDsObjStackPop (1, WalkState);
@@ -559,13 +559,13 @@ AcpiDsBuildInternalSimpleObj (
if (Name)
{
- REPORT_WARNING (("Reference %s AML 0x%X not found\n",
+ REPORT_WARNING (("Reference %s AML %X not found\n",
Name, Op->AmlOffset));
AcpiCmFree (Name);
}
else
{
- REPORT_WARNING (("Reference %s AML 0x%X not found\n",
+ REPORT_WARNING (("Reference %s AML %X not found\n",
Op->Value.String, Op->AmlOffset));
}
*ObjDescPtr = NULL;
diff --git a/sys/contrib/dev/acpica/dsopcode.c b/sys/contrib/dev/acpica/dsopcode.c
index 086f5c2..e8082b8 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: 25 $
+ * $Revision: 28 $
*
*****************************************************************************/
@@ -290,8 +290,8 @@ AcpiDsGetRegionArguments (
Node = ObjDesc->Region.Node;
DEBUG_PRINT (TRACE_EXEC,
- ("DsGetRegionArguments: [%4.4s] OpRegion JIT Init\n",
- &Node->Name));
+ ("DsGetRegionArguments: [%4.4s] OpRegion Init at AML %p[%x]\n",
+ &Node->Name, ExtraDesc->Extra.Pcode, *(UINT32*) ExtraDesc->Extra.Pcode));
/*
* Allocate a new parser op to be the root of the parsed
@@ -478,7 +478,7 @@ AcpiDsEvalFieldUnitOperands (
/* Invalid parameters on object stack */
DEBUG_PRINT (ACPI_ERROR,
- ("ExecCreateField/%s: bad operand(s) (0x%X)\n",
+ ("ExecCreateField/%s: bad operand(s) (%X)\n",
AcpiPsGetOpcodeName (Op->Opcode), Status));
goto Cleanup;
@@ -625,7 +625,7 @@ AcpiDsEvalFieldUnitOperands (
!AcpiCmValidObjectType (SrcDesc->Common.Type))
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlExecCreateField: Tried to create field in invalid object type - 0x%X\n",
+ ("AmlExecCreateField: Tried to create field in invalid object type %X\n",
SrcDesc->Common.Type));
}
@@ -988,7 +988,8 @@ AcpiDsExecEndControlOp (
WalkState->ReturnDesc = WalkState->Operands[0];
}
- else if (WalkState->NumResults > 0)
+ else if ((WalkState->Results) &&
+ (WalkState->Results->Results.NumResults > 0))
{
/*
* The return value has come from a previous calculation.
@@ -998,13 +999,13 @@ AcpiDsExecEndControlOp (
* cease to exist at the end of the method.
*/
- Status = AcpiAmlResolveToValue (&WalkState->Results [0], WalkState);
+ Status = AcpiAmlResolveToValue (&WalkState->Results->Results.ObjDesc [0], WalkState);
if (ACPI_FAILURE (Status))
{
return (Status);
}
- WalkState->ReturnDesc = WalkState->Results [0];
+ WalkState->ReturnDesc = WalkState->Results->Results.ObjDesc [0];
}
else
diff --git a/sys/contrib/dev/acpica/dsutils.c b/sys/contrib/dev/acpica/dsutils.c
index 33f351a..825fa70 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: 48 $
+ * $Revision: 50 $
*
******************************************************************************/
@@ -241,6 +241,24 @@ AcpiDsIsResultUsed (
case OPTYPE_NAMED_OBJECT: /* Scope, method, etc. */
+ /*
+ * These opcodes allow TermArg(s) as operands and therefore
+ * method calls. The result is used.
+ */
+ if ((Op->Parent->Opcode == AML_REGION_OP) ||
+ (Op->Parent->Opcode == AML_CREATE_FIELD_OP) ||
+ (Op->Parent->Opcode == AML_BIT_FIELD_OP) ||
+ (Op->Parent->Opcode == AML_BYTE_FIELD_OP) ||
+ (Op->Parent->Opcode == AML_WORD_FIELD_OP) ||
+ (Op->Parent->Opcode == AML_DWORD_FIELD_OP) ||
+ (Op->Parent->Opcode == AML_QWORD_FIELD_OP))
+ {
+ DEBUG_PRINT (TRACE_DISPATCH,
+ ("DsIsResultUsed: Result used, [Region or CreateField] opcode=%X Op=%X\n",
+ Op->Opcode, Op));
+ return_VALUE (TRUE);
+ }
+
DEBUG_PRINT (TRACE_DISPATCH,
("DsIsResultUsed: Result not used, Parent opcode=%X Op=%X\n",
Op->Opcode, Op));
@@ -311,7 +329,7 @@ AcpiDsDeleteResultIfNotUsed (
* to ResultObj)
*/
- Status = AcpiDsResultStackPop (&ObjDesc, WalkState);
+ Status = AcpiDsResultPop (&ObjDesc, WalkState);
if (ACPI_SUCCESS (Status))
{
AcpiCmRemoveReference (ResultObj);
@@ -341,7 +359,8 @@ AcpiDsDeleteResultIfNotUsed (
ACPI_STATUS
AcpiDsCreateOperand (
ACPI_WALK_STATE *WalkState,
- ACPI_PARSE_OBJECT *Arg)
+ ACPI_PARSE_OBJECT *Arg,
+ UINT32 ArgIndex)
{
ACPI_STATUS Status = AE_OK;
NATIVE_CHAR *NameString;
@@ -513,7 +532,7 @@ AcpiDsCreateOperand (
* by the evaluation of this argument
*/
- Status = AcpiDsResultStackPop (&ObjDesc, WalkState);
+ Status = AcpiDsResultPopFromBottom (&ObjDesc, WalkState);
if (ACPI_FAILURE (Status))
{
/*
@@ -584,20 +603,17 @@ AcpiDsCreateOperands (
{
ACPI_STATUS Status = AE_OK;
ACPI_PARSE_OBJECT *Arg;
- UINT32 ArgsPushed = 0;
+ UINT32 ArgCount = 0;
FUNCTION_TRACE_PTR ("DsCreateOperands", FirstArg);
- Arg = FirstArg;
-
-
/* For all arguments in the list... */
+ Arg = FirstArg;
while (Arg)
{
-
- Status = AcpiDsCreateOperand (WalkState, Arg);
+ Status = AcpiDsCreateOperand (WalkState, Arg, ArgCount);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -605,12 +621,12 @@ AcpiDsCreateOperands (
DEBUG_PRINT (TRACE_DISPATCH,
("DsCreateOperands: Arg #%d (%p) done, Arg1=%p\n",
- ArgsPushed, Arg, FirstArg));
+ ArgCount, Arg, FirstArg));
/* Move on to next argument, if any */
Arg = Arg->Next;
- ArgsPushed++;
+ ArgCount++;
}
return_ACPI_STATUS (Status);
@@ -623,11 +639,11 @@ Cleanup:
* objects
*/
- AcpiDsObjStackPopAndDelete (ArgsPushed, WalkState);
+ AcpiDsObjStackPopAndDelete (ArgCount, WalkState);
DEBUG_PRINT (ACPI_ERROR,
("DsCreateOperands: Error while creating Arg %d - %s\n",
- (ArgsPushed+1), AcpiCmFormatException (Status)));
+ (ArgCount + 1), AcpiCmFormatException (Status)));
return_ACPI_STATUS (Status);
}
diff --git a/sys/contrib/dev/acpica/dswexec.c b/sys/contrib/dev/acpica/dswexec.c
index e23dc04..0ba3a08 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: 48 $
+ * $Revision: 50 $
*
*****************************************************************************/
@@ -159,7 +159,7 @@ AcpiDsGetPredicateValue (
if (HasResultObj)
{
- Status = AcpiDsResultStackPop (&ObjDesc, WalkState);
+ Status = AcpiDsResultPop (&ObjDesc, WalkState);
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
@@ -172,7 +172,7 @@ AcpiDsGetPredicateValue (
else
{
- Status = AcpiDsCreateOperand (WalkState, Op);
+ Status = AcpiDsCreateOperand (WalkState, Op, 0);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -352,6 +352,12 @@ AcpiDsExecBeginOp (
{
case OPTYPE_CONTROL:
+ Status = AcpiDsResultStackPush (WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
Status = AcpiDsExecBeginControlOp (WalkState, Op);
break;
@@ -370,6 +376,34 @@ AcpiDsExecBeginOp (
Status = AcpiDsLoad2BeginOp (Op->Opcode, Op, WalkState, NULL);
}
+
+
+ if (Op->Opcode == AML_REGION_OP)
+ {
+ Status = AcpiDsResultStackPush (WalkState);
+ }
+
+ break;
+
+
+ /* most operators with arguments */
+
+ case OPTYPE_MONADIC1:
+ case OPTYPE_DYADIC1:
+ case OPTYPE_MONADIC2:
+ case OPTYPE_MONADIC2R:
+ case OPTYPE_DYADIC2:
+ case OPTYPE_DYADIC2R:
+ case OPTYPE_DYADIC2S:
+ case OPTYPE_RECONFIGURATION:
+ case OPTYPE_INDEX:
+ case OPTYPE_MATCH:
+ case OPTYPE_FATAL:
+ case OPTYPE_CREATE_FIELD:
+
+ /* Start a new result/operand state */
+
+ Status = AcpiDsResultStackPush (WalkState);
break;
@@ -486,6 +520,8 @@ AcpiDsExecEndOp (
case OPTYPE_FATAL:
+ /* Build resolved operand stack */
+
Status = AcpiDsCreateOperands (WalkState, FirstArg);
if (ACPI_FAILURE (Status))
{
@@ -494,9 +530,17 @@ AcpiDsExecEndOp (
OperandIndex = WalkState->NumOperands - 1;
- switch (Optype)
+
+ /* Done with this result state (Now that operand stack is built) */
+
+ Status = AcpiDsResultStackPop (WalkState);
+ if (ACPI_FAILURE (Status))
{
+ goto Cleanup;
+ }
+ switch (Optype)
+ {
case OPTYPE_MONADIC1:
/* 1 Operand, 0 ExternalResult, 0 InternalResult */
@@ -510,11 +554,6 @@ AcpiDsExecEndOp (
/* 1 Operand, 0 ExternalResult, 1 InternalResult */
Status = AcpiAmlExecMonadic2 (Opcode, WalkState, &ResultObj);
- if (ACPI_SUCCESS (Status))
- {
- Status = AcpiDsResultStackPush (ResultObj, WalkState);
- }
-
break;
@@ -523,11 +562,6 @@ AcpiDsExecEndOp (
/* 1 Operand, 1 ExternalResult, 1 InternalResult */
Status = AcpiAmlExecMonadic2R (Opcode, WalkState, &ResultObj);
- if (ACPI_SUCCESS (Status))
- {
- Status = AcpiDsResultStackPush (ResultObj, WalkState);
- }
-
break;
@@ -536,7 +570,6 @@ AcpiDsExecEndOp (
/* 2 Operands, 0 ExternalResult, 0 InternalResult */
Status = AcpiAmlExecDyadic1 (Opcode, WalkState);
-
break;
@@ -545,11 +578,6 @@ AcpiDsExecEndOp (
/* 2 Operands, 0 ExternalResult, 1 InternalResult */
Status = AcpiAmlExecDyadic2 (Opcode, WalkState, &ResultObj);
- if (ACPI_SUCCESS (Status))
- {
- Status = AcpiDsResultStackPush (ResultObj, WalkState);
- }
-
break;
@@ -557,18 +585,7 @@ AcpiDsExecEndOp (
/* 2 Operands, 1 or 2 ExternalResults, 1 InternalResult */
-
- /* NEW INTERFACE:
- * Pass in WalkState, keep result obj but let interpreter
- * push the result
- */
-
Status = AcpiAmlExecDyadic2R (Opcode, WalkState, &ResultObj);
- if (ACPI_SUCCESS (Status))
- {
- Status = AcpiDsResultStackPush (ResultObj, WalkState);
- }
-
break;
@@ -577,56 +594,51 @@ AcpiDsExecEndOp (
/* 2 Operands, 0 ExternalResult, 1 InternalResult */
Status = AcpiAmlExecDyadic2S (Opcode, WalkState, &ResultObj);
- if (ACPI_SUCCESS (Status))
- {
- Status = AcpiDsResultStackPush (ResultObj, WalkState);
- }
-
break;
- case OPTYPE_RECONFIGURATION:
+ case OPTYPE_INDEX: /* Type 2 opcode with 3 operands */
- /* 1 or 2 operands, 0 Internal Result */
+ /* 3 Operands, 1 ExternalResult, 1 InternalResult */
- Status = AcpiAmlExecReconfiguration (Opcode, WalkState);
+ Status = AcpiAmlExecIndex (WalkState, &ResultObj);
break;
- case OPTYPE_FATAL:
+ case OPTYPE_MATCH: /* Type 2 opcode with 6 operands */
- /* 3 Operands, 0 ExternalResult, 0 InternalResult */
+ /* 6 Operands, 0 ExternalResult, 1 InternalResult */
- Status = AcpiAmlExecFatal (WalkState);
+ Status = AcpiAmlExecMatch (WalkState, &ResultObj);
break;
- case OPTYPE_INDEX: /* Type 2 opcode with 3 operands */
-
- /* 3 Operands, 1 ExternalResult, 1 InternalResult */
+ case OPTYPE_RECONFIGURATION:
- Status = AcpiAmlExecIndex (WalkState, &ResultObj);
- if (ACPI_SUCCESS (Status))
- {
- Status = AcpiDsResultStackPush (ResultObj, WalkState);
- }
+ /* 1 or 2 operands, 0 Internal Result */
+ Status = AcpiAmlExecReconfiguration (Opcode, WalkState);
break;
- case OPTYPE_MATCH: /* Type 2 opcode with 6 operands */
-
- /* 6 Operands, 0 ExternalResult, 1 InternalResult */
+ case OPTYPE_FATAL:
- Status = AcpiAmlExecMatch (WalkState, &ResultObj);
- if (ACPI_SUCCESS (Status))
- {
- Status = AcpiDsResultStackPush (ResultObj, WalkState);
- }
+ /* 3 Operands, 0 ExternalResult, 0 InternalResult */
+ Status = AcpiAmlExecFatal (WalkState);
break;
}
+ /*
+ * If a result object was returned from above, push it on the
+ * current result stack
+ */
+ if (ACPI_SUCCESS (Status) &&
+ ResultObj)
+ {
+ Status = AcpiDsResultPush (ResultObj, WalkState);
+ }
+
break;
@@ -636,6 +648,7 @@ AcpiDsExecEndOp (
Status = AcpiDsExecEndControlOp (WalkState, Op);
+ AcpiDsResultStackPop (WalkState);
break;
@@ -726,12 +739,16 @@ AcpiDsExecEndOp (
Op));
Status = AcpiDsEvalRegionOperands (WalkState, Op);
+ if (ACPI_FAILURE (Status))
+ {
+ break;
+ }
+ Status = AcpiDsResultStackPop (WalkState);
break;
case AML_METHOD_OP:
-
break;
diff --git a/sys/contrib/dev/acpica/dswload.c b/sys/contrib/dev/acpica/dswload.c
index c595c5d..0e560e1 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: 23 $
+ * $Revision: 24 $
*
*****************************************************************************/
@@ -860,7 +860,8 @@ AcpiDsLoad2EndOp (
Status = AcpiAmlExecCreateRegion (((ACPI_PARSE2_OBJECT *) Op)->Data,
((ACPI_PARSE2_OBJECT *) Op)->Length,
- Arg->Value.Integer, WalkState);
+ (ACPI_ADDRESS_SPACE_TYPE) Arg->Value.Integer,
+ WalkState);
DEBUG_PRINT (TRACE_DISPATCH,
("Completed OpRegion Init, Op=%p State=%p entry=%p\n",
diff --git a/sys/contrib/dev/acpica/dswscope.c b/sys/contrib/dev/acpica/dswscope.c
index 9d7f1da..b24e1ba 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: 39 $
+ * $Revision: 40 $
*
*****************************************************************************/
@@ -154,7 +154,7 @@ AcpiDsScopeStackClear (
WalkState->ScopeInfo = ScopeInfo->Scope.Next;
DEBUG_PRINT (TRACE_EXEC,
- ("Popped object type 0x%X\n", ScopeInfo->Common.Value));
+ ("Popped object type %X\n", ScopeInfo->Common.Value));
AcpiCmDeleteGenericState (ScopeInfo);
}
}
@@ -258,7 +258,7 @@ AcpiDsScopeStackPop (
}
DEBUG_PRINT (TRACE_EXEC,
- ("Popped object type 0x%X\n", ScopeInfo->Common.Value));
+ ("Popped object type %X\n", ScopeInfo->Common.Value));
AcpiCmDeleteGenericState (ScopeInfo);
diff --git a/sys/contrib/dev/acpica/dswstate.c b/sys/contrib/dev/acpica/dswstate.c
index 73d2973..9ec067b 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: 34 $
+ * $Revision: 35 $
*
*****************************************************************************/
@@ -142,20 +142,20 @@
******************************************************************************/
ACPI_STATUS
-AcpiDsResultStackClear (
+xxxAcpiDsResultStackClear (
ACPI_WALK_STATE *WalkState)
{
-
+/*
WalkState->NumResults = 0;
WalkState->CurrentResult = 0;
-
+*/
return (AE_OK);
}
/*******************************************************************************
*
- * FUNCTION: AcpiDsResultStackPush
+ * FUNCTION: AcpiDsResultInsert
*
* PARAMETERS: Object - Object to push
* WalkState - Current Walk state
@@ -167,34 +167,55 @@ AcpiDsResultStackClear (
******************************************************************************/
ACPI_STATUS
-AcpiDsResultStackPush (
+AcpiDsResultInsert (
void *Object,
+ UINT32 Index,
ACPI_WALK_STATE *WalkState)
{
+ ACPI_GENERIC_STATE *State;
- if (WalkState->NumResults >= OBJ_NUM_OPERANDS)
+ State = WalkState->Results;
+ if (!State)
{
DEBUG_PRINT (ACPI_ERROR,
- ("DsResultStackPush: overflow! Obj=%p State=%p Num=%X\n",
- Object, WalkState, WalkState->NumResults));
- return (AE_STACK_OVERFLOW);
+ ("DsResultInsert: No result object pushed! State=%p\n",
+ WalkState));
+ return (AE_NOT_EXIST);
+ }
+
+ if (Index >= OBJ_NUM_OPERANDS)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultInsert: Index out of range: %X Obj=%p State=%p Num=%X\n",
+ Index, Object, WalkState, State->Results.NumResults));
+ return (AE_BAD_PARAMETER);
+ }
+
+ if (!Object)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultInsert: Null Object! Index=%X Obj=%p State=%p Num=%X\n",
+ Index, Object, WalkState, State->Results.NumResults));
+ return (AE_BAD_PARAMETER);
}
- WalkState->Results [WalkState->NumResults] = Object;
- WalkState->NumResults++;
+ State->Results.ObjDesc [Index] = Object;
+ State->Results.NumResults++;
DEBUG_PRINT (TRACE_EXEC,
- ("DsResultStackPush: Obj=%p State=%p Num=%X Cur=%X\n",
- Object, WalkState, WalkState->NumResults, WalkState->CurrentResult));
+ ("DsResultStackPush: Obj=%p [%s] State=%p Num=%X Cur=%X\n",
+ Object, Object ? AcpiCmGetTypeName (((ACPI_OPERAND_OBJECT *) Object)->Common.Type) : "NULL",
+ WalkState, State->Results.NumResults, WalkState->CurrentResult));
return (AE_OK);
}
+
/*******************************************************************************
*
- * FUNCTION: AcpiDsResultStackPop
+ * FUNCTION: AcpiDsResultRemove
*
* PARAMETERS: Object - Where to return the popped object
* WalkState - Current Walk state
@@ -207,48 +228,339 @@ AcpiDsResultStackPush (
******************************************************************************/
ACPI_STATUS
-AcpiDsResultStackPop (
+AcpiDsResultRemove (
ACPI_OPERAND_OBJECT **Object,
+ UINT32 Index,
ACPI_WALK_STATE *WalkState)
{
+ ACPI_GENERIC_STATE *State;
- /* Check for stack underflow */
+ State = WalkState->Results;
+ if (!State)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultRemove: No result object pushed! State=%p\n",
+ WalkState));
+ return (AE_NOT_EXIST);
+ }
- if (WalkState->NumResults == 0)
+ if (Index >= OBJ_NUM_OPERANDS)
{
- DEBUG_PRINT (TRACE_EXEC,
- ("DsResultStackPop: Underflow - State=%p Cur=%X Num=%X\n",
- WalkState, WalkState->CurrentResult, WalkState->NumResults));
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultRemove: Index out of range: %X State=%p Num=%X\n",
+ Index, WalkState, State->Results.NumResults));
+ }
+
+
+ /* Check for a valid result object */
+
+ if (!State->Results.ObjDesc [Index])
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultStackRemove: Null operand! State=%p #Ops=%X, Index=%X\n",
+ WalkState, State->Results.NumResults, Index));
return (AE_AML_NO_OPERAND);
}
+ /* Remove the object */
- /* Pop the stack */
+ State->Results.NumResults--;
+
+ *Object = State->Results.ObjDesc [Index];
+ State->Results.ObjDesc [Index] = NULL;
+
+ DEBUG_PRINT (TRACE_EXEC,
+ ("DsResultStackRemove: Obj=%p [%s] Index=%X State=%p Num=%X\n",
+ *Object, (*Object) ? AcpiCmGetTypeName ((*Object)->Common.Type) : "NULL",
+ Index, WalkState, State->Results.NumResults));
+
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDsResultPop
+ *
+ * PARAMETERS: Object - Where to return the popped object
+ * WalkState - Current Walk state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Pop an object off the bottom of this walk's result stack. In
+ * other words, this is a FIFO.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDsResultPop (
+ ACPI_OPERAND_OBJECT **Object,
+ ACPI_WALK_STATE *WalkState)
+{
+ UINT32 Index;
+ ACPI_GENERIC_STATE *State;
+
+
+ State = WalkState->Results;
+ if (!State)
+ {
+ return (AE_OK);
+ }
+
+
+ if (!State->Results.NumResults)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultPop: No result objects! State=%p\n",
+ WalkState));
+ return (AE_STACK_UNDERFLOW);
+ }
+
+ /* Remove top element */
+
+ State->Results.NumResults--;
+
+ for (Index = OBJ_NUM_OPERANDS; Index; Index--)
+ {
+ /* Check for a valid result object */
+
+ if (State->Results.ObjDesc [Index -1])
+ {
+ *Object = State->Results.ObjDesc [Index -1];
+ State->Results.ObjDesc [Index -1] = NULL;
+
+ DEBUG_PRINT (TRACE_EXEC,
+ ("DsResultStackRemove: Obj=%p [%s] Index=%X State=%p Num=%X\n",
+ *Object, (*Object) ? AcpiCmGetTypeName ((*Object)->Common.Type) : "NULL",
+ Index -1, WalkState, State->Results.NumResults));
+
+ return (AE_OK);
+ }
+ }
+
+
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultPop: No result objects! State=%p\n",
+ WalkState));
+ return (AE_STACK_UNDERFLOW);
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDsResultPop
+ *
+ * PARAMETERS: Object - Where to return the popped object
+ * WalkState - Current Walk state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Pop an object off the bottom of this walk's result stack. In
+ * other words, this is a FIFO.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDsResultPopFromBottom (
+ ACPI_OPERAND_OBJECT **Object,
+ ACPI_WALK_STATE *WalkState)
+{
+ UINT32 Index;
+ ACPI_GENERIC_STATE *State;
+
+
+ State = WalkState->Results;
+ if (!State)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultPopFromBottom: Warning: No result object pushed! State=%p\n",
+ WalkState));
+ return (AE_NOT_EXIST);
+ }
+
+
+ if (!State->Results.NumResults)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultPopFromBottom: No result objects! State=%p\n",
+ WalkState));
+ return (AE_STACK_UNDERFLOW);
+ }
+
+ /* Remove Bottom element */
+
+ *Object = State->Results.ObjDesc [0];
+
+
+ /* Push entire stack down one element */
+
+ for (Index = 0; Index < State->Results.NumResults; Index++)
+ {
+ State->Results.ObjDesc [Index] = State->Results.ObjDesc [Index + 1];
+ }
- WalkState->NumResults--;
+ State->Results.NumResults--;
/* Check for a valid result object */
- if (!WalkState->Results [WalkState->NumResults])
+ if (!*Object)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultPopFromBottom: Null operand! State=%p #Ops=%X, Index=%X\n",
+ WalkState, State->Results.NumResults, Index));
+ return (AE_AML_NO_OPERAND);
+ }
+
+ DEBUG_PRINT (TRACE_EXEC,
+ ("DsResultPopFromBottom: Obj=%p [%s], Results=%p State=%p\n",
+ *Object, (*Object) ? AcpiCmGetTypeName ((*Object)->Common.Type) : "NULL",
+ State, WalkState));
+
+
+ return (AE_OK);
+}
+
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDsResultPop
+ *
+ * PARAMETERS: Object - Where to return the popped object
+ * WalkState - Current Walk state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Pop an object off the bottom of this walk's result stack. In
+ * other words, this is a FIFO.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDsResultPush (
+ ACPI_OPERAND_OBJECT *Object,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_GENERIC_STATE *State;
+
+
+ State = WalkState->Results;
+ if (!State)
+ {
+ return (AE_OK);
+ }
+
+ if (State->Results.NumResults == OBJ_NUM_OPERANDS)
{
DEBUG_PRINT (ACPI_ERROR,
- ("DsResultStackPop: Null operand! State=%p #Ops=%X\n",
- WalkState, WalkState->NumResults));
+ ("DsResultPush: Result stack overflow: Obj=%p State=%p Num=%X\n",
+ Object, WalkState, State->Results.NumResults));
+ return (AE_STACK_OVERFLOW);
+ }
+
+ if (!Object)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultPush: Null Object! Obj=%p State=%p Num=%X\n",
+ Object, WalkState, State->Results.NumResults));
+ return (AE_BAD_PARAMETER);
+ }
+
+
+ State->Results.ObjDesc [State->Results.NumResults] = Object;
+ State->Results.NumResults++;
+
+ DEBUG_PRINT (TRACE_EXEC,
+ ("DsResultPush: Obj=%p [%s] State=%p Num=%X Cur=%X\n",
+ Object, Object ? AcpiCmGetTypeName (((ACPI_OPERAND_OBJECT *) Object)->Common.Type) : "NULL",
+ WalkState, State->Results.NumResults, WalkState->CurrentResult));
+
+ return (AE_OK);
+}
+
+
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDsResultStackPush
+ *
+ * PARAMETERS: Object - Object to push
+ * WalkState - Current Walk state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION:
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDsResultStackPush (
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_GENERIC_STATE *State;
+
+
+ State = AcpiCmCreateGenericState ();
+ if (!State)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ AcpiCmPushGenericState (&WalkState->Results, State);
+
+ DEBUG_PRINT (TRACE_EXEC,
+ ("DsResultStackPush: Results=%p State=%p\n",
+ State, WalkState));
+
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDsResultStackPop
+ *
+ * PARAMETERS: WalkState - Current Walk state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION:
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDsResultStackPop (
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_GENERIC_STATE *State;
+
+
+ /* Check for stack underflow */
+
+ if (WalkState->Results == NULL)
+ {
+ DEBUG_PRINT (TRACE_EXEC,
+ ("DsResultStackPop: Underflow - State=%p\n",
+ WalkState));
return (AE_AML_NO_OPERAND);
}
- *Object = WalkState->Results [WalkState->NumResults];
- WalkState->Results [WalkState->NumResults] = NULL;
+
+ State = AcpiCmPopGenericState (&WalkState->Results);
DEBUG_PRINT (TRACE_EXEC,
- ("DsResultStackPop: Obj=%p State=%p Num=%X Cur=%X\n",
- *Object, WalkState, WalkState->NumResults, WalkState->CurrentResult));
+ ("DsResultStackPop: Result=%p RemainingResults=%X State=%p\n",
+ State, State->Results.NumResults, WalkState));
+
+ AcpiCmDeleteGenericState (State);
return (AE_OK);
}
+
+
/*******************************************************************************
*
* FUNCTION: AcpiDsObjStackDeleteAll
@@ -322,8 +634,9 @@ AcpiDsObjStackPush (
WalkState->Operands [WalkState->NumOperands] = Object;
WalkState->NumOperands++;
- DEBUG_PRINT (TRACE_EXEC, ("DsObjStackPush: Obj=%p State=%p #Ops=%X\n",
- Object, WalkState, WalkState->NumOperands));
+ DEBUG_PRINT (TRACE_EXEC, ("DsObjStackPush: Obj=%p [%s] State=%p #Ops=%X\n",
+ Object, AcpiCmGetTypeName (((ACPI_OPERAND_OBJECT *) Object)->Common.Type),
+ WalkState, WalkState->NumOperands));
return (AE_OK);
}
@@ -380,7 +693,8 @@ AcpiDsObjStackPopObject (
*Object = WalkState->Operands [WalkState->NumOperands];
WalkState->Operands [WalkState->NumOperands] = NULL;
- DEBUG_PRINT (TRACE_EXEC, ("DsObjStackPopObject: State=%p #Ops=%X\n",
+ DEBUG_PRINT (TRACE_EXEC, ("DsObjStackPopObject: Obj=%p [%s] State=%p #Ops=%X\n",
+ *Object, AcpiCmGetTypeName ((*Object)->Common.Type),
WalkState, WalkState->NumOperands));
return (AE_OK);
@@ -749,6 +1063,7 @@ AcpiDsDeleteWalkState (
return;
}
+
/* Always must free any linked control states */
while (WalkState->ControlState)
@@ -759,7 +1074,6 @@ AcpiDsDeleteWalkState (
AcpiCmDeleteGenericState (State);
}
-
/* Always must free any linked parse states */
while (WalkState->ScopeInfo)
@@ -770,6 +1084,18 @@ AcpiDsDeleteWalkState (
AcpiCmDeleteGenericState (State);
}
+ /* Always must free any stacked result states */
+
+ while (WalkState->Results)
+ {
+ State = WalkState->Results;
+ WalkState->Results = State->Common.Next;
+
+ AcpiCmDeleteGenericState (State);
+ }
+
+
+
/* If walk cache is full, just free this wallkstate object */
if (AcpiGbl_WalkStateCacheDepth >= MAX_WALK_CACHE_DEPTH)
diff --git a/sys/contrib/dev/acpica/evevent.c b/sys/contrib/dev/acpica/evevent.c
index 5cdfb7f..2e836c0 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: 26 $
+ * $Revision: 30 $
*
*****************************************************************************/
@@ -393,7 +393,7 @@ AcpiEvFixedEventDispatch (
RegisterId, 0);
REPORT_ERROR (
- ("EvGpeDispatch: No installed handler for fixed event [0x%08X]\n",
+ ("EvGpeDispatch: No installed handler for fixed event [%08X]\n",
Event));
return (INTERRUPT_NOT_HANDLED);
@@ -559,7 +559,7 @@ AcpiEvGpeInitialize (void)
}
DEBUG_PRINT (ACPI_INFO,
- ("GPE registers: %d@%p (Blk0) %d@%p (Blk1)\n",
+ ("GPE registers: %X@%p (Blk0) %X@%p (Blk1)\n",
Gpe0RegisterCount, AcpiGbl_FADT->XGpe0Blk.Address, Gpe1RegisterCount,
AcpiGbl_FADT->XGpe1Blk.Address));
@@ -665,7 +665,7 @@ AcpiEvSaveMethodInfo (
AcpiHwEnableGpe (GpeNumber);
DEBUG_PRINT (ACPI_INFO,
- ("EvSaveMethodInfo: Registered GPE method %s as GPE number %d\n",
+ ("EvSaveMethodInfo: Registered GPE method %s as GPE number %X\n",
Name, GpeNumber));
return (AE_OK);
}
@@ -812,9 +812,9 @@ AcpiEvAsynchExecuteGpeMethod (
FUNCTION_TRACE ("EvAsynchExecuteGpeMethod");
-
- /* Take a snapshot of the GPE info for this level */
-
+ /*
+ * Take a snapshot of the GPE info for this level
+ */
AcpiCmAcquireMutex (ACPI_MTX_EVENTS);
GpeInfo = AcpiGbl_GpeInfo [GpeNumber];
AcpiCmReleaseMutex (ACPI_MTX_EVENTS);
@@ -822,7 +822,7 @@ AcpiEvAsynchExecuteGpeMethod (
/*
* Method Handler (_Lxx, _Exx):
* ----------------------------
- * AcpiEvaluate the _Lxx/_Exx control method that corresponds to this GPE.
+ * Evaluate the _Lxx/_Exx control method that corresponds to this GPE.
*/
if (GpeInfo.MethodHandle)
{
@@ -832,9 +832,7 @@ AcpiEvAsynchExecuteGpeMethod (
/*
* Level-Triggered?
* ----------------
- * If level-triggered, clear the GPE status bit after execution. Note
- * that edge-triggered events are cleared prior to calling (via DPC)
- * this function.
+ * If level-triggered we clear the GPE status bit after handling the event.
*/
if (GpeInfo.Type & ACPI_EVENT_LEVEL_TRIGGERED)
{
@@ -873,18 +871,18 @@ UINT32
AcpiEvGpeDispatch (
UINT32 GpeNumber)
{
- FUNCTION_TRACE ("EvGpeDispatch");
-
+ ACPI_GPE_LEVEL_INFO GpeInfo;
- DEBUG_PRINT (ACPI_INFO, ("GPE [%d] event occurred.\n", GpeNumber));
+ FUNCTION_TRACE ("EvGpeDispatch");
/*DEBUG_INCREMENT_EVENT_COUNT (EVENT_GENERAL);*/
- /* Ensure that we have a valid GPE number */
-
+ /*
+ * Valid GPE number?
+ */
if (AcpiGbl_GpeValid[GpeNumber] == ACPI_GPE_INVALID)
{
- DEBUG_PRINT (ACPI_ERROR, ("Invalid GPE [%d].\n", GpeNumber));
+ DEBUG_PRINT (ACPI_ERROR, ("Invalid GPE bit [%X].\n", GpeNumber));
return_VALUE (INTERRUPT_NOT_HANDLED);
}
@@ -893,70 +891,65 @@ AcpiEvGpeDispatch (
*/
AcpiHwDisableGpe (GpeNumber);
- /*
- * Edge-Triggered?
- * ---------------
- * If edge-triggered, clear the GPE status bit now. Note that
- * level-triggered events are cleared after the GPE is serviced
- * (see AcpiEvAsynchExecuteGpeMethod).
- */
- if (AcpiGbl_GpeInfo[GpeNumber].Type & ACPI_EVENT_EDGE_TRIGGERED)
+ GpeInfo = AcpiGbl_GpeInfo [GpeNumber];
+
+ /*
+ * Edge-Triggered?
+ * ---------------
+ * If edge-triggered, clear the GPE status bit now. Note that
+ * level-triggered events are cleared after the GPE is serviced.
+ */
+ if (GpeInfo.Type & ACPI_EVENT_EDGE_TRIGGERED)
{
- AcpiHwClearGpe (GpeNumber);
- }
+ AcpiHwClearGpe (GpeNumber);
+ }
- /*
- * Queue-up the Handler:
- * ---------------------
- * Queue the handler, which is either an installable function handler
- * (e.g. EC) or a control method (e.g. _Lxx/_Exx) for later execution.
- */
- if (AcpiGbl_GpeInfo[GpeNumber].MethodHandle)
+ /*
+ * Function Handler (e.g. EC)?
+ */
+ if (GpeInfo.Handler)
{
- if (ACPI_FAILURE (AcpiOsQueueForExecution (OSD_PRIORITY_GPE,
- AcpiEvAsynchExecuteGpeMethod,
- (void*)(NATIVE_UINT)GpeNumber)))
+ /* Invoke function handler (at interrupt level). */
+ GpeInfo.Handler (GpeInfo.Context);
+
+ /* Level-Triggered? */
+ if (GpeInfo.Type & ACPI_EVENT_LEVEL_TRIGGERED)
{
- /*
- * Shoudn't occur, but if it does report an error. Note that
- * the GPE will remain disabled until the ACPI Core Subsystem
- * is restarted, or the handler is removed/reinstalled.
- */
- REPORT_ERROR (
- ("EvGpeDispatch: Unable to queue the handler for GPE [0x%08X]\n",
- GpeNumber));
+ AcpiHwClearGpe (GpeNumber);
+ }
+
+ /* Enable GPE */
+ AcpiHwEnableGpe (GpeNumber);
}
- }
- else if (AcpiGbl_GpeInfo[GpeNumber].Handler)
- {
- ACPI_GPE_LEVEL_INFO GpeInfo;
/*
- * Function Handler (e.g. EC):
- * ---------------------------
- * Execute the installed function handler to handle this event.
- * Without queueing.
+ * Method Handler (e.g. _Exx/_Lxx)?
*/
- AcpiCmAcquireMutex (ACPI_MTX_EVENTS);
- GpeInfo = AcpiGbl_GpeInfo [GpeNumber];
- AcpiCmReleaseMutex (ACPI_MTX_EVENTS);
+ else if (GpeInfo.MethodHandle)
+ {
+ if (ACPI_FAILURE(AcpiOsQueueForExecution (OSD_PRIORITY_GPE,
+ AcpiEvAsynchExecuteGpeMethod, (void*)(NATIVE_UINT)GpeNumber)))
+ {
+ /*
+ * Shoudn't occur, but if it does report an error. Note that
+ * the GPE will remain disabled until the ACPI Core Subsystem
+ * is restarted, or the handler is removed/reinstalled.
+ */
+ REPORT_ERROR (("AcpiEvGpeDispatch: Unable to queue handler for GPE bit [%X]\n", GpeNumber));
+ }
+ }
+ /*
+ * No Handler? Report an error and leave the GPE disabled.
+ */
+ else
+ {
+ REPORT_ERROR (("AcpiEvGpeDispatch: No installed handler for GPE [%X]\n", GpeNumber));
- if (GpeInfo.Handler)
+ /* Level-Triggered? */
+ if (GpeInfo.Type & ACPI_EVENT_LEVEL_TRIGGERED)
{
- GpeInfo.Handler (GpeInfo.Context);
+ AcpiHwClearGpe (GpeNumber);
+ }
}
- }
- /*
- * Non Handled GPEs:
- * -----------------
- * GPEs without handlers are disabled and kept that way until a handler
- * is registered for them.
- */
- else
- {
- REPORT_ERROR (
- ("EvGpeDispatch: No installed handler for GPE [0x%08X]\n",
- GpeNumber));
- }
return_VALUE (INTERRUPT_HANDLED);
}
diff --git a/sys/contrib/dev/acpica/evmisc.c b/sys/contrib/dev/acpica/evmisc.c
index 92fe7a27..0ecb991 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: 19 $
+ * $Revision: 20 $
*
*****************************************************************************/
@@ -157,7 +157,7 @@ AcpiEvNotifyDispatch (
DEBUG_PRINT (ACPI_INFO,
- ("Dispatching Notify(%d) on device %p\n", NotifyValue, Device));
+ ("Dispatching Notify(%X) on device %p\n", NotifyValue, Device));
switch (NotifyValue)
{
diff --git a/sys/contrib/dev/acpica/evregion.c b/sys/contrib/dev/acpica/evregion.c
index 79ff3e7..0039c070 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: 88 $
+ * $Revision: 90 $
*
*****************************************************************************/
@@ -311,7 +311,7 @@ AcpiEvAddressSpaceDispatch (
if (!HandlerDesc)
{
DEBUG_PRINT (TRACE_OPREGION,
- ("Dispatch address access region 0x%p, no handler\n", RegionObj));
+ ("Dispatch address access region %p, no handler\n", RegionObj));
return_ACPI_STATUS(AE_NOT_EXIST);
}
@@ -356,7 +356,7 @@ AcpiEvAddressSpaceDispatch (
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("EvAddressSpaceDispatch: %s from region init, SpaceID %d\n",
+ ("EvAddressSpaceDispatch: %s from region init, SpaceID %X\n",
AcpiCmFormatException (Status), RegionObj->Region.SpaceId));
return_ACPI_STATUS(Status);
}
@@ -376,7 +376,7 @@ AcpiEvAddressSpaceDispatch (
Handler = HandlerDesc->AddrHandler.Handler;
DEBUG_PRINT ((TRACE_OPREGION | VERBOSE_INFO),
- ("Addrhandler 0x%p (0x%p), Address 0x%p\n",
+ ("Addrhandler %p (%p), Address %p\n",
&RegionObj->Region.AddrHandler->AddrHandler, Handler, Address));
if (!(HandlerDesc->AddrHandler.Flags & ADDR_HANDLER_DEFAULT_INSTALLED))
@@ -399,7 +399,7 @@ AcpiEvAddressSpaceDispatch (
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("EvAddressSpaceDispatch: %s from handler, SpaceID %d\n",
+ ("EvAddressSpaceDispatch: %s from handler, SpaceID %X\n",
AcpiCmFormatException (Status), RegionObj->Region.SpaceId));
}
@@ -473,7 +473,7 @@ AcpiEvDisassociateRegionFromHandler(
if (ObjDesc == RegionObj)
{
DEBUG_PRINT (TRACE_OPREGION,
- ("Removing Region 0x%p from address handler 0x%p\n",
+ ("Removing Region %p from address handler %p\n",
RegionObj, HandlerObj));
/*
* This is it, remove it from the handler's list
@@ -500,7 +500,7 @@ AcpiEvDisassociateRegionFromHandler(
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("EvDisassociateRegionFromHandler: %s from region init, SpaceID %d\n",
+ ("EvDisassociateRegionFromHandler: %s from region init, SpaceID %X\n",
AcpiCmFormatException (Status), RegionObj->Region.SpaceId));
}
@@ -535,7 +535,7 @@ AcpiEvDisassociateRegionFromHandler(
* If we get here, the region was not in the handler's region list
*/
DEBUG_PRINT (TRACE_OPREGION,
- ("Cannot remove region 0x%p from address handler 0x%p\n",
+ ("Cannot remove region %p from address handler %p\n",
RegionObj, HandlerObj));
return_VOID;
@@ -568,7 +568,7 @@ AcpiEvAssociateRegionAndHandler (
FUNCTION_TRACE ("EvAssociateRegionAndHandler");
- DEBUG_PRINT (TRACE_OPREGION, ("Adding Region 0x%p to address handler 0x%p\n",
+ DEBUG_PRINT (TRACE_OPREGION, ("Adding Region %p to address handler %p\n",
RegionObj, HandlerObj));
ACPI_ASSERT (RegionObj->Region.SpaceId == HandlerObj->AddrHandler.SpaceId);
@@ -705,8 +705,8 @@ AcpiEvAddrHandlerHelper (
*/
DEBUG_PRINT (TRACE_OPREGION,
- ("Found handler for %s in device 0x%p (0x%p) handler 0x%p\n",
- AcpiGbl_RegionTypes[HandlerObj->AddrHandler.SpaceId], ObjDesc, TmpObj, HandlerObj));
+ ("Found handler for region %s in device %p(%p) handler %p\n",
+ AcpiCmGetRegionName (HandlerObj->AddrHandler.SpaceId), ObjDesc, TmpObj, HandlerObj));
/*
* Since the object we found it on was a device, then it
diff --git a/sys/contrib/dev/acpica/evrgnini.c b/sys/contrib/dev/acpica/evrgnini.c
index 3522e77..c344b9f 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: 29 $
+ * $Revision: 31 $
*
*****************************************************************************/
@@ -255,7 +255,7 @@ AcpiEvPciConfigRegionSetup (
* routine checks before we get here, but we check again just in case.
*/
DEBUG_PRINT (TRACE_OPREGION,
- ("Attempting to init a region 0x%X, with no handler\n", RegionObj));
+ ("Attempting to init a region %X, with no handler\n", RegionObj));
return_ACPI_STATUS(AE_NOT_EXIST);
}
@@ -440,7 +440,7 @@ AcpiEvInitializeRegion (
{
ACPI_OPERAND_OBJECT *HandlerObj;
ACPI_OPERAND_OBJECT *ObjDesc;
- UINT32 SpaceId;
+ ACPI_ADDRESS_SPACE_TYPE SpaceId;
ACPI_NAMESPACE_NODE *Node;
ACPI_STATUS Status;
ACPI_NAMESPACE_NODE *MethodNode;
@@ -522,7 +522,7 @@ AcpiEvInitializeRegion (
if (HandlerObj->AddrHandler.SpaceId == SpaceId)
{
DEBUG_PRINT (TRACE_OPREGION,
- ("Found handler (0x%X) for region 0x%X in obj 0x%X\n",
+ ("Found handler %p for region %p in obj %p\n",
HandlerObj, RegionObj, ObjDesc));
/*
@@ -549,8 +549,8 @@ AcpiEvInitializeRegion (
* If we get here, there is no handler for this region
*/
DEBUG_PRINT (TRACE_OPREGION,
- ("No handler currently for SpaceId[%d] (Initializing region 0x%X)\n",
- SpaceId, RegionObj));
+ ("No handler for RegionType %s(%X) (RegionObj %p)\n",
+ AcpiCmGetRegionName (SpaceId), SpaceId, RegionObj));
return_ACPI_STATUS (AE_NOT_EXIST);
}
diff --git a/sys/contrib/dev/acpica/evxface.c b/sys/contrib/dev/acpica/evxface.c
index 4a508e2..df51333 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: 96 $
+ * $Revision: 97 $
*
*****************************************************************************/
@@ -195,7 +195,7 @@ AcpiInstallFixedEventHandler (
}
DEBUG_PRINT (ACPI_INFO,
- ("Enabled fixed event %d. Handler: %x\n", Event, Handler));
+ ("Enabled fixed event %X, Handler=%p\n", Event, Handler));
Cleanup:
@@ -256,7 +256,7 @@ AcpiRemoveFixedEventHandler (
AcpiGbl_FixedEventHandlers[Event].Handler = NULL;
AcpiGbl_FixedEventHandlers[Event].Context = NULL;
- DEBUG_PRINT (ACPI_INFO, ("Disabled fixed event %d.\n", Event));
+ DEBUG_PRINT (ACPI_INFO, ("Disabled fixed event %X.\n", Event));
AcpiCmReleaseMutex (ACPI_MTX_EVENTS);
return_ACPI_STATUS (Status);
diff --git a/sys/contrib/dev/acpica/evxfregn.c b/sys/contrib/dev/acpica/evxfregn.c
index fad4040..4f4b089 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: 22 $
+ * $Revision: 24 $
*
*****************************************************************************/
@@ -270,7 +270,7 @@ AcpiInstallAddressSpaceHandler (
else
{
DEBUG_PRINT (TRACE_OPREGION,
- ("Creating object on Device 0x%X while installing handler\n",
+ ("Creating object on Device %p while installing handler\n",
Node));
/* ObjDesc does not exist, create one */
@@ -307,8 +307,8 @@ AcpiInstallAddressSpaceHandler (
}
DEBUG_PRINT (TRACE_OPREGION,
- ("Installing address handler for %s on Device 0x%p (0x%p)\n",
- AcpiGbl_RegionTypes[SpaceId], Node, ObjDesc));
+ ("Installing address handler for region %s(%X) on Device %p(%p)\n",
+ AcpiCmGetRegionName (SpaceId), SpaceId, Node, ObjDesc));
/*
* Now we can install the handler
@@ -447,8 +447,8 @@ AcpiRemoveAddressSpaceHandler (
* Got it, first dereference this in the Regions
*/
DEBUG_PRINT (TRACE_OPREGION,
- ("Removing address handler 0x%p (0x%p) for %s on Device 0x%p (0x%p)\n",
- HandlerObj, Handler, AcpiGbl_RegionTypes[SpaceId],
+ ("Removing address handler %p(%p) for region %s on Device %p(%p)\n",
+ HandlerObj, Handler, AcpiCmGetRegionName (SpaceId),
Node, ObjDesc));
RegionObj = HandlerObj->AddrHandler.RegionList;
@@ -501,8 +501,8 @@ AcpiRemoveAddressSpaceHandler (
* The handler does not exist
*/
DEBUG_PRINT (TRACE_OPREGION,
- ("Unable to remove address handler 0x%p for %s, DeviceNode 0x%p, obj 0x%p\n",
- Handler, AcpiGbl_RegionTypes[SpaceId], Node, ObjDesc));
+ ("Unable to remove address handler %p for %s(%X), DevNode %p, obj %p\n",
+ Handler, AcpiCmGetRegionName (SpaceId), SpaceId, Node, ObjDesc));
Status = AE_NOT_EXIST;
diff --git a/sys/contrib/dev/acpica/exconfig.c b/sys/contrib/dev/acpica/exconfig.c
index cbb7a1e..db3c767 100644
--- a/sys/contrib/dev/acpica/exconfig.c
+++ b/sys/contrib/dev/acpica/exconfig.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amconfig - Namespace reconfiguration (Load/Unload opcodes)
- * $Revision: 25 $
+ * $Revision: 26 $
*
*****************************************************************************/
@@ -392,7 +392,7 @@ AcpiAmlExecReconfiguration (
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("ExecReconfiguration/AML_LOAD_OP: bad operand(s) (0x%X)\n",
+ ("ExecReconfiguration/AML_LOAD_OP: bad operand(s) (%X)\n",
Status));
AcpiCmRemoveReference (RegionDesc);
@@ -408,7 +408,7 @@ AcpiAmlExecReconfiguration (
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("ExecReconfiguration/AML_UNLOAD_OP: bad operand(s) (0x%X)\n",
+ ("ExecReconfiguration/AML_UNLOAD_OP: bad operand(s) (%X)\n",
Status));
return_ACPI_STATUS (Status);
diff --git a/sys/contrib/dev/acpica/excreate.c b/sys/contrib/dev/acpica/excreate.c
index 5099cfb..4826be9 100644
--- a/sys/contrib/dev/acpica/excreate.c
+++ b/sys/contrib/dev/acpica/excreate.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amcreate - Named object creation
- * $Revision: 50 $
+ * $Revision: 51 $
*
*****************************************************************************/
@@ -520,7 +520,7 @@ ACPI_STATUS
AcpiAmlExecCreateRegion (
UINT8 *AmlPtr,
UINT32 AmlLength,
- UINT32 RegionSpace,
+ UINT8 RegionSpace,
ACPI_WALK_STATE *WalkState)
{
ACPI_STATUS Status;
@@ -531,21 +531,19 @@ AcpiAmlExecCreateRegion (
FUNCTION_TRACE ("AmlExecCreateRegion");
- if (RegionSpace >= NUM_REGION_TYPES)
+ /*
+ * Space ID must be one of the predefined IDs, or in the user-defined
+ * range
+ */
+ if ((RegionSpace >= NUM_REGION_TYPES) &&
+ (RegionSpace < USER_REGION_BEGIN))
{
- /* TBD: [Future] In ACPI 2.0, valid region space
- * includes types 0-6 (Adding CMOS and PCIBARTarget).
- * Also, types 0x80-0xff are defined as "OEM Region
- * Space handler"
- *
- * Should this return an error, or should we just keep
- * going? How do we handle the OEM region handlers?
- */
- REPORT_WARNING (("Invalid AddressSpace type %X\n", RegionSpace));
+ REPORT_ERROR (("Invalid AddressSpace type %X\n", RegionSpace));
+ return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID);
}
- DEBUG_PRINT (TRACE_LOAD, ("AmlDoNode: Region Type [%s]\n",
- AcpiGbl_RegionTypes[RegionSpace]));
+ DEBUG_PRINT (TRACE_LOAD, ("AmlExecCreateRegion: Region Type - %s (%X)\n",
+ AcpiCmGetRegionName (RegionSpace), RegionSpace));
/* Get the Node from the object stack */
@@ -583,7 +581,7 @@ AcpiAmlExecCreateRegion (
/* Init the region from the operands */
- ObjDesc->Region.SpaceId = (UINT8) RegionSpace;
+ ObjDesc->Region.SpaceId = RegionSpace;
ObjDesc->Region.Address = 0;
ObjDesc->Region.Length = 0;
diff --git a/sys/contrib/dev/acpica/exdump.c b/sys/contrib/dev/acpica/exdump.c
index a3662d7..bdab038 100644
--- a/sys/contrib/dev/acpica/exdump.c
+++ b/sys/contrib/dev/acpica/exdump.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amdump - Interpreter debug output routines
- * $Revision: 94 $
+ * $Revision: 96 $
*
*****************************************************************************/
@@ -384,8 +384,8 @@ AcpiAmlDumpOperand (
case ACPI_TYPE_BUFFER:
- DEBUG_PRINT_RAW (ACPI_INFO, ("Buffer[%d] seq %lx @ %p \n",
- EntryDesc->Buffer.Length, EntryDesc->Buffer.Sequence,
+ DEBUG_PRINT_RAW (ACPI_INFO, ("Buffer len %X @ %p \n",
+ EntryDesc->Buffer.Length,
EntryDesc->Buffer.Pointer));
Length = EntryDesc->Buffer.Length;
@@ -414,28 +414,28 @@ AcpiAmlDumpOperand (
case ACPI_TYPE_NUMBER:
- DEBUG_PRINT_RAW (ACPI_INFO, ("Number 0x%lx\n",
+ DEBUG_PRINT_RAW (ACPI_INFO, ("Number %lX\n",
EntryDesc->Number.Value));
break;
case INTERNAL_TYPE_IF:
- DEBUG_PRINT_RAW (ACPI_INFO, ("If [Number] 0x%lx\n",
+ DEBUG_PRINT_RAW (ACPI_INFO, ("If [Number] %lX\n",
EntryDesc->Number.Value));
break;
case INTERNAL_TYPE_WHILE:
- DEBUG_PRINT_RAW (ACPI_INFO, ("While [Number] 0x%lx\n",
+ DEBUG_PRINT_RAW (ACPI_INFO, ("While [Number] %lX\n",
EntryDesc->Number.Value));
break;
case ACPI_TYPE_PACKAGE:
- DEBUG_PRINT_RAW (ACPI_INFO, ("Package[%d] @ %p\n",
+ DEBUG_PRINT_RAW (ACPI_INFO, ("Package count %X @ %p\n",
EntryDesc->Package.Count, EntryDesc->Package.Elements));
@@ -465,16 +465,9 @@ AcpiAmlDumpOperand (
case ACPI_TYPE_REGION:
- if (EntryDesc->Region.SpaceId >= NUM_REGION_TYPES)
- {
- DEBUG_PRINT_RAW (ACPI_INFO, ("Region **** Unknown ID=0x%X",
- EntryDesc->Region.SpaceId));
- }
- else
- {
- DEBUG_PRINT_RAW (ACPI_INFO, ("Region %s",
- AcpiGbl_RegionTypes[EntryDesc->Region.SpaceId]));
- }
+ DEBUG_PRINT_RAW (ACPI_INFO, ("Region %s (%X)",
+ AcpiCmGetRegionName (EntryDesc->Region.SpaceId),
+ EntryDesc->Region.SpaceId));
/*
* If the address and length have not been evaluated,
@@ -486,7 +479,7 @@ AcpiAmlDumpOperand (
}
else
{
- DEBUG_PRINT_RAW (ACPI_INFO, (" base %p Length 0x%X\n",
+ DEBUG_PRINT_RAW (ACPI_INFO, (" base %p Length %X\n",
EntryDesc->Region.Address, EntryDesc->Region.Length));
}
break;
@@ -494,7 +487,7 @@ AcpiAmlDumpOperand (
case ACPI_TYPE_STRING:
- DEBUG_PRINT_RAW (ACPI_INFO, ("String[%d] @ %p\n\n",
+ DEBUG_PRINT_RAW (ACPI_INFO, ("String length %X @ %p\n\n",
EntryDesc->String.Length, EntryDesc->String.Pointer));
for (i=0; i < EntryDesc->String.Length; i++)
@@ -516,7 +509,7 @@ AcpiAmlDumpOperand (
case INTERNAL_TYPE_DEF_FIELD:
DEBUG_PRINT_RAW (ACPI_INFO,
- ("DefField: bits=%d acc=%d lock=%d update=%d at byte=%lx bit=%d of below:\n",
+ ("DefField: bits=%X acc=%X lock=%X update=%X at byte=%lX bit=%X of below:\n",
EntryDesc->Field.Length, EntryDesc->Field.Access,
EntryDesc->Field.LockRule, EntryDesc->Field.UpdateRule,
EntryDesc->Field.Offset, EntryDesc->Field.BitOffset));
@@ -533,7 +526,7 @@ AcpiAmlDumpOperand (
case ACPI_TYPE_FIELD_UNIT:
DEBUG_PRINT_RAW (ACPI_INFO,
- ("FieldUnit: %d bits acc %d lock %d update %d at byte %lx bit %d of \n",
+ ("FieldUnit: %X bits acc %X lock %X update %X at byte %lX bit %X of \n",
EntryDesc->FieldUnit.Length, EntryDesc->FieldUnit.Access,
EntryDesc->FieldUnit.LockRule, EntryDesc->FieldUnit.UpdateRule,
EntryDesc->FieldUnit.Offset, EntryDesc->FieldUnit.BitOffset));
@@ -566,7 +559,7 @@ AcpiAmlDumpOperand (
case ACPI_TYPE_METHOD:
DEBUG_PRINT_RAW (ACPI_INFO,
- ("Method(%d) @ %p:%lx\n",
+ ("Method(%X) @ %p:%lX\n",
EntryDesc->Method.ParamCount,
EntryDesc->Method.Pcode, EntryDesc->Method.PcodeLength));
break;
@@ -605,7 +598,7 @@ AcpiAmlDumpOperand (
default:
/* unknown EntryDesc->Common.Type value */
- DEBUG_PRINT_RAW (ACPI_INFO, ("Unknown Type 0x%X\n",
+ DEBUG_PRINT_RAW (ACPI_INFO, ("Unknown Type %X\n",
EntryDesc->Common.Type));
/* Back up to previous entry */
@@ -716,15 +709,15 @@ AcpiAmlDumpNode (
}
- AcpiOsPrintf ("%20s : %4.4s\n", "Name", &Node->Name);
- AcpiOsPrintf ("%20s : %s\n", "Type", AcpiCmGetTypeName (Node->Type));
- AcpiOsPrintf ("%20s : 0x%X\n", "Flags", Node->Flags);
- AcpiOsPrintf ("%20s : 0x%X\n", "Owner Id", Node->OwnerId);
- AcpiOsPrintf ("%20s : 0x%X\n", "Reference Count", Node->ReferenceCount);
- AcpiOsPrintf ("%20s : 0x%p\n", "Attached Object", Node->Object);
- AcpiOsPrintf ("%20s : 0x%p\n", "ChildList", Node->Child);
- AcpiOsPrintf ("%20s : 0x%p\n", "NextPeer", Node->Peer);
- AcpiOsPrintf ("%20s : 0x%p\n", "Parent", AcpiNsGetParentObject (Node));
+ AcpiOsPrintf ("%20s : %4.4s\n", "Name", &Node->Name);
+ AcpiOsPrintf ("%20s : %s\n", "Type", AcpiCmGetTypeName (Node->Type));
+ AcpiOsPrintf ("%20s : %X\n", "Flags", Node->Flags);
+ AcpiOsPrintf ("%20s : %X\n", "Owner Id", Node->OwnerId);
+ AcpiOsPrintf ("%20s : %X\n", "Reference Count", Node->ReferenceCount);
+ AcpiOsPrintf ("%20s : %p\n", "Attached Object", Node->Object);
+ AcpiOsPrintf ("%20s : %p\n", "ChildList", Node->Child);
+ AcpiOsPrintf ("%20s : %p\n", "NextPeer", Node->Peer);
+ AcpiOsPrintf ("%20s : %p\n", "Parent", AcpiNsGetParentObject (Node));
}
@@ -757,14 +750,14 @@ AcpiAmlDumpObjectDescriptor (
if (!(VALID_DESCRIPTOR_TYPE (ObjDesc, ACPI_DESC_TYPE_INTERNAL)))
{
- AcpiOsPrintf ("0x%p is not a valid ACPI object\n", ObjDesc);
+ AcpiOsPrintf ("%p is not a valid ACPI object\n", ObjDesc);
return;
}
/* Common Fields */
- AcpiOsPrintf ("%20s : 0x%X\n", "Reference Count", ObjDesc->Common.ReferenceCount);
- AcpiOsPrintf ("%20s : 0x%X\n", "Flags", ObjDesc->Common.Flags);
+ AcpiOsPrintf ("%20s : %X\n", "Reference Count", ObjDesc->Common.ReferenceCount);
+ AcpiOsPrintf ("%20s : %X\n", "Flags", ObjDesc->Common.Flags);
/* Object-specific Fields */
@@ -772,195 +765,195 @@ AcpiAmlDumpObjectDescriptor (
{
case ACPI_TYPE_NUMBER:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Number");
- AcpiOsPrintf ("%20s : 0x%X\n", "Value", ObjDesc->Number.Value);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Number");
+ AcpiOsPrintf ("%20s : %X\n", "Value", ObjDesc->Number.Value);
break;
case ACPI_TYPE_STRING:
- AcpiOsPrintf ("%20s : %s\n", "Type", "String");
- AcpiOsPrintf ("%20s : 0x%X\n", "Length", ObjDesc->String.Length);
- AcpiOsPrintf ("%20s : 0x%p\n", "Pointer", ObjDesc->String.Pointer);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "String");
+ AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->String.Length);
+ AcpiOsPrintf ("%20s : %p\n", "Pointer", ObjDesc->String.Pointer);
break;
case ACPI_TYPE_BUFFER:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Buffer");
- AcpiOsPrintf ("%20s : 0x%X\n", "Length", ObjDesc->Buffer.Length);
- AcpiOsPrintf ("%20s : 0x%X\n", "Sequence", ObjDesc->Buffer.Sequence);
- AcpiOsPrintf ("%20s : 0x%p\n", "Pointer", ObjDesc->Buffer.Pointer);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Buffer");
+ AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->Buffer.Length);
+ AcpiOsPrintf ("%20s : %X\n", "Sequence", ObjDesc->Buffer.Sequence);
+ AcpiOsPrintf ("%20s : %p\n", "Pointer", ObjDesc->Buffer.Pointer);
break;
case ACPI_TYPE_PACKAGE:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Package");
- AcpiOsPrintf ("%20s : 0x%X\n", "Count", ObjDesc->Package.Count);
- AcpiOsPrintf ("%20s : 0x%p\n", "Elements", ObjDesc->Package.Elements);
- AcpiOsPrintf ("%20s : 0x%p\n", "NextElement", ObjDesc->Package.NextElement);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Package");
+ AcpiOsPrintf ("%20s : %X\n", "Count", ObjDesc->Package.Count);
+ AcpiOsPrintf ("%20s : %p\n", "Elements", ObjDesc->Package.Elements);
+ AcpiOsPrintf ("%20s : %p\n", "NextElement", ObjDesc->Package.NextElement);
break;
case ACPI_TYPE_FIELD_UNIT:
- AcpiOsPrintf ("%20s : %s\n", "Type", "FieldUnit");
- AcpiOsPrintf ("%20s : 0x%X\n", "Access", ObjDesc->FieldUnit.Access);
- AcpiOsPrintf ("%20s : 0x%X\n", "LockRule", ObjDesc->FieldUnit.LockRule);
- AcpiOsPrintf ("%20s : 0x%X\n", "UpdateRule", ObjDesc->FieldUnit.UpdateRule);
- AcpiOsPrintf ("%20s : 0x%X\n", "Length", ObjDesc->FieldUnit.Length);
- AcpiOsPrintf ("%20s : 0x%X\n", "BitOffset", ObjDesc->FieldUnit.BitOffset);
- AcpiOsPrintf ("%20s : 0x%X\n", "Offset", ObjDesc->FieldUnit.Offset);
- AcpiOsPrintf ("%20s : 0x%p\n", "Container", ObjDesc->FieldUnit.Container);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "FieldUnit");
+ AcpiOsPrintf ("%20s : %X\n", "Access", ObjDesc->FieldUnit.Access);
+ AcpiOsPrintf ("%20s : %X\n", "LockRule", ObjDesc->FieldUnit.LockRule);
+ AcpiOsPrintf ("%20s : %X\n", "UpdateRule", ObjDesc->FieldUnit.UpdateRule);
+ AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->FieldUnit.Length);
+ AcpiOsPrintf ("%20s : %X\n", "BitOffset", ObjDesc->FieldUnit.BitOffset);
+ AcpiOsPrintf ("%20s : %X\n", "Offset", ObjDesc->FieldUnit.Offset);
+ AcpiOsPrintf ("%20s : %p\n", "Container", ObjDesc->FieldUnit.Container);
break;
case ACPI_TYPE_DEVICE:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Device");
- AcpiOsPrintf ("%20s : 0x%p\n", "AddrHandler", ObjDesc->Device.AddrHandler);
- AcpiOsPrintf ("%20s : 0x%p\n", "SysHandler", ObjDesc->Device.SysHandler);
- AcpiOsPrintf ("%20s : 0x%p\n", "DrvHandler", ObjDesc->Device.DrvHandler);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Device");
+ AcpiOsPrintf ("%20s : %p\n", "AddrHandler", ObjDesc->Device.AddrHandler);
+ AcpiOsPrintf ("%20s : %p\n", "SysHandler", ObjDesc->Device.SysHandler);
+ AcpiOsPrintf ("%20s : %p\n", "DrvHandler", ObjDesc->Device.DrvHandler);
break;
case ACPI_TYPE_EVENT:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Event");
- AcpiOsPrintf ("%20s : 0x%X\n", "Semaphore", ObjDesc->Event.Semaphore);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Event");
+ AcpiOsPrintf ("%20s : %X\n", "Semaphore", ObjDesc->Event.Semaphore);
break;
case ACPI_TYPE_METHOD:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Method");
- AcpiOsPrintf ("%20s : 0x%X\n", "ParamCount", ObjDesc->Method.ParamCount);
- AcpiOsPrintf ("%20s : 0x%X\n", "Concurrency", ObjDesc->Method.Concurrency);
- AcpiOsPrintf ("%20s : 0x%p\n", "Semaphore", ObjDesc->Method.Semaphore);
- AcpiOsPrintf ("%20s : 0x%X\n", "PcodeLength", ObjDesc->Method.PcodeLength);
- AcpiOsPrintf ("%20s : 0x%X\n", "Pcode", ObjDesc->Method.Pcode);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Method");
+ AcpiOsPrintf ("%20s : %X\n", "ParamCount", ObjDesc->Method.ParamCount);
+ AcpiOsPrintf ("%20s : %X\n", "Concurrency", ObjDesc->Method.Concurrency);
+ AcpiOsPrintf ("%20s : %p\n", "Semaphore", ObjDesc->Method.Semaphore);
+ AcpiOsPrintf ("%20s : %X\n", "PcodeLength", ObjDesc->Method.PcodeLength);
+ AcpiOsPrintf ("%20s : %X\n", "Pcode", ObjDesc->Method.Pcode);
break;
case ACPI_TYPE_MUTEX:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Mutex");
- AcpiOsPrintf ("%20s : 0x%X\n", "SyncLevel", ObjDesc->Mutex.SyncLevel);
- AcpiOsPrintf ("%20s : 0x%p\n", "Semaphore", ObjDesc->Mutex.Semaphore);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Mutex");
+ AcpiOsPrintf ("%20s : %X\n", "SyncLevel", ObjDesc->Mutex.SyncLevel);
+ AcpiOsPrintf ("%20s : %p\n", "Semaphore", ObjDesc->Mutex.Semaphore);
break;
case ACPI_TYPE_REGION:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Region");
- AcpiOsPrintf ("%20s : 0x%X\n", "SpaceId", ObjDesc->Region.SpaceId);
- AcpiOsPrintf ("%20s : 0x%X\n", "Flags", ObjDesc->Region.Flags);
- AcpiOsPrintf ("%20s : 0x%X\n", "Address", ObjDesc->Region.Address);
- AcpiOsPrintf ("%20s : 0x%X\n", "Length", ObjDesc->Region.Length);
- AcpiOsPrintf ("%20s : 0x%p\n", "AddrHandler", ObjDesc->Region.AddrHandler);
- AcpiOsPrintf ("%20s : 0x%p\n", "Next", ObjDesc->Region.Next);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Region");
+ AcpiOsPrintf ("%20s : %X\n", "SpaceId", ObjDesc->Region.SpaceId);
+ AcpiOsPrintf ("%20s : %X\n", "Flags", ObjDesc->Region.Flags);
+ AcpiOsPrintf ("%20s : %X\n", "Address", ObjDesc->Region.Address);
+ AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->Region.Length);
+ AcpiOsPrintf ("%20s : %p\n", "AddrHandler", ObjDesc->Region.AddrHandler);
+ AcpiOsPrintf ("%20s : %p\n", "Next", ObjDesc->Region.Next);
break;
case ACPI_TYPE_POWER:
- AcpiOsPrintf ("%20s : %s\n", "Type", "PowerResource");
- AcpiOsPrintf ("%20s : 0x%X\n", "SystemLevel", ObjDesc->PowerResource.SystemLevel);
- AcpiOsPrintf ("%20s : 0x%X\n", "ResourceOrder", ObjDesc->PowerResource.ResourceOrder);
- AcpiOsPrintf ("%20s : 0x%p\n", "SysHandler", ObjDesc->PowerResource.SysHandler);
- AcpiOsPrintf ("%20s : 0x%p\n", "DrvHandler", ObjDesc->PowerResource.DrvHandler);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "PowerResource");
+ AcpiOsPrintf ("%20s : %X\n", "SystemLevel", ObjDesc->PowerResource.SystemLevel);
+ AcpiOsPrintf ("%20s : %X\n", "ResourceOrder", ObjDesc->PowerResource.ResourceOrder);
+ AcpiOsPrintf ("%20s : %p\n", "SysHandler", ObjDesc->PowerResource.SysHandler);
+ AcpiOsPrintf ("%20s : %p\n", "DrvHandler", ObjDesc->PowerResource.DrvHandler);
break;
case ACPI_TYPE_PROCESSOR:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Processor");
- AcpiOsPrintf ("%20s : 0x%X\n", "Processor ID", ObjDesc->Processor.ProcId);
- AcpiOsPrintf ("%20s : 0x%X\n", "Length", ObjDesc->Processor.Length);
- AcpiOsPrintf ("%20s : 0x%X\n", "Address", ObjDesc->Processor.Address);
- AcpiOsPrintf ("%20s : 0x%p\n", "SysHandler", ObjDesc->Processor.SysHandler);
- AcpiOsPrintf ("%20s : 0x%p\n", "DrvHandler", ObjDesc->Processor.DrvHandler);
- AcpiOsPrintf ("%20s : 0x%p\n", "AddrHandler", ObjDesc->Processor.AddrHandler);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Processor");
+ AcpiOsPrintf ("%20s : %X\n", "Processor ID", ObjDesc->Processor.ProcId);
+ AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->Processor.Length);
+ AcpiOsPrintf ("%20s : %X\n", "Address", ObjDesc->Processor.Address);
+ AcpiOsPrintf ("%20s : %p\n", "SysHandler", ObjDesc->Processor.SysHandler);
+ AcpiOsPrintf ("%20s : %p\n", "DrvHandler", ObjDesc->Processor.DrvHandler);
+ AcpiOsPrintf ("%20s : %p\n", "AddrHandler", ObjDesc->Processor.AddrHandler);
break;
case ACPI_TYPE_THERMAL:
- AcpiOsPrintf ("%20s : %s\n", "Type", "ThermalZone");
- AcpiOsPrintf ("%20s : 0x%p\n", "SysHandler", ObjDesc->ThermalZone.SysHandler);
- AcpiOsPrintf ("%20s : 0x%p\n", "DrvHandler", ObjDesc->ThermalZone.DrvHandler);
- AcpiOsPrintf ("%20s : 0x%p\n", "AddrHandler", ObjDesc->ThermalZone.AddrHandler);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "ThermalZone");
+ AcpiOsPrintf ("%20s : %p\n", "SysHandler", ObjDesc->ThermalZone.SysHandler);
+ AcpiOsPrintf ("%20s : %p\n", "DrvHandler", ObjDesc->ThermalZone.DrvHandler);
+ AcpiOsPrintf ("%20s : %p\n", "AddrHandler", ObjDesc->ThermalZone.AddrHandler);
break;
case INTERNAL_TYPE_BANK_FIELD:
- AcpiOsPrintf ("%20s : %s\n", "Type", "BankField");
- AcpiOsPrintf ("%20s : 0x%X\n", "Access", ObjDesc->BankField.Access);
- AcpiOsPrintf ("%20s : 0x%X\n", "LockRule", ObjDesc->BankField.LockRule);
- AcpiOsPrintf ("%20s : 0x%X\n", "UpdateRule", ObjDesc->BankField.UpdateRule);
- AcpiOsPrintf ("%20s : 0x%X\n", "Length", ObjDesc->BankField.Length);
- AcpiOsPrintf ("%20s : 0x%X\n", "BitOffset", ObjDesc->BankField.BitOffset);
- AcpiOsPrintf ("%20s : 0x%X\n", "Offset", ObjDesc->BankField.Offset);
- AcpiOsPrintf ("%20s : 0x%X\n", "Value", ObjDesc->BankField.Value);
- AcpiOsPrintf ("%20s : 0x%p\n", "Container", ObjDesc->BankField.Container);
- AcpiOsPrintf ("%20s : 0x%X\n", "BankSelect", ObjDesc->BankField.BankSelect);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "BankField");
+ AcpiOsPrintf ("%20s : %X\n", "Access", ObjDesc->BankField.Access);
+ AcpiOsPrintf ("%20s : %X\n", "LockRule", ObjDesc->BankField.LockRule);
+ AcpiOsPrintf ("%20s : %X\n", "UpdateRule", ObjDesc->BankField.UpdateRule);
+ AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->BankField.Length);
+ AcpiOsPrintf ("%20s : %X\n", "BitOffset", ObjDesc->BankField.BitOffset);
+ AcpiOsPrintf ("%20s : %X\n", "Offset", ObjDesc->BankField.Offset);
+ AcpiOsPrintf ("%20s : %X\n", "Value", ObjDesc->BankField.Value);
+ AcpiOsPrintf ("%20s : %p\n", "Container", ObjDesc->BankField.Container);
+ AcpiOsPrintf ("%20s : %X\n", "BankSelect", ObjDesc->BankField.BankSelect);
break;
case INTERNAL_TYPE_INDEX_FIELD:
- AcpiOsPrintf ("%20s : %s\n", "Type", "IndexField");
- AcpiOsPrintf ("%20s : 0x%X\n", "Access", ObjDesc->IndexField.Access);
- AcpiOsPrintf ("%20s : 0x%X\n", "LockRule", ObjDesc->IndexField.LockRule);
- AcpiOsPrintf ("%20s : 0x%X\n", "UpdateRule", ObjDesc->IndexField.UpdateRule);
- AcpiOsPrintf ("%20s : 0x%X\n", "Length", ObjDesc->IndexField.Length);
- AcpiOsPrintf ("%20s : 0x%X\n", "BitOffset", ObjDesc->IndexField.BitOffset);
- AcpiOsPrintf ("%20s : 0x%X\n", "Value", ObjDesc->IndexField.Value);
- AcpiOsPrintf ("%20s : 0x%X\n", "Index", ObjDesc->IndexField.Index);
- AcpiOsPrintf ("%20s : 0x%X\n", "Data", ObjDesc->IndexField.Data);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "IndexField");
+ AcpiOsPrintf ("%20s : %X\n", "Access", ObjDesc->IndexField.Access);
+ AcpiOsPrintf ("%20s : %X\n", "LockRule", ObjDesc->IndexField.LockRule);
+ AcpiOsPrintf ("%20s : %X\n", "UpdateRule", ObjDesc->IndexField.UpdateRule);
+ AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->IndexField.Length);
+ AcpiOsPrintf ("%20s : %X\n", "BitOffset", ObjDesc->IndexField.BitOffset);
+ AcpiOsPrintf ("%20s : %X\n", "Value", ObjDesc->IndexField.Value);
+ AcpiOsPrintf ("%20s : %X\n", "Index", ObjDesc->IndexField.Index);
+ AcpiOsPrintf ("%20s : %X\n", "Data", ObjDesc->IndexField.Data);
break;
case INTERNAL_TYPE_REFERENCE:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Reference");
- AcpiOsPrintf ("%20s : 0x%X\n", "TargetType", ObjDesc->Reference.TargetType);
- AcpiOsPrintf ("%20s : 0x%X\n", "OpCode", ObjDesc->Reference.OpCode);
- AcpiOsPrintf ("%20s : 0x%X\n", "Offset", ObjDesc->Reference.Offset);
- AcpiOsPrintf ("%20s : 0x%p\n", "ObjDesc", ObjDesc->Reference.Object);
- AcpiOsPrintf ("%20s : 0x%p\n", "Node", ObjDesc->Reference.Node);
- AcpiOsPrintf ("%20s : 0x%p\n", "Where", ObjDesc->Reference.Where);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Reference");
+ AcpiOsPrintf ("%20s : %X\n", "TargetType", ObjDesc->Reference.TargetType);
+ AcpiOsPrintf ("%20s : %X\n", "OpCode", ObjDesc->Reference.OpCode);
+ AcpiOsPrintf ("%20s : %X\n", "Offset", ObjDesc->Reference.Offset);
+ AcpiOsPrintf ("%20s : %p\n", "ObjDesc", ObjDesc->Reference.Object);
+ AcpiOsPrintf ("%20s : %p\n", "Node", ObjDesc->Reference.Node);
+ AcpiOsPrintf ("%20s : %p\n", "Where", ObjDesc->Reference.Where);
break;
case INTERNAL_TYPE_ADDRESS_HANDLER:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Address Handler");
- AcpiOsPrintf ("%20s : 0x%X\n", "SpaceId", ObjDesc->AddrHandler.SpaceId);
- AcpiOsPrintf ("%20s : 0x%p\n", "Next", ObjDesc->AddrHandler.Next);
- AcpiOsPrintf ("%20s : 0x%p\n", "RegionList", ObjDesc->AddrHandler.RegionList);
- AcpiOsPrintf ("%20s : 0x%p\n", "Node", ObjDesc->AddrHandler.Node);
- AcpiOsPrintf ("%20s : 0x%p\n", "Handler", ObjDesc->AddrHandler.Handler);
- AcpiOsPrintf ("%20s : 0x%p\n", "Context", ObjDesc->AddrHandler.Context);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Address Handler");
+ AcpiOsPrintf ("%20s : %X\n", "SpaceId", ObjDesc->AddrHandler.SpaceId);
+ AcpiOsPrintf ("%20s : %p\n", "Next", ObjDesc->AddrHandler.Next);
+ AcpiOsPrintf ("%20s : %p\n", "RegionList", ObjDesc->AddrHandler.RegionList);
+ AcpiOsPrintf ("%20s : %p\n", "Node", ObjDesc->AddrHandler.Node);
+ AcpiOsPrintf ("%20s : %p\n", "Handler", ObjDesc->AddrHandler.Handler);
+ AcpiOsPrintf ("%20s : %p\n", "Context", ObjDesc->AddrHandler.Context);
break;
case INTERNAL_TYPE_NOTIFY:
- AcpiOsPrintf ("%20s : %s\n", "Type", "Notify Handler");
- AcpiOsPrintf ("%20s : 0x%p\n", "Node", ObjDesc->NotifyHandler.Node);
- AcpiOsPrintf ("%20s : 0x%p\n", "Handler", ObjDesc->NotifyHandler.Handler);
- AcpiOsPrintf ("%20s : 0x%p\n", "Context", ObjDesc->NotifyHandler.Context);
+ AcpiOsPrintf ("%20s : %s\n", "Type", "Notify Handler");
+ AcpiOsPrintf ("%20s : %p\n", "Node", ObjDesc->NotifyHandler.Node);
+ AcpiOsPrintf ("%20s : %p\n", "Handler", ObjDesc->NotifyHandler.Handler);
+ AcpiOsPrintf ("%20s : %p\n", "Context", ObjDesc->NotifyHandler.Context);
break;
case INTERNAL_TYPE_DEF_FIELD:
- AcpiOsPrintf ("%20s : 0x%p\n", "Granularity", ObjDesc->Field.Granularity);
- AcpiOsPrintf ("%20s : 0x%p\n", "Length", ObjDesc->Field.Length);
- AcpiOsPrintf ("%20s : 0x%p\n", "Offset", ObjDesc->Field.Offset);
- AcpiOsPrintf ("%20s : 0x%p\n", "BitOffset", ObjDesc->Field.BitOffset);
- AcpiOsPrintf ("%20s : 0x%p\n", "Container", ObjDesc->Field.Container);
+ AcpiOsPrintf ("%20s : %p\n", "Granularity", ObjDesc->Field.Granularity);
+ AcpiOsPrintf ("%20s : %p\n", "Length", ObjDesc->Field.Length);
+ AcpiOsPrintf ("%20s : %p\n", "Offset", ObjDesc->Field.Offset);
+ AcpiOsPrintf ("%20s : %p\n", "BitOffset", ObjDesc->Field.BitOffset);
+ AcpiOsPrintf ("%20s : %p\n", "Container", ObjDesc->Field.Container);
break;
@@ -974,14 +967,14 @@ AcpiAmlDumpObjectDescriptor (
case INTERNAL_TYPE_SCOPE:
case INTERNAL_TYPE_DEF_ANY:
- AcpiOsPrintf ("*** Structure display not implemented for type 0x%X! ***\n",
+ AcpiOsPrintf ("*** Structure display not implemented for type %X! ***\n",
ObjDesc->Common.Type);
break;
default:
- AcpiOsPrintf ("*** Cannot display unknown type 0x%X! ***\n", ObjDesc->Common.Type);
+ AcpiOsPrintf ("*** Cannot display unknown type %X! ***\n", ObjDesc->Common.Type);
break;
}
diff --git a/sys/contrib/dev/acpica/exdyadic.c b/sys/contrib/dev/acpica/exdyadic.c
index a29a655..57b0730 100644
--- a/sys/contrib/dev/acpica/exdyadic.c
+++ b/sys/contrib/dev/acpica/exdyadic.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amdyadic - ACPI AML (p-code) execution for dyadic operators
- * $Revision: 67 $
+ * $Revision: 68 $
*
*****************************************************************************/
@@ -174,7 +174,7 @@ AcpiAmlExecDyadic1 (
/* Invalid parameters on object stack */
DEBUG_PRINT (ACPI_ERROR,
- ("ExecDyadic1/%s: bad operand(s) (0x%X)\n",
+ ("ExecDyadic1/%s: bad operand(s) (Status=%X)\n",
AcpiPsGetOpcodeName (Opcode), Status));
goto Cleanup;
@@ -216,7 +216,7 @@ AcpiAmlExecDyadic1 (
default:
DEBUG_PRINT (ACPI_ERROR,
- ("AmlExecDyadic1/NotifyOp: unexpected notify object type %d\n",
+ ("AmlExecDyadic1/NotifyOp: unexpected notify object type %X\n",
ObjDesc->Common.Type));
Status = AE_AML_OPERAND_TYPE;
@@ -299,7 +299,7 @@ AcpiAmlExecDyadic2R (
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("ExecDyadic2R/%s: bad operand(s) (0x%X)\n",
+ ("ExecDyadic2R/%s: bad operand(s) (Status=%X)\n",
AcpiPsGetOpcodeName (Opcode), Status));
goto Cleanup;
@@ -469,7 +469,7 @@ AcpiAmlExecDyadic2R (
if (ObjDesc2->Common.Type != ObjDesc->Common.Type)
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlExecDyadic2R/ConcatOp: operand type mismatch %d %d\n",
+ ("AmlExecDyadic2R/ConcatOp: operand type mismatch %X != %X\n",
ObjDesc->Common.Type, ObjDesc2->Common.Type));
Status = AE_AML_OPERAND_TYPE;
goto Cleanup;
@@ -656,7 +656,7 @@ AcpiAmlExecDyadic2S (
/* Invalid parameters on object stack */
DEBUG_PRINT (ACPI_ERROR,
- ("ExecDyadic2S/%s: bad operand(s) (0x%X)\n",
+ ("ExecDyadic2S/%s: bad operand(s) (Status=%X)\n",
AcpiPsGetOpcodeName (Opcode), Status));
goto Cleanup;
@@ -789,7 +789,7 @@ AcpiAmlExecDyadic2 (
/* Invalid parameters on object stack */
DEBUG_PRINT (ACPI_ERROR,
- ("ExecDyadic2/%s: bad operand(s) (0x%X)\n",
+ ("ExecDyadic2/%s: bad operand(s) (Status=%X)\n",
AcpiPsGetOpcodeName (Opcode), Status));
goto Cleanup;
diff --git a/sys/contrib/dev/acpica/exfield.c b/sys/contrib/dev/acpica/exfield.c
index d450fbf..646af1c 100644
--- a/sys/contrib/dev/acpica/exfield.c
+++ b/sys/contrib/dev/acpica/exfield.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amfield - ACPI AML (p-code) execution - field manipulation
- * $Revision: 73 $
+ * $Revision: 74 $
*
*****************************************************************************/
@@ -367,7 +367,7 @@ AcpiAmlAccessNamedField (
if (BufferLength > ByteFieldLength)
{
DEBUG_PRINT (ACPI_INFO,
- ("AmlAccessNamedField: Byte length %d too large, truncated to %x\n",
+ ("AmlAccessNamedField: Byte length %X truncated to %X\n",
ActualByteLength, ByteFieldLength));
ActualByteLength = ByteFieldLength;
@@ -378,7 +378,7 @@ AcpiAmlAccessNamedField (
if (DIV_8(BitGranularity) > ByteFieldLength)
{
DEBUG_PRINT (ACPI_INFO,
- ("AmlAccessNamedField: Bit granularity %d too large, truncated to %x\n",
+ ("AmlAccessNamedField: Bit granularity %X truncated to %X\n",
BitGranularity, MUL_8(ByteFieldLength)));
BitGranularity = MUL_8(ByteFieldLength);
@@ -387,7 +387,7 @@ AcpiAmlAccessNamedField (
if (ByteGranularity > ByteFieldLength)
{
DEBUG_PRINT (ACPI_INFO,
- ("AmlAccessNamedField: Byte granularity %d too large, truncated to %x\n",
+ ("AmlAccessNamedField: Byte granularity %X truncated to %X\n",
ByteGranularity, ByteFieldLength));
ByteGranularity = ByteFieldLength;
diff --git a/sys/contrib/dev/acpica/exfldio.c b/sys/contrib/dev/acpica/exfldio.c
index 91aedda..766d55c 100644
--- a/sys/contrib/dev/acpica/exfldio.c
+++ b/sys/contrib/dev/acpica/exfldio.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amfldio - Aml Field I/O
- * $Revision: 30 $
+ * $Revision: 32 $
*
*****************************************************************************/
@@ -191,21 +191,11 @@ AcpiAmlReadFieldData (
(ObjDesc->Field.Offset * FieldByteWidth) +
FieldByteOffset;
-
- if (RgnDesc->Region.SpaceId >= NUM_REGION_TYPES)
- {
- DEBUG_PRINT (TRACE_OPREGION,
- ("AmlReadFieldData: **** Unknown OpRegion SpaceID %d at %08lx width %d\n",
- RgnDesc->Region.SpaceId, Address, FieldBitWidth));
- }
-
- else
- {
- DEBUG_PRINT (TRACE_OPREGION,
- ("AmlReadFieldData: OpRegion %s at %08lx width %d\n",
- AcpiGbl_RegionTypes[RgnDesc->Region.SpaceId], Address,
- FieldBitWidth));
- }
+ DEBUG_PRINT (TRACE_OPREGION,
+ ("AmlReadFieldData: Region %s(%X) at %08lx width %X\n",
+ AcpiCmGetRegionName (RgnDesc->Region.SpaceId),
+ RgnDesc->Region.SpaceId, Address,
+ FieldBitWidth));
/* Invoke the appropriate AddressSpace/OpRegion handler */
@@ -216,14 +206,16 @@ AcpiAmlReadFieldData (
if (Status == AE_NOT_IMPLEMENTED)
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlReadFieldData: **** OpRegion type %s not implemented\n",
- AcpiGbl_RegionTypes[RgnDesc->Region.SpaceId]));
+ ("AmlReadFieldData: **** Region %s(%X) not implemented\n",
+ AcpiCmGetRegionName (RgnDesc->Region.SpaceId),
+ RgnDesc->Region.SpaceId));
}
else if (Status == AE_NOT_EXIST)
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlReadFieldData: **** Unknown OpRegion SpaceID %d\n",
+ ("AmlReadFieldData: **** Region %s(%X) has no handler\n",
+ AcpiCmGetRegionName (RgnDesc->Region.SpaceId),
RgnDesc->Region.SpaceId));
}
@@ -493,20 +485,11 @@ AcpiAmlWriteFieldData (
(ObjDesc->Field.Offset * FieldByteWidth) +
FieldByteOffset;
-
- if (RgnDesc->Region.SpaceId >= NUM_REGION_TYPES)
- {
- DEBUG_PRINT (TRACE_OPREGION,
- ("AmlWriteField: **** Store %lx in unknown OpRegion SpaceID %d at %p width %d ** \n",
- Value, RgnDesc->Region.SpaceId, Address, FieldBitWidth));
- }
- else
- {
- DEBUG_PRINT (TRACE_OPREGION,
- ("AmlWriteField: Store %lx in OpRegion %s at %p width %d\n",
- Value, AcpiGbl_RegionTypes[RgnDesc->Region.SpaceId], Address,
- FieldBitWidth));
- }
+ DEBUG_PRINT (TRACE_OPREGION,
+ ("AmlWriteField: Store %lx in Region %s(%X) at %p width %X\n",
+ Value, AcpiCmGetRegionName (RgnDesc->Region.SpaceId),
+ RgnDesc->Region.SpaceId, Address,
+ FieldBitWidth));
/* Invoke the appropriate AddressSpace/OpRegion handler */
@@ -516,14 +499,16 @@ AcpiAmlWriteFieldData (
if (Status == AE_NOT_IMPLEMENTED)
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlWriteField: **** OpRegion type %s not implemented\n",
- AcpiGbl_RegionTypes[RgnDesc->Region.SpaceId]));
+ ("AmlWriteField: **** Region type %s(%X) not implemented\n",
+ AcpiCmGetRegionName (RgnDesc->Region.SpaceId),
+ RgnDesc->Region.SpaceId));
}
else if (Status == AE_NOT_EXIST)
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlWriteField: **** Unknown OpRegion SpaceID %x\n",
+ ("AmlWriteField: **** Region type %s(%X) does not have a handler\n",
+ AcpiCmGetRegionName (RgnDesc->Region.SpaceId),
RgnDesc->Region.SpaceId));
}
diff --git a/sys/contrib/dev/acpica/exmisc.c b/sys/contrib/dev/acpica/exmisc.c
index 7decf64..5884acd 100644
--- a/sys/contrib/dev/acpica/exmisc.c
+++ b/sys/contrib/dev/acpica/exmisc.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: ammisc - ACPI AML (p-code) execution - specific opcodes
- * $Revision: 70 $
+ * $Revision: 71 $
*
*****************************************************************************/
@@ -178,7 +178,7 @@ AcpiAmlExecFatal (
/* Invalid parameters on object stack */
DEBUG_PRINT (ACPI_ERROR,
- ("AcpiAmlExecFatal/AML_FATAL_OP: bad operand(s) (0x%X)\n",
+ ("AcpiAmlExecFatal/AML_FATAL_OP: bad operand(s) (Status=%X)\n",
Status));
goto Cleanup;
@@ -271,7 +271,7 @@ AcpiAmlExecIndex (
/* Invalid parameters on object stack */
DEBUG_PRINT (ACPI_ERROR,
- ("AcpiAmlExecIndex/AML_INDEX_OP: bad operand(s) (0x%X)\n",
+ ("AcpiAmlExecIndex/AML_INDEX_OP: bad operand(s) (Status=%X)\n",
Status));
goto Cleanup;
@@ -452,7 +452,7 @@ AcpiAmlExecMatch (
/* Invalid parameters on object stack */
DEBUG_PRINT (ACPI_ERROR,
- ("ExecMatch/AML_MATCH_OP: bad operand(s) (0x%X)\n",
+ ("ExecMatch/AML_MATCH_OP: bad operand(s) (Status=%X)\n",
Status));
goto Cleanup;
diff --git a/sys/contrib/dev/acpica/exmonad.c b/sys/contrib/dev/acpica/exmonad.c
index 4b2b172..a899d63 100644
--- a/sys/contrib/dev/acpica/exmonad.c
+++ b/sys/contrib/dev/acpica/exmonad.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: ammonad - ACPI AML (p-code) execution for monadic operators
- * $Revision: 83 $
+ * $Revision: 85 $
*
*****************************************************************************/
@@ -256,8 +256,8 @@ AcpiAmlExecMonadic1 (
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("ExecMonadic1/%s: bad operand(s) (0x%X)\n",
- AcpiPsGetOpcodeName (Opcode), Status));
+ ("ExecMonadic1/%s: bad operand(s) (Status=%s)\n",
+ AcpiPsGetOpcodeName (Opcode), AcpiCmFormatException(Status)));
goto Cleanup;
}
@@ -378,8 +378,8 @@ AcpiAmlExecMonadic2R (
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("ExecMonadic2R/%s: bad operand(s) (0x%X)\n",
- AcpiPsGetOpcodeName (Opcode), Status));
+ ("ExecMonadic2R/%s: bad operand(s) (Status=%s)\n",
+ AcpiPsGetOpcodeName (Opcode), AcpiCmFormatException(Status)));
goto Cleanup;
}
@@ -783,8 +783,8 @@ AcpiAmlExecMonadic2 (
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("ExecMonadic2/%s: bad operand(s) (0x%X)\n",
- AcpiPsGetOpcodeName (Opcode), Status));
+ ("ExecMonadic2/%s: bad operand(s) (Status=%s)\n",
+ AcpiPsGetOpcodeName (Opcode), AcpiCmFormatException(Status)));
goto Cleanup;
}
@@ -947,7 +947,7 @@ AcpiAmlExecMonadic2 (
default:
DEBUG_PRINT (ACPI_ERROR,
- ("AmlExecMonadic2: Not Buf/Str/Pkg - found type 0x%X\n",
+ ("AmlExecMonadic2: Not Buf/Str/Pkg - found type %X\n",
ObjDesc->Common.Type));
Status = AE_AML_OPERAND_TYPE;
goto Cleanup;
diff --git a/sys/contrib/dev/acpica/exprep.c b/sys/contrib/dev/acpica/exprep.c
index b0c39ad..63b7c0b 100644
--- a/sys/contrib/dev/acpica/exprep.c
+++ b/sys/contrib/dev/acpica/exprep.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amprep - ACPI AML (p-code) execution - field prep utilities
- * $Revision: 68 $
+ * $Revision: 69 $
*
*****************************************************************************/
@@ -294,7 +294,7 @@ AcpiAmlPrepDefFieldValue (
if (Type != ACPI_TYPE_REGION)
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlPrepDefFieldValue: Needed Region, found %d %s\n",
+ ("AmlPrepDefFieldValue: Needed Region, found type %X %s\n",
Type, AcpiCmGetTypeName (Type)));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
@@ -415,7 +415,7 @@ AcpiAmlPrepBankFieldValue (
if (Type != ACPI_TYPE_REGION)
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlPrepBankFieldValue: Needed Region, found %d %s\n",
+ ("AmlPrepBankFieldValue: Needed Region, found type %X %s\n",
Type, AcpiCmGetTypeName (Type)));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
diff --git a/sys/contrib/dev/acpica/exregion.c b/sys/contrib/dev/acpica/exregion.c
index dd9327d..7ae052f 100644
--- a/sys/contrib/dev/acpica/exregion.c
+++ b/sys/contrib/dev/acpica/exregion.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amregion - ACPI default OpRegion (address space) handlers
- * $Revision: 40 $
+ * $Revision: 41 $
*
*****************************************************************************/
@@ -250,7 +250,7 @@ AcpiAmlSystemMemorySpaceHandler (
case ADDRESS_SPACE_READ:
DEBUG_PRINT ((TRACE_OPREGION | VERBOSE_INFO),
- ("Read (%d width) Address:0x%X\n", BitWidth, Address));
+ ("Read (%d width) Address=%p\n", BitWidth, Address));
switch (BitWidth)
{
@@ -273,7 +273,7 @@ AcpiAmlSystemMemorySpaceHandler (
case ADDRESS_SPACE_WRITE:
DEBUG_PRINT ((TRACE_OPREGION | VERBOSE_INFO),
- ("Write (%d width) Address:0x%p Value 0x%X\n",
+ ("Write (%d width) Address=%p Value %X\n",
BitWidth, Address, *Value));
switch (BitWidth)
@@ -344,7 +344,7 @@ AcpiAmlSystemIoSpaceHandler (
case ADDRESS_SPACE_READ:
DEBUG_PRINT ((TRACE_OPREGION | VERBOSE_INFO),
- ("Read(%d width) Address:0x%08x\n", BitWidth, Address));
+ ("Read(%d width) Address=%p\n", BitWidth, Address));
switch (BitWidth)
{
@@ -375,7 +375,7 @@ AcpiAmlSystemIoSpaceHandler (
case ADDRESS_SPACE_WRITE:
DEBUG_PRINT ((TRACE_OPREGION | VERBOSE_INFO),
- ("Write(%d width) Address:0x%08x Value 0x%08x\n",
+ ("Write(%d width) Address=%p Value %X\n",
BitWidth, Address, *Value));
switch (BitWidth)
diff --git a/sys/contrib/dev/acpica/exresnte.c b/sys/contrib/dev/acpica/exresnte.c
index 59f45a8..cd232e5 100644
--- a/sys/contrib/dev/acpica/exresnte.c
+++ b/sys/contrib/dev/acpica/exresnte.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amresnte - AML Interpreter object resolution
- * $Revision: 24 $
+ * $Revision: 25 $
*
*****************************************************************************/
@@ -218,8 +218,7 @@ AcpiAmlResolveNodeToValue (
* and Method locals and arguments have a pseudo-Node
*/
if (EntryType == ACPI_TYPE_DEVICE ||
- EntryType == INTERNAL_TYPE_METHOD_ARGUMENT ||
- EntryType == INTERNAL_TYPE_METHOD_LOCAL_VAR)
+ (Node->Flags & (ANOBJ_METHOD_ARG | ANOBJ_METHOD_LOCAL)))
{
return_ACPI_STATUS (AE_OK);
}
diff --git a/sys/contrib/dev/acpica/exresolv.c b/sys/contrib/dev/acpica/exresolv.c
index 39a764c..bd50719 100644
--- a/sys/contrib/dev/acpica/exresolv.c
+++ b/sys/contrib/dev/acpica/exresolv.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amresolv - AML Interpreter object resolution
- * $Revision: 77 $
+ * $Revision: 78 $
*
*****************************************************************************/
@@ -424,7 +424,7 @@ AcpiAmlResolveObjectToValue (
/* Value is a Number */
DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveObjectToValue: [Local%d] value is [0x%X] \n",
+ ("AmlResolveObjectToValue: [Local%d] value=%X \n",
Index, ObjDesc->Number.Value));
}
@@ -465,7 +465,7 @@ AcpiAmlResolveObjectToValue (
/* Value is a Number */
DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveObjectToValue: [Arg%d] value is [0x%X] \n",
+ ("AmlResolveObjectToValue: [Arg%d] value=%X\n",
Index, ObjDesc->Number.Value));
}
@@ -543,7 +543,7 @@ AcpiAmlResolveObjectToValue (
/* Invalid reference OBJ*/
DEBUG_PRINT (ACPI_ERROR,
- ("AmlResolveObjectToValue: Unknown TargetType %d in Index/Reference obj %p\n",
+ ("AmlResolveObjectToValue: Unknown TargetType %X in Index/Reference obj %p\n",
StackDesc->Reference.TargetType, StackDesc));
Status = AE_AML_INTERNAL;
break;
@@ -561,7 +561,7 @@ AcpiAmlResolveObjectToValue (
default:
DEBUG_PRINT (ACPI_ERROR,
- ("AmlResolveObjectToValue: Unknown Reference object subtype %02x in %p\n",
+ ("AmlResolveObjectToValue: Unknown Reference object subtype %02X in %p\n",
Opcode, StackDesc));
Status = AE_AML_INTERNAL;
diff --git a/sys/contrib/dev/acpica/exresop.c b/sys/contrib/dev/acpica/exresop.c
index 02a13d4..0fe9b8c 100644
--- a/sys/contrib/dev/acpica/exresop.c
+++ b/sys/contrib/dev/acpica/exresop.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amresop - AML Interpreter operand/object resolution
- * $Revision: 15 $
+ * $Revision: 18 $
*
*****************************************************************************/
@@ -131,6 +131,52 @@
MODULE_NAME ("amresop")
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlCheckObjectType
+ *
+ * PARAMETERS: TypeNeeded Object type needed
+ * ThisType Actual object type
+ * Object Object pointer
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Check required type against actual type
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlCheckObjectType (
+ ACPI_OBJECT_TYPE TypeNeeded,
+ ACPI_OBJECT_TYPE ThisType,
+ void *Object)
+{
+
+
+ if (TypeNeeded == ACPI_TYPE_ANY)
+ {
+ /* All types OK, so we don't perform any typechecks */
+
+ return (AE_OK);
+ }
+
+
+ if (TypeNeeded != ThisType)
+ {
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlResolveOperands: Needed [%s], found [%s] %p\n",
+ AcpiCmGetTypeName (TypeNeeded),
+ AcpiCmGetTypeName (ThisType), Object));
+
+ return (AE_AML_OPERAND_TYPE);
+ }
+
+
+ return (AE_OK);
+}
+
+
/*******************************************************************************
*
* FUNCTION: AcpiAmlResolveOperands
@@ -163,6 +209,7 @@ AcpiAmlResolveOperands (
UINT32 ArgTypes;
ACPI_OPCODE_INFO *OpInfo;
UINT32 ThisArgType;
+ ACPI_OBJECT_TYPE TypeNeeded;
FUNCTION_TRACE_U32 ("AmlResolveOperands", Opcode);
@@ -179,9 +226,9 @@ AcpiAmlResolveOperands (
if (ArgTypes == ARGI_INVALID_OPCODE)
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlResolveOperands: Internal error - %X is not a runtime opcode\n", Opcode));
- Status = AE_AML_INTERNAL;
- goto Cleanup;
+ ("AmlResolveOperands: Internal error - %X is not a valid AML opcode\n", Opcode));
+
+ return_ACPI_STATUS (AE_AML_INTERNAL);
}
DEBUG_PRINT (TRACE_EXEC,
@@ -203,8 +250,8 @@ AcpiAmlResolveOperands (
{
DEBUG_PRINT (ACPI_ERROR,
("AmlResolveOperands: Internal error - null stack entry at %X\n", StackPtr));
- Status = AE_AML_INTERNAL;
- goto Cleanup;
+
+ return_ACPI_STATUS (AE_AML_INTERNAL);
}
/* Extract useful items */
@@ -231,10 +278,10 @@ AcpiAmlResolveOperands (
if (!AcpiAmlValidateObjectType (ObjectType))
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlResolveOperands: Bad operand object type [0x%x]\n",
+ ("AmlResolveOperands: Bad operand object type [%X]\n",
ObjectType));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
+
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
if (ObjectType == (UINT8) INTERNAL_TYPE_REFERENCE)
@@ -270,12 +317,10 @@ AcpiAmlResolveOperands (
("Reference Opcode: Unknown [%02x]\n",
ObjDesc->Reference.OpCode));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
break;
}
}
-
}
else
@@ -283,22 +328,26 @@ AcpiAmlResolveOperands (
/* Invalid descriptor */
DEBUG_PRINT (ACPI_ERROR,
- ("Bad descriptor type 0x%X in Obj %p\n",
+ ("Bad descriptor type %X in Obj %p\n",
ObjDesc->Common.DataType, ObjDesc));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
/*
- * Decode a character from the type string
+ * Get one argument type, point to the next
*/
ThisArgType = GET_CURRENT_ARG_TYPE (ArgTypes);
INCREMENT_ARG_LIST (ArgTypes);
+ /*
+ * Handle cases where the object does not need to be
+ * resolved to a value
+ */
+
switch (ThisArgType)
{
@@ -309,18 +358,17 @@ AcpiAmlResolveOperands (
if (VALID_DESCRIPTOR_TYPE (ObjDesc, ACPI_DESC_TYPE_NAMED)) /* direct name ptr OK as-is */
{
- break;
+ goto NextOperand;
}
- if (INTERNAL_TYPE_REFERENCE != ObjectType)
+ Status = AcpiAmlCheckObjectType (INTERNAL_TYPE_REFERENCE,
+ ObjectType, ObjDesc);
+ if (ACPI_FAILURE (Status))
{
- DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed Reference, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
+ return_ACPI_STATUS (Status);
}
+
if (AML_NAME_OP == ObjDesc->Reference.OpCode)
{
/*
@@ -332,198 +380,126 @@ AcpiAmlResolveOperands (
AcpiCmRemoveReference (ObjDesc);
(*StackPtr) = TempHandle;
}
+
+ goto NextOperand;
break;
- case ARGI_NUMBER: /* Number */
-
- /* Need an operand of type ACPI_TYPE_NUMBER */
+ case ARGI_ANYTYPE:
- Status = AcpiAmlResolveToValue (StackPtr, WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
+ /*
+ * We don't want to resolve IndexOp reference objects during
+ * a store because this would be an implicit DeRefOf operation.
+ * Instead, we just want to store the reference object.
+ * -- All others must be resolved below.
+ */
- if (ACPI_TYPE_NUMBER != (*StackPtr)->Common.Type)
+ if ((Opcode == AML_STORE_OP) &&
+ ((*StackPtr)->Common.Type == INTERNAL_TYPE_REFERENCE) &&
+ ((*StackPtr)->Reference.OpCode == AML_INDEX_OP))
{
- DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed Number, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
+ goto NextOperand;
}
break;
+ }
- case ARGI_STRING:
- /* Need an operand of type ACPI_TYPE_STRING or ACPI_TYPE_BUFFER */
+ /*
+ * Resolve this object to a value
+ */
- Status = AcpiAmlResolveToValue (StackPtr, WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
+ Status = AcpiAmlResolveToValue (StackPtr, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
- if ((ACPI_TYPE_STRING != (*StackPtr)->Common.Type) &&
- (ACPI_TYPE_BUFFER != (*StackPtr)->Common.Type))
- {
- DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed String or Buffer, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
- }
- break;
+ /*
+ * Check the resulting object (value) type
+ */
+ switch (ThisArgType)
+ {
+ /*
+ * For the simple cases, only one type of resolved object
+ * is allowed
+ */
+ case ARGI_NUMBER: /* Number */
+
+ /* Need an operand of type ACPI_TYPE_NUMBER */
+
+ TypeNeeded = ACPI_TYPE_NUMBER;
+ break;
case ARGI_BUFFER:
/* Need an operand of type ACPI_TYPE_BUFFER */
- Status = AcpiAmlResolveToValue (StackPtr, WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
-
- if (ACPI_TYPE_BUFFER != (*StackPtr)->Common.Type)
- {
- DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed Buffer, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
- }
+ TypeNeeded = ACPI_TYPE_BUFFER;
break;
-
case ARGI_MUTEX:
/* Need an operand of type ACPI_TYPE_MUTEX */
- Status = AcpiAmlResolveToValue (StackPtr, WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
-
- if (ACPI_TYPE_MUTEX != (*StackPtr)->Common.Type)
- {
- DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed Mutex, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
- }
+ TypeNeeded = ACPI_TYPE_MUTEX;
break;
-
case ARGI_EVENT:
/* Need an operand of type ACPI_TYPE_EVENT */
- Status = AcpiAmlResolveToValue (StackPtr, WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
-
- if (ACPI_TYPE_EVENT != (*StackPtr)->Common.Type)
- {
- DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed AcpiEvent, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
- }
+ TypeNeeded = ACPI_TYPE_EVENT;
break;
-
case ARGI_REGION:
/* Need an operand of type ACPI_TYPE_REGION */
- Status = AcpiAmlResolveToValue (StackPtr, WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
-
- if (ACPI_TYPE_REGION != (*StackPtr)->Common.Type)
- {
- DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed Region, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
- }
+ TypeNeeded = ACPI_TYPE_REGION;
break;
-
- case ARGI_IF: /* If */
+ case ARGI_IF: /* If */
/* Need an operand of type INTERNAL_TYPE_IF */
- if (INTERNAL_TYPE_IF != (*StackPtr)->Common.Type)
- {
- DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed If, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
- }
+ TypeNeeded = INTERNAL_TYPE_IF;
break;
-
case ARGI_PACKAGE: /* Package */
/* Need an operand of type ACPI_TYPE_PACKAGE */
- Status = AcpiAmlResolveToValue (StackPtr, WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
-
- if (ACPI_TYPE_PACKAGE != (*StackPtr)->Common.Type)
- {
- DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed Package, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
- }
+ TypeNeeded = ACPI_TYPE_PACKAGE;
break;
-
case ARGI_ANYTYPE:
+ /* Any operand type will do */
- /*
- * We don't want to resolve IndexOp reference objects during
- * a store because this would be an implicit DeRefOf operation.
- * Instead, we just want to store the reference object.
- */
+ TypeNeeded = ACPI_TYPE_ANY;
+ break;
- if ((Opcode == AML_STORE_OP) &&
- ((*StackPtr)->Common.Type == INTERNAL_TYPE_REFERENCE) &&
- ((*StackPtr)->Reference.OpCode == AML_INDEX_OP))
- {
- break;
- }
- /* All others must be resolved */
+ /*
+ * The more complex cases allow multiple resolved object types
+ */
- Status = AcpiAmlResolveToValue (StackPtr, WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
+ case ARGI_STRING:
- /* All types OK, so we don't perform any typechecks */
+ /* Need an operand of type ACPI_TYPE_STRING or ACPI_TYPE_BUFFER */
+
+ if ((ACPI_TYPE_STRING != (*StackPtr)->Common.Type) &&
+ (ACPI_TYPE_BUFFER != (*StackPtr)->Common.Type))
+ {
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlResolveOperands: Needed [String or Buffer], found [%s] %p\n",
+ AcpiCmGetTypeName ((*StackPtr)->Common.Type), *StackPtr));
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
+ }
+ goto NextOperand;
break;
@@ -537,12 +513,6 @@ AcpiAmlResolveOperands (
* error with a size of 4.
*/
- Status = AcpiAmlResolveToValue (StackPtr, WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
-
/* Need a buffer, string, package or Node reference */
if (((*StackPtr)->Common.Type != ACPI_TYPE_BUFFER) &&
@@ -551,10 +521,10 @@ AcpiAmlResolveOperands (
((*StackPtr)->Common.Type != INTERNAL_TYPE_REFERENCE))
{
DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed Buf/Str/Pkg, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
+ ("AmlResolveOperands: Needed [Buf/Str/Pkg/Ref], found [%s] %p\n",
+ AcpiCmGetTypeName ((*StackPtr)->Common.Type), *StackPtr));
+
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
/*
@@ -565,53 +535,63 @@ AcpiAmlResolveOperands (
if (!(*StackPtr)->Reference.Node)
{
DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed Node reference, found %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
+ ("AmlResolveOperands: Needed [Node Reference], found [%p]\n",
+ *StackPtr));
+
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
}
-
+ goto NextOperand;
break;
case ARGI_COMPLEXOBJ:
- Status = AcpiAmlResolveToValue (StackPtr, WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
-
/* Need a buffer or package */
if (((*StackPtr)->Common.Type != ACPI_TYPE_BUFFER) &&
((*StackPtr)->Common.Type != ACPI_TYPE_PACKAGE))
{
DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed Package, Buf/Pkg %s Obj=%p\n",
- AcpiCmGetTypeName (ObjectType), *StackPtr));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
+ ("AmlResolveOperands: Needed [Buf/Pkg], found [%s] %p\n",
+ AcpiCmGetTypeName ((*StackPtr)->Common.Type), *StackPtr));
+
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
+ goto NextOperand;
break;
- /* Unknown abbreviation passed in */
-
default:
+
+ /* Unknown type */
+
DEBUG_PRINT (ACPI_ERROR,
- ("AmlResolveOperands: Internal error - Unknown arg type %X\n",
+ ("AmlResolveOperands: Internal error - Unknown ARGI type %X\n",
ThisArgType));
- Status = AE_BAD_PARAMETER;
- goto Cleanup;
- } /* switch (*Types++) */
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
+
+
+ /*
+ * Make sure that the original object was resolved to the
+ * required object type (Simple cases only).
+ */
+ Status = AcpiAmlCheckObjectType (TypeNeeded,
+ (*StackPtr)->Common.Type, *StackPtr);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+
+NextOperand:
/*
* If more operands needed, decrement StackPtr to point
- * to next operand on stack (after checking for underflow).
+ * to next operand on stack
*/
if (GET_CURRENT_ARG_TYPE (ArgTypes))
{
@@ -621,9 +601,8 @@ AcpiAmlResolveOperands (
} /* while (*Types) */
-Cleanup:
- return_ACPI_STATUS (Status);
+ return_ACPI_STATUS (Status);
}
diff --git a/sys/contrib/dev/acpica/exstore.c b/sys/contrib/dev/acpica/exstore.c
index 976ecc7..7d9285f 100644
--- a/sys/contrib/dev/acpica/exstore.c
+++ b/sys/contrib/dev/acpica/exstore.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amstore - AML Interpreter object store support
- * $Revision: 116 $
+ * $Revision: 117 $
*
*****************************************************************************/
@@ -430,7 +430,7 @@ AcpiAmlExecStore (
*/
default:
DEBUG_PRINT (ACPI_ERROR,
- ("AmlExecStore/Index: Source must be Number/Buffer/String type, not 0x%x\n",
+ ("AmlExecStore/Index: Source must be Number/Buffer/String type, not %X\n",
ValDesc->Common.Type));
Status = AE_AML_OPERAND_TYPE;
break;
diff --git a/sys/contrib/dev/acpica/exstoren.c b/sys/contrib/dev/acpica/exstoren.c
index e9736b6..3458a84 100644
--- a/sys/contrib/dev/acpica/exstoren.c
+++ b/sys/contrib/dev/acpica/exstoren.c
@@ -3,7 +3,7 @@
*
* Module Name: amstoren - AML Interpreter object store support,
* Store to Node (namespace object)
- * $Revision: 23 $
+ * $Revision: 24 $
*
*****************************************************************************/
@@ -328,7 +328,7 @@ AcpiAmlStoreObjectToNode (
* There is no existing object attached to this Node
*/
DEBUG_PRINT (ACPI_ERROR,
- ("AmlStoreObjectToNte: Internal error - no destination object for %4.4s type %d\n",
+ ("AmlStoreObjectToNte: Internal error - no destination object for %4.4s type %X\n",
&Node->Name, DestinationType));
Status = AE_AML_INTERNAL;
goto CleanUpAndBailOut;
@@ -340,7 +340,7 @@ AcpiAmlStoreObjectToNode (
if (DestDesc->Common.Type != (UINT8) DestinationType)
{
DEBUG_PRINT (ACPI_ERROR,
- ("AmlStoreObjectToNte: Internal error - Name %4.4s type %d does not match value-type %d at %p\n",
+ ("AmlStoreObjectToNte: Internal error - Name %4.4s type %X does not match value-type %X at %p\n",
&Node->Name, AcpiNsGetType (Node),
DestDesc->Common.Type, DestDesc));
Status = AE_AML_INTERNAL;
@@ -531,7 +531,7 @@ AcpiAmlStoreObjectToNode (
*/
MEMCPY(DestDesc->Buffer.Pointer, Buffer, DestDesc->Buffer.Length);
DEBUG_PRINT (ACPI_INFO,
- ("AmlStoreObjectToNte: Truncating src buffer from %d to %d\n",
+ ("AmlStoreObjectToNte: Truncating src buffer from %X to %X\n",
Length, DestDesc->Buffer.Length));
}
break;
@@ -601,7 +601,7 @@ AcpiAmlStoreObjectToNode (
if (DestDesc->FieldUnit.Container)
{
- DEBUG_PRINT_RAW (ACPI_ERROR, (" Type %d",
+ DEBUG_PRINT_RAW (ACPI_ERROR, (" Type %X",
DestDesc->FieldUnit.Container->Common.Type));
}
DEBUG_PRINT_RAW (ACPI_ERROR, ("\n"));
@@ -641,7 +641,7 @@ AcpiAmlStoreObjectToNode (
<< DestDesc->FieldUnit.BitOffset);
DEBUG_PRINT (TRACE_EXEC,
- ("** Store %lx in buffer %p byte %ld bit %d width %d addr %p mask %08lx\n",
+ ("** Store %lx in buffer %p byte %ld bit %X width %d addr %p mask %08lx\n",
ValDesc->Number.Value,
DestDesc->FieldUnit.Container->Buffer.Pointer,
DestDesc->FieldUnit.Offset, DestDesc->FieldUnit.BitOffset,
diff --git a/sys/contrib/dev/acpica/exstorob.c b/sys/contrib/dev/acpica/exstorob.c
index d93b719..c9d96c6 100644
--- a/sys/contrib/dev/acpica/exstorob.c
+++ b/sys/contrib/dev/acpica/exstorob.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amstorob - AML Interpreter object store support, store to object
- * $Revision: 17 $
+ * $Revision: 18 $
*
*****************************************************************************/
@@ -408,7 +408,7 @@ AcpiAmlStoreObjectToObject (
*/
MEMCPY(DestDesc->Buffer.Pointer, Buffer, DestDesc->Buffer.Length);
DEBUG_PRINT (ACPI_INFO,
- ("AmlStoreObjectToObject: Truncating src buffer from %d to %d\n",
+ ("AmlStoreObjectToObject: Truncating src buffer from %X to %X\n",
Length, DestDesc->Buffer.Length));
}
break;
diff --git a/sys/contrib/dev/acpica/exutils.c b/sys/contrib/dev/acpica/exutils.c
index 3e044b5..9304b5a 100644
--- a/sys/contrib/dev/acpica/exutils.c
+++ b/sys/contrib/dev/acpica/exutils.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amutils - interpreter/scanner utilities
- * $Revision: 63 $
+ * $Revision: 64 $
*
*****************************************************************************/
@@ -591,7 +591,7 @@ AcpiAmlBuildCopyInternalPackageObject (
* Too many nested levels of packages for us to handle
*/
DEBUG_PRINT (ACPI_ERROR,
- ("AmlBuildCopyInternalPackageObject: Pkg nested too deep (max %d)\n",
+ ("AmlBuildCopyInternalPackageObject: Pkg nested too deep (max %X)\n",
MAX_PACKAGE_DEPTH));
return_ACPI_STATUS (AE_LIMIT);
}
diff --git a/sys/contrib/dev/acpica/hwacpi.c b/sys/contrib/dev/acpica/hwacpi.c
index 2238108..f0b5577 100644
--- a/sys/contrib/dev/acpica/hwacpi.c
+++ b/sys/contrib/dev/acpica/hwacpi.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: hwacpi - ACPI hardware functions - mode and timer
- * $Revision: 31 $
+ * $Revision: 32 $
*
*****************************************************************************/
@@ -339,7 +339,7 @@ AcpiHwSetMode (
if (AcpiHwGetMode () == Mode)
{
- DEBUG_PRINT (ACPI_INFO, ("Mode %d successfully enabled\n", Mode));
+ DEBUG_PRINT (ACPI_INFO, ("Mode %X successfully enabled\n", Mode));
Status = AE_OK;
}
diff --git a/sys/contrib/dev/acpica/hwregs.c b/sys/contrib/dev/acpica/hwregs.c
index 1a04596..77deaec 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: 81 $
+ * $Revision: 84 $
*
******************************************************************************/
@@ -533,7 +533,7 @@ AcpiHwRegisterBitAccess (
*/
RegisterValue = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK, PM1_CONTROL);
- DEBUG_PRINT (TRACE_IO, ("PM1 control: Read 0x%X\n", RegisterValue));
+ DEBUG_PRINT (TRACE_IO, ("PM1 control: Read %X\n", RegisterValue));
if (ReadWrite == ACPI_WRITE)
{
@@ -547,10 +547,13 @@ AcpiHwRegisterBitAccess (
* than any other control Registers with
* respect to A and B Registers. The value
* for A may be different than the value for B
+ *
+ * Therefore, pass the RegisterId, not just generic PM1_CONTROL,
+ * because we need to do different things. Yuck.
*/
AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
- PM1_CONTROL, (UINT16) RegisterValue);
+ RegisterId, (UINT16) RegisterValue);
}
break;
@@ -570,7 +573,7 @@ AcpiHwRegisterBitAccess (
RegisterValue = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK, PM2_CONTROL);
- DEBUG_PRINT (TRACE_IO, ("PM2 control: Read 0x%X from 0x%X\n",
+ DEBUG_PRINT (TRACE_IO, ("PM2 control: Read %X from %p\n",
RegisterValue, AcpiGbl_FADT->XPm2CntBlk.Address));
if (ReadWrite == ACPI_WRITE)
@@ -581,7 +584,7 @@ AcpiHwRegisterBitAccess (
RegisterValue |= Value;
DEBUG_PRINT (TRACE_IO,
- ("About to write %04X to %04X\n", RegisterValue,
+ ("About to write %04X to %p\n", RegisterValue,
AcpiGbl_FADT->XPm2CntBlk.Address));
AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
@@ -595,7 +598,7 @@ AcpiHwRegisterBitAccess (
Mask = TMR_VAL_MASK;
RegisterValue = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK,
PM_TIMER);
- DEBUG_PRINT (TRACE_IO, ("PM_TIMER: Read 0x%X from 0x%X\n",
+ DEBUG_PRINT (TRACE_IO, ("PM_TIMER: Read %X from %p\n",
RegisterValue, AcpiGbl_FADT->XPmTmrBlk.Address));
break;
@@ -637,7 +640,7 @@ AcpiHwRegisterBitAccess (
/* Now get the current Enable Bits in the selected Reg */
RegisterValue = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK, RegisterId);
- DEBUG_PRINT (TRACE_IO, ("GPE Enable bits: Read 0x%X from 0x%X\n",
+ DEBUG_PRINT (TRACE_IO, ("GPE Enable bits: Read %X from %X\n",
RegisterValue, RegisterId));
if (ReadWrite == ACPI_WRITE)
@@ -676,7 +679,7 @@ AcpiHwRegisterBitAccess (
RegisterValue &= Mask;
RegisterValue >>= AcpiHwGetBitShift (Mask);
- DEBUG_PRINT (TRACE_IO, ("Register I/O: returning 0x%X\n", RegisterValue));
+ DEBUG_PRINT (TRACE_IO, ("Register I/O: returning %X\n", RegisterValue));
return_VALUE (RegisterValue);
}
@@ -701,7 +704,6 @@ AcpiHwRegisterRead (
UINT32 RegisterId)
{
UINT32 Value = 0;
- UINT32 Offset = REGISTER_OFFSET (RegisterId);
UINT32 BankOffset;
FUNCTION_TRACE ("AcpiHwRegisterRead");
@@ -716,16 +718,16 @@ AcpiHwRegisterRead (
{
case PM1_STS: /* 16-bit access */
- Value = AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1aEvtBlk, Offset);
- Value |= AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1bEvtBlk, Offset);
+ Value = AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1aEvtBlk, 0);
+ Value |= AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1bEvtBlk, 0);
break;
case PM1_EN: /* 16-bit access*/
BankOffset = DIV_2 (AcpiGbl_FADT->Pm1EvtLen);
- Value = AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1aEvtBlk, BankOffset + Offset);
- Value |= AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1bEvtBlk, BankOffset + Offset);
+ Value = AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1aEvtBlk, BankOffset);
+ Value |= AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1bEvtBlk, BankOffset);
break;
@@ -745,39 +747,39 @@ AcpiHwRegisterRead (
case PM2_CONTROL: /* 8-bit access */
- Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XPm2CntBlk, Offset);
+ Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XPm2CntBlk, 0);
break;
case PM_TIMER: /* 32-bit access */
- Value = AcpiHwLowLevelRead (32, &AcpiGbl_FADT->XPmTmrBlk, Offset);
+ Value = AcpiHwLowLevelRead (32, &AcpiGbl_FADT->XPmTmrBlk, 0);
break;
case GPE0_STS_BLOCK: /* 8-bit access */
- Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XGpe0Blk, Offset);
+ Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XGpe0Blk, 0);
break;
case GPE0_EN_BLOCK: /* 8-bit access */
BankOffset = DIV_2 (AcpiGbl_FADT->Gpe0BlkLen);
- Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XGpe0Blk, BankOffset + Offset);
+ Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XGpe0Blk, BankOffset);
break;
case GPE1_STS_BLOCK: /* 8-bit access */
- Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XGpe1Blk, Offset);
+ Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XGpe1Blk, 0);
break;
case GPE1_EN_BLOCK: /* 8-bit access */
BankOffset = DIV_2 (AcpiGbl_FADT->Gpe1BlkLen);
- Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XGpe1Blk, BankOffset + Offset);
+ Value = AcpiHwLowLevelRead (8, &AcpiGbl_FADT->XGpe1Blk, BankOffset);
break;
@@ -822,7 +824,6 @@ AcpiHwRegisterWrite (
UINT32 RegisterId,
UINT32 Value)
{
- UINT32 Offset = REGISTER_OFFSET (RegisterId);
UINT32 BankOffset;
FUNCTION_TRACE ("AcpiHwRegisterWrite");
@@ -838,16 +839,16 @@ AcpiHwRegisterWrite (
{
case PM1_STS: /* 16-bit access */
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aEvtBlk, Offset);
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bEvtBlk, Offset);
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aEvtBlk, 0);
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bEvtBlk, 0);
break;
case PM1_EN: /* 16-bit access*/
BankOffset = DIV_2 (AcpiGbl_FADT->Pm1EvtLen);
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aEvtBlk, BankOffset + Offset);
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bEvtBlk, BankOffset + Offset);
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aEvtBlk, BankOffset);
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bEvtBlk, BankOffset);
break;
@@ -859,11 +860,11 @@ AcpiHwRegisterWrite (
*/
if (RegisterId == SLP_TYPE_A)
{
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aCntBlk, Offset);
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aCntBlk, 0);
}
else if (RegisterId == SLP_TYPE_B)
{
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bCntBlk, Offset);
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bCntBlk, 0);
}
else
{
@@ -873,8 +874,8 @@ AcpiHwRegisterWrite (
disable();
}
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aCntBlk, Offset);
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bCntBlk, Offset);
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aCntBlk, 0);
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bCntBlk, 0);
if (RegisterId == SLP_EN)
{
@@ -887,39 +888,39 @@ AcpiHwRegisterWrite (
case PM2_CONTROL: /* 8-bit access */
- AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XPm2CntBlk, Offset);
+ AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XPm2CntBlk, 0);
break;
case PM_TIMER: /* 32-bit access */
- AcpiHwLowLevelWrite (32, Value, &AcpiGbl_FADT->XPmTmrBlk, Offset);
+ AcpiHwLowLevelWrite (32, Value, &AcpiGbl_FADT->XPmTmrBlk, 0);
break;
case GPE0_STS_BLOCK: /* 8-bit access */
- AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XGpe0Blk, Offset);
+ AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XGpe0Blk, 0);
break;
case GPE0_EN_BLOCK: /* 8-bit access */
BankOffset = DIV_2 (AcpiGbl_FADT->Gpe0BlkLen);
- AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XGpe0Blk, BankOffset + Offset);
+ AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XGpe0Blk, BankOffset);
break;
case GPE1_STS_BLOCK: /* 8-bit access */
- AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XGpe1Blk, Offset);
+ AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XGpe1Blk, 0);
break;
case GPE1_EN_BLOCK: /* 8-bit access */
BankOffset = DIV_2 (AcpiGbl_FADT->Gpe1BlkLen);
- AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XGpe1Blk, BankOffset + Offset);
+ AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XGpe1Blk, BankOffset);
break;
@@ -1159,5 +1160,3 @@ AcpiHwLowLevelWrite (
break;
}
}
-
-
diff --git a/sys/contrib/dev/acpica/nsaccess.c b/sys/contrib/dev/acpica/nsaccess.c
index 87ee4f3..c2f2183 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: 113 $
+ * $Revision: 115 $
*
******************************************************************************/
@@ -392,6 +392,9 @@ AcpiNsLookup (
if ((!ScopeInfo) ||
(!ScopeInfo->Scope.Node))
{
+ DEBUG_PRINT (TRACE_NAMES,
+ ("NsLookup: Null scope prefix, using root node (%p)\n", AcpiGbl_RootNode));
+
PrefixNode = AcpiGbl_RootNode;
}
else
@@ -604,7 +607,7 @@ AcpiNsLookup (
ThisSearchType = Type;
}
- /* Pluck and ACPI name from the front of the pathname */
+ /* Pluck one ACPI name from the front of the pathname */
MOVE_UNALIGNED32_TO_32 (&SimpleName, Pathname);
@@ -655,7 +658,7 @@ AcpiNsLookup (
/* Complain about a type mismatch */
REPORT_WARNING (
- ("NsLookup: %4.4s, type 0x%X, checking for type 0x%X\n",
+ ("NsLookup: %4.4s, type %X, checking for type %X\n",
&SimpleName, ThisNode->Type, TypeToCheckFor));
}
@@ -679,7 +682,7 @@ AcpiNsLookup (
*/
DEBUG_PRINT (ACPI_INFO,
- ("NsLookup: Load mode=%d ThisNode=%x\n",
+ ("NsLookup: Load mode=%X ThisNode=%X\n",
InterpreterMode, ThisNode));
}
diff --git a/sys/contrib/dev/acpica/nsalloc.c b/sys/contrib/dev/acpica/nsalloc.c
index ef92cb32..9dbaf96 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: 42 $
+ * $Revision: 43 $
*
******************************************************************************/
@@ -427,7 +427,7 @@ AcpiNsDeleteChildren (
DECREMENT_NAME_TABLE_METRICS (sizeof (ACPI_NAMESPACE_NODE));
DEBUG_PRINT (ACPI_INFO,
- ("AcpiNsDeleteChildren: Object %p, Remaining %d\n",
+ ("AcpiNsDeleteChildren: Object %p, Remaining %X\n",
ChildNode, AcpiGbl_CurrentNodeCount));
/*
diff --git a/sys/contrib/dev/acpica/nsdump.c b/sys/contrib/dev/acpica/nsdump.c
index dbef828..960a0ce 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: 81 $
+ * $Revision: 82 $
*
*****************************************************************************/
@@ -305,7 +305,7 @@ AcpiNsDumpOneObject (
if (!AcpiCmValidAcpiName (ThisNode->Name))
{
- REPORT_WARNING (("Invalid ACPI Name 0x%X\n", ThisNode->Name));
+ REPORT_WARNING (("Invalid ACPI Name %08X\n", ThisNode->Name));
}
/*
@@ -409,13 +409,13 @@ AcpiNsDumpOneObject (
if (ObjType > INTERNAL_TYPE_MAX)
{
- DEBUG_PRINT_RAW (TRACE_TABLES, ("(Ptr to ACPI Object type 0x%X [UNKNOWN])\n", ObjType));
+ DEBUG_PRINT_RAW (TRACE_TABLES, ("(Ptr to ACPI Object type %X [UNKNOWN])\n", ObjType));
BytesToDump = 32;
}
else
{
- DEBUG_PRINT_RAW (TRACE_TABLES, ("(Ptr to ACPI Object type 0x%X [%s])\n",
+ DEBUG_PRINT_RAW (TRACE_TABLES, ("(Ptr to ACPI Object type %X [%s])\n",
ObjType, AcpiCmGetTypeName (ObjType)));
BytesToDump = sizeof (ACPI_OPERAND_OBJECT);
}
diff --git a/sys/contrib/dev/acpica/nsinit.c b/sys/contrib/dev/acpica/nsinit.c
index 655a0d0..34f7cf3 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: 5 $
+ * $Revision: 9 $
*
*****************************************************************************/
@@ -216,8 +216,6 @@ AcpiNsInitializeDevices (
Info.DeviceCount = 0;
Info.Num_STA = 0;
Info.Num_INI = 0;
- Info.Num_HID = 0;
- Info.Num_PCI = 0;
DEBUG_PRINT_RAW (ACPI_OK, ("Executing device _INI methods:"));
@@ -233,9 +231,8 @@ AcpiNsInitializeDevices (
DEBUG_PRINT_RAW (ACPI_OK,
- ("\n%d Devices found: %d _STA, %d _INI, %d _HID, %d PCIRoot\n",
- Info.DeviceCount, Info.Num_STA, Info.Num_INI,
- Info.Num_HID, Info.Num_PCI));
+ ("\n%d Devices found: %d _STA, %d _INI\n",
+ Info.DeviceCount, Info.Num_STA, Info.Num_INI));
return_ACPI_STATUS (Status);
}
@@ -300,6 +297,13 @@ AcpiNsInitOneObject (
Info->OpRegionInit++;
Status = AcpiDsGetRegionArguments (ObjDesc);
+ if (ACPI_FAILURE (Status))
+ {
+ DEBUG_PRINT_RAW (ACPI_ERROR, ("\n"));
+ DEBUG_PRINT (ACPI_ERROR, ("%s while getting region arguments [%4.4s]\n",
+ AcpiCmFormatException (Status), &Node->Name));
+ }
+
DEBUG_PRINT_RAW (ACPI_OK, ("."));
break;
@@ -314,6 +318,12 @@ AcpiNsInitOneObject (
Info->FieldInit++;
Status = AcpiDsGetFieldUnitArguments (ObjDesc);
+ if (ACPI_FAILURE (Status))
+ {
+ DEBUG_PRINT_RAW (ACPI_ERROR, ("\n"));
+ DEBUG_PRINT (ACPI_ERROR, ("%s while getting field arguments [%4.4s]\n",
+ AcpiCmFormatException (Status), &Node->Name));
+ }
DEBUG_PRINT_RAW (ACPI_OK, ("."));
break;
@@ -352,7 +362,6 @@ AcpiNsInitOneDevice (
void **ReturnValue)
{
ACPI_STATUS Status;
- ACPI_OPERAND_OBJECT *RetObj = NULL;
ACPI_NAMESPACE_NODE *Node;
UINT32 Flags;
ACPI_DEVICE_WALK_INFO *Info = (ACPI_DEVICE_WALK_INFO *) Context;
@@ -400,7 +409,8 @@ AcpiNsInitOneDevice (
Status = AcpiNsEvaluateRelative (ObjHandle, "_INI", NULL, NULL);
if (AE_NOT_FOUND == Status)
{
- /* No _INI means device requires no initialization */
+ /* No _INI means device requires no initialization */
+ Status = AE_OK;
}
else if (ACPI_FAILURE (Status))
@@ -421,93 +431,5 @@ AcpiNsInitOneDevice (
Info->Num_INI++;
}
-
- /*
- * Examine the HID of the device. _HID can be an executable
- * control method -- it simply has to return a string or number
- * containing the HID.
- */
-
- if (RetObj)
- {
- AcpiCmRemoveReference (RetObj);
- }
-
- RetObj = NULL;
- Status = AcpiNsEvaluateRelative (ObjHandle, "_HID", NULL, &RetObj);
- if (AE_NOT_FOUND == Status)
- {
- /* No _HID --> Can't be a PCI root bridge */
- return_ACPI_STATUS (AE_OK);
- }
-
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- Info->Num_HID++;
-
-
- /*
- * Found an _HID object.
- * Check for a PCI Root Bridge. We need to install the PCI_CONFIG space
- * handler on all PCI Root Bridges found within the namespace
- *
- * A PCI Root Bridge has an HID with the value EISAID("PNP0A03")
- * The HID can be either a number or a string.
- */
-
- switch (RetObj->Common.Type)
- {
- case ACPI_TYPE_NUMBER:
-
- if (RetObj->Number.Value != PCI_ROOT_HID_VALUE)
- {
- goto Cleanup;
- }
-
- break;
-
- case ACPI_TYPE_STRING:
-
- if (STRNCMP (RetObj->String.Pointer, PCI_ROOT_HID_STRING,
- sizeof (PCI_ROOT_HID_STRING)))
- {
- goto Cleanup;
- }
-
- break;
-
- default:
-
- goto Cleanup;
- }
-
-
- /*
- * We found a valid PCI_ROOT_HID.
- * The parent of the HID entry is the PCI device; Install the default PCI
- * handler for this PCI device.
- */
-
- Info->Num_PCI++;
-
- if (!(Info->Flags & ACPI_NO_PCI_INIT))
- {
- Status = AcpiInstallAddressSpaceHandler (ObjHandle,
- ADDRESS_SPACE_PCI_CONFIG,
- ACPI_DEFAULT_HANDLER, NULL, NULL);
- }
-
-Cleanup:
-
- if (RetObj)
- {
- AcpiCmRemoveReference (RetObj);
- }
-
return_ACPI_STATUS (Status);
}
-
-
diff --git a/sys/contrib/dev/acpica/nsload.c b/sys/contrib/dev/acpica/nsload.c
index 523d94f..e49a8b7 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: 32 $
+ * $Revision: 33 $
*
*****************************************************************************/
@@ -179,7 +179,7 @@ AcpiNsLoadNamespace (
DEBUG_PRINT_RAW (ACPI_OK,
- ("ACPI Namespace successfully loaded at root 0x%p\n",
+ ("ACPI Namespace successfully loaded at root %p\n",
AcpiGbl_RootNode));
diff --git a/sys/contrib/dev/acpica/nsnames.c b/sys/contrib/dev/acpica/nsnames.c
index 795c811..5990ff5 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: 49 $
+ * $Revision: 51 $
*
******************************************************************************/
@@ -210,7 +210,7 @@ AcpiNsGetTablePathname (
if (Size != 0)
{
DEBUG_PRINT (ACPI_ERROR,
- ("NsGetTablePathname: Bad pointer returned; size = %d\n", Size));
+ ("NsGetTablePathname: Bad pointer returned; size=%X\n", Size));
}
return_PTR (NameBuffer);
@@ -278,6 +278,13 @@ AcpiNsHandleToPathname (
Size += PATH_SEGMENT_LENGTH;
}
+ /* Special case for size still 0 - no parent for "special" nodes */
+
+ if (!Size)
+ {
+ Size = PATH_SEGMENT_LENGTH;
+ }
+
/* Set return length to the required path length */
PathLength = Size + 1;
@@ -324,7 +331,7 @@ AcpiNsHandleToPathname (
UserBuffer[Size] = '\\';
DEBUG_PRINT (TRACE_EXEC,
- ("NsHandleToPathname: Len=%d, %s \n",
+ ("NsHandleToPathname: Len=%X, %s \n",
PathLength, UserBuffer));
Exit:
diff --git a/sys/contrib/dev/acpica/nssearch.c b/sys/contrib/dev/acpica/nssearch.c
index 880bc5f..57bb9f5 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: 59 $
+ * $Revision: 60 $
*
******************************************************************************/
@@ -170,7 +170,7 @@ AcpiNsSearchNode (
("NsSearchNode: Searching %s [%p]\n",
ScopeName, Node));
DEBUG_PRINT (TRACE_NAMES,
- ("NsSearchNode: For %4.4s (type 0x%X)\n",
+ ("NsSearchNode: For %4.4s (type %X)\n",
&TargetName, Type));
DEBUG_EXEC (AcpiCmFree (ScopeName));
}
@@ -223,7 +223,7 @@ AcpiNsSearchNode (
}
DEBUG_PRINT (TRACE_NAMES,
- ("NsSearchNode: Name %4.4s (actual type 0x%X) found at %p\n",
+ ("NsSearchNode: Name %4.4s (actual type %X) found at %p\n",
&TargetName, NextNode->Type, NextNode));
*ReturnNode = NextNode;
@@ -251,7 +251,7 @@ AcpiNsSearchNode (
/* Searched entire table, not found */
DEBUG_PRINT (TRACE_NAMES,
- ("NsSearchNode: Name %4.4s (type 0x%X) not found at %p\n",
+ ("NsSearchNode: Name %4.4s (type %X) not found at %p\n",
&TargetName, Type, NextNode));
@@ -317,7 +317,7 @@ AcpiNsSearchParentTree (
if (AcpiNsLocal (Type))
{
DEBUG_PRINT (TRACE_NAMES,
- ("NsSearchParentTree: [%4.4s] (type 0x%X) is local (no search)\n",
+ ("NsSearchParentTree: [%4.4s] (type %X) is local (no search)\n",
&TargetName, Type));
}
diff --git a/sys/contrib/dev/acpica/nsutils.c b/sys/contrib/dev/acpica/nsutils.c
index 79f3e08..835afa6 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: 72 $
+ * $Revision: 74 $
*
*****************************************************************************/
@@ -825,10 +825,9 @@ AcpiNsGetNode (
NATIVE_CHAR *InternalPath = NULL;
- FUNCTION_TRACE_PTR ("NsGetNte", Pathname);
+ FUNCTION_TRACE_PTR ("NsGetNode", Pathname);
- ScopeInfo.Scope.Node = StartNode;
/* Ensure that the namespace has been initialized */
@@ -854,22 +853,9 @@ AcpiNsGetNode (
AcpiCmAcquireMutex (ACPI_MTX_NAMESPACE);
- /* NS_ALL means start from the root */
-
- if (NS_ALL == ScopeInfo.Scope.Node)
- {
- ScopeInfo.Scope.Node = AcpiGbl_RootNode;
- }
+ /* Setup lookup scope (search starting point) */
- else
- {
- ScopeInfo.Scope.Node = StartNode;
- if (!ScopeInfo.Scope.Node)
- {
- Status = AE_BAD_PARAMETER;
- goto UnlockAndExit;
- }
- }
+ ScopeInfo.Scope.Node = StartNode;
/* Lookup the name in the namespace */
@@ -880,13 +866,11 @@ AcpiNsGetNode (
if (ACPI_FAILURE (Status))
{
- DEBUG_PRINT (ACPI_INFO, ("NsGetNte: %s, %s\n",
+ DEBUG_PRINT (ACPI_INFO, ("NsGetNode: %s, %s\n",
InternalPath, AcpiCmFormatException (Status)));
}
-UnlockAndExit:
-
AcpiCmReleaseMutex (ACPI_MTX_NAMESPACE);
/* Cleanup */
@@ -1007,6 +991,11 @@ AcpiNsGetParentObject (
{
+ if (!Node)
+ {
+ return (NULL);
+ }
+
/*
* Walk to the end of this peer list.
* The last entry is marked with a flag and the peer
diff --git a/sys/contrib/dev/acpica/nsxfname.c b/sys/contrib/dev/acpica/nsxfname.c
index faab487..fca363b 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: 72 $
+ * $Revision: 73 $
*
*****************************************************************************/
@@ -164,6 +164,8 @@ AcpiGetHandle (
return (AE_BAD_PARAMETER);
}
+ /* Convert a parent handle to a prefix node */
+
if (Parent)
{
AcpiCmAcquireMutex (ACPI_MTX_NAMESPACE);
@@ -179,7 +181,6 @@ AcpiGetHandle (
}
/* Special case for root, since we can't search for it */
- /* TBD: [Investigate] Check for both forward and backslash?? */
if (STRCMP (Pathname, NS_ROOT_PATH) == 0)
{
@@ -188,12 +189,12 @@ AcpiGetHandle (
}
/*
- * Find the Node and convert to the user format
+ * Find the Node and convert to a handle
*/
- Status = AcpiNsGetNode (Pathname, Node, &Node);
+ Status = AcpiNsGetNode (Pathname, PrefixNode, &Node);
*RetHandle = NULL;
- if(ACPI_SUCCESS(Status))
+ if (ACPI_SUCCESS (Status))
{
*RetHandle = AcpiNsConvertEntryToHandle (Node);
}
diff --git a/sys/contrib/dev/acpica/nsxfobj.c b/sys/contrib/dev/acpica/nsxfobj.c
index bdb0c2c..d9201e3 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: 74 $
+ * $Revision: 75 $
*
******************************************************************************/
@@ -350,7 +350,7 @@ AcpiEvaluateObject (
*/
DEBUG_PRINT (ACPI_INFO,
- ("AcpiEvaluateObject: Needed buffer size %d, received %d\n",
+ ("AcpiEvaluateObject: Needed buffer size %X, received %X\n",
BufferSpaceNeeded, UserBufferLength));
ReturnBuffer->Length = BufferSpaceNeeded;
diff --git a/sys/contrib/dev/acpica/psfind.c b/sys/contrib/dev/acpica/psfind.c
index 44b7dec..7b8529d 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: 18 $
+ * $Revision: 19 $
*
*****************************************************************************/
@@ -374,7 +374,8 @@ AcpiPsFind (
break;
}
- DEBUG_PRINT (TRACE_PARSE, ("PsFind: Search scope %p Segs=%d Opcode=%4.4X Create=%d\n", Scope, SegCount, Opcode, Create));
+ DEBUG_PRINT (TRACE_PARSE, ("PsFind: Search scope %p Segs=%d Opcode=%4.4X Create=%d\n",
+ Scope, SegCount, Opcode, Create));
/* match each name segment */
diff --git a/sys/contrib/dev/acpica/psscope.c b/sys/contrib/dev/acpica/psscope.c
index 47b61dc..7e70f60 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: 21 $
+ * $Revision: 22 $
*
*****************************************************************************/
@@ -329,7 +329,7 @@ AcpiPsPopScope (
DEBUG_PRINT (TRACE_PARSE,
- ("PsPopScope: Popped Op %p Args %d\n", *Op, *ArgCount));
+ ("PsPopScope: Popped Op %p Args %X\n", *Op, *ArgCount));
return_VOID;
}
diff --git a/sys/contrib/dev/acpica/rscalc.c b/sys/contrib/dev/acpica/rscalc.c
index 8d02ee8..633d206 100644
--- a/sys/contrib/dev/acpica/rscalc.c
+++ b/sys/contrib/dev/acpica/rscalc.c
@@ -989,4 +989,3 @@ AcpiRsCalculatePciRoutingTableLength (
return_ACPI_STATUS (AE_OK);
}
-
diff --git a/sys/contrib/dev/acpica/rscreate.c b/sys/contrib/dev/acpica/rscreate.c
index ceec373..9b4f5fb 100644
--- a/sys/contrib/dev/acpica/rscreate.c
+++ b/sys/contrib/dev/acpica/rscreate.c
@@ -3,7 +3,7 @@
* Module Name: rscreate - AcpiRsCreateResourceList
* AcpiRsCreatePciRoutingTable
* AcpiRsCreateByteStream
- * $Revision: 21 $
+ * $Revision: 22 $
*
******************************************************************************/
@@ -181,7 +181,7 @@ AcpiRsCreateResourceList (
&ListSizeNeeded);
DEBUG_PRINT (VERBOSE_INFO,
- ("RsCreateResourceList: Status=%d ListSizeNeeded=%d\n",
+ ("RsCreateResourceList: Status=%X ListSizeNeeded=%X\n",
Status, ListSizeNeeded));
/*
@@ -280,7 +280,7 @@ AcpiRsCreatePciRoutingTable (
&BufferSizeNeeded);
DEBUG_PRINT (VERBOSE_INFO,
- ("RsCreatePciRoutingTable: BufferSizeNeeded = %d\n",
+ ("RsCreatePciRoutingTable: BufferSizeNeeded = %X\n",
BufferSizeNeeded));
/*
@@ -500,7 +500,7 @@ AcpiRsCreateByteStream (
&ByteStreamSizeNeeded);
DEBUG_PRINT (VERBOSE_INFO,
- ("RsCreateByteStream: ByteStreamSizeNeeded=%d, %s\n",
+ ("RsCreateByteStream: ByteStreamSizeNeeded=%X, %s\n",
ByteStreamSizeNeeded,
AcpiCmFormatException (Status)));
diff --git a/sys/contrib/dev/acpica/rsdump.c b/sys/contrib/dev/acpica/rsdump.c
index 91cf28b..e01abf0 100644
--- a/sys/contrib/dev/acpica/rsdump.c
+++ b/sys/contrib/dev/acpica/rsdump.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsdump - Functions do dump out the resource structures.
- * $Revision: 12 $
+ * $Revision: 13 $
*
******************************************************************************/
@@ -158,12 +158,12 @@ AcpiRsDumpIrq (
SHARED == IrqData->SharedExclusive ?
"Shared" : "Exclusive");
- AcpiOsPrintf ("\t\t%d Interrupts ( ",
+ AcpiOsPrintf ("\t\t%X Interrupts ( ",
IrqData->NumberOfInterrupts);
for (Index = 0; Index < IrqData->NumberOfInterrupts; Index++)
{
- AcpiOsPrintf ("%d ", IrqData->Interrupts[Index]);
+ AcpiOsPrintf ("%X ", IrqData->Interrupts[Index]);
}
AcpiOsPrintf (")\n");
@@ -239,12 +239,12 @@ AcpiRsDumpDma (
break;
}
- AcpiOsPrintf ("\t\tNumber of Channels: %d ( ",
+ AcpiOsPrintf ("\t\tNumber of Channels: %X ( ",
DmaData->NumberOfChannels);
for (Index = 0; Index < DmaData->NumberOfChannels; Index++)
{
- AcpiOsPrintf ("%d ", DmaData->Channels[Index]);
+ AcpiOsPrintf ("%X ", DmaData->Channels[Index]);
}
AcpiOsPrintf (")\n");
@@ -341,16 +341,16 @@ AcpiRsDumpIo (
AcpiOsPrintf ("\t\t%d bit decode\n",
DECODE_16 == IoData->IoDecode ? 16 : 10);
- AcpiOsPrintf ("\t\tRange minimum base: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange minimum base: %08X\n",
IoData->MinBaseAddress);
- AcpiOsPrintf ("\t\tRange maximum base: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange maximum base: %08X\n",
IoData->MaxBaseAddress);
- AcpiOsPrintf ("\t\tAlignment: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAlignment: %08X\n",
IoData->Alignment);
- AcpiOsPrintf ("\t\tRange Length: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange Length: %08X\n",
IoData->RangeLength);
return;
@@ -377,10 +377,10 @@ AcpiRsDumpFixedIo (
AcpiOsPrintf ("\tFixed Io Resource\n");
- AcpiOsPrintf ("\t\tRange base address: 0x%08x",
+ AcpiOsPrintf ("\t\tRange base address: %08X",
FixedIoData->BaseAddress);
- AcpiOsPrintf ("\t\tRange length: 0x%08x",
+ AcpiOsPrintf ("\t\tRange length: %08X",
FixedIoData->RangeLength);
return;
@@ -409,11 +409,11 @@ AcpiRsDumpVendorSpecific (
AcpiOsPrintf ("\tVendor Specific Resource\n");
- AcpiOsPrintf ("\t\tLength: 0x%08x\n", VendorData->Length);
+ AcpiOsPrintf ("\t\tLength: %08X\n", VendorData->Length);
for (Index = 0; Index < VendorData->Length; Index++)
{
- AcpiOsPrintf ("\t\tByte %d: 0x%08x\n",
+ AcpiOsPrintf ("\t\tByte %X: %08X\n",
Index, VendorData->Reserved[Index]);
}
@@ -447,16 +447,16 @@ AcpiRsDumpMemory24 (
Memory24Data->ReadWriteAttribute ?
"/Write" : " only");
- AcpiOsPrintf ("\t\tRange minimum base: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange minimum base: %08X\n",
Memory24Data->MinBaseAddress);
- AcpiOsPrintf ("\t\tRange maximum base: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange maximum base: %08X\n",
Memory24Data->MaxBaseAddress);
- AcpiOsPrintf ("\t\tAlignment: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAlignment: %08X\n",
Memory24Data->Alignment);
- AcpiOsPrintf ("\t\tRange length: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange length: %08X\n",
Memory24Data->RangeLength);
return;
@@ -489,16 +489,16 @@ AcpiRsDumpMemory32 (
Memory32Data->ReadWriteAttribute ?
"/Write" : " only");
- AcpiOsPrintf ("\t\tRange minimum base: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange minimum base: %08X\n",
Memory32Data->MinBaseAddress);
- AcpiOsPrintf ("\t\tRange maximum base: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange maximum base: %08X\n",
Memory32Data->MaxBaseAddress);
- AcpiOsPrintf ("\t\tAlignment: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAlignment: %08X\n",
Memory32Data->Alignment);
- AcpiOsPrintf ("\t\tRange length: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange length: %08X\n",
Memory32Data->RangeLength);
return;
@@ -531,10 +531,10 @@ AcpiRsDumpFixedMemory32 (
FixedMemory32Data->ReadWriteAttribute ?
"/Write" : " Only");
- AcpiOsPrintf ("\t\tRange base address: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange base address: %08X\n",
FixedMemory32Data->RangeBaseAddress);
- AcpiOsPrintf ("\t\tRange length: 0x%08x\n",
+ AcpiOsPrintf ("\t\tRange length: %08X\n",
FixedMemory32Data->RangeLength);
return;
@@ -658,24 +658,24 @@ AcpiRsDumpAddress16 (
ADDRESS_FIXED == Address16Data->MaxAddressFixed ?
"" : "not");
- AcpiOsPrintf ("\t\tGranularity: 0x%08x\n",
+ AcpiOsPrintf ("\t\tGranularity: %08X\n",
Address16Data->Granularity);
- AcpiOsPrintf ("\t\tAddress range min: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAddress range min: %08X\n",
Address16Data->MinAddressRange);
- AcpiOsPrintf ("\t\tAddress range max: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAddress range max: %08X\n",
Address16Data->MaxAddressRange);
- AcpiOsPrintf ("\t\tAddress translation offset: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAddress translation offset: %08X\n",
Address16Data->AddressTranslationOffset);
- AcpiOsPrintf ("\t\tAddress Length: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAddress Length: %08X\n",
Address16Data->AddressLength);
if (0xFF != Address16Data->ResourceSourceIndex)
{
- AcpiOsPrintf ("\t\tResource Source Index: %d\n",
+ AcpiOsPrintf ("\t\tResource Source Index: %X\n",
Address16Data->ResourceSourceIndex);
AcpiOsPrintf ("\t\tResource Source: %s\n",
Address16Data->ResourceSource);
@@ -801,24 +801,24 @@ AcpiRsDumpAddress32 (
ADDRESS_FIXED == Address32Data->MaxAddressFixed ?
"" : "not ");
- AcpiOsPrintf ("\t\tGranularity: 0x%08x\n",
+ AcpiOsPrintf ("\t\tGranularity: %08X\n",
Address32Data->Granularity);
- AcpiOsPrintf ("\t\tAddress range min: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAddress range min: %08X\n",
Address32Data->MinAddressRange);
- AcpiOsPrintf ("\t\tAddress range max: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAddress range max: %08X\n",
Address32Data->MaxAddressRange);
- AcpiOsPrintf ("\t\tAddress translation offset: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAddress translation offset: %08X\n",
Address32Data->AddressTranslationOffset);
- AcpiOsPrintf ("\t\tAddress Length: 0x%08x\n",
+ AcpiOsPrintf ("\t\tAddress Length: %08X\n",
Address32Data->AddressLength);
if(0xFF != Address32Data->ResourceSourceIndex)
{
- AcpiOsPrintf ("\t\tResource Source Index: %d\n",
+ AcpiOsPrintf ("\t\tResource Source Index: %X\n",
Address32Data->ResourceSourceIndex);
AcpiOsPrintf ("\t\tResource Source: %s\n",
Address32Data->ResourceSource);
@@ -866,19 +866,19 @@ AcpiRsDumpExtendedIrq (
SHARED == ExtIrqData->SharedExclusive ?
"Shared" : "Exclusive");
- AcpiOsPrintf ("\t\tInterrupts : %d ( ",
+ AcpiOsPrintf ("\t\tInterrupts : %X ( ",
ExtIrqData->NumberOfInterrupts);
for (Index = 0; Index < ExtIrqData->NumberOfInterrupts; Index++)
{
- AcpiOsPrintf ("%d ", ExtIrqData->Interrupts[Index]);
+ AcpiOsPrintf ("%X ", ExtIrqData->Interrupts[Index]);
}
AcpiOsPrintf (")\n");
if(0xFF != ExtIrqData->ResourceSourceIndex)
{
- AcpiOsPrintf ("\t\tResource Source Index: %d",
+ AcpiOsPrintf ("\t\tResource Source Index: %X",
ExtIrqData->ResourceSourceIndex);
AcpiOsPrintf ("\t\tResource Source: %s",
ExtIrqData->ResourceSource);
@@ -1017,16 +1017,16 @@ AcpiRsDumpIrqList (
while (!Done)
{
- AcpiOsPrintf ("\tPCI IRQ Routing Table structure %x.\n", Count++);
+ AcpiOsPrintf ("\tPCI IRQ Routing Table structure %X.\n", Count++);
- AcpiOsPrintf ("\t\tAddress: 0x%x\n",
+ AcpiOsPrintf ("\t\tAddress: %X\n",
PrtElement->Data.Address);
- AcpiOsPrintf ("\t\tPin: 0x%x\n", PrtElement->Data.Pin);
+ AcpiOsPrintf ("\t\tPin: %X\n", PrtElement->Data.Pin);
AcpiOsPrintf ("\t\tSource: %s\n", PrtElement->Data.Source);
- AcpiOsPrintf ("\t\tSourceIndex: 0x%x\n",
+ AcpiOsPrintf ("\t\tSourceIndex: %X\n",
PrtElement->Data.SourceIndex);
Buffer += PrtElement->Length;
diff --git a/sys/contrib/dev/acpica/tbconvrt.c b/sys/contrib/dev/acpica/tbconvrt.c
index 647243c..2f67eb0 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: 14 $
+ * $Revision: 15 $
*
*****************************************************************************/
@@ -576,7 +576,7 @@ AcpiTbConvertTableFadt (void)
/* Dump the entire FADT */
DEBUG_PRINT (TRACE_TABLES,
- ("Hex dump of FADT (After header), size %d (0x%x)\n",
+ ("Hex dump of FADT (After header), size %d (%X)\n",
AcpiGbl_FADT->header.Length, AcpiGbl_FADT->header.Length));
DUMP_BUFFER ((UINT8 *) (&AcpiGbl_FADT->V1_FirmwareCtrl), AcpiGbl_FADT->header.Length);
diff --git a/sys/contrib/dev/acpica/tbget.c b/sys/contrib/dev/acpica/tbget.c
index a72431b..581417b 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: 39 $
+ * $Revision: 40 $
*
*****************************************************************************/
@@ -469,7 +469,7 @@ AcpiTbGetAllTables (
/* Dump the entire DSDT */
DEBUG_PRINT (TRACE_TABLES,
- ("Hex dump of DSDT (After header), size %d (0x%x)\n",
+ ("Hex dump of DSDT (After header), size %d (%x)\n",
AcpiGbl_DSDT->Length, AcpiGbl_DSDT->Length));
DUMP_BUFFER ((UINT8 *) (AcpiGbl_DSDT + 1), AcpiGbl_DSDT->Length);
diff --git a/sys/contrib/dev/acpica/tbinstal.c b/sys/contrib/dev/acpica/tbinstal.c
index 7554c26..3357379 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: 33 $
+ * $Revision: 34 $
*
*****************************************************************************/
@@ -275,7 +275,7 @@ AcpiTbRecognizeTable (
if (Status == AE_SUPPORT)
{
DEBUG_PRINT (ACPI_INFO,
- ("Unsupported table %s (Type %d) was found and discarded\n",
+ ("Unsupported table %s (Type %X) was found and discarded\n",
AcpiGbl_AcpiTableData[TableType].Name, TableType));
}
diff --git a/sys/contrib/dev/acpica/tbutils.c b/sys/contrib/dev/acpica/tbutils.c
index 5c48165..654568f 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: 30 $
+ * $Revision: 31 $
*
*****************************************************************************/
@@ -164,7 +164,7 @@ AcpiTbHandleToObject (
}
- DEBUG_PRINT (ACPI_ERROR, ("TableId=0x%X does not exist\n", TableId));
+ DEBUG_PRINT (ACPI_ERROR, ("TableId=%X does not exist\n", TableId));
return (AE_BAD_PARAMETER);
}
@@ -392,7 +392,7 @@ AcpiTbMapAcpiTable (
}
DEBUG_PRINT (ACPI_INFO,
- ("Mapped memory for ACPI table, length=%d(0x%X) at %p\n",
+ ("Mapped memory for ACPI table, length=%d(%X) at %p\n",
TableSize, TableSize, Table));
*Size = TableSize;
diff --git a/sys/contrib/dev/acpica/utalloc.c b/sys/contrib/dev/acpica/utalloc.c
index 8ac46c8..3b8564e 100644
--- a/sys/contrib/dev/acpica/utalloc.c
+++ b/sys/contrib/dev/acpica/utalloc.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmalloc - local memory allocation routines
- * $Revision: 78 $
+ * $Revision: 79 $
*
*****************************************************************************/
@@ -422,11 +422,11 @@ AcpiCmDeleteElementFromAllocList (
if (Size == sizeof (ACPI_OPERAND_OBJECT))
{
- DEBUG_PRINT (TRACE_ALLOCATIONS, ("CmDelete: Freeing size 0x%X (ACPI_OPERAND_OBJECT)\n", Size));
+ DEBUG_PRINT (TRACE_ALLOCATIONS, ("CmDelete: Freeing size %X (ACPI_OPERAND_OBJECT)\n", Size));
}
else
{
- DEBUG_PRINT (TRACE_ALLOCATIONS, ("CmDelete: Freeing size 0x%X\n", Size));
+ DEBUG_PRINT (TRACE_ALLOCATIONS, ("CmDelete: Freeing size %X\n", Size));
}
AcpiOsFree (Element);
@@ -611,7 +611,7 @@ AcpiCmDumpCurrentAllocations (
AcpiCmReleaseMutex (ACPI_MTX_MEMORY);
DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES,
- ("Total number of unfreed allocations = %d\n", i));
+ ("Total number of unfreed allocations = %d(%X)\n", i,i));
return_VOID;
}
@@ -664,7 +664,7 @@ _CmAllocate (
/* Report allocation error */
_REPORT_ERROR (Module, Line, Component,
- ("CmAllocate: Could not allocate size 0x%x\n", Size));
+ ("CmAllocate: Could not allocate size %X\n", Size));
return_VALUE (NULL);
}
@@ -679,7 +679,7 @@ _CmAllocate (
}
DEBUG_PRINT (TRACE_ALLOCATIONS,
- ("CmAllocate: %p Size 0x%x\n", Address, Size));
+ ("CmAllocate: %p Size %X\n", Address, Size));
#endif
return_PTR (Address);
@@ -733,7 +733,7 @@ _CmCallocate (
/* Report allocation error */
_REPORT_ERROR (Module, Line, Component,
- ("CmCallocate: Could not allocate size 0x%x\n", Size));
+ ("CmCallocate: Could not allocate size %X\n", Size));
return_VALUE (NULL);
}
@@ -748,7 +748,7 @@ _CmCallocate (
#endif
DEBUG_PRINT (TRACE_ALLOCATIONS,
- ("CmCallocate: %p Size 0x%x\n", Address, Size));
+ ("CmCallocate: %p Size %X\n", Address, Size));
return_PTR (Address);
}
diff --git a/sys/contrib/dev/acpica/utcopy.c b/sys/contrib/dev/acpica/utcopy.c
index 88216c7..91405da 100644
--- a/sys/contrib/dev/acpica/utcopy.c
+++ b/sys/contrib/dev/acpica/utcopy.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmcopy - Internal to external object translation utilities
- * $Revision: 58 $
+ * $Revision: 59 $
*
*****************************************************************************/
@@ -445,7 +445,7 @@ AcpiCmBuildExternalPackageObject (
* for us to handle
*/
DEBUG_PRINT (ACPI_ERROR,
- ("CmBuildPackageObject: Pkg nested too deep (max %d)\n",
+ ("CmBuildPackageObject: Pkg nested too deep (max %X)\n",
MAX_PACKAGE_DEPTH));
return_ACPI_STATUS (AE_LIMIT);
}
@@ -701,7 +701,7 @@ AcpiCmBuildInternalPackageObject (
* Too many nested levels of packages for us to handle
*/
DEBUG_PRINT (ACPI_ERROR,
- ("CmBuildPackageObject: Pkg nested too deep (max %d)\n",
+ ("CmBuildPackageObject: Pkg nested too deep (max %X)\n",
MAX_PACKAGE_DEPTH));
return_ACPI_STATUS (AE_LIMIT);
}
diff --git a/sys/contrib/dev/acpica/utdebug.c b/sys/contrib/dev/acpica/utdebug.c
index e9a4f5b..59ec1aa 100644
--- a/sys/contrib/dev/acpica/utdebug.c
+++ b/sys/contrib/dev/acpica/utdebug.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmdebug - Debug print routines
- * $Revision: 60 $
+ * $Revision: 61 $
*
*****************************************************************************/
@@ -210,7 +210,7 @@ FunctionTracePtr (
AcpiGbl_NestingLevel++;
DebugPrint (ModuleName, LineNumber, ComponentId, TRACE_FUNCTIONS,
- " %2.2ld Entered Function: %s, 0x%p\n",
+ " %2.2ld Entered Function: %s, %p\n",
AcpiGbl_NestingLevel, FunctionName, Pointer);
}
@@ -276,7 +276,7 @@ FunctionTraceU32 (
AcpiGbl_NestingLevel++;
DebugPrint (ModuleName, LineNumber, ComponentId, TRACE_FUNCTIONS,
- " %2.2ld Entered Function: %s, 0x%lX\n",
+ " %2.2ld Entered Function: %s, %lX\n",
AcpiGbl_NestingLevel, FunctionName, Integer);
}
@@ -377,7 +377,7 @@ FunctionValueExit (
{
DebugPrint (ModuleName, LineNumber, ComponentId, TRACE_FUNCTIONS,
- " %2.2ld Exiting Function: %s, 0x%X\n",
+ " %2.2ld Exiting Function: %s, %X\n",
AcpiGbl_NestingLevel, FunctionName, Value);
AcpiGbl_NestingLevel--;
@@ -411,7 +411,7 @@ FunctionPtrExit (
{
DebugPrint (ModuleName, LineNumber, ComponentId, TRACE_FUNCTIONS,
- " %2.2ld Exiting Function: %s, 0x%p\n",
+ " %2.2ld Exiting Function: %s, %p\n",
AcpiGbl_NestingLevel, FunctionName, Ptr);
AcpiGbl_NestingLevel--;
diff --git a/sys/contrib/dev/acpica/utdelete.c b/sys/contrib/dev/acpica/utdelete.c
index 1eefe19..055c71c 100644
--- a/sys/contrib/dev/acpica/utdelete.c
+++ b/sys/contrib/dev/acpica/utdelete.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: cmdelete - object deletion and reference count utilities
- * $Revision: 59 $
+ * $Revision: 60 $
*
******************************************************************************/
@@ -190,7 +190,7 @@ AcpiCmDeleteInternalObj (
case ACPI_TYPE_PACKAGE:
DEBUG_PRINT (ACPI_INFO,
- ("CmDeleteInternalObj: **** Package of count %d\n",
+ ("CmDeleteInternalObj: **** Package of count %X\n",
Object->Package.Count));
/*
@@ -423,7 +423,7 @@ AcpiCmUpdateRefCount (
Object->Common.ReferenceCount = NewCount;
DEBUG_PRINT (ACPI_INFO,
- ("CmUpdateRefCount: Obj %p Refs=%d, [Incremented]\n",
+ ("CmUpdateRefCount: Obj %p Refs=%X, [Incremented]\n",
Object, NewCount));
break;
@@ -433,7 +433,7 @@ AcpiCmUpdateRefCount (
if (Count < 1)
{
DEBUG_PRINT (ACPI_INFO,
- ("CmUpdateRefCount: Obj %p Refs=%d, can't decrement! (Set to 0)\n",
+ ("CmUpdateRefCount: Obj %p Refs=%X, can't decrement! (Set to 0)\n",
Object, NewCount));
NewCount = 0;
@@ -444,14 +444,14 @@ AcpiCmUpdateRefCount (
NewCount--;
DEBUG_PRINT (ACPI_INFO,
- ("CmUpdateRefCount: Obj %p Refs=%d, [Decremented]\n",
+ ("CmUpdateRefCount: Obj %p Refs=%X, [Decremented]\n",
Object, NewCount));
}
if (Object->Common.Type == ACPI_TYPE_METHOD)
{
DEBUG_PRINT (ACPI_INFO,
- ("CmUpdateRefCount: Method Obj %p Refs=%d, [Decremented]\n",
+ ("CmUpdateRefCount: Method Obj %p Refs=%X, [Decremented]\n",
Object, NewCount));
}
@@ -467,7 +467,7 @@ AcpiCmUpdateRefCount (
case REF_FORCE_DELETE:
DEBUG_PRINT (ACPI_INFO,
- ("CmUpdateRefCount: Obj %p Refs=%d, Force delete! (Set to 0)\n",
+ ("CmUpdateRefCount: Obj %p Refs=%X, Force delete! (Set to 0)\n",
Object, Count));
NewCount = 0;
@@ -479,7 +479,7 @@ AcpiCmUpdateRefCount (
default:
DEBUG_PRINT (ACPI_ERROR,
- ("CmUpdateRefCount: Unknown action (%d)\n", Action));
+ ("CmUpdateRefCount: Unknown action (%X)\n", Action));
break;
}
@@ -493,7 +493,7 @@ AcpiCmUpdateRefCount (
{
DEBUG_PRINT (ACPI_ERROR,
- ("CmUpdateRefCount: **** AE_ERROR **** Invalid Reference Count (0x%X) in object %p\n\n",
+ ("CmUpdateRefCount: **** AE_ERROR **** Invalid Reference Count (%X) in object %p\n\n",
Count, Object));
}
@@ -789,7 +789,7 @@ AcpiCmRemoveReference (
return_VOID;
}
- DEBUG_PRINT (ACPI_INFO, ("CmRemoveReference: Obj %p Refs=%d\n",
+ DEBUG_PRINT (ACPI_INFO, ("CmRemoveReference: Obj %p Refs=%X\n",
Object, Object->Common.ReferenceCount));
/*
diff --git a/sys/contrib/dev/acpica/uteval.c b/sys/contrib/dev/acpica/uteval.c
index 81be3df..7b9fefc 100644
--- a/sys/contrib/dev/acpica/uteval.c
+++ b/sys/contrib/dev/acpica/uteval.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmeval - Object evaluation
- * $Revision: 18 $
+ * $Revision: 19 $
*
*****************************************************************************/
@@ -193,7 +193,7 @@ AcpiCmEvaluateNumericObject (
{
Status = AE_TYPE;
DEBUG_PRINT (ACPI_ERROR,
- ("Type returned from %s was not a number: %d \n",
+ ("Type returned from %s was not a number: %X \n",
ObjectName, ObjDesc->Common.Type));
}
else
@@ -283,8 +283,8 @@ AcpiCmExecute_HID (
{
Status = AE_TYPE;
DEBUG_PRINT (ACPI_ERROR,
- ("Type returned from _HID was not a number or string: [0x%X] \n",
- ObjDesc->Common.Type));
+ ("Type returned from _HID not a number or string: %s(%X) \n",
+ AcpiCmGetTypeName (ObjDesc->Common.Type), ObjDesc->Common.Type));
}
else
@@ -380,7 +380,7 @@ AcpiCmExecute_UID (
{
Status = AE_TYPE;
DEBUG_PRINT (ACPI_ERROR,
- ("Type returned from _UID was not a number or string: %d \n",
+ ("Type returned from _UID was not a number or string: %X \n",
ObjDesc->Common.Type));
}
@@ -474,7 +474,7 @@ AcpiCmExecute_STA (
{
Status = AE_TYPE;
DEBUG_PRINT (ACPI_ERROR,
- ("Type returned from _STA was not a number: %d \n",
+ ("Type returned from _STA was not a number: %X \n",
ObjDesc->Common.Type));
}
diff --git a/sys/contrib/dev/acpica/utglobal.c b/sys/contrib/dev/acpica/utglobal.c
index 508b01d..07757d5 100644
--- a/sys/contrib/dev/acpica/utglobal.c
+++ b/sys/contrib/dev/acpica/utglobal.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmglobal - Global variables for the ACPI subsystem
- * $Revision: 110 $
+ * $Revision: 112 $
*
*****************************************************************************/
@@ -121,6 +121,7 @@
#include "acevents.h"
#include "acnamesp.h"
#include "acinterp.h"
+#include "amlcode.h"
#define _COMPONENT MISCELLANEOUS
@@ -242,10 +243,8 @@ UINT8 AcpiGbl_NsProperties[] =
NSP_NORMAL, /* 30 While */
NSP_NEWSCOPE, /* 31 Scope */
NSP_LOCAL, /* 32 DefAny */
- NSP_NORMAL, /* 33 Method Arg */
- NSP_NORMAL, /* 34 Method Local */
- NSP_NORMAL, /* 35 Extra */
- NSP_NORMAL /* 36 Invalid */
+ NSP_NORMAL, /* 33 Extra */
+ NSP_NORMAL /* 34 Invalid */
};
@@ -288,6 +287,8 @@ ACPI_TABLE_SUPPORT AcpiGbl_AcpiTableData[NUM_ACPI_TABLES] =
NATIVE_CHAR *MsgAcpiErrorBreak = "*** Break on ACPI_ERROR ***\n";
+
+
/*****************************************************************************
*
* FUNCTION: AcpiCmGetMutexName
@@ -361,10 +362,8 @@ static NATIVE_CHAR *AcpiGbl_NsTypeNames[] = /* printable names of AC
/* 30 */ "While",
/* 31 */ "Scope",
/* 32 */ "DefAny",
- /* 33 */ "MethodArg",
- /* 34 */ "MethodLcl",
- /* 35 */ "Extra",
- /* 36 */ "Invalid"
+ /* 33 */ "Extra",
+ /* 34 */ "Invalid"
};
@@ -393,9 +392,107 @@ AcpiCmGetTypeName (
return (AcpiGbl_NsTypeNames[Type]);
}
+
+
+
+
+/* Region type decoding */
+
+NATIVE_CHAR *AcpiGbl_RegionTypes[NUM_REGION_TYPES] =
+{
+ "SystemMemory",
+ "SystemIO",
+ "PCIConfig",
+ "EmbeddedControl",
+ "SMBus",
+ "CMOS",
+ "PCIBarTarget",
+};
+
+
+/*****************************************************************************
+ *
+ * FUNCTION: AcpiCmGetRegionName
+ *
+ * PARAMETERS: None.
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Translate a Space ID into a name string (Debug only)
+ *
+ ****************************************************************************/
+
+NATIVE_CHAR *
+AcpiCmGetRegionName (
+ UINT8 SpaceId)
+{
+
+ if (SpaceId >= USER_REGION_BEGIN)
+ {
+ return ("UserDefinedRegion");
+ }
+
+ else if (SpaceId >= NUM_REGION_TYPES)
+ {
+ return ("InvalidSpaceID");
+ }
+
+ return (AcpiGbl_RegionTypes[SpaceId]);
+}
+
+
+
+
+
+/* Data used in keeping track of fields */
+
+NATIVE_CHAR *AcpiGbl_FENames[NUM_FIELD_NAMES] =
+{
+ "skip",
+ "?access?"
+}; /* FE = Field Element */
+
+
+
+NATIVE_CHAR *AcpiGbl_MatchOps[NUM_MATCH_OPS] =
+{
+ "Error",
+ "MTR",
+ "MEQ",
+ "MLE",
+ "MLT",
+ "MGE",
+ "MGT"
+};
+
+
+/* Access type decoding */
+
+NATIVE_CHAR *AcpiGbl_AccessTypes[NUM_ACCESS_TYPES] =
+{
+ "AnyAcc",
+ "ByteAcc",
+ "WordAcc",
+ "DWordAcc",
+ "BlockAcc",
+ "SMBSendRecvAcc",
+ "SMBQuickAcc"
+};
+
+
+/* Update rule decoding */
+
+NATIVE_CHAR *AcpiGbl_UpdateRules[NUM_UPDATE_RULES] =
+{
+ "Preserve",
+ "WriteAsOnes",
+ "WriteAsZeros"
+};
+
#endif
+
/*****************************************************************************
*
* FUNCTION: AcpiCmValidObjectType
diff --git a/sys/contrib/dev/acpica/utinit.c b/sys/contrib/dev/acpica/utinit.c
index bbc0878..1c5a0a9 100644
--- a/sys/contrib/dev/acpica/utinit.c
+++ b/sys/contrib/dev/acpica/utinit.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cminit - Common ACPI subsystem initialization
- * $Revision: 88 $
+ * $Revision: 89 $
*
*****************************************************************************/
@@ -150,7 +150,7 @@ AcpiCmFadtRegisterError (
{
REPORT_ERROR (
- ("Invalid FADT register value, %s = 0x%X (FADT=0x%X)\n",
+ ("Invalid FADT register value, %s=%X (FADT=%p)\n",
RegisterName, Value, AcpiGbl_FADT));
diff --git a/sys/contrib/dev/acpica/utobject.c b/sys/contrib/dev/acpica/utobject.c
index 83a2d0f..a1a8b0e 100644
--- a/sys/contrib/dev/acpica/utobject.c
+++ b/sys/contrib/dev/acpica/utobject.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmobject - ACPI object create/delete/size/cache routines
- * $Revision: 31 $
+ * $Revision: 32 $
*
*****************************************************************************/
@@ -334,7 +334,7 @@ _CmAllocateObjectDesc (
Object->Common.DataType = ACPI_DESC_TYPE_INTERNAL;
- DEBUG_PRINT (TRACE_ALLOCATIONS, ("AllocateObjectDesc: %p Size 0x%x\n",
+ DEBUG_PRINT (TRACE_ALLOCATIONS, ("AllocateObjectDesc: %p Size %X\n",
Object, sizeof (ACPI_OPERAND_OBJECT)));
return_PTR (Object);
@@ -605,7 +605,7 @@ AcpiCmGetSimpleObjectSize (
if (InternalObj->Reference.OpCode != AML_NAMEPATH_OP)
{
DEBUG_PRINT (ACPI_ERROR,
- ("CmGetSimpleObjectSize: Unsupported Reference opcode=0x%X in object %p\n",
+ ("CmGetSimpleObjectSize: Unsupported Reference opcode=%X in object %p\n",
InternalObj->Reference.OpCode, InternalObj));
Status = AE_TYPE;
}
@@ -615,7 +615,7 @@ AcpiCmGetSimpleObjectSize (
default:
DEBUG_PRINT (ACPI_ERROR,
- ("CmGetSimpleObjectSize: Unsupported type=0x%X in object %p\n",
+ ("CmGetSimpleObjectSize: Unsupported type=%X in object %p\n",
InternalObj->Common.Type, InternalObj));
Status = AE_TYPE;
break;
@@ -772,7 +772,7 @@ AcpiCmGetPackageObjectSize (
*/
DEBUG_PRINT (ACPI_ERROR,
- ("CmGetPackageObjectSize: Pkg nested too deep (max %d)\n",
+ ("CmGetPackageObjectSize: Pkg nested too deep (max %X)\n",
MAX_PACKAGE_DEPTH));
return_ACPI_STATUS (AE_LIMIT);
}
diff --git a/sys/contrib/dev/acpica/utxface.c b/sys/contrib/dev/acpica/utxface.c
index 6add38b..e905921 100644
--- a/sys/contrib/dev/acpica/utxface.c
+++ b/sys/contrib/dev/acpica/utxface.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmxface - External interfaces for "global" ACPI functions
- * $Revision: 54 $
+ * $Revision: 55 $
*
*****************************************************************************/
@@ -277,7 +277,9 @@ AcpiEnableSubsystem (
Status = AcpiEnable ();
if (ACPI_FAILURE (Status))
{
- return_ACPI_STATUS (Status);
+ /* TBD: workaround. Old Lions don't enable properly */
+ DEBUG_PRINT(ACPI_WARN, ("AcpiEnable failed.\n"));
+ /*return_ACPI_STATUS (Status);*/
}
}
OpenPOWER on IntegriCloud