test: arb/debug.c File Reference

Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

# debug.c File Reference

`#include "arbp.h"`

Go to the source code of this file.

## Functions

VOID | ArbDumpArbiterRange (LONG Level, PRTL_RANGE_LIST List, PUCHAR RangeText)
VOID | ArbDumpArbiterInstance (LONG Level, PARBITER_INSTANCE Arbiter)
VOID | ArbDumpArbitrationList (LONG Level, PLIST_ENTRY ArbitrationList)

## Variables

LONG | ArbDebugLevel = -1
ULONG | ArbStopOnError
ULONG | ArbReplayOnError
PCHAR | ArbpActionStrings []

## Function Documentation

VOID ArbDumpArbiterInstance | ( | LONG | Level,
|  | PARBITER_INSTANCE | Arbiter
| ) |

Definition at line 123 of file arb/debug.c.

References ARB_PRINT, ArbDumpArbiterRange(), and PAGED_CODE.

    00130                    :
    00131
    00132     This dumps the state of the arbiter to the debugger.
    00133
    00134 Parameters:
    00135
    00136     Level - The debug level at or above which the data should be displayed.
    00137
    00138     Arbiter - The arbiter instance to display
    00139
    00140 Return Value:
    00141
    00142     None
    00143
    00144 --*/
    00145
    00146 {
    00147
    00148     PAGED_CODE();
    00149
    00150     ARB_PRINT(Level,
    00151                 ("---%S Arbiter State---\n",
    00152                 Arbiter->Name
    00153                 ));
    00154
    00155     ArbDumpArbiterRange(
    00156         Level,
    00157         Arbiter->Allocation,
    00158         "Allocation"
    00159         );
    00160
    00161     ArbDumpArbiterRange(
    00162         Level,
    00163         Arbiter->PossibleAllocation,
    00164         "PossibleAllocation"
    00165         );
    00166 }

VOID ArbDumpArbiterRange | ( | LONG | Level,
|  | PRTL_RANGE_LIST | List,
|  | PUCHAR | RangeText
| ) |

Definition at line 69 of file arb/debug.c.

References ARB_PRINT, FALSE, List, PAGED_CODE, and TRUE.

Referenced by ArbDumpArbiterInstance().

    00077                    :
    00078
    00079     This dumps the contents of a range list to the debugger.
    00080
    00081 Parameters:
    00082
    00083     Level     - The debug level at or above which the data should be displayed.
    00084     List      - The range list to be displayed.
    00085     RangeText - Informative text to go with the display.
    00086
    00087 Return Value:
    00088
    00089     None
    00090
    00091 --*/
    00092
    00093 {
    00094     PRTL_RANGE current;
    00095     RTL_RANGE_LIST_ITERATOR iterator;
    00096     BOOLEAN headerDisplayed = FALSE;
    00097
    00098     PAGED_CODE();
    00099
    00100     FOR_ALL_RANGES(List, &iterator, current) {
    00101
    00102         if (headerDisplayed == FALSE) {
    00103             headerDisplayed = TRUE;
    00104             ARB_PRINT(Level, ("  %s:\n", RangeText));
    00105         }
    00106
    00107         ARB_PRINT(Level,
    00108                     ("    %I64x-%I64x %s%s O=0x%08x U=0x%08x\n",
    00109                     current->Start,
    00110                     current->End,
    00111                     current->Flags & RTL_RANGE_SHARED ? "S" : " ",
    00112                     current->Flags & RTL_RANGE_CONFLICT ? "C" : " ",
    00113                     current->Owner,
    00114                     current->UserData
    00115                    ));
    00116     }
    00117     if (headerDisplayed == FALSE) {
    00118         ARB_PRINT(Level, ("  %s: <None>\n", RangeText));
    00119     }
    00120 }

VOID ArbDumpArbitrationList | ( | LONG | Level,
|  | PLIST_ENTRY | ArbitrationList
| ) |

Definition at line 169 of file arb/debug.c.

References _ARBITER_LIST_ENTRY::AlternativeCount, _ARBITER_LIST_ENTRY::Alternatives, ARB_PRINT, FOR_ALL_IN_ARRAY, FOR_ALL_IN_LIST, NULL, PAGED_CODE, and _ARBITER_LIST_ENTRY::PhysicalDeviceObject.

    00176                    :
    00177
    00178     Display the contents of an arbitration list.  That is, the
    00179     set of resources (possibilities) we are trying to get.
    00180
    00181 Parameters:
    00182
    00183     Level           - The debug level at or above which the data
    00184                       should be displayed.
    00185     ArbitrationList - The arbitration list to be displayed.
    00186
    00187 Return Value:
    00188
    00189     None
    00190
    00191 --*/
    00192
    00193 {
    00194     PARBITER_LIST_ENTRY current;
    00195     PIO_RESOURCE_DESCRIPTOR alternative;
    00196     PDEVICE_OBJECT previousOwner = NULL;
    00197     UCHAR andOr = ' ';
    00198
    00199     PAGED_CODE();
    00200
    00201     ARB_PRINT(Level, ("Arbitration List\n"));
    00202
    00203     FOR_ALL_IN_LIST(ARBITER_LIST_ENTRY, ArbitrationList, current) {
    00204
    00205         if (previousOwner != current->PhysicalDeviceObject) {
    00206
    00207             previousOwner = current->PhysicalDeviceObject;
    00208
    00209             ARB_PRINT(
    00210                 Level,
    00211                 ("  Owning object 0x%08x\n",
    00212                 current->PhysicalDeviceObject
    00213                 ));
    00214             ARB_PRINT(
    00215                 Level,
    00216                 ("    Length  Alignment   Minimum Address - Maximum Address\n"
    00217                 ));
    00218
    00219         }
    00220
    00221         FOR_ALL_IN_ARRAY(current->Alternatives,
    00222                          current->AlternativeCount,
    00223                          alternative) {
    00224
    00225             ARB_PRINT(
    00226                 Level,
    00227                 ("%c %8x   %8x  %08x%08x - %08x%08x  %s\n",
    00228                 andOr,
    00229                 alternative->u.Generic.Length,
    00230                 alternative->u.Generic.Alignment,
    00231                 alternative->u.Generic.MinimumAddress.HighPart,
    00232                 alternative->u.Generic.MinimumAddress.LowPart,
    00233                 alternative->u.Generic.MaximumAddress.HighPart,
    00234                 alternative->u.Generic.MaximumAddress.LowPart,
    00235                 alternative->Type == CmResourceTypeMemory ?
    00236                   "Memory"
    00237                 : "Port"
    00238                 ));
    00239             andOr = '|';
    00240         }
    00241         andOr = '&';
    00242     }
    00243 }

## Variable Documentation

LONG ArbDebugLevel = -1

| Definition at line 43 of file arb/debug.c.

PCHAR ArbpActionStrings[]

Initial value:

     {
        "ArbiterActionTestAllocation",
        "ArbiterActionRetestAllocation",
        "ArbiterActionCommitAllocation",
        "ArbiterActionRollbackAllocation",
        "ArbiterActionQueryAllocatedResources",
        "ArbiterActionWriteReservedResources",
        "ArbiterActionQueryConflict",
        "ArbiterActionQueryArbitrate",
        "ArbiterActionAddReserved",
        "ArbiterActionBootAllocation"
    }

Definition at line 55 of file arb/debug.c.

Referenced by ArbArbiterHandler().

ULONG ArbReplayOnError

| Definition at line 53 of file arb/debug.c. Referenced by ArbArbiterHandler().

ULONG ArbStopOnError

| Definition at line 52 of file arb/debug.c. Referenced by ArbArbiterHandler().