Print this page
acpica-unix2-20130823
PANKOVs restructure
*** 3,13 ****
* Module Name: exdump - Interpreter debug output routines
*
*****************************************************************************/
/*
! * Copyright (C) 2000 - 2011, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
--- 3,13 ----
* Module Name: exdump - Interpreter debug output routines
*
*****************************************************************************/
/*
! * Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*** 129,140 ****
static ACPI_EXDUMP_INFO AcpiExDumpDevice[4] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpDevice), NULL},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Device.Handler), "Handler"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Device.SystemNotify), "System Notify"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Device.DeviceNotify), "Device Notify"}
};
static ACPI_EXDUMP_INFO AcpiExDumpEvent[2] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpEvent), NULL},
--- 129,140 ----
static ACPI_EXDUMP_INFO AcpiExDumpDevice[4] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpDevice), NULL},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Device.Handler), "Handler"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Device.NotifyList[0]), "System Notify"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Device.NotifyList[1]), "Device Notify"}
};
static ACPI_EXDUMP_INFO AcpiExDumpEvent[2] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpEvent), NULL},
*** 177,206 ****
static ACPI_EXDUMP_INFO AcpiExDumpPower[5] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpPower), NULL},
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET (PowerResource.SystemLevel), "System Level"},
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET (PowerResource.ResourceOrder), "Resource Order"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (PowerResource.SystemNotify), "System Notify"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (PowerResource.DeviceNotify), "Device Notify"}
};
static ACPI_EXDUMP_INFO AcpiExDumpProcessor[7] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpProcessor), NULL},
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Processor.ProcId), "Processor ID"},
{ACPI_EXD_UINT8 , ACPI_EXD_OFFSET (Processor.Length), "Length"},
{ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET (Processor.Address), "Address"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Processor.SystemNotify), "System Notify"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Processor.DeviceNotify), "Device Notify"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Processor.Handler), "Handler"}
};
static ACPI_EXDUMP_INFO AcpiExDumpThermal[4] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpThermal), NULL},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (ThermalZone.SystemNotify), "System Notify"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (ThermalZone.DeviceNotify), "Device Notify"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (ThermalZone.Handler), "Handler"}
};
static ACPI_EXDUMP_INFO AcpiExDumpBufferField[3] =
{
--- 177,206 ----
static ACPI_EXDUMP_INFO AcpiExDumpPower[5] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpPower), NULL},
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET (PowerResource.SystemLevel), "System Level"},
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET (PowerResource.ResourceOrder), "Resource Order"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (PowerResource.NotifyList[0]), "System Notify"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (PowerResource.NotifyList[1]), "Device Notify"}
};
static ACPI_EXDUMP_INFO AcpiExDumpProcessor[7] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpProcessor), NULL},
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Processor.ProcId), "Processor ID"},
{ACPI_EXD_UINT8 , ACPI_EXD_OFFSET (Processor.Length), "Length"},
{ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET (Processor.Address), "Address"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Processor.NotifyList[0]), "System Notify"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Processor.NotifyList[1]), "Device Notify"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Processor.Handler), "Handler"}
};
static ACPI_EXDUMP_INFO AcpiExDumpThermal[4] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpThermal), NULL},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (ThermalZone.NotifyList[0]), "System Notify"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (ThermalZone.NotifyList[1]), "Device Notify"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (ThermalZone.Handler), "Handler"}
};
static ACPI_EXDUMP_INFO AcpiExDumpBufferField[3] =
{
*** 207,221 ****
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpBufferField), NULL},
{ACPI_EXD_FIELD, 0, NULL},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (BufferField.BufferObj), "Buffer Object"}
};
! static ACPI_EXDUMP_INFO AcpiExDumpRegionField[3] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpRegionField), NULL},
{ACPI_EXD_FIELD, 0, NULL},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Field.RegionObj), "Region Object"}
};
static ACPI_EXDUMP_INFO AcpiExDumpBankField[5] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpBankField), NULL},
--- 207,223 ----
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpBufferField), NULL},
{ACPI_EXD_FIELD, 0, NULL},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (BufferField.BufferObj), "Buffer Object"}
};
! static ACPI_EXDUMP_INFO AcpiExDumpRegionField[5] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpRegionField), NULL},
{ACPI_EXD_FIELD, 0, NULL},
! {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Field.AccessLength), "AccessLength"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Field.RegionObj), "Region Object"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Field.ResourceBuffer), "ResourceBuffer"}
};
static ACPI_EXDUMP_INFO AcpiExDumpBankField[5] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpBankField), NULL},
*** 254,268 ****
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (AddressSpace.RegionList), "Region List"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (AddressSpace.Node), "Node"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (AddressSpace.Context), "Context"}
};
! static ACPI_EXDUMP_INFO AcpiExDumpNotify[3] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpNotify), NULL},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Notify.Node), "Node"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Notify.Context), "Context"}
};
/* Miscellaneous tables */
--- 256,274 ----
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (AddressSpace.RegionList), "Region List"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (AddressSpace.Node), "Node"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (AddressSpace.Context), "Context"}
};
! static ACPI_EXDUMP_INFO AcpiExDumpNotify[7] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpNotify), NULL},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Notify.Node), "Node"},
! {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Notify.HandlerType), "Handler Type"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Notify.Handler), "Handler"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Notify.Context), "Context"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Notify.Next[0]), "Next System Notify"},
! {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Notify.Next[1]), "Next Device Notify"}
};
/* Miscellaneous tables */
*** 349,358 ****
--- 355,365 ----
ACPI_OPERAND_OBJECT *ObjDesc,
ACPI_EXDUMP_INFO *Info)
{
UINT8 *Target;
char *Name;
+ const char *ReferenceName;
UINT8 Count;
if (!Info)
{
*** 372,381 ****
--- 379,389 ----
Name = Info->Name;
switch (Info->Opcode)
{
case ACPI_EXD_INIT:
+
break;
case ACPI_EXD_TYPE:
AcpiExOutString ("Type", AcpiUtGetObjectTypeName (ObjDesc));
*** 432,443 ****
AcpiExDumpObject (ObjDesc, AcpiExDumpFieldCommon);
break;
case ACPI_EXD_REFERENCE:
! AcpiExOutString ("Class Name",
! ACPI_CAST_PTR (char, AcpiUtGetReferenceName (ObjDesc)));
AcpiExDumpReferenceObj (ObjDesc);
break;
default:
--- 440,451 ----
AcpiExDumpObject (ObjDesc, AcpiExDumpFieldCommon);
break;
case ACPI_EXD_REFERENCE:
! ReferenceName = AcpiUtGetReferenceName (ObjDesc);
! AcpiExOutString ("Class Name", ACPI_CAST_PTR (char, ReferenceName));
AcpiExDumpReferenceObj (ObjDesc);
break;
default:
*** 475,485 ****
ACPI_FUNCTION_NAME (ExDumpOperand)
! if (!((ACPI_LV_EXEC & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
{
return;
}
if (!ObjDesc)
--- 483,495 ----
ACPI_FUNCTION_NAME (ExDumpOperand)
! /* Check if debug output enabled */
!
! if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_EXEC, _COMPONENT))
{
return;
}
if (!ObjDesc)
*** 531,582 ****
case ACPI_REFCLASS_DEBUG:
AcpiOsPrintf ("\n");
break;
-
case ACPI_REFCLASS_INDEX:
AcpiOsPrintf ("%p\n", ObjDesc->Reference.Object);
break;
-
case ACPI_REFCLASS_TABLE:
AcpiOsPrintf ("Table Index %X\n", ObjDesc->Reference.Value);
break;
-
case ACPI_REFCLASS_REFOF:
AcpiOsPrintf ("%p [%s]\n", ObjDesc->Reference.Object,
AcpiUtGetTypeName (((ACPI_OPERAND_OBJECT *)
ObjDesc->Reference.Object)->Common.Type));
break;
-
case ACPI_REFCLASS_NAME:
AcpiOsPrintf ("- [%4.4s]\n", ObjDesc->Reference.Node->Name.Ascii);
break;
-
case ACPI_REFCLASS_ARG:
case ACPI_REFCLASS_LOCAL:
AcpiOsPrintf ("%X\n", ObjDesc->Reference.Value);
break;
-
default: /* Unknown reference class */
AcpiOsPrintf ("%2.2X\n", ObjDesc->Reference.Class);
break;
}
break;
-
case ACPI_TYPE_BUFFER:
AcpiOsPrintf ("Buffer length %.2X @ %p\n",
ObjDesc->Buffer.Length, ObjDesc->Buffer.Pointer);
--- 541,585 ----
*** 594,611 ****
Length);
ACPI_DUMP_BUFFER (ObjDesc->Buffer.Pointer, Length);
}
break;
-
case ACPI_TYPE_INTEGER:
AcpiOsPrintf ("Integer %8.8X%8.8X\n",
ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
break;
-
case ACPI_TYPE_PACKAGE:
AcpiOsPrintf ("Package [Len %X] ElementArray %p\n",
ObjDesc->Package.Count, ObjDesc->Package.Elements);
--- 597,612 ----
*** 622,632 ****
AcpiExDumpOperand (ObjDesc->Package.Elements[Index], Depth+1);
}
}
break;
-
case ACPI_TYPE_REGION:
AcpiOsPrintf ("Region %s (%X)",
AcpiUtGetRegionName (ObjDesc->Region.SpaceId),
ObjDesc->Region.SpaceId);
--- 623,632 ----
*** 645,655 ****
ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
ObjDesc->Region.Length);
}
break;
-
case ACPI_TYPE_STRING:
AcpiOsPrintf ("String length %X @ %p ",
ObjDesc->String.Length,
ObjDesc->String.Pointer);
--- 645,654 ----
*** 656,672 ****
AcpiUtPrintString (ObjDesc->String.Pointer, ACPI_UINT8_MAX);
AcpiOsPrintf ("\n");
break;
-
case ACPI_TYPE_LOCAL_BANK_FIELD:
AcpiOsPrintf ("BankField\n");
break;
-
case ACPI_TYPE_LOCAL_REGION_FIELD:
AcpiOsPrintf ("RegionField: Bits=%X AccWidth=%X Lock=%X Update=%X at "
"byte=%X bit=%X of below:\n",
ObjDesc->Field.BitLength,
--- 655,669 ----
*** 677,693 ****
ObjDesc->Field.StartFieldBitOffset);
AcpiExDumpOperand (ObjDesc->Field.RegionObj, Depth+1);
break;
-
case ACPI_TYPE_LOCAL_INDEX_FIELD:
AcpiOsPrintf ("IndexField\n");
break;
-
case ACPI_TYPE_BUFFER_FIELD:
AcpiOsPrintf ("BufferField: %X bits at byte %X bit %X of\n",
ObjDesc->BufferField.BitLength,
ObjDesc->BufferField.BaseByteOffset,
--- 674,688 ----
*** 706,762 ****
{
AcpiExDumpOperand (ObjDesc->BufferField.BufferObj, Depth+1);
}
break;
-
case ACPI_TYPE_EVENT:
AcpiOsPrintf ("Event\n");
break;
-
case ACPI_TYPE_METHOD:
AcpiOsPrintf ("Method(%X) @ %p:%X\n",
ObjDesc->Method.ParamCount,
ObjDesc->Method.AmlStart,
ObjDesc->Method.AmlLength);
break;
-
case ACPI_TYPE_MUTEX:
AcpiOsPrintf ("Mutex\n");
break;
-
case ACPI_TYPE_DEVICE:
AcpiOsPrintf ("Device\n");
break;
-
case ACPI_TYPE_POWER:
AcpiOsPrintf ("Power\n");
break;
-
case ACPI_TYPE_PROCESSOR:
AcpiOsPrintf ("Processor\n");
break;
-
case ACPI_TYPE_THERMAL:
AcpiOsPrintf ("Thermal\n");
break;
-
default:
/* Unknown Type */
AcpiOsPrintf ("Unknown Type %X\n", ObjDesc->Common.Type);
break;
}
--- 701,750 ----
{
AcpiExDumpOperand (ObjDesc->BufferField.BufferObj, Depth+1);
}
break;
case ACPI_TYPE_EVENT:
AcpiOsPrintf ("Event\n");
break;
case ACPI_TYPE_METHOD:
AcpiOsPrintf ("Method(%X) @ %p:%X\n",
ObjDesc->Method.ParamCount,
ObjDesc->Method.AmlStart,
ObjDesc->Method.AmlLength);
break;
case ACPI_TYPE_MUTEX:
AcpiOsPrintf ("Mutex\n");
break;
case ACPI_TYPE_DEVICE:
AcpiOsPrintf ("Device\n");
break;
case ACPI_TYPE_POWER:
AcpiOsPrintf ("Power\n");
break;
case ACPI_TYPE_PROCESSOR:
AcpiOsPrintf ("Processor\n");
break;
case ACPI_TYPE_THERMAL:
AcpiOsPrintf ("Thermal\n");
break;
default:
+
/* Unknown Type */
AcpiOsPrintf ("Unknown Type %X\n", ObjDesc->Common.Type);
break;
}
*** 865,875 ****
ACPI_FUNCTION_ENTRY ();
if (!Flags)
{
! if (!((ACPI_LV_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
{
return;
}
}
--- 853,865 ----
ACPI_FUNCTION_ENTRY ();
if (!Flags)
{
! /* Check if debug output enabled */
!
! if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_OBJECTS, _COMPONENT))
{
return;
}
}
*** 993,1029 ****
AcpiOsPrintf ("[Integer] = %8.8X%8.8X\n",
ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
break;
-
case ACPI_TYPE_STRING:
AcpiOsPrintf ("[String] Value: ");
! for (i = 0; i < ObjDesc->String.Length; i++)
! {
! AcpiOsPrintf ("%c", ObjDesc->String.Pointer[i]);
! }
AcpiOsPrintf ("\n");
break;
-
case ACPI_TYPE_BUFFER:
AcpiOsPrintf ("[Buffer] Length %.2X = ", ObjDesc->Buffer.Length);
if (ObjDesc->Buffer.Length)
{
! AcpiUtDumpBuffer (ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT);
}
else
{
AcpiOsPrintf ("\n");
}
break;
-
case ACPI_TYPE_PACKAGE:
AcpiOsPrintf ("[Package] Contains %u Elements:\n",
ObjDesc->Package.Count);
--- 983,1013 ----
AcpiOsPrintf ("[Integer] = %8.8X%8.8X\n",
ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
break;
case ACPI_TYPE_STRING:
AcpiOsPrintf ("[String] Value: ");
! AcpiUtPrintString (ObjDesc->String.Pointer, ACPI_UINT8_MAX);
AcpiOsPrintf ("\n");
break;
case ACPI_TYPE_BUFFER:
AcpiOsPrintf ("[Buffer] Length %.2X = ", ObjDesc->Buffer.Length);
if (ObjDesc->Buffer.Length)
{
! AcpiUtDebugDumpBuffer (ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT);
}
else
{
AcpiOsPrintf ("\n");
}
break;
case ACPI_TYPE_PACKAGE:
AcpiOsPrintf ("[Package] Contains %u Elements:\n",
ObjDesc->Package.Count);
*** 1031,1050 ****
{
AcpiExDumpPackageObj (ObjDesc->Package.Elements[i], Level+1, i);
}
break;
-
case ACPI_TYPE_LOCAL_REFERENCE:
AcpiOsPrintf ("[Object Reference] Type [%s] %2.2X",
AcpiUtGetReferenceName (ObjDesc),
ObjDesc->Reference.Class);
AcpiExDumpReferenceObj (ObjDesc);
break;
-
default:
AcpiOsPrintf ("[Unknown Type] %X\n", ObjDesc->Common.Type);
break;
}
--- 1015,1032 ----
*** 1075,1085 ****
return_VOID;
}
if (!Flags)
{
! if (!((ACPI_LV_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
{
return_VOID;
}
}
--- 1057,1069 ----
return_VOID;
}
if (!Flags)
{
! /* Check if debug output enabled */
!
! if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_OBJECTS, _COMPONENT))
{
return_VOID;
}
}
*** 1117,1122 ****
AcpiExDumpObject (ObjDesc, AcpiExDumpInfo[ObjDesc->Common.Type]);
return_VOID;
}
#endif
-
--- 1101,1105 ----