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

📄 dmresrcl.c

📁 acpi tools for linux include acpiexec and acpixtract
💻 C
📖 第 1 页 / 共 3 页
字号:
    /* The ResourceSource fields are optional */    AcpiDmIndent (Level + 1);    AcpiDmResourceSource (Resource, sizeof (AML_RESOURCE_ADDRESS64), Length);    /* Insert a descriptor name */    AcpiDmDescriptorName ();    /* Type-specific flags */    AcpiDmAddressFlags (Resource);    AcpiOsPrintf (")\n");}/******************************************************************************* * * FUNCTION:    AcpiDmExtendedDescriptor * * PARAMETERS:  Resource            - Pointer to the resource descriptor *              Length              - Length of the descriptor in bytes *              Level               - Current source code indentation level * * RETURN:      None * * DESCRIPTION: Decode a Extended Address Space descriptor * ******************************************************************************/voidAcpiDmExtendedDescriptor (    AML_RESOURCE            *Resource,    UINT32                  Length,    UINT32                  Level){    /* Dump resource name and flags */    AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64, Level);    /* Dump the 5 contiguous QWORD values */    AcpiDmAddressFields (&Resource->ExtAddress64.Granularity, 64, Level);    /* Extra field for this descriptor only */    AcpiDmIndent (Level + 1);    AcpiDmDumpInteger64 (Resource->ExtAddress64.TypeSpecific,        "Type-Specific Attributes");    /* Insert a descriptor name */    AcpiDmIndent (Level + 1);    AcpiDmDescriptorName ();    /* Type-specific flags */    AcpiDmAddressFlags (Resource);    AcpiOsPrintf (")\n");}/******************************************************************************* * * FUNCTION:    AcpiDmMemory24Descriptor * * PARAMETERS:  Resource            - Pointer to the resource descriptor *              Length              - Length of the descriptor in bytes *              Level               - Current source code indentation level * * RETURN:      None * * DESCRIPTION: Decode a Memory24 descriptor * ******************************************************************************/voidAcpiDmMemory24Descriptor (    AML_RESOURCE            *Resource,    UINT32                  Length,    UINT32                  Level){    /* Dump name and read/write flag */    AcpiDmIndent (Level);    AcpiOsPrintf ("Memory24 (%s,\n",        AcpiGbl_RwDecode [Resource->Memory24.Flags & 1]);    /* Dump the 4 contiguous WORD values */    AcpiDmMemoryFields (&Resource->Memory24.Minimum, 16, Level);    /* Insert a descriptor name */    AcpiDmIndent (Level + 1);    AcpiDmDescriptorName ();    AcpiOsPrintf (")\n");}/******************************************************************************* * * FUNCTION:    AcpiDmMemory32Descriptor * * PARAMETERS:  Resource            - Pointer to the resource descriptor *              Length              - Length of the descriptor in bytes *              Level               - Current source code indentation level * * RETURN:      None * * DESCRIPTION: Decode a Memory32 descriptor * ******************************************************************************/voidAcpiDmMemory32Descriptor (    AML_RESOURCE            *Resource,    UINT32                  Length,    UINT32                  Level){    /* Dump name and read/write flag */    AcpiDmIndent (Level);    AcpiOsPrintf ("Memory32 (%s,\n",        AcpiGbl_RwDecode [Resource->Memory32.Flags & 1]);    /* Dump the 4 contiguous DWORD values */    AcpiDmMemoryFields (&Resource->Memory32.Minimum, 32, Level);    /* Insert a descriptor name */    AcpiDmIndent (Level + 1);    AcpiDmDescriptorName ();    AcpiOsPrintf (")\n");}/******************************************************************************* * * FUNCTION:    AcpiDmFixedMemory32Descriptor * * PARAMETERS:  Resource            - Pointer to the resource descriptor *              Length              - Length of the descriptor in bytes *              Level               - Current source code indentation level * * RETURN:      None * * DESCRIPTION: Decode a Fixed Memory32 descriptor * ******************************************************************************/voidAcpiDmFixedMemory32Descriptor (    AML_RESOURCE            *Resource,    UINT32                  Length,    UINT32                  Level){    /* Dump name and read/write flag */    AcpiDmIndent (Level);    AcpiOsPrintf ("Memory32Fixed (%s,\n",        AcpiGbl_RwDecode [Resource->FixedMemory32.Flags & 1]);    AcpiDmIndent (Level + 1);    AcpiDmDumpInteger32 (Resource->FixedMemory32.Address, "Address Base");    AcpiDmIndent (Level + 1);    AcpiDmDumpInteger32 (Resource->FixedMemory32.AddressLength, "Address Length");    /* Insert a descriptor name */    AcpiDmIndent (Level + 1);    AcpiDmDescriptorName ();    AcpiOsPrintf (")\n");}/******************************************************************************* * * FUNCTION:    AcpiDmGenericRegisterDescriptor * * PARAMETERS:  Resource            - Pointer to the resource descriptor *              Length              - Length of the descriptor in bytes *              Level               - Current source code indentation level * * RETURN:      None * * DESCRIPTION: Decode a Generic Register descriptor * ******************************************************************************/voidAcpiDmGenericRegisterDescriptor (    AML_RESOURCE            *Resource,    UINT32                  Length,    UINT32                  Level){    AcpiDmIndent (Level);    AcpiOsPrintf ("Register (");    AcpiDmAddressSpace (Resource->GenericReg.AddressSpaceId);    AcpiOsPrintf ("\n");    AcpiDmIndent (Level + 1);    AcpiDmDumpInteger8 (Resource->GenericReg.BitWidth, "Bit Width");    AcpiDmIndent (Level + 1);    AcpiDmDumpInteger8 (Resource->GenericReg.BitOffset, "Bit Offset");    AcpiDmIndent (Level + 1);    AcpiDmDumpInteger64 (Resource->GenericReg.Address, "Address");    /* Optional field for ACPI 3.0 */    AcpiDmIndent (Level + 1);    if (Resource->GenericReg.AccessSize)    {        AcpiOsPrintf ("0x%2.2X,               // %s\n",            Resource->GenericReg.AccessSize, "Access Size");        AcpiDmIndent (Level + 1);    }    else    {        AcpiOsPrintf (",");    }    /* DescriptorName was added for ACPI 3.0+ */    AcpiDmDescriptorName ();    AcpiOsPrintf (")\n");}/******************************************************************************* * * FUNCTION:    AcpiDmInterruptDescriptor * * PARAMETERS:  Resource            - Pointer to the resource descriptor *              Length              - Length of the descriptor in bytes *              Level               - Current source code indentation level * * RETURN:      None * * DESCRIPTION: Decode a extended Interrupt descriptor * ******************************************************************************/voidAcpiDmInterruptDescriptor (    AML_RESOURCE            *Resource,    UINT32                  Length,    UINT32                  Level){    UINT32                  i;    AcpiDmIndent (Level);    AcpiOsPrintf ("Interrupt (%s, %s, %s, %s, ",        AcpiGbl_ConsumeDecode [(Resource->ExtendedIrq.Flags & 1)],        AcpiGbl_HeDecode [(Resource->ExtendedIrq.Flags >> 1) & 1],        AcpiGbl_LlDecode [(Resource->ExtendedIrq.Flags >> 2) & 1],        AcpiGbl_ShrDecode [(Resource->ExtendedIrq.Flags >> 3) & 1]);    /*     * The ResourceSource fields are optional and appear after the interrupt     * list. Must compute length based on length of the list. First xrupt     * is included in the struct (reason for -1 below)     */    AcpiDmResourceSource (Resource,        sizeof (AML_RESOURCE_EXTENDED_IRQ) +            (Resource->ExtendedIrq.InterruptCount - 1) * sizeof (UINT32),        Resource->ExtendedIrq.ResourceLength);    /* Insert a descriptor name */    AcpiDmDescriptorName ();    AcpiOsPrintf (")\n");    /* Dump the interrupt list */    AcpiDmIndent (Level);    AcpiOsPrintf ("{\n");    for (i = 0; i < Resource->ExtendedIrq.InterruptCount; i++)    {        AcpiDmIndent (Level + 1);        AcpiOsPrintf ("0x%8.8X,\n",            (UINT32) Resource->ExtendedIrq.Interrupts[i]);    }    AcpiDmIndent (Level);    AcpiOsPrintf ("}\n");}/******************************************************************************* * * FUNCTION:    AcpiDmVendorCommon * * PARAMETERS:  Name                - Descriptor name suffix *              ByteData            - Pointer to the vendor byte data *              Length              - Length of the byte data *              Level               - Current source code indentation level * * RETURN:      None * * DESCRIPTION: Decode a Vendor descriptor, both Large and Small * ******************************************************************************/voidAcpiDmVendorCommon (    char                    *Name,    UINT8                   *ByteData,    UINT32                  Length,    UINT32                  Level){    /* Dump macro name */    AcpiDmIndent (Level);    AcpiOsPrintf ("Vendor%s (", Name);    /* Insert a descriptor name */    AcpiDmDescriptorName ();    AcpiOsPrintf (")      // Length = 0x%.2X\n", Length);    /* Dump the vendor bytes */    AcpiDmIndent (Level);    AcpiOsPrintf ("{\n");    AcpiDmDisasmByteList (Level + 1, ByteData, Length);    AcpiDmIndent (Level);    AcpiOsPrintf ("}\n");}/******************************************************************************* * * FUNCTION:    AcpiDmVendorLargeDescriptor * * PARAMETERS:  Resource            - Pointer to the resource descriptor *              Length              - Length of the descriptor in bytes *              Level               - Current source code indentation level * * RETURN:      None * * DESCRIPTION: Decode a Vendor Large descriptor * ******************************************************************************/voidAcpiDmVendorLargeDescriptor (    AML_RESOURCE            *Resource,    UINT32                  Length,    UINT32                  Level){    AcpiDmVendorCommon ("Long ",        ACPI_ADD_PTR (UINT8, Resource, sizeof (AML_RESOURCE_LARGE_HEADER)),        Length, Level);}#endif

⌨️ 快捷键说明

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