summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/components/executer/exdump.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2016-09-30 22:40:58 +0000
committerjkim <jkim@FreeBSD.org>2016-09-30 22:40:58 +0000
commitdba8c0a565199df70a86f6a036d00c92f0c7675f (patch)
treecf4924274c6e92898c01efb3c8ba31b34f0630f2 /sys/contrib/dev/acpica/components/executer/exdump.c
parent0f41551ef9dde560d9d191d7190af02904dbf611 (diff)
downloadFreeBSD-src-dba8c0a565199df70a86f6a036d00c92f0c7675f.zip
FreeBSD-src-dba8c0a565199df70a86f6a036d00c92f0c7675f.tar.gz
MFC: r284583, r285797, r285799, r287168, r298714, r298720, r298838,
r300879 Merge ACPICA up to 20160527. Requested by: mav
Diffstat (limited to 'sys/contrib/dev/acpica/components/executer/exdump.c')
-rw-r--r--sys/contrib/dev/acpica/components/executer/exdump.c86
1 files changed, 50 insertions, 36 deletions
diff --git a/sys/contrib/dev/acpica/components/executer/exdump.c b/sys/contrib/dev/acpica/components/executer/exdump.c
index 622dc14..3e6c089 100644
--- a/sys/contrib/dev/acpica/components/executer/exdump.c
+++ b/sys/contrib/dev/acpica/components/executer/exdump.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -60,13 +60,13 @@
static void
AcpiExOutString (
- char *Title,
- char *Value);
+ const char *Title,
+ const char *Value);
static void
AcpiExOutPointer (
- char *Title,
- void *Value);
+ const char *Title,
+ const void *Value);
static void
AcpiExDumpObject (
@@ -238,7 +238,7 @@ static ACPI_EXDUMP_INFO AcpiExDumpIndexField[5] =
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (IndexField.DataObj), "Data Object"}
};
-static ACPI_EXDUMP_INFO AcpiExDumpReference[8] =
+static ACPI_EXDUMP_INFO AcpiExDumpReference[9] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpReference), NULL},
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Reference.Class), "Class"},
@@ -247,6 +247,7 @@ static ACPI_EXDUMP_INFO AcpiExDumpReference[8] =
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Reference.Object), "Object Desc"},
{ACPI_EXD_NODE, ACPI_EXD_OFFSET (Reference.Node), "Node"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Reference.Where), "Where"},
+ {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Reference.IndexPointer), "Index Pointer"},
{ACPI_EXD_REFERENCE,0, NULL}
};
@@ -379,8 +380,7 @@ AcpiExDumpObject (
ACPI_EXDUMP_INFO *Info)
{
UINT8 *Target;
- char *Name;
- const char *ReferenceName;
+ const char *Name;
UINT8 Count;
ACPI_OPERAND_OBJECT *Start;
ACPI_OPERAND_OBJECT *Data = NULL;
@@ -452,7 +452,8 @@ AcpiExDumpObject (
case ACPI_EXD_BUFFER:
- ACPI_DUMP_BUFFER (ObjDesc->Buffer.Pointer, ObjDesc->Buffer.Length);
+ ACPI_DUMP_BUFFER (
+ ObjDesc->Buffer.Pointer, ObjDesc->Buffer.Length);
break;
case ACPI_EXD_PACKAGE:
@@ -470,8 +471,7 @@ AcpiExDumpObject (
case ACPI_EXD_REFERENCE:
- ReferenceName = AcpiUtGetReferenceName (ObjDesc);
- AcpiExOutString ("Class Name", ACPI_CAST_PTR (char, ReferenceName));
+ AcpiExOutString ("Class Name", AcpiUtGetReferenceName (ObjDesc));
AcpiExDumpReferenceObj (ObjDesc);
break;
@@ -500,7 +500,8 @@ AcpiExDumpObject (
if ((Next == Start) || (Next == Data))
{
- AcpiOsPrintf ("\n**** Error: Object list appears to be circular linked");
+ AcpiOsPrintf (
+ "\n**** Error: Object list appears to be circular linked");
break;
}
}
@@ -518,7 +519,8 @@ AcpiExDumpObject (
if (Next)
{
AcpiOsPrintf ("(%s %2.2X)",
- AcpiUtGetObjectTypeName (Next), Next->Common.Type);
+ AcpiUtGetObjectTypeName (Next),
+ Next->AddressSpace.SpaceId);
while (Next->AddressSpace.Next)
{
@@ -530,11 +532,13 @@ AcpiExDumpObject (
Next = Next->AddressSpace.Next;
AcpiOsPrintf ("->%p(%s %2.2X)", Next,
- AcpiUtGetObjectTypeName (Next), Next->Common.Type);
+ AcpiUtGetObjectTypeName (Next),
+ Next->AddressSpace.SpaceId);
if ((Next == Start) || (Next == Data))
{
- AcpiOsPrintf ("\n**** Error: Handler list appears to be circular linked");
+ AcpiOsPrintf (
+ "\n**** Error: Handler list appears to be circular linked");
break;
}
}
@@ -568,7 +572,8 @@ AcpiExDumpObject (
if ((Next == Start) || (Next == Data))
{
- AcpiOsPrintf ("\n**** Error: Region list appears to be circular linked");
+ AcpiOsPrintf (
+ "\n**** Error: Region list appears to be circular linked");
break;
}
}
@@ -676,7 +681,8 @@ AcpiExDumpOperand (
{
case ACPI_TYPE_LOCAL_REFERENCE:
- AcpiOsPrintf ("Reference: [%s] ", AcpiUtGetReferenceName (ObjDesc));
+ AcpiOsPrintf ("Reference: [%s] ",
+ AcpiUtGetReferenceName (ObjDesc));
switch (ObjDesc->Reference.Class)
{
@@ -704,7 +710,8 @@ AcpiExDumpOperand (
case ACPI_REFCLASS_NAME:
- AcpiOsPrintf ("- [%4.4s]\n", ObjDesc->Reference.Node->Name.Ascii);
+ AcpiOsPrintf ("- [%4.4s]\n",
+ ObjDesc->Reference.Node->Name.Ascii);
break;
case ACPI_REFCLASS_ARG:
@@ -735,8 +742,8 @@ AcpiExDumpOperand (
Length = 128;
}
- AcpiOsPrintf ("Buffer Contents: (displaying length 0x%.2X)\n",
- Length);
+ AcpiOsPrintf (
+ "Buffer Contents: (displaying length 0x%.2X)\n", Length);
ACPI_DUMP_BUFFER (ObjDesc->Buffer.Pointer, Length);
}
break;
@@ -762,7 +769,8 @@ AcpiExDumpOperand (
{
for (Index = 0; Index < ObjDesc->Package.Count; Index++)
{
- AcpiExDumpOperand (ObjDesc->Package.Elements[Index], Depth+1);
+ AcpiExDumpOperand (
+ ObjDesc->Package.Elements[Index], Depth + 1);
}
}
break;
@@ -815,7 +823,7 @@ AcpiExDumpOperand (
ObjDesc->Field.BaseByteOffset,
ObjDesc->Field.StartFieldBitOffset);
- AcpiExDumpOperand (ObjDesc->Field.RegionObj, Depth+1);
+ AcpiExDumpOperand (ObjDesc->Field.RegionObj, Depth + 1);
break;
case ACPI_TYPE_LOCAL_INDEX_FIELD:
@@ -835,13 +843,13 @@ AcpiExDumpOperand (
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "*NULL*\n"));
}
else if ((ObjDesc->BufferField.BufferObj)->Common.Type !=
- ACPI_TYPE_BUFFER)
+ ACPI_TYPE_BUFFER)
{
AcpiOsPrintf ("*not a Buffer*\n");
}
else
{
- AcpiExDumpOperand (ObjDesc->BufferField.BufferObj, Depth+1);
+ AcpiExDumpOperand (ObjDesc->BufferField.BufferObj, Depth + 1);
}
break;
@@ -960,16 +968,16 @@ AcpiExDumpOperands (
static void
AcpiExOutString (
- char *Title,
- char *Value)
+ const char *Title,
+ const char *Value)
{
AcpiOsPrintf ("%20s : %s\n", Title, Value);
}
static void
AcpiExOutPointer (
- char *Title,
- void *Value)
+ const char *Title,
+ const void *Value)
{
AcpiOsPrintf ("%20s : %p\n", Title, Value);
}
@@ -1038,7 +1046,8 @@ AcpiExDumpReferenceObj (
{
AcpiOsPrintf (" %p ", ObjDesc->Reference.Node);
- Status = AcpiNsHandleToPathname (ObjDesc->Reference.Node, &RetBuf);
+ Status = AcpiNsHandleToPathname (ObjDesc->Reference.Node,
+ &RetBuf, TRUE);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf (" Could not convert name to pathname\n");
@@ -1053,16 +1062,18 @@ AcpiExDumpReferenceObj (
{
if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_OPERAND)
{
- AcpiOsPrintf (" Target: %p", ObjDesc->Reference.Object);
+ AcpiOsPrintf ("%22s %p", "Target :",
+ ObjDesc->Reference.Object);
if (ObjDesc->Reference.Class == ACPI_REFCLASS_TABLE)
{
- AcpiOsPrintf (" Table Index: %X\n", ObjDesc->Reference.Value);
+ AcpiOsPrintf (" Table Index: %X\n",
+ ObjDesc->Reference.Value);
}
else
{
- AcpiOsPrintf (" Target: %p [%s]\n", ObjDesc->Reference.Object,
+ AcpiOsPrintf (" [%s]\n",
AcpiUtGetTypeName (((ACPI_OPERAND_OBJECT *)
- ObjDesc->Reference.Object)->Common.Type));
+ ObjDesc->Reference.Object)->Common.Type));
}
}
else
@@ -1138,7 +1149,8 @@ AcpiExDumpPackageObj (
AcpiOsPrintf ("[Buffer] Length %.2X = ", ObjDesc->Buffer.Length);
if (ObjDesc->Buffer.Length)
{
- AcpiUtDebugDumpBuffer (ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
+ AcpiUtDebugDumpBuffer (
+ ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT);
}
else
@@ -1154,7 +1166,8 @@ AcpiExDumpPackageObj (
for (i = 0; i < ObjDesc->Package.Count; i++)
{
- AcpiExDumpPackageObj (ObjDesc->Package.Elements[i], Level+1, i);
+ AcpiExDumpPackageObj (
+ ObjDesc->Package.Elements[i], Level + 1, i);
}
break;
@@ -1252,7 +1265,8 @@ DumpObject:
ObjDesc = ObjDesc->Common.NextObject;
if (ObjDesc->Common.Type > ACPI_TYPE_LOCAL_MAX)
{
- AcpiOsPrintf ("Secondary object is not a known object type: %2.2X\n",
+ AcpiOsPrintf (
+ "Secondary object is not a known object type: %2.2X\n",
ObjDesc->Common.Type);
return_VOID;
OpenPOWER on IntegriCloud