⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 utdebug.c

📁 acpi tools for linux include acpiexec and acpixtract
💻 C
📖 第 1 页 / 共 2 页
字号:
voidAcpiUtTracePtr (    UINT32                  LineNumber,    const char              *FunctionName,    char                    *ModuleName,    UINT32                  ComponentId,    void                    *Pointer){    AcpiGbl_NestingLevel++;    AcpiUtTrackStackPtr ();    AcpiUtDebugPrint (ACPI_LV_FUNCTIONS,        LineNumber, FunctionName, ModuleName, ComponentId,        "%s %p\n", AcpiGbl_FnEntryStr, Pointer);}/******************************************************************************* * * FUNCTION:    AcpiUtTraceStr * * PARAMETERS:  LineNumber          - Caller's line number *              FunctionName        - Caller's procedure name *              ModuleName          - Caller's module name *              ComponentId         - Caller's component ID *              String              - Additional string to display * * RETURN:      None * * DESCRIPTION: Function entry trace.  Prints only if TRACE_FUNCTIONS bit is *              set in DebugLevel * ******************************************************************************/voidAcpiUtTraceStr (    UINT32                  LineNumber,    const char              *FunctionName,    char                    *ModuleName,    UINT32                  ComponentId,    char                    *String){    AcpiGbl_NestingLevel++;    AcpiUtTrackStackPtr ();    AcpiUtDebugPrint (ACPI_LV_FUNCTIONS,        LineNumber, FunctionName, ModuleName, ComponentId,        "%s %s\n", AcpiGbl_FnEntryStr, String);}/******************************************************************************* * * FUNCTION:    AcpiUtTraceU32 * * PARAMETERS:  LineNumber          - Caller's line number *              FunctionName        - Caller's procedure name *              ModuleName          - Caller's module name *              ComponentId         - Caller's component ID *              Integer             - Integer to display * * RETURN:      None * * DESCRIPTION: Function entry trace.  Prints only if TRACE_FUNCTIONS bit is *              set in DebugLevel * ******************************************************************************/voidAcpiUtTraceU32 (    UINT32                  LineNumber,    const char              *FunctionName,    char                    *ModuleName,    UINT32                  ComponentId,    UINT32                  Integer){    AcpiGbl_NestingLevel++;    AcpiUtTrackStackPtr ();    AcpiUtDebugPrint (ACPI_LV_FUNCTIONS,        LineNumber, FunctionName, ModuleName, ComponentId,        "%s %08X\n", AcpiGbl_FnEntryStr, Integer);}/******************************************************************************* * * FUNCTION:    AcpiUtExit * * PARAMETERS:  LineNumber          - Caller's line number *              FunctionName        - Caller's procedure name *              ModuleName          - Caller's module name *              ComponentId         - Caller's component ID * * RETURN:      None * * DESCRIPTION: Function exit trace.  Prints only if TRACE_FUNCTIONS bit is *              set in DebugLevel * ******************************************************************************/voidAcpiUtExit (    UINT32                  LineNumber,    const char              *FunctionName,    char                    *ModuleName,    UINT32                  ComponentId){    AcpiUtDebugPrint (ACPI_LV_FUNCTIONS,        LineNumber, FunctionName, ModuleName, ComponentId,        "%s\n", AcpiGbl_FnExitStr);    AcpiGbl_NestingLevel--;}ACPI_EXPORT_SYMBOL (AcpiUtExit)/******************************************************************************* * * FUNCTION:    AcpiUtStatusExit * * PARAMETERS:  LineNumber          - Caller's line number *              FunctionName        - Caller's procedure name *              ModuleName          - Caller's module name *              ComponentId         - Caller's component ID *              Status              - Exit status code * * RETURN:      None * * DESCRIPTION: Function exit trace.  Prints only if TRACE_FUNCTIONS bit is *              set in DebugLevel.  Prints exit status also. * ******************************************************************************/voidAcpiUtStatusExit (    UINT32                  LineNumber,    const char              *FunctionName,    char                    *ModuleName,    UINT32                  ComponentId,    ACPI_STATUS             Status){    if (ACPI_SUCCESS (Status))    {        AcpiUtDebugPrint (ACPI_LV_FUNCTIONS,            LineNumber, FunctionName, ModuleName, ComponentId,            "%s %s\n", AcpiGbl_FnExitStr,            AcpiFormatException (Status));    }    else    {        AcpiUtDebugPrint (ACPI_LV_FUNCTIONS,            LineNumber, FunctionName, ModuleName, ComponentId,            "%s ****Exception****: %s\n", AcpiGbl_FnExitStr,            AcpiFormatException (Status));    }    AcpiGbl_NestingLevel--;}ACPI_EXPORT_SYMBOL (AcpiUtStatusExit)/******************************************************************************* * * FUNCTION:    AcpiUtValueExit * * PARAMETERS:  LineNumber          - Caller's line number *              FunctionName        - Caller's procedure name *              ModuleName          - Caller's module name *              ComponentId         - Caller's component ID *              Value               - Value to be printed with exit msg * * RETURN:      None * * DESCRIPTION: Function exit trace.  Prints only if TRACE_FUNCTIONS bit is *              set in DebugLevel.  Prints exit value also. * ******************************************************************************/voidAcpiUtValueExit (    UINT32                  LineNumber,    const char              *FunctionName,    char                    *ModuleName,    UINT32                  ComponentId,    ACPI_INTEGER            Value){    AcpiUtDebugPrint (ACPI_LV_FUNCTIONS,        LineNumber, FunctionName, ModuleName, ComponentId,        "%s %8.8X%8.8X\n", AcpiGbl_FnExitStr,        ACPI_FORMAT_UINT64 (Value));    AcpiGbl_NestingLevel--;}ACPI_EXPORT_SYMBOL (AcpiUtValueExit)/******************************************************************************* * * FUNCTION:    AcpiUtPtrExit * * PARAMETERS:  LineNumber          - Caller's line number *              FunctionName        - Caller's procedure name *              ModuleName          - Caller's module name *              ComponentId         - Caller's component ID *              Ptr                 - Pointer to display * * RETURN:      None * * DESCRIPTION: Function exit trace.  Prints only if TRACE_FUNCTIONS bit is *              set in DebugLevel.  Prints exit value also. * ******************************************************************************/voidAcpiUtPtrExit (    UINT32                  LineNumber,    const char              *FunctionName,    char                    *ModuleName,    UINT32                  ComponentId,    UINT8                   *Ptr){    AcpiUtDebugPrint (ACPI_LV_FUNCTIONS,        LineNumber, FunctionName, ModuleName, ComponentId,        "%s %p\n", AcpiGbl_FnExitStr, Ptr);    AcpiGbl_NestingLevel--;}#endif/******************************************************************************* * * FUNCTION:    AcpiUtDumpBuffer * * PARAMETERS:  Buffer              - Buffer to dump *              Count               - Amount to dump, in bytes *              Display             - BYTE, WORD, DWORD, or QWORD display *              ComponentID         - Caller's component ID * * RETURN:      None * * DESCRIPTION: Generic dump buffer in both hex and ascii. * ******************************************************************************/voidAcpiUtDumpBuffer2 (    UINT8                   *Buffer,    UINT32                  Count,    UINT32                  Display){    ACPI_NATIVE_UINT        i = 0;    ACPI_NATIVE_UINT        j;    UINT32                  Temp32;    UINT8                   BufChar;    if (!Buffer)    {        AcpiOsPrintf ("Null Buffer Pointer in DumpBuffer!\n");        return;    }    if ((Count < 4) || (Count & 0x01))    {        Display = DB_BYTE_DISPLAY;    }    /* Nasty little dump buffer routine! */    while (i < Count)    {        /* Print current offset */        AcpiOsPrintf ("%6.4X: ", (UINT32) i);        /* Print 16 hex chars */        for (j = 0; j < 16;)        {            if (i + j >= Count)            {                /* Dump fill spaces */                AcpiOsPrintf ("%*s", ((Display * 2) + 1), " ");                j += (ACPI_NATIVE_UINT) Display;                continue;            }            switch (Display)            {            case DB_BYTE_DISPLAY:            default:    /* Default is BYTE display */                AcpiOsPrintf ("%02X ", Buffer[i + j]);                break;            case DB_WORD_DISPLAY:                ACPI_MOVE_16_TO_32 (&Temp32, &Buffer[i + j]);                AcpiOsPrintf ("%04X ", Temp32);                break;            case DB_DWORD_DISPLAY:                ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[i + j]);                AcpiOsPrintf ("%08X ", Temp32);                break;            case DB_QWORD_DISPLAY:                ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[i + j]);                AcpiOsPrintf ("%08X", Temp32);                ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[i + j + 4]);                AcpiOsPrintf ("%08X ", Temp32);                break;            }            j += (ACPI_NATIVE_UINT) Display;        }        /*         * Print the ASCII equivalent characters but watch out for the bad         * unprintable ones (printable chars are 0x20 through 0x7E)         */        AcpiOsPrintf (" ");        for (j = 0; j < 16; j++)        {            if (i + j >= Count)            {                AcpiOsPrintf ("\n");                return;            }            BufChar = Buffer[i + j];            if (ACPI_IS_PRINT (BufChar))            {                AcpiOsPrintf ("%c", BufChar);            }            else            {                AcpiOsPrintf (".");            }        }        /* Done with that line. */        AcpiOsPrintf ("\n");        i += 16;    }    return;}/******************************************************************************* * * FUNCTION:    AcpiUtDumpBuffer * * PARAMETERS:  Buffer              - Buffer to dump *              Count               - Amount to dump, in bytes *              Display             - BYTE, WORD, DWORD, or QWORD display *              ComponentID         - Caller's component ID * * RETURN:      None * * DESCRIPTION: Generic dump buffer in both hex and ascii. * ******************************************************************************/voidAcpiUtDumpBuffer (    UINT8                   *Buffer,    UINT32                  Count,    UINT32                  Display,    UINT32                  ComponentId){    /* Only dump the buffer if tracing is enabled */    if (!((ACPI_LV_TABLES & AcpiDbgLevel) &&        (ComponentId & AcpiDbgLayer)))    {        return;    }    AcpiUtDumpBuffer2 (Buffer, Count, Display);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -