diff --git a/source/components/resources/rsdump.c b/source/components/resources/rsdump.c index 6d05f26f2..71e22a202 100644 --- a/source/components/resources/rsdump.c +++ b/source/components/resources/rsdump.c @@ -1,15 +1,16 @@ -/****************************************************************************** +/******************************************************************************* * - * Module Name: rsdump - Functions do dump out the resource structures. + * Module Name: rsdump - Functions to display the resource structures. + * $Revision: 1.20 $ * - *****************************************************************************/ + ******************************************************************************/ /****************************************************************************** * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights - * reserved. + * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp. + * All rights reserved. * * 2. License * @@ -117,18 +118,19 @@ #define __RSDUMP_C__ #include "acpi.h" +#include "acresrc.h" -#define _COMPONENT RESOURCE_MANAGER - MODULE_NAME ("rsdump"); +#define _COMPONENT ACPI_RESOURCES + MODULE_NAME ("rsdump") -/****************************************************************************** +/******************************************************************************* * * FUNCTION: AcpiRsDumpIrq * * PARAMETERS: Data - pointer to the resource structure to dump. * - * RETURN: + * RETURN: None * * DESCRIPTION: Prints out the various members of the Data structure type. * @@ -136,32 +138,28 @@ void AcpiRsDumpIrq ( - RESOURCE_DATA *Data) + ACPI_RESOURCE_DATA *Data) { - IRQ_RESOURCE *IrqData = (IRQ_RESOURCE*) Data; + ACPI_RESOURCE_IRQ *IrqData = (ACPI_RESOURCE_IRQ *) Data; UINT8 Index = 0; - AcpiOsPrintf ("\tIRQ Resource\n"); + AcpiOsPrintf ("IRQ Resource\n"); - AcpiOsPrintf ("\t\t%s Triggered\n", - LEVEL_SENSITIVE == IrqData->EdgeLevel ? - "Level" : "Edge"); + AcpiOsPrintf (" %s Triggered\n", + LEVEL_SENSITIVE == IrqData->EdgeLevel ? "Level" : "Edge"); - AcpiOsPrintf ("\t\tActive %s\n", - ACTIVE_LOW == IrqData->ActiveHighLow ? - "Low" : "High"); + AcpiOsPrintf (" Active %s\n", + ACTIVE_LOW == IrqData->ActiveHighLow ? "Low" : "High"); - AcpiOsPrintf ("\t\t%s\n", - SHARED == IrqData->SharedExclusive ? - "Shared" : "Exclusive"); + AcpiOsPrintf (" %s\n", + SHARED == IrqData->SharedExclusive ? "Shared" : "Exclusive"); - AcpiOsPrintf ("\t\t%d Interrupts ( ", - IrqData->NumberOfInterrupts); + AcpiOsPrintf (" %X Interrupts ( ", IrqData->NumberOfInterrupts); for (Index = 0; Index < IrqData->NumberOfInterrupts; Index++) { - AcpiOsPrintf ("%d ", IrqData->Interrupts[Index]); + AcpiOsPrintf ("%X ", IrqData->Interrupts[Index]); } AcpiOsPrintf (")\n"); @@ -169,13 +167,13 @@ AcpiRsDumpIrq ( } -/****************************************************************************** +/******************************************************************************* * * FUNCTION: AcpiRsDumpDma * * PARAMETERS: Data - pointer to the resource structure to dump. * - * RETURN: + * RETURN: None * * DESCRIPTION: Prints out the various members of the Data structure type. * @@ -183,66 +181,65 @@ AcpiRsDumpIrq ( void AcpiRsDumpDma ( - RESOURCE_DATA *Data) + ACPI_RESOURCE_DATA *Data) { - DMA_RESOURCE *DmaData = (DMA_RESOURCE*) Data; + ACPI_RESOURCE_DMA *DmaData = (ACPI_RESOURCE_DMA *) Data; UINT8 Index = 0; - AcpiOsPrintf ("\tDMA Resource\n"); + AcpiOsPrintf ("DMA Resource\n"); switch (DmaData->Type) { case COMPATIBILITY: - AcpiOsPrintf ("\t\tCompatibility mode\n"); + AcpiOsPrintf (" Compatibility mode\n"); break; case TYPE_A: - AcpiOsPrintf ("\t\tType A\n"); + AcpiOsPrintf (" Type A\n"); break; case TYPE_B: - AcpiOsPrintf ("\t\tType B\n"); + AcpiOsPrintf (" Type B\n"); break; case TYPE_F: - AcpiOsPrintf ("\t\tType F\n"); + AcpiOsPrintf (" Type F\n"); break; default: - AcpiOsPrintf ("\t\tInvalid DMA type\n"); + AcpiOsPrintf (" Invalid DMA type\n"); break; } - AcpiOsPrintf ("\t\t%sBus Master\n", - BUS_MASTER == DmaData->BusMaster ? - "" : "Not a "); + AcpiOsPrintf (" %sBus Master\n", + BUS_MASTER == DmaData->BusMaster ? "" : "Not a "); + switch (DmaData->Transfer) { case TRANSFER_8: - AcpiOsPrintf ("\t\t8-bit only transfer\n"); + AcpiOsPrintf (" 8-bit only transfer\n"); break; case TRANSFER_8_16: - AcpiOsPrintf ("\t\t8 and 16-bit transfer\n"); + AcpiOsPrintf (" 8 and 16-bit transfer\n"); break; case TRANSFER_16: - AcpiOsPrintf ("\t\t16 bit only transfer\n"); + AcpiOsPrintf (" 16 bit only transfer\n"); break; default: - AcpiOsPrintf ("\t\tInvalid transfer preference\n"); + AcpiOsPrintf (" Invalid transfer preference\n"); break; } - AcpiOsPrintf ("\t\tNumber of Channels: %d ( ", - DmaData->NumberOfChannels); + AcpiOsPrintf (" Number of Channels: %X ( ", DmaData->NumberOfChannels); for (Index = 0; Index < DmaData->NumberOfChannels; Index++) { - AcpiOsPrintf ("%d ", DmaData->Channels[Index]); + AcpiOsPrintf ("%X ", DmaData->Channels[Index]); } AcpiOsPrintf (")\n"); @@ -250,13 +247,13 @@ AcpiRsDumpDma ( } -/****************************************************************************** +/******************************************************************************* * * FUNCTION: AcpiRsDumpStartDependentFunctions * * PARAMETERS: Data - pointer to the resource structure to dump. * - * RETURN: + * RETURN: None * * DESCRIPTION: Prints out the various members of the Data structure type. * @@ -264,49 +261,49 @@ AcpiRsDumpDma ( void AcpiRsDumpStartDependentFunctions ( - RESOURCE_DATA *Data) + ACPI_RESOURCE_DATA *Data) { - START_DEPENDENT_FUNCTIONS_RESOURCE *SdfData = - (START_DEPENDENT_FUNCTIONS_RESOURCE*) Data; + ACPI_RESOURCE_START_DPF *SdfData = (ACPI_RESOURCE_START_DPF *) Data; - AcpiOsPrintf ("\tStart Dependent Functions Resource\n"); + AcpiOsPrintf ("Start Dependent Functions Resource\n"); + switch (SdfData->CompatibilityPriority) { case GOOD_CONFIGURATION: - AcpiOsPrintf ("\t\tGood configuration\n"); + AcpiOsPrintf (" Good configuration\n"); break; case ACCEPTABLE_CONFIGURATION: - AcpiOsPrintf ("\t\tAcceptable configuration\n"); + AcpiOsPrintf (" Acceptable configuration\n"); break; case SUB_OPTIMAL_CONFIGURATION: - AcpiOsPrintf ("\t\tSub-optimal configuration\n"); + AcpiOsPrintf (" Sub-optimal configuration\n"); break; default: - AcpiOsPrintf ("\t\tInvalid compatibility priority\n"); + AcpiOsPrintf (" Invalid compatibility priority\n"); break; } switch(SdfData->PerformanceRobustness) { case GOOD_CONFIGURATION: - AcpiOsPrintf ("\t\tGood configuration\n"); + AcpiOsPrintf (" Good configuration\n"); break; case ACCEPTABLE_CONFIGURATION: - AcpiOsPrintf ("\t\tAcceptable configuration\n"); + AcpiOsPrintf (" Acceptable configuration\n"); break; case SUB_OPTIMAL_CONFIGURATION: - AcpiOsPrintf ("\t\tSub-optimal configuration\n"); + AcpiOsPrintf (" Sub-optimal configuration\n"); break; default: - AcpiOsPrintf ("\t\tInvalid performance " + AcpiOsPrintf (" Invalid performance " "robustness preference\n"); break; } @@ -315,13 +312,13 @@ AcpiRsDumpStartDependentFunctions ( } -/****************************************************************************** +/******************************************************************************* * * FUNCTION: AcpiRsDumpIo * * PARAMETERS: Data - pointer to the resource structure to dump. * - * RETURN: + * RETURN: None * * DESCRIPTION: Prints out the various members of the Data structure type. * @@ -329,39 +326,39 @@ AcpiRsDumpStartDependentFunctions ( void AcpiRsDumpIo ( - RESOURCE_DATA *Data) + ACPI_RESOURCE_DATA *Data) { - IO_RESOURCE *IoData = (IO_RESOURCE*) Data; + ACPI_RESOURCE_IO *IoData = (ACPI_RESOURCE_IO *) Data; - AcpiOsPrintf ("\tIo Resource\n"); + AcpiOsPrintf ("Io Resource\n"); - AcpiOsPrintf ("\t\t%d bit decode\n", + AcpiOsPrintf (" %d bit decode\n", DECODE_16 == IoData->IoDecode ? 16 : 10); - AcpiOsPrintf ("\t\tRange minimum base: 0x%08x\n", + AcpiOsPrintf (" Range minimum base: %08X\n", IoData->MinBaseAddress); - AcpiOsPrintf ("\t\tRange maximum base: 0x%08x\n", + AcpiOsPrintf (" Range maximum base: %08X\n", IoData->MaxBaseAddress); - AcpiOsPrintf ("\t\tAlignment: 0x%08x\n", + AcpiOsPrintf (" Alignment: %08X\n", IoData->Alignment); - AcpiOsPrintf ("\t\tRange Length: 0x%08x\n", + AcpiOsPrintf (" Range Length: %08X\n", IoData->RangeLength); return; } -/****************************************************************************** +/******************************************************************************* * * FUNCTION: AcpiRsDumpFixedIo * * PARAMETERS: Data - pointer to the resource structure to dump. * - * RETURN: + * RETURN: None * * DESCRIPTION: Prints out the various members of the Data structure type. * @@ -369,29 +366,29 @@ AcpiRsDumpIo ( void AcpiRsDumpFixedIo ( - RESOURCE_DATA *Data) + ACPI_RESOURCE_DATA *Data) { - FIXED_IO_RESOURCE *FixedIoData = (FIXED_IO_RESOURCE*) Data; + ACPI_RESOURCE_FIXED_IO *FixedIoData = (ACPI_RESOURCE_FIXED_IO *) Data; - AcpiOsPrintf ("\tFixed Io Resource\n"); - AcpiOsPrintf ("\t\tRange base address: 0x%08x", + AcpiOsPrintf ("Fixed Io Resource\n"); + AcpiOsPrintf (" Range base address: %08X", FixedIoData->BaseAddress); - AcpiOsPrintf ("\t\tRange length: 0x%08x", + AcpiOsPrintf (" Range length: %08X", FixedIoData->RangeLength); return; } -/****************************************************************************** +/******************************************************************************* * * FUNCTION: AcpiRsDumpVendorSpecific * * PARAMETERS: Data - pointer to the resource structure to dump. * - * RETURN: + * RETURN: None * * DESCRIPTION: Prints out the various members of the Data structure type. * @@ -399,19 +396,19 @@ AcpiRsDumpFixedIo ( void AcpiRsDumpVendorSpecific ( - RESOURCE_DATA *Data) + ACPI_RESOURCE_DATA *Data) { - VENDOR_RESOURCE *VendorData = (VENDOR_RESOURCE*) Data; + ACPI_RESOURCE_VENDOR *VendorData = (ACPI_RESOURCE_VENDOR *) Data; UINT16 Index = 0; - AcpiOsPrintf ("\tVendor Specific Resource\n"); + AcpiOsPrintf ("Vendor Specific Resource\n"); - AcpiOsPrintf ("\t\tLength: 0x%08x\n", VendorData->Length); + AcpiOsPrintf (" Length: %08X\n", VendorData->Length); for (Index = 0; Index < VendorData->Length; Index++) { - AcpiOsPrintf ("\t\tByte %d: 0x%08x\n", + AcpiOsPrintf (" Byte %X: %08X\n", Index, VendorData->Reserved[Index]); } @@ -419,13 +416,13 @@ AcpiRsDumpVendorSpecific ( } -/****************************************************************************** +/******************************************************************************* * * FUNCTION: AcpiRsDumpMemory24 * * PARAMETERS: Data - pointer to the resource structure to dump. * - * RETURN: + * RETURN: None * * DESCRIPTION: Prints out the various members of the Data structure type. * @@ -433,41 +430,41 @@ AcpiRsDumpVendorSpecific ( void AcpiRsDumpMemory24 ( - RESOURCE_DATA *Data) + ACPI_RESOURCE_DATA *Data) { - MEMORY24_RESOURCE *Memory24Data = (MEMORY24_RESOURCE*) Data; + ACPI_RESOURCE_MEM24 *Memory24Data = (ACPI_RESOURCE_MEM24 *) Data; - AcpiOsPrintf ("\t24-Bit Memory Range Resource\n"); + AcpiOsPrintf ("24-Bit Memory Range Resource\n"); - AcpiOsPrintf ("\t\tRead%s\n", + AcpiOsPrintf (" Read%s\n", READ_WRITE_MEMORY == Memory24Data->ReadWriteAttribute ? "/Write" : " only"); - AcpiOsPrintf ("\t\tRange minimum base: 0x%08x\n", + AcpiOsPrintf (" Range minimum base: %08X\n", Memory24Data->MinBaseAddress); - AcpiOsPrintf ("\t\tRange maximum base: 0x%08x\n", + AcpiOsPrintf (" Range maximum base: %08X\n", Memory24Data->MaxBaseAddress); - AcpiOsPrintf ("\t\tAlignment: 0x%08x\n", + AcpiOsPrintf (" Alignment: %08X\n", Memory24Data->Alignment); - AcpiOsPrintf ("\t\tRange length: 0x%08x\n", + AcpiOsPrintf (" Range length: %08X\n", Memory24Data->RangeLength); return; } -/****************************************************************************** +/******************************************************************************* * * FUNCTION: AcpiRsDumpMemory32 * * PARAMETERS: Data - pointer to the resource structure to dump. * - * RETURN: + * RETURN: None * * DESCRIPTION: Prints out the various members of the Data structure type. * @@ -475,35 +472,35 @@ AcpiRsDumpMemory24 ( void AcpiRsDumpMemory32 ( - RESOURCE_DATA *Data) + ACPI_RESOURCE_DATA *Data) { - MEMORY32_RESOURCE *Memory32Data = (MEMORY32_RESOURCE*) Data; + ACPI_RESOURCE_MEM32 *Memory32Data = (ACPI_RESOURCE_MEM32 *) Data; - AcpiOsPrintf ("\t32-Bit Memory Range Resource\n"); + AcpiOsPrintf ("32-Bit Memory Range Resource\n"); - AcpiOsPrintf ("\t\tRead%s\n", + AcpiOsPrintf (" Read%s\n", READ_WRITE_MEMORY == Memory32Data->ReadWriteAttribute ? "/Write" : " only"); - AcpiOsPrintf ("\t\tRange minimum base: 0x%08x\n", + AcpiOsPrintf (" Range minimum base: %08X\n", Memory32Data->MinBaseAddress); - AcpiOsPrintf ("\t\tRange maximum base: 0x%08x\n", + AcpiOsPrintf (" Range maximum base: %08X\n", Memory32Data->MaxBaseAddress); - AcpiOsPrintf ("\t\tAlignment: 0x%08x\n", + AcpiOsPrintf (" Alignment: %08X\n", Memory32Data->Alignment); - AcpiOsPrintf ("\t\tRange length: 0x%08x\n", + AcpiOsPrintf (" Range length: %08X\n", Memory32Data->RangeLength); return; } -/****************************************************************************** +/******************************************************************************* * * FUNCTION: AcpiRsDumpFixedMemory32 * @@ -517,35 +514,35 @@ AcpiRsDumpMemory32 ( void AcpiRsDumpFixedMemory32 ( - RESOURCE_DATA *Data) + ACPI_RESOURCE_DATA *Data) { - FIXED_MEMORY32_RESOURCE *FixedMemory32Data = (FIXED_MEMORY32_RESOURCE*) Data; + ACPI_RESOURCE_FIXED_MEM32 *FixedMemory32Data = (ACPI_RESOURCE_FIXED_MEM32 *) Data; - AcpiOsPrintf ("\t32-Bit Fixed Location Memory Range Resource\n"); + AcpiOsPrintf ("32-Bit Fixed Location Memory Range Resource\n"); - AcpiOsPrintf ("\t\tRead%s\n", + AcpiOsPrintf (" Read%s\n", READ_WRITE_MEMORY == FixedMemory32Data->ReadWriteAttribute ? "/Write" : " Only"); - AcpiOsPrintf ("\t\tRange base address: 0x%08x\n", + AcpiOsPrintf (" Range base address: %08X\n", FixedMemory32Data->RangeBaseAddress); - AcpiOsPrintf ("\t\tRange length: 0x%08x\n", + AcpiOsPrintf (" Range length: %08X\n", FixedMemory32Data->RangeLength); return; } -/****************************************************************************** +/******************************************************************************* * * FUNCTION: AcpiRsDumpAddress16 * * PARAMETERS: Data - pointer to the resource structure to dump. * - * RETURN: + * RETURN: None * * DESCRIPTION: Prints out the various members of the Data structure type. * @@ -553,13 +550,13 @@ AcpiRsDumpFixedMemory32 ( void AcpiRsDumpAddress16 ( - RESOURCE_DATA *Data) + ACPI_RESOURCE_DATA *Data) { - ADDRESS16_RESOURCE *Address16Data = (ADDRESS16_RESOURCE*) Data; + ACPI_RESOURCE_ADDRESS16 *Address16Data = (ACPI_RESOURCE_ADDRESS16 *) Data; - AcpiOsPrintf ("\t16-Bit Address Space Resource\n"); - AcpiOsPrintf ("\t\tResource Type: "); + AcpiOsPrintf ("16-Bit Address Space Resource\n"); + AcpiOsPrintf (" Resource Type: "); switch (Address16Data->ResourceType) { @@ -570,32 +567,32 @@ AcpiRsDumpAddress16 ( switch (Address16Data->Attribute.Memory.CacheAttribute) { case NON_CACHEABLE_MEMORY: - AcpiOsPrintf ("\t\tType Specific: " + AcpiOsPrintf (" Type Specific: " "Noncacheable memory\n"); break; case CACHABLE_MEMORY: - AcpiOsPrintf ("\t\tType Specific: " + AcpiOsPrintf (" Type Specific: " "Cacheable memory\n"); break; case WRITE_COMBINING_MEMORY: - AcpiOsPrintf ("\t\tType Specific: " + AcpiOsPrintf (" Type Specific: " "Write-combining memory\n"); break; case PREFETCHABLE_MEMORY: - AcpiOsPrintf ("\t\tType Specific: " + AcpiOsPrintf (" Type Specific: " "Prefetchable memory\n"); break; default: - AcpiOsPrintf ("\t\tType Specific: " + AcpiOsPrintf (" Type Specific: " "Invalid cache attribute\n"); break; } - AcpiOsPrintf ("\t\tType Specific: Read%s\n", + AcpiOsPrintf (" Type Specific: Read%s\n", READ_WRITE_MEMORY == Address16Data->Attribute.Memory.ReadWriteAttribute ? "/Write" : " Only"); @@ -608,22 +605,22 @@ AcpiRsDumpAddress16 ( switch (Address16Data->Attribute.Io.RangeAttribute) { case NON_ISA_ONLY_RANGES: - AcpiOsPrintf ("\t\tType Specific: " + AcpiOsPrintf (" Type Specific: " "Non-ISA Io Addresses\n"); break; case ISA_ONLY_RANGES: - AcpiOsPrintf ("\t\tType Specific: " + AcpiOsPrintf (" Type Specific: " "ISA Io Addresses\n"); break; case ENTIRE_RANGE: - AcpiOsPrintf ("\t\tType Specific: " + AcpiOsPrintf (" Type Specific: " "ISA and non-ISA Io Addresses\n"); break; default: - AcpiOsPrintf ("\t\tType Specific: " + AcpiOsPrintf (" Type Specific: " "Invalid range attribute\n"); break; } @@ -640,56 +637,56 @@ AcpiRsDumpAddress16 ( return; } - AcpiOsPrintf ("\t\tResource %s\n", + AcpiOsPrintf (" Resource %s\n", CONSUMER == Address16Data->ProducerConsumer ? "Consumer" : "Producer"); - AcpiOsPrintf ("\t\t%s decode\n", + AcpiOsPrintf (" %s decode\n", SUB_DECODE == Address16Data->Decode ? "Subtractive" : "Positive"); - AcpiOsPrintf ("\t\tMin address is %s fixed\n", + AcpiOsPrintf (" Min address is %s fixed\n", ADDRESS_FIXED == Address16Data->MinAddressFixed ? "" : "not"); - AcpiOsPrintf ("\t\tMax address is %s fixed\n", + AcpiOsPrintf (" Max address is %s fixed\n", ADDRESS_FIXED == Address16Data->MaxAddressFixed ? "" : "not"); - AcpiOsPrintf ("\t\tGranularity: 0x%08x\n", + AcpiOsPrintf (" Granularity: %08X\n", Address16Data->Granularity); - AcpiOsPrintf ("\t\tAddress range min: 0x%08x\n", + AcpiOsPrintf (" Address range min: %08X\n", Address16Data->MinAddressRange); - AcpiOsPrintf ("\t\tAddress range max: 0x%08x\n", + AcpiOsPrintf (" Address range max: %08X\n", Address16Data->MaxAddressRange); - AcpiOsPrintf ("\t\tAddress translation offset: 0x%08x\n", + AcpiOsPrintf (" Address translation offset: %08X\n", Address16Data->AddressTranslationOffset); - AcpiOsPrintf ("\t\tAddress Length: 0x%08x\n", + AcpiOsPrintf (" Address Length: %08X\n", Address16Data->AddressLength); - if (0xFF != Address16Data->ResourceSourceIndex) + if (0xFF != Address16Data->ResourceSource.Index) { - AcpiOsPrintf ("\t\tResource Source Index: %d\n", - Address16Data->ResourceSourceIndex); - AcpiOsPrintf ("\t\tResource Source: %s\n", - Address16Data->ResourceSource); + AcpiOsPrintf (" Resource Source Index: %X\n", + Address16Data->ResourceSource.Index); + AcpiOsPrintf (" Resource Source: %s\n", + Address16Data->ResourceSource.StringPtr); } return; } -/****************************************************************************** +/******************************************************************************* * * FUNCTION: AcpiRsDumpAddress32 * * PARAMETERS: Data - pointer to the resource structure to dump. * - * RETURN: + * RETURN: None * * DESCRIPTION: Prints out the various members of the Data structure type. * @@ -697,48 +694,48 @@ AcpiRsDumpAddress16 ( void AcpiRsDumpAddress32 ( - RESOURCE_DATA *Data) + ACPI_RESOURCE_DATA *Data) { - ADDRESS32_RESOURCE *Address32Data = (ADDRESS32_RESOURCE*) Data; + ACPI_RESOURCE_ADDRESS32 *Address32Data = (ACPI_RESOURCE_ADDRESS32 *) Data; - AcpiOsPrintf ("\t32-Bit Address Space Resource\n"); + AcpiOsPrintf ("32-Bit Address Space Resource\n"); switch (Address32Data->ResourceType) { case MEMORY_RANGE: - AcpiOsPrintf ("\t\tResource Type: Memory Range\n"); + AcpiOsPrintf (" Resource Type: Memory Range\n"); switch (Address32Data->Attribute.Memory.CacheAttribute) { case NON_CACHEABLE_MEMORY: - AcpiOsPrintf ("\t\tType Specific: " + AcpiOsPrintf (" Type Specific: " "Noncacheable memory\n"); break; case CACHABLE_MEMORY: - AcpiOsPrintf ("\t\tType Specific: " + AcpiOsPrintf (" Type Specific: " "Cacheable memory\n"); break; case WRITE_COMBINING_MEMORY: - AcpiOsPrintf ("\t\tType Specific: " + AcpiOsPrintf (" Type Specific: " "Write-combining memory\n"); break; case PREFETCHABLE_MEMORY: - AcpiOsPrintf ("\t\tType Specific: " + AcpiOsPrintf (" Type Specific: " "Prefetchable memory\n"); break; default: - AcpiOsPrintf ("\t\tType Specific: " + AcpiOsPrintf (" Type Specific: " "Invalid cache attribute\n"); break; } - AcpiOsPrintf ("\t\tType Specific: Read%s\n", + AcpiOsPrintf (" Type Specific: Read%s\n", READ_WRITE_MEMORY == Address32Data->Attribute.Memory.ReadWriteAttribute ? "/Write" : " Only"); @@ -746,27 +743,27 @@ AcpiRsDumpAddress32 ( case IO_RANGE: - AcpiOsPrintf ("\t\tResource Type: Io Range\n"); + AcpiOsPrintf (" Resource Type: Io Range\n"); switch (Address32Data->Attribute.Io.RangeAttribute) { case NON_ISA_ONLY_RANGES: - AcpiOsPrintf ("\t\tType Specific: " + AcpiOsPrintf (" Type Specific: " "Non-ISA Io Addresses\n"); break; case ISA_ONLY_RANGES: - AcpiOsPrintf ("\t\tType Specific: " + AcpiOsPrintf (" Type Specific: " "ISA Io Addresses\n"); break; case ENTIRE_RANGE: - AcpiOsPrintf ("\t\tType Specific: " + AcpiOsPrintf (" Type Specific: " "ISA and non-ISA Io Addresses\n"); break; default: - AcpiOsPrintf ("\t\tType Specific: " + AcpiOsPrintf (" Type Specific: " "Invalid Range attribute"); break; } @@ -774,65 +771,208 @@ AcpiRsDumpAddress32 ( case BUS_NUMBER_RANGE: - AcpiOsPrintf ("\t\tResource Type: Bus Number Range\n"); + AcpiOsPrintf (" Resource Type: Bus Number Range\n"); break; default: - AcpiOsPrintf ("\t\tInvalid Resource Type..exiting.\n"); + AcpiOsPrintf (" Invalid Resource Type..exiting.\n"); return; } - AcpiOsPrintf ("\t\tResource %s\n", + AcpiOsPrintf (" Resource %s\n", CONSUMER == Address32Data->ProducerConsumer ? "Consumer" : "Producer"); - AcpiOsPrintf ("\t\t%s decode\n", + AcpiOsPrintf (" %s decode\n", SUB_DECODE == Address32Data->Decode ? "Subtractive" : "Positive"); - AcpiOsPrintf ("\t\tMin address is %s fixed\n", + AcpiOsPrintf (" Min address is %s fixed\n", ADDRESS_FIXED == Address32Data->MinAddressFixed ? "" : "not "); - AcpiOsPrintf ("\t\tMax address is %s fixed\n", + AcpiOsPrintf (" Max address is %s fixed\n", ADDRESS_FIXED == Address32Data->MaxAddressFixed ? "" : "not "); - AcpiOsPrintf ("\t\tGranularity: 0x%08x\n", + AcpiOsPrintf (" Granularity: %08X\n", Address32Data->Granularity); - AcpiOsPrintf ("\t\tAddress range min: 0x%08x\n", + AcpiOsPrintf (" Address range min: %08X\n", Address32Data->MinAddressRange); - AcpiOsPrintf ("\t\tAddress range max: 0x%08x\n", + AcpiOsPrintf (" Address range max: %08X\n", Address32Data->MaxAddressRange); - AcpiOsPrintf ("\t\tAddress translation offset: 0x%08x\n", + AcpiOsPrintf (" Address translation offset: %08X\n", Address32Data->AddressTranslationOffset); - AcpiOsPrintf ("\t\tAddress Length: 0x%08x\n", + AcpiOsPrintf (" Address Length: %08X\n", Address32Data->AddressLength); - if(0xFF != Address32Data->ResourceSourceIndex) + if(0xFF != Address32Data->ResourceSource.Index) { - AcpiOsPrintf ("\t\tResource Source Index: %d\n", - Address32Data->ResourceSourceIndex); - AcpiOsPrintf ("\t\tResource Source: %s\n", - Address32Data->ResourceSource); + AcpiOsPrintf (" Resource Source Index: %X\n", + Address32Data->ResourceSource.Index); + AcpiOsPrintf (" Resource Source: %s\n", + Address32Data->ResourceSource.StringPtr); } return; } -/****************************************************************************** +/******************************************************************************* + * + * FUNCTION: AcpiRsDumpAddress64 + * + * PARAMETERS: Data - pointer to the resource structure to dump. + * + * RETURN: None + * + * DESCRIPTION: Prints out the various members of the Data structure type. + * + ******************************************************************************/ + +void +AcpiRsDumpAddress64 ( + ACPI_RESOURCE_DATA *Data) +{ + ACPI_RESOURCE_ADDRESS64 *Address64Data = (ACPI_RESOURCE_ADDRESS64 *) Data; + + + AcpiOsPrintf ("64-Bit Address Space Resource\n"); + + switch (Address64Data->ResourceType) + { + case MEMORY_RANGE: + + AcpiOsPrintf (" Resource Type: Memory Range\n"); + + switch (Address64Data->Attribute.Memory.CacheAttribute) + { + case NON_CACHEABLE_MEMORY: + AcpiOsPrintf (" Type Specific: " + "Noncacheable memory\n"); + break; + + case CACHABLE_MEMORY: + AcpiOsPrintf (" Type Specific: " + "Cacheable memory\n"); + break; + + case WRITE_COMBINING_MEMORY: + AcpiOsPrintf (" Type Specific: " + "Write-combining memory\n"); + break; + + case PREFETCHABLE_MEMORY: + AcpiOsPrintf (" Type Specific: " + "Prefetchable memory\n"); + break; + + default: + AcpiOsPrintf (" Type Specific: " + "Invalid cache attribute\n"); + break; + } + + AcpiOsPrintf (" Type Specific: Read%s\n", + READ_WRITE_MEMORY == + Address64Data->Attribute.Memory.ReadWriteAttribute ? + "/Write" : " Only"); + break; + + case IO_RANGE: + + AcpiOsPrintf (" Resource Type: Io Range\n"); + + switch (Address64Data->Attribute.Io.RangeAttribute) + { + case NON_ISA_ONLY_RANGES: + AcpiOsPrintf (" Type Specific: " + "Non-ISA Io Addresses\n"); + break; + + case ISA_ONLY_RANGES: + AcpiOsPrintf (" Type Specific: " + "ISA Io Addresses\n"); + break; + + case ENTIRE_RANGE: + AcpiOsPrintf (" Type Specific: " + "ISA and non-ISA Io Addresses\n"); + break; + + default: + AcpiOsPrintf (" Type Specific: " + "Invalid Range attribute"); + break; + } + break; + + case BUS_NUMBER_RANGE: + + AcpiOsPrintf (" Resource Type: Bus Number Range\n"); + break; + + default: + + AcpiOsPrintf (" Invalid Resource Type..exiting.\n"); + return; + } + + AcpiOsPrintf (" Resource %s\n", + CONSUMER == Address64Data->ProducerConsumer ? + "Consumer" : "Producer"); + + AcpiOsPrintf (" %s decode\n", + SUB_DECODE == Address64Data->Decode ? + "Subtractive" : "Positive"); + + AcpiOsPrintf (" Min address is %s fixed\n", + ADDRESS_FIXED == Address64Data->MinAddressFixed ? + "" : "not "); + + AcpiOsPrintf (" Max address is %s fixed\n", + ADDRESS_FIXED == Address64Data->MaxAddressFixed ? + "" : "not "); + + AcpiOsPrintf (" Granularity: %16X\n", + Address64Data->Granularity); + + AcpiOsPrintf (" Address range min: %16X\n", + Address64Data->MinAddressRange); + + AcpiOsPrintf (" Address range max: %16X\n", + Address64Data->MaxAddressRange); + + AcpiOsPrintf (" Address translation offset: %16X\n", + Address64Data->AddressTranslationOffset); + + AcpiOsPrintf (" Address Length: %16X\n", + Address64Data->AddressLength); + + if(0xFF != Address64Data->ResourceSource.Index) + { + AcpiOsPrintf (" Resource Source Index: %X\n", + Address64Data->ResourceSource.Index); + AcpiOsPrintf (" Resource Source: %s\n", + Address64Data->ResourceSource.StringPtr); + } + + return; +} + + +/******************************************************************************* * * FUNCTION: AcpiRsDumpExtendedIrq * * PARAMETERS: Data - pointer to the resource structure to dump. * - * RETURN: + * RETURN: None * * DESCRIPTION: Prints out the various members of the Data structure type. * @@ -840,59 +980,59 @@ AcpiRsDumpAddress32 ( void AcpiRsDumpExtendedIrq ( - RESOURCE_DATA *Data) + ACPI_RESOURCE_DATA *Data) { - EXTENDED_IRQ_RESOURCE *ExtIrqData = (EXTENDED_IRQ_RESOURCE*) Data; + ACPI_RESOURCE_EXT_IRQ *ExtIrqData = (ACPI_RESOURCE_EXT_IRQ *) Data; UINT8 Index = 0; - AcpiOsPrintf ("\tExtended IRQ Resource\n"); + AcpiOsPrintf ("Extended IRQ Resource\n"); - AcpiOsPrintf ("\t\tResource %s\n", + AcpiOsPrintf (" Resource %s\n", CONSUMER == ExtIrqData->ProducerConsumer ? "Consumer" : "Producer"); - AcpiOsPrintf ("\t\t%s\n", + AcpiOsPrintf (" %s\n", LEVEL_SENSITIVE == ExtIrqData->EdgeLevel ? "Level" : "Edge"); - AcpiOsPrintf ("\t\tActive %s\n", + AcpiOsPrintf (" Active %s\n", ACTIVE_LOW == ExtIrqData->ActiveHighLow ? "low" : "high"); - AcpiOsPrintf ("\t\t%s\n", + AcpiOsPrintf (" %s\n", SHARED == ExtIrqData->SharedExclusive ? "Shared" : "Exclusive"); - AcpiOsPrintf ("\t\tInterrupts : %d ( ", + AcpiOsPrintf (" Interrupts : %X ( ", ExtIrqData->NumberOfInterrupts); for (Index = 0; Index < ExtIrqData->NumberOfInterrupts; Index++) { - AcpiOsPrintf ("%d ", ExtIrqData->Interrupts[Index]); + AcpiOsPrintf ("%X ", ExtIrqData->Interrupts[Index]); } AcpiOsPrintf (")\n"); - if(0xFF != ExtIrqData->ResourceSourceIndex) + if(0xFF != ExtIrqData->ResourceSource.Index) { - AcpiOsPrintf ("\t\tResource Source Index: %d", - ExtIrqData->ResourceSourceIndex); - AcpiOsPrintf ("\t\tResource Source: %s", - ExtIrqData->ResourceSource); + AcpiOsPrintf (" Resource Source Index: %X", + ExtIrqData->ResourceSource.Index); + AcpiOsPrintf (" Resource Source: %s", + ExtIrqData->ResourceSource.StringPtr); } return; } -/****************************************************************************** +/******************************************************************************* * * FUNCTION: AcpiRsDumpResourceList * * PARAMETERS: Data - pointer to the resource structure to dump. * - * RETURN: + * RETURN: None * * DESCRIPTION: Dispatches the structure to the correct dump routine. * @@ -900,7 +1040,7 @@ AcpiRsDumpExtendedIrq ( void AcpiRsDumpResourceList ( - RESOURCE *Resource) + ACPI_RESOURCE *Resource) { UINT8 Count = 0; BOOLEAN Done = FALSE; @@ -910,66 +1050,70 @@ AcpiRsDumpResourceList ( { while (!Done) { - AcpiOsPrintf ("\tResource structure %x.\n", Count++); + AcpiOsPrintf ("Resource structure %x.\n", Count++); switch (Resource->Id) { - case Irq: + case ACPI_RSTYPE_IRQ: AcpiRsDumpIrq (&Resource->Data); break; - case Dma: + case ACPI_RSTYPE_DMA: AcpiRsDumpDma (&Resource->Data); break; - case StartDependentFunctions: + case ACPI_RSTYPE_START_DPF: AcpiRsDumpStartDependentFunctions (&Resource->Data); break; - case EndDependentFunctions: - AcpiOsPrintf ("\tEndDependentFunctions Resource\n"); + case ACPI_RSTYPE_END_DPF: + AcpiOsPrintf ("EndDependentFunctions Resource\n"); /* AcpiRsDumpEndDependentFunctions (Resource->Data);*/ break; - case Io: + case ACPI_RSTYPE_IO: AcpiRsDumpIo (&Resource->Data); break; - case FixedIo: + case ACPI_RSTYPE_FIXED_IO: AcpiRsDumpFixedIo (&Resource->Data); break; - case VendorSpecific: + case ACPI_RSTYPE_VENDOR: AcpiRsDumpVendorSpecific (&Resource->Data); break; - case EndTag: + case ACPI_RSTYPE_END_TAG: /*RsDumpEndTag (Resource->Data);*/ - AcpiOsPrintf ("\tEndTag Resource\n"); + AcpiOsPrintf ("EndTag Resource\n"); Done = TRUE; break; - case Memory24: + case ACPI_RSTYPE_MEM24: AcpiRsDumpMemory24 (&Resource->Data); break; - case Memory32: + case ACPI_RSTYPE_MEM32: AcpiRsDumpMemory32 (&Resource->Data); break; - case FixedMemory32: + case ACPI_RSTYPE_FIXED_MEM32: AcpiRsDumpFixedMemory32 (&Resource->Data); break; - case Address16: + case ACPI_RSTYPE_ADDRESS16: AcpiRsDumpAddress16 (&Resource->Data); break; - case Address32: + case ACPI_RSTYPE_ADDRESS32: AcpiRsDumpAddress32 (&Resource->Data); break; - case ExtendedIrq: + case ACPI_RSTYPE_ADDRESS64: + AcpiRsDumpAddress64 (&Resource->Data); + break; + + case ACPI_RSTYPE_EXT_IRQ: AcpiRsDumpExtendedIrq (&Resource->Data); break; @@ -979,21 +1123,20 @@ AcpiRsDumpResourceList ( } - Resource = (RESOURCE *) ((NATIVE_UINT) Resource + - (NATIVE_UINT) Resource->Length); + Resource = POINTER_ADD (ACPI_RESOURCE, Resource, Resource->Length); } } return; } -/****************************************************************************** +/******************************************************************************* * * FUNCTION: AcpiRsDumpIrqList * * PARAMETERS: Data - pointer to the routing table to dump. * - * RETURN: + * RETURN: None * * DESCRIPTION: Dispatches the structures to the correct dump routine. * @@ -1011,25 +1154,25 @@ AcpiRsDumpIrqList ( if (AcpiDbgLevel & TRACE_RESOURCES && _COMPONENT & AcpiDbgLayer) { - PrtElement = (PCI_ROUTING_TABLE *)Buffer; + PrtElement = (PCI_ROUTING_TABLE *) Buffer; while (!Done) { - AcpiOsPrintf ("\tPCI IRQ Routing Table structure %x.\n", Count++); + AcpiOsPrintf ("PCI IRQ Routing Table structure %X.\n", Count++); - AcpiOsPrintf ("\t\tAddress: 0x%x\n", - PrtElement->Data.Address); + AcpiOsPrintf (" Address: %X\n", + PrtElement->Address); - AcpiOsPrintf ("\t\tPin: 0x%x\n", PrtElement->Data.Pin); + AcpiOsPrintf (" Pin: %X\n", PrtElement->Pin); - AcpiOsPrintf ("\t\tSource: %s\n", PrtElement->Data.Source); + AcpiOsPrintf (" Source: %s\n", PrtElement->Source); - AcpiOsPrintf ("\t\tSourceIndex: 0x%x\n", - PrtElement->Data.SourceIndex); + AcpiOsPrintf (" SourceIndex: %X\n", + PrtElement->SourceIndex); Buffer += PrtElement->Length; - PrtElement = (PCI_ROUTING_TABLE *)Buffer; + PrtElement = (PCI_ROUTING_TABLE *) Buffer; if(0 == PrtElement->Length) {