mirror of
https://github.com/acpica/acpica/
synced 2025-01-17 14:59:56 +03:00
Optimized the ACPI_OPERAND_OBJECT size
date 2000.08.30.22.55.00; author rmoore1; state Exp;
This commit is contained in:
parent
712a57ce9c
commit
ad65e90230
@ -1,7 +1,7 @@
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: nsdump - table dumping routines for debug
|
||||
* $Revision: 1.78 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -124,7 +124,7 @@
|
||||
|
||||
|
||||
#define _COMPONENT NAMESPACE
|
||||
MODULE_NAME ("nsdump");
|
||||
MODULE_NAME ("nsdump")
|
||||
|
||||
|
||||
#ifdef ACPI_DEBUG
|
||||
@ -187,11 +187,11 @@ AcpiNsDumpPathname (
|
||||
*
|
||||
* FUNCTION: AcpiNsDumpOneObject
|
||||
*
|
||||
* PARAMETERS: Handle - Entry to be dumped
|
||||
* PARAMETERS: Handle - Node to be dumped
|
||||
* Level - Nesting level of the handle
|
||||
* Context - Passed into WalkNamespace
|
||||
*
|
||||
* DESCRIPTION: Dump a single nte
|
||||
* DESCRIPTION: Dump a single Node
|
||||
* This procedure is a UserFunction called by AcpiNsWalkNamespace.
|
||||
*
|
||||
***************************************************************************/
|
||||
@ -204,9 +204,9 @@ AcpiNsDumpOneObject (
|
||||
void **ReturnValue)
|
||||
{
|
||||
ACPI_WALK_INFO *Info = (ACPI_WALK_INFO *) Context;
|
||||
ACPI_NAMED_OBJECT *ThisEntry;
|
||||
ACPI_NAMESPACE_NODE *ThisNode;
|
||||
UINT8 *Value;
|
||||
ACPI_OBJECT_INTERNAL *ObjDesc = NULL;
|
||||
ACPI_OPERAND_OBJECT *ObjDesc = NULL;
|
||||
OBJECT_TYPE_INTERNAL ObjType;
|
||||
OBJECT_TYPE_INTERNAL Type;
|
||||
UINT32 BytesToDump;
|
||||
@ -215,10 +215,10 @@ AcpiNsDumpOneObject (
|
||||
UINT32 WhichBit;
|
||||
|
||||
|
||||
ThisEntry = AcpiNsConvertHandleToEntry (ObjHandle);
|
||||
ThisNode = AcpiNsConvertHandleToEntry (ObjHandle);
|
||||
|
||||
LevelTmp = Level;
|
||||
Type = ThisEntry->Type;
|
||||
Type = ThisNode->Type;
|
||||
WhichBit = 1;
|
||||
|
||||
|
||||
@ -236,7 +236,7 @@ AcpiNsDumpOneObject (
|
||||
/* Check if the owner matches */
|
||||
|
||||
if ((Info->OwnerId != ACPI_UINT32_MAX) &&
|
||||
(Info->OwnerId != ThisEntry->OwnerId))
|
||||
(Info->OwnerId != ThisNode->OwnerId))
|
||||
{
|
||||
return (AE_OK);
|
||||
}
|
||||
@ -266,7 +266,7 @@ AcpiNsDumpOneObject (
|
||||
|
||||
else
|
||||
{
|
||||
if (AcpiNsExistDownstreamSibling (ThisEntry + 1))
|
||||
if (AcpiNsExistDownstreamSibling (ThisNode + 1))
|
||||
{
|
||||
DownstreamSiblingMask |= (1 << (Level - 1));
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, ("+"));
|
||||
@ -278,12 +278,12 @@ AcpiNsDumpOneObject (
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, ("+"));
|
||||
}
|
||||
|
||||
if (ThisEntry->ChildTable == NULL)
|
||||
if (ThisNode->Child == NULL)
|
||||
{
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, ("-"));
|
||||
}
|
||||
|
||||
else if (AcpiNsExistDownstreamSibling (ThisEntry->ChildTable->Entries))
|
||||
else if (AcpiNsExistDownstreamSibling (ThisNode->Child))
|
||||
{
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, ("+"));
|
||||
}
|
||||
@ -303,7 +303,7 @@ AcpiNsDumpOneObject (
|
||||
Type = INTERNAL_TYPE_DEF_ANY; /* prints as *ERROR* */
|
||||
}
|
||||
|
||||
if (!AcpiCmValidAcpiName (ThisEntry->Name))
|
||||
if (!AcpiCmValidAcpiName (ThisNode->Name))
|
||||
{
|
||||
REPORT_WARNING ("Invalid Name");
|
||||
}
|
||||
@ -312,11 +312,11 @@ AcpiNsDumpOneObject (
|
||||
* Now we can print out the pertinent information
|
||||
*/
|
||||
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, (" %4.4s %-9s ", &ThisEntry->Name, AcpiCmGetTypeName (Type)));
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, ("%p S:%p O:%p", ThisEntry, ThisEntry->ChildTable, ThisEntry->Object));
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, (" %4.4s %-9s ", &ThisNode->Name, AcpiCmGetTypeName (Type)));
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, ("%p S:%p O:%p", ThisNode, ThisNode->Child, ThisNode->Object));
|
||||
|
||||
|
||||
if (!ThisEntry->Object)
|
||||
if (!ThisNode->Object)
|
||||
{
|
||||
/* No attached object, we are done */
|
||||
|
||||
@ -332,8 +332,8 @@ AcpiNsDumpOneObject (
|
||||
/* Name is a Method and its AML offset/length are set */
|
||||
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, (" M:%p-%X\n",
|
||||
((ACPI_OBJECT_INTERNAL *) ThisEntry->Object)->Method.Pcode,
|
||||
((ACPI_OBJECT_INTERNAL *) ThisEntry->Object)->Method.PcodeLength));
|
||||
((ACPI_OPERAND_OBJECT *) ThisNode->Object)->Method.Pcode,
|
||||
((ACPI_OPERAND_OBJECT *) ThisNode->Object)->Method.PcodeLength));
|
||||
|
||||
break;
|
||||
|
||||
@ -341,23 +341,23 @@ AcpiNsDumpOneObject (
|
||||
case ACPI_TYPE_NUMBER:
|
||||
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, (" N:%X\n",
|
||||
((ACPI_OBJECT_INTERNAL *) ThisEntry->Object)->Number.Value));
|
||||
((ACPI_OPERAND_OBJECT *) ThisNode->Object)->Number.Value));
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_STRING:
|
||||
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, (" S:%p-%X\n",
|
||||
((ACPI_OBJECT_INTERNAL *) ThisEntry->Object)->String.Pointer,
|
||||
((ACPI_OBJECT_INTERNAL *) ThisEntry->Object)->String.Length));
|
||||
((ACPI_OPERAND_OBJECT *) ThisNode->Object)->String.Pointer,
|
||||
((ACPI_OPERAND_OBJECT *) ThisNode->Object)->String.Length));
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_BUFFER:
|
||||
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, (" B:%p-%X\n",
|
||||
((ACPI_OBJECT_INTERNAL *) ThisEntry->Object)->Buffer.Pointer,
|
||||
((ACPI_OBJECT_INTERNAL *) ThisEntry->Object)->Buffer.Length));
|
||||
((ACPI_OPERAND_OBJECT *) ThisNode->Object)->Buffer.Pointer,
|
||||
((ACPI_OPERAND_OBJECT *) ThisNode->Object)->Buffer.Length));
|
||||
break;
|
||||
|
||||
|
||||
@ -377,7 +377,7 @@ AcpiNsDumpOneObject (
|
||||
|
||||
/* If there is an attached object, display it */
|
||||
|
||||
Value = ThisEntry->Object;
|
||||
Value = ThisNode->Object;
|
||||
|
||||
/* Dump attached objects */
|
||||
|
||||
@ -397,14 +397,14 @@ AcpiNsDumpOneObject (
|
||||
|
||||
else if (VALID_DESCRIPTOR_TYPE (Value, ACPI_DESC_TYPE_NAMED))
|
||||
{
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, ("(Ptr to Name Table Entry)\n"));
|
||||
BytesToDump = sizeof (ACPI_NAMED_OBJECT);
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, ("(Ptr to Node)\n"));
|
||||
BytesToDump = sizeof (ACPI_NAMESPACE_NODE);
|
||||
}
|
||||
|
||||
|
||||
else if (VALID_DESCRIPTOR_TYPE (Value, ACPI_DESC_TYPE_INTERNAL))
|
||||
{
|
||||
ObjDesc = (ACPI_OBJECT_INTERNAL *) Value;
|
||||
ObjDesc = (ACPI_OPERAND_OBJECT *) Value;
|
||||
ObjType = ObjDesc->Common.Type;
|
||||
|
||||
if (ObjType > INTERNAL_TYPE_MAX)
|
||||
@ -417,7 +417,7 @@ AcpiNsDumpOneObject (
|
||||
{
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, ("(Ptr to ACPI Object type 0x%X [%s])\n",
|
||||
ObjType, AcpiCmGetTypeName (ObjType)));
|
||||
BytesToDump = ObjDesc->Common.Size;
|
||||
BytesToDump = sizeof (ACPI_OPERAND_OBJECT);
|
||||
}
|
||||
}
|
||||
|
||||
@ -525,11 +525,11 @@ AcpiNsDumpObjects (
|
||||
*
|
||||
* FUNCTION: AcpiNsDumpOneDevice
|
||||
*
|
||||
* PARAMETERS: Handle - Entry to be dumped
|
||||
* PARAMETERS: Handle - Node to be dumped
|
||||
* Level - Nesting level of the handle
|
||||
* Context - Passed into WalkNamespace
|
||||
*
|
||||
* DESCRIPTION: Dump a single nte that represents a device
|
||||
* DESCRIPTION: Dump a single Node that represents a device
|
||||
* This procedure is a UserFunction called by AcpiNsWalkNamespace.
|
||||
*
|
||||
***************************************************************************/
|
||||
@ -558,7 +558,6 @@ AcpiNsDumpOneDevice (
|
||||
|
||||
DEBUG_PRINT_RAW (TRACE_TABLES, (" HID: %.8X, ADR: %.8X, Status: %x\n",
|
||||
Info.HardwareId, Info.Address, Info.CurrentStatus));
|
||||
|
||||
}
|
||||
|
||||
return (Status);
|
||||
@ -620,7 +619,7 @@ AcpiNsDumpTables (
|
||||
FUNCTION_TRACE ("NsDumpTables");
|
||||
|
||||
|
||||
if (!AcpiGbl_RootObject->ChildTable)
|
||||
if (!AcpiGbl_RootNode)
|
||||
{
|
||||
/*
|
||||
* If the name space has not been initialized,
|
||||
@ -634,7 +633,7 @@ AcpiNsDumpTables (
|
||||
{
|
||||
/* entire namespace */
|
||||
|
||||
SearchHandle = AcpiGbl_RootObject;
|
||||
SearchHandle = AcpiGbl_RootNode;
|
||||
DEBUG_PRINT (TRACE_TABLES, ("\\\n"));
|
||||
}
|
||||
|
||||
@ -648,10 +647,10 @@ AcpiNsDumpTables (
|
||||
*
|
||||
* FUNCTION: AcpiNsDumpEntry
|
||||
*
|
||||
* PARAMETERS: Handle - Entry to be dumped
|
||||
* PARAMETERS: Handle - Node to be dumped
|
||||
* DebugLevel - Output level
|
||||
*
|
||||
* DESCRIPTION: Dump a single nte
|
||||
* DESCRIPTION: Dump a single Node
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user