diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2013-01-02 19:01:21 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2013-01-02 19:01:21 +0000 |
commit | b28e481ae9b051dab150e9b5a89730cdc1103a9c (patch) | |
tree | 434e706ece73a93073f350c91cd35ed7d7e98811 /source/compiler/dtio.c | |
parent | c2463a8709e5b3a5ce54c09d35b4820a756b0fc5 (diff) | |
download | src-b28e481ae9b051dab150e9b5a89730cdc1103a9c.tar.gz src-b28e481ae9b051dab150e9b5a89730cdc1103a9c.zip |
Import ACPICA 20121220.vendor/acpica/20121220
Notes
Notes:
svn path=/vendor-sys/acpica/dist/; revision=244971
svn path=/vendor-sys/acpica/20121220/; revision=244972; tag=vendor/acpica/20121220
Diffstat (limited to 'source/compiler/dtio.c')
-rw-r--r-- | source/compiler/dtio.c | 153 |
1 files changed, 130 insertions, 23 deletions
diff --git a/source/compiler/dtio.c b/source/compiler/dtio.c index 9d1bcb2f3284..3571c39a0d26 100644 --- a/source/compiler/dtio.c +++ b/source/compiler/dtio.c @@ -79,6 +79,18 @@ DtDumpBuffer ( UINT32 Offset, UINT32 Length); +static void +DtDumpSubtableInfo ( + DT_SUBTABLE *Subtable, + void *Context, + void *ReturnValue); + +static void +DtDumpSubtableTree ( + DT_SUBTABLE *Subtable, + void *Context, + void *ReturnValue); + /* States for DtGetNextLine */ @@ -708,7 +720,6 @@ DtScanFile ( { ACPI_STATUS Status; UINT32 Offset; - DT_FIELD *Next; ACPI_FUNCTION_NAME (DtScanFile); @@ -738,28 +749,7 @@ DtScanFile ( /* Dump the parse tree if debug enabled */ - if (Gbl_DebugFlag) - { - Next = Gbl_FieldList; - DbgPrint (ASL_DEBUG_OUTPUT, "Tree: %32s %32s %8s %8s %8s %8s %8s %8s\n\n", - "Name", "Value", "Line", "ByteOff", "NameCol", "Column", "TableOff", "Flags"); - - while (Next) - { - DbgPrint (ASL_DEBUG_OUTPUT, "Field: %32.32s %32.32s %.8X %.8X %.8X %.8X %.8X %.8X\n", - Next->Name, - Next->Value, - Next->Line, - Next->ByteOffset, - Next->NameColumn, - Next->Column, - Next->TableOffset, - Next->Flags); - - Next = Next->Next; - } - } - + DtDumpFieldList (Gbl_FieldList); return (Gbl_FieldList); } @@ -913,6 +903,123 @@ DtDumpBuffer ( /****************************************************************************** * + * FUNCTION: DtDumpFieldList + * + * PARAMETERS: Field - Root field + * + * RETURN: None + * + * DESCRIPTION: Dump the entire field list + * + *****************************************************************************/ + +void +DtDumpFieldList ( + DT_FIELD *Field) +{ + + if (!Gbl_DebugFlag || !Field) + { + return; + } + + DbgPrint (ASL_DEBUG_OUTPUT, "\nField List:\n" + "LineNo ByteOff NameCol Column TableOff " + "Flags %32s : %s\n\n", "Name", "Value"); + while (Field) + { + DbgPrint (ASL_DEBUG_OUTPUT, + "%.08X %.08X %.08X %.08X %.08X %.08X %32s : %s\n", + Field->Line, Field->ByteOffset, Field->NameColumn, + Field->Column, Field->TableOffset, Field->Flags, + Field->Name, Field->Value); + + Field = Field->Next; + } + + DbgPrint (ASL_DEBUG_OUTPUT, "\n\n"); +} + + +/****************************************************************************** + * + * FUNCTION: DtDumpSubtableInfo, DtDumpSubtableTree + * + * PARAMETERS: DT_WALK_CALLBACK + * + * RETURN: None + * + * DESCRIPTION: Info - dump a subtable tree entry with extra information. + * Tree - dump a subtable tree formatted by depth indentation. + * + *****************************************************************************/ + +static void +DtDumpSubtableInfo ( + DT_SUBTABLE *Subtable, + void *Context, + void *ReturnValue) +{ + + DbgPrint (ASL_DEBUG_OUTPUT, + "[%.04X] %.08X %.08X %.08X %.08X %.08X %p %p %p\n", + Subtable->Depth, Subtable->Length, Subtable->TotalLength, + Subtable->SizeOfLengthField, Subtable->Flags, Subtable, + Subtable->Parent, Subtable->Child, Subtable->Peer); +} + +static void +DtDumpSubtableTree ( + DT_SUBTABLE *Subtable, + void *Context, + void *ReturnValue) +{ + + DbgPrint (ASL_DEBUG_OUTPUT, + "[%.04X] %*s%08X (%.02X) - (%.02X)\n", + Subtable->Depth, (4 * Subtable->Depth), " ", + Subtable, Subtable->Length, Subtable->TotalLength); +} + + +/****************************************************************************** + * + * FUNCTION: DtDumpSubtableList + * + * PARAMETERS: None + * + * RETURN: None + * + * DESCRIPTION: Dump the raw list of subtables with information, and also + * dump the subtable list in formatted tree format. Assists with + * the development of new table code. + * + *****************************************************************************/ + +void +DtDumpSubtableList ( + void) +{ + + if (!Gbl_DebugFlag || !Gbl_RootTable) + { + return; + } + + DbgPrint (ASL_DEBUG_OUTPUT, + "Subtable Info:\n" + "Depth Length TotalLen LenSize Flags " + "This Parent Child Peer\n\n"); + DtWalkTableTree (Gbl_RootTable, DtDumpSubtableInfo, NULL, NULL); + + DbgPrint (ASL_DEBUG_OUTPUT, + "\nSubtable Tree: (Depth, Subtable, Length, TotalLength)\n\n"); + DtWalkTableTree (Gbl_RootTable, DtDumpSubtableTree, NULL, NULL); +} + + +/****************************************************************************** + * * FUNCTION: DtWriteFieldToListing * * PARAMETERS: Buffer - Contains the compiled data |