sys/contrib/dev/acpica/source/components/disassembler/dmresrcl2.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiDmDumpRawDataBuffer
 *
 * PARAMETERS:  Buffer              - Pointer to the data bytes
 *              Length              - Length of the descriptor in bytes
 *              Level               - Current source code indentation level
 *
 * RETURN:      None
 *
 * DESCRIPTION: Dump a data buffer as a RawDataBuffer() object. Used for
 *              vendor data bytes.
 *
 ******************************************************************************/
AcpiDmDumpRawDataBuffer
PARAMETERS:  Buffer              - Pointer to the data bytes
Length              - Length of the descriptor in bytes
Level               - Current source code indentation level

None

Dump a data buffer as a RawDataBuffer() object. Used for
vendor data bytes.
AcpiDmDumpRawDataBuffer PARAMETERS : Buffer - Pointer to the data bytes Length - Length of the descriptor in bytes Level - Current source code indentation level None Dump a data buffer as a RawDataBuffer () object . Used for vendor data bytes .
static void
AcpiDmDumpRawDataBuffer (
    UINT8                   *Buffer,
    UINT32                  Length,
    UINT32                  Level)
{
    UINT32                  Index;
    UINT32                  i;
    UINT32                  j;
    if (!Length)
    {
        return;
    }
    AcpiOsPrintf ("RawDataBuffer (0x%.2X)  // Vendor Data", Length);
    AcpiOsPrintf ("\n");
    AcpiDmIndent (Level + 1);
    AcpiOsPrintf ("{\n");
    AcpiDmIndent (Level + 2);
    for (i = 0; i < Length;)
    {
        for (j = 0; j < 8; j++)
        {
            Index = i + j;
            if (Index >= Length)
            {
                goto Finish;
            }
            AcpiOsPrintf ("0x%2.2X", Buffer[Index]);
            if ((Index + 1) >= Length)
            {
                goto Finish;
            }
            AcpiOsPrintf (", ");
        }
        AcpiOsPrintf ("\n");
        AcpiDmIndent (Level + 2);
        i += 8;
    }
Finish:
    AcpiOsPrintf ("\n");
    AcpiDmIndent (Level + 1);
    AcpiOsPrintf ("}");
}
static void AcpiDmDumpRawDataBuffer ( UINT8 * Buffer , UINT32 Length , UINT32 Level ) { UINT32 Index ; UINT32 i ; UINT32 j ; if ( ! Length ) { return ; } AcpiOsPrintf ( " " , Length ) ; AcpiOsPrintf ( " \n " ) ; AcpiDmIndent ( Level + 1 ) ; AcpiOsPrintf ( " \n " ) ; AcpiDmIndent ( Level + 2 ) ; for ( i = 0 ; i < Length ; ) { for ( j = 0 ; j < 8 ; j ++ ) { Index = i + j ; if ( Index >= Length ) { goto Finish ; } AcpiOsPrintf ( " " , Buffer [ Index ] ) ; if ( ( Index + 1 ) >= Length ) { goto Finish ; } AcpiOsPrintf ( " " ) ; } AcpiOsPrintf ( " \n " ) ; AcpiDmIndent ( Level + 2 ) ; i += 8 ; } Finish : AcpiOsPrintf ( " \n " ) ; AcpiDmIndent ( Level + 1 ) ; AcpiOsPrintf ( " " ) ; }
FUNCTION:    AcpiDmDumpRawDataBuffer
 PARAMETERS:  Buffer              - Pointer to the data bytes
              Length              - Length of the descriptor in bytes
              Level               - Current source code indentation level
FUNCTION : AcpiDmDumpRawDataBuffer PARAMETERS : Buffer - Pointer to the data bytes Length - Length of the descriptor in bytes Level - Current source code indentation level