📄 rsdump.c
字号:
ResourceSource->StringPtr ? ResourceSource->StringPtr : "[Not Specified]");}/******************************************************************************* * * FUNCTION: AcpiRsDumpAddressCommon * * PARAMETERS: Resource - Pointer to an internal resource descriptor * * RETURN: None * * DESCRIPTION: Dump the fields that are common to all Address resource * descriptors * ******************************************************************************/static voidAcpiRsDumpAddressCommon ( ACPI_RESOURCE_DATA *Resource){ ACPI_FUNCTION_ENTRY (); /* Decode the type-specific flags */ switch (Resource->Address.ResourceType) { case ACPI_MEMORY_RANGE: AcpiRsDumpDescriptor (Resource, AcpiRsDumpMemoryFlags); break; case ACPI_IO_RANGE: AcpiRsDumpDescriptor (Resource, AcpiRsDumpIoFlags); break; case ACPI_BUS_NUMBER_RANGE: AcpiRsOutString ("Resource Type", "Bus Number Range"); break; default: AcpiRsOutInteger8 ("Resource Type", (UINT8) Resource->Address.ResourceType); break; } /* Decode the general flags */ AcpiRsDumpDescriptor (Resource, AcpiRsDumpGeneralFlags);}/******************************************************************************* * * FUNCTION: AcpiRsDumpResourceList * * PARAMETERS: ResourceList - Pointer to a resource descriptor list * * RETURN: None * * DESCRIPTION: Dispatches the structure to the correct dump routine. * ******************************************************************************/voidAcpiRsDumpResourceList ( ACPI_RESOURCE *ResourceList){ UINT32 Count = 0; UINT32 Type; ACPI_FUNCTION_ENTRY (); if (!(AcpiDbgLevel & ACPI_LV_RESOURCES) || !( _COMPONENT & AcpiDbgLayer)) { return; } /* Walk list and dump all resource descriptors (END_TAG terminates) */ do { AcpiOsPrintf ("\n[%02X] ", Count); Count++; /* Validate Type before dispatch */ Type = ResourceList->Type; if (Type > ACPI_RESOURCE_TYPE_MAX) { AcpiOsPrintf ( "Invalid descriptor type (%X) in resource list\n", ResourceList->Type); return; } /* Dump the resource descriptor */ AcpiRsDumpDescriptor (&ResourceList->Data, AcpiGbl_DumpResourceDispatch[Type]); /* Point to the next resource structure */ ResourceList = ACPI_ADD_PTR (ACPI_RESOURCE, ResourceList, ResourceList->Length); /* Exit when END_TAG descriptor is reached */ } while (Type != ACPI_RESOURCE_TYPE_END_TAG);}/******************************************************************************* * * FUNCTION: AcpiRsDumpIrqList * * PARAMETERS: RouteTable - Pointer to the routing table to dump. * * RETURN: None * * DESCRIPTION: Print IRQ routing table * ******************************************************************************/voidAcpiRsDumpIrqList ( UINT8 *RouteTable){ ACPI_PCI_ROUTING_TABLE *PrtElement; UINT8 Count; ACPI_FUNCTION_ENTRY (); if (!(AcpiDbgLevel & ACPI_LV_RESOURCES) || !( _COMPONENT & AcpiDbgLayer)) { return; } PrtElement = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, RouteTable); /* Dump all table elements, Exit on zero length element */ for (Count = 0; PrtElement->Length; Count++) { AcpiOsPrintf ("\n[%02X] PCI IRQ Routing Table Package\n", Count); AcpiRsDumpDescriptor (PrtElement, AcpiRsDumpPrt); PrtElement = ACPI_ADD_PTR (ACPI_PCI_ROUTING_TABLE, PrtElement, PrtElement->Length); }}/******************************************************************************* * * FUNCTION: AcpiRsOut* * * PARAMETERS: Title - Name of the resource field * Value - Value of the resource field * * RETURN: None * * DESCRIPTION: Miscellaneous helper functions to consistently format the * output of the resource dump routines * ******************************************************************************/static voidAcpiRsOutString ( char *Title, char *Value){ AcpiOsPrintf ("%27s : %s", Title, Value); if (!*Value) { AcpiOsPrintf ("[NULL NAMESTRING]"); } AcpiOsPrintf ("\n");}static voidAcpiRsOutInteger8 ( char *Title, UINT8 Value){ AcpiOsPrintf ("%27s : %2.2X\n", Title, Value);}static voidAcpiRsOutInteger16 ( char *Title, UINT16 Value){ AcpiOsPrintf ("%27s : %4.4X\n", Title, Value);}static voidAcpiRsOutInteger32 ( char *Title, UINT32 Value){ AcpiOsPrintf ("%27s : %8.8X\n", Title, Value);}static voidAcpiRsOutInteger64 ( char *Title, UINT64 Value){ AcpiOsPrintf ("%27s : %8.8X%8.8X\n", Title, ACPI_FORMAT_UINT64 (Value));}static voidAcpiRsOutTitle ( char *Title){ AcpiOsPrintf ("%27s : ", Title);}/******************************************************************************* * * FUNCTION: AcpiRsDump*List * * PARAMETERS: Length - Number of elements in the list * Data - Start of the list * * RETURN: None * * DESCRIPTION: Miscellaneous functions to dump lists of raw data * ******************************************************************************/static voidAcpiRsDumpByteList ( UINT16 Length, UINT8 *Data){ UINT8 i; for (i = 0; i < Length; i++) { AcpiOsPrintf ("%25s%2.2X : %2.2X\n", "Byte", i, Data[i]); }}static voidAcpiRsDumpShortByteList ( UINT8 Length, UINT8 *Data){ UINT8 i; for (i = 0; i < Length; i++) { AcpiOsPrintf ("%X ", Data[i]); } AcpiOsPrintf ("\n");}static voidAcpiRsDumpDwordList ( UINT8 Length, UINT32 *Data){ UINT8 i; for (i = 0; i < Length; i++) { AcpiOsPrintf ("%25s%2.2X : %8.8X\n", "Dword", i, Data[i]); }}#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -