summaryrefslogtreecommitdiff
path: root/usr/src/uts/intel/io/acpica/debugger/dbcmds.c
diff options
context:
space:
mode:
authorDana Myers <Dana.Myers@Sun.COM>2008-10-15 19:26:19 -0400
committerDana Myers <Dana.Myers@Sun.COM>2008-10-15 19:26:19 -0400
commitdb2bae3047e71d795bde12e3baa621f4b6cc8930 (patch)
tree6f7ced35318bced4805171292ec76a5229f3e78a /usr/src/uts/intel/io/acpica/debugger/dbcmds.c
parent25351652d920ae27c5a56c199da581033ce763f6 (diff)
downloadillumos-joyent-db2bae3047e71d795bde12e3baa621f4b6cc8930.tar.gz
6464695 acpica: update to Intel ACPI CA 20080829
6747548 acpica: must check size of buffers returned from AcpiEvaluateObject() --HG-- rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsfield.c => usr/src/uts/intel/io/acpica/dispatcher/dsfield.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsinit.c => usr/src/uts/intel/io/acpica/dispatcher/dsinit.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsmethod.c => usr/src/uts/intel/io/acpica/dispatcher/dsmethod.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsmthdat.c => usr/src/uts/intel/io/acpica/dispatcher/dsmthdat.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsobject.c => usr/src/uts/intel/io/acpica/dispatcher/dsobject.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsopcode.c => usr/src/uts/intel/io/acpica/dispatcher/dsopcode.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsutils.c => usr/src/uts/intel/io/acpica/dispatcher/dsutils.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswexec.c => usr/src/uts/intel/io/acpica/dispatcher/dswexec.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswload.c => usr/src/uts/intel/io/acpica/dispatcher/dswload.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswscope.c => usr/src/uts/intel/io/acpica/dispatcher/dswscope.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswstate.c => usr/src/uts/intel/io/acpica/dispatcher/dswstate.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exconfig.c => usr/src/uts/intel/io/acpica/executer/exconfig.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exconvrt.c => usr/src/uts/intel/io/acpica/executer/exconvrt.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/excreate.c => usr/src/uts/intel/io/acpica/executer/excreate.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exdump.c => usr/src/uts/intel/io/acpica/executer/exdump.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exfield.c => usr/src/uts/intel/io/acpica/executer/exfield.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exfldio.c => usr/src/uts/intel/io/acpica/executer/exfldio.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exmisc.c => usr/src/uts/intel/io/acpica/executer/exmisc.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exmutex.c => usr/src/uts/intel/io/acpica/executer/exmutex.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exnames.c => usr/src/uts/intel/io/acpica/executer/exnames.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exoparg1.c => usr/src/uts/intel/io/acpica/executer/exoparg1.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exoparg2.c => usr/src/uts/intel/io/acpica/executer/exoparg2.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exoparg3.c => usr/src/uts/intel/io/acpica/executer/exoparg3.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exoparg6.c => usr/src/uts/intel/io/acpica/executer/exoparg6.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exprep.c => usr/src/uts/intel/io/acpica/executer/exprep.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exregion.c => usr/src/uts/intel/io/acpica/executer/exregion.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exresnte.c => usr/src/uts/intel/io/acpica/executer/exresnte.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exresolv.c => usr/src/uts/intel/io/acpica/executer/exresolv.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exresop.c => usr/src/uts/intel/io/acpica/executer/exresop.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exstore.c => usr/src/uts/intel/io/acpica/executer/exstore.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exstoren.c => usr/src/uts/intel/io/acpica/executer/exstoren.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exstorob.c => usr/src/uts/intel/io/acpica/executer/exstorob.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exsystem.c => usr/src/uts/intel/io/acpica/executer/exsystem.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exutils.c => usr/src/uts/intel/io/acpica/executer/exutils.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psargs.c => usr/src/uts/intel/io/acpica/parser/psargs.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psloop.c => usr/src/uts/intel/io/acpica/parser/psloop.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psopcode.c => usr/src/uts/intel/io/acpica/parser/psopcode.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psparse.c => usr/src/uts/intel/io/acpica/parser/psparse.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psscope.c => usr/src/uts/intel/io/acpica/parser/psscope.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/pstree.c => usr/src/uts/intel/io/acpica/parser/pstree.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psutils.c => usr/src/uts/intel/io/acpica/parser/psutils.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/pswalk.c => usr/src/uts/intel/io/acpica/parser/pswalk.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psxface.c => usr/src/uts/intel/io/acpica/parser/psxface.c
Diffstat (limited to 'usr/src/uts/intel/io/acpica/debugger/dbcmds.c')
-rw-r--r--usr/src/uts/intel/io/acpica/debugger/dbcmds.c92
1 files changed, 56 insertions, 36 deletions
diff --git a/usr/src/uts/intel/io/acpica/debugger/dbcmds.c b/usr/src/uts/intel/io/acpica/debugger/dbcmds.c
index b3ae57d306..0cefe35436 100644
--- a/usr/src/uts/intel/io/acpica/debugger/dbcmds.c
+++ b/usr/src/uts/intel/io/acpica/debugger/dbcmds.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbcmds - debug commands and output routines
- * $Revision: 1.145 $
+ * $Revision: 1.157 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -117,14 +117,12 @@
#include "acpi.h"
#include "acdispat.h"
-#include "amlcode.h"
#include "acnamesp.h"
#include "acevents.h"
#include "acdebug.h"
#include "acresrc.h"
#include "acdisasm.h"
-
-
+#include "actables.h"
#include "acparser.h"
#ifdef ACPI_DEBUGGER
@@ -285,9 +283,6 @@ ACPI_STATUS
AcpiDbSleep (
char *ObjectArg)
{
-#if ACPI_MACHINE_WIDTH == 16
- return (AE_OK);
-#else
ACPI_STATUS Status;
UINT8 SleepState;
@@ -312,7 +307,6 @@ AcpiDbSleep (
Status = AcpiLeaveSleepState (SleepState);
return (Status);
-#endif
}
@@ -441,25 +435,29 @@ AcpiDbDisplayTableInfo (
ACPI_TABLE_DESC *TableDesc;
- for (i = 0; i < (ACPI_TABLE_ID_MAX+1); i++)
+ /* Walk the entire root table list */
+
+ for (i = 0; i < AcpiGbl_RootTableList.Count; i++)
{
- TableDesc = AcpiGbl_TableLists[i].Next;
- while (TableDesc)
- {
- AcpiOsPrintf ( "%s at %p length %.5X",
- AcpiGbl_TableData[i].Name, TableDesc->Pointer,
- (UINT32) TableDesc->Length);
+ TableDesc = &AcpiGbl_RootTableList.Tables[i];
+ AcpiOsPrintf ("%d ", i);
- if (i != ACPI_TABLE_ID_FACS)
- {
- AcpiOsPrintf (" OemID=%6s TableId=%8s OemRevision=%8.8X",
- TableDesc->Pointer->OemId,
- TableDesc->Pointer->OemTableId,
- TableDesc->Pointer->OemRevision);
- }
- AcpiOsPrintf ("\n");
+ /* Make sure that the table is mapped */
+
+ AcpiTbVerifyTable (TableDesc);
+
+ /* Dump the table header */
+
+ if (TableDesc->Pointer)
+ {
+ AcpiTbPrintTableHeader (TableDesc->Address, TableDesc->Pointer);
+ }
+ else
+ {
+ /* If the pointer is null, the table has been unloaded */
- TableDesc = TableDesc->Next;
+ ACPI_INFO ((AE_INFO, "%4.4s - Table has been unloaded",
+ TableDesc->Signature.Ascii));
}
}
}
@@ -485,6 +483,9 @@ AcpiDbUnloadAcpiTable (
char *TableArg,
char *InstanceArg)
{
+/* TBD: Need to reimplement for new data structures */
+
+#if 0
UINT32 i;
ACPI_STATUS Status;
@@ -514,6 +515,7 @@ AcpiDbUnloadAcpiTable (
}
AcpiOsPrintf ("Unknown table type [%s]\n", TableArg);
+#endif
}
@@ -677,7 +679,7 @@ AcpiDbDisassembleMethod (
Status = AcpiDsInitAmlWalk (WalkState, Op, NULL,
ObjDesc->Method.AmlStart,
- ObjDesc->Method.AmlLength, NULL, 1);
+ ObjDesc->Method.AmlLength, NULL, ACPI_IMODE_LOAD_PASS1);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -940,7 +942,7 @@ AcpiDbSetMethodData (
goto Cleanup;
}
- Status = AcpiDsStoreObjectToLocal (AML_ARG_OP, Index, ObjDesc,
+ Status = AcpiDsStoreObjectToLocal (ACPI_REFCLASS_ARG, Index, ObjDesc,
WalkState);
if (ACPI_FAILURE (Status))
{
@@ -963,7 +965,7 @@ AcpiDbSetMethodData (
goto Cleanup;
}
- Status = AcpiDsStoreObjectToLocal (AML_LOCAL_OP, Index, ObjDesc,
+ Status = AcpiDsStoreObjectToLocal (ACPI_REFCLASS_LOCAL, Index, ObjDesc,
WalkState);
if (ACPI_FAILURE (Status))
{
@@ -1413,8 +1415,8 @@ AcpiDmTestResourceConversion (
OriginalAml = ReturnObj.Pointer;
AcpiDmCompareAmlResources (
- OriginalAml->Buffer.Pointer, OriginalAml->Buffer.Length,
- NewAml.Pointer, NewAml.Length);
+ OriginalAml->Buffer.Pointer, (ACPI_RSDESC_SIZE) OriginalAml->Buffer.Length,
+ NewAml.Pointer, (ACPI_RSDESC_SIZE) NewAml.Length);
/* Cleanup and exit */
@@ -1443,8 +1445,6 @@ void
AcpiDbDisplayResources (
char *ObjectArg)
{
-#if ACPI_MACHINE_WIDTH != 16
-
ACPI_NAMESPACE_NODE *Node;
ACPI_STATUS Status;
ACPI_BUFFER ReturnObj;
@@ -1582,7 +1582,6 @@ Cleanup:
AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);
return;
-#endif
}
@@ -1608,24 +1607,45 @@ AcpiDbIntegrityWalk (
ACPI_INTEGRITY_INFO *Info = (ACPI_INTEGRITY_INFO *) Context;
ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
ACPI_OPERAND_OBJECT *Object;
+ BOOLEAN Alias = TRUE;
Info->Nodes++;
- if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
+
+ /* Verify the NS node, and dereference aliases */
+
+ while (Alias)
{
- AcpiOsPrintf ("Invalid Descriptor Type for Node %p [%s]\n",
- Node, AcpiUtGetDescriptorName (Node));
+ if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
+ {
+ AcpiOsPrintf ("Invalid Descriptor Type for Node %p [%s] - is %2.2X should be %2.2X\n",
+ Node, AcpiUtGetDescriptorName (Node), ACPI_GET_DESCRIPTOR_TYPE (Node),
+ ACPI_DESC_TYPE_NAMED);
+ return (AE_OK);
+ }
+
+ if ((Node->Type == ACPI_TYPE_LOCAL_ALIAS) ||
+ (Node->Type == ACPI_TYPE_LOCAL_METHOD_ALIAS))
+ {
+ Node = (ACPI_NAMESPACE_NODE *) Node->Object;
+ }
+ else
+ {
+ Alias = FALSE;
+ }
}
if (Node->Type > ACPI_TYPE_LOCAL_MAX)
{
AcpiOsPrintf ("Invalid Object Type for Node %p, Type = %X\n",
Node, Node->Type);
+ return (AE_OK);
}
if (!AcpiUtValidAcpiName (Node->Name.Integer))
{
AcpiOsPrintf ("Invalid AcpiName for Node %p\n", Node);
+ return (AE_OK);
}
Object = AcpiNsGetAttachedObject (Node);