summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/dmresrcs.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/dmresrcs.c')
-rw-r--r--sys/contrib/dev/acpica/dmresrcs.c92
1 files changed, 56 insertions, 36 deletions
diff --git a/sys/contrib/dev/acpica/dmresrcs.c b/sys/contrib/dev/acpica/dmresrcs.c
index 2d13867..78b5826 100644
--- a/sys/contrib/dev/acpica/dmresrcs.c
+++ b/sys/contrib/dev/acpica/dmresrcs.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmresrcs.c - "Small" Resource Descriptor disassembly
- * $Revision: 5 $
+ * $Revision: 1.10 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -135,13 +135,13 @@
*
* RETURN: None
*
- * DESCRIPTION: Decode a IRQ descriptor
+ * DESCRIPTION: Decode a IRQ descriptor, either Irq() or IrqNoFlags()
*
******************************************************************************/
void
AcpiDmIrqDescriptor (
- ASL_IRQ_FORMAT_DESC *Resource,
+ AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
@@ -150,15 +150,19 @@ AcpiDmIrqDescriptor (
AcpiOsPrintf ("%s (",
AcpiGbl_IrqDecode [Length & 1]);
+ /* Decode flags byte if present */
+
if (Length & 1)
{
AcpiOsPrintf ("%s, %s, %s",
- AcpiGbl_HEDecode [Resource->Flags & 1],
- AcpiGbl_LLDecode [(Resource->Flags >> 3) & 1],
- AcpiGbl_SHRDecode [(Resource->Flags >> 4) & 1]);
+ AcpiGbl_HEDecode [Resource->Irq.Flags & 1],
+ AcpiGbl_LLDecode [(Resource->Irq.Flags >> 3) & 1],
+ AcpiGbl_SHRDecode [(Resource->Irq.Flags >> 4) & 1]);
}
+ AcpiOsPrintf (")\n");
- AcpiDmBitList (Resource->IrqMask);
+ AcpiDmIndent (Level + 1);
+ AcpiDmBitList (Resource->Irq.IrqMask);
}
@@ -178,18 +182,19 @@ AcpiDmIrqDescriptor (
void
AcpiDmDmaDescriptor (
- ASL_DMA_FORMAT_DESC *Resource,
+ AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
AcpiDmIndent (Level);
- AcpiOsPrintf ("DMA (%s, %s, %s",
- AcpiGbl_TYPDecode [(Resource->Flags >> 5) & 3],
- AcpiGbl_BMDecode [(Resource->Flags >> 2) & 1],
- AcpiGbl_SIZDecode [(Resource->Flags >> 0) & 3]);
+ AcpiOsPrintf ("DMA (%s, %s, %s)\n",
+ AcpiGbl_TYPDecode [(Resource->Dma.Flags >> 5) & 3],
+ AcpiGbl_BMDecode [(Resource->Dma.Flags >> 2) & 1],
+ AcpiGbl_SIZDecode [(Resource->Dma.Flags >> 0) & 3]);
- AcpiDmBitList (Resource->DmaChannelMask);
+ AcpiDmIndent (Level + 1);
+ AcpiDmBitList (Resource->Dma.DmaChannelMask);
}
@@ -209,18 +214,29 @@ AcpiDmDmaDescriptor (
void
AcpiDmIoDescriptor (
- ASL_IO_PORT_DESC *Resource,
+ AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
AcpiDmIndent (Level);
- AcpiOsPrintf ("IO (%s, 0x%4.4X, 0x%4.4X, 0x%2.2X, 0x%2.2X)\n",
- AcpiGbl_IoDecode [(Resource->Information & 1)],
- (UINT32) Resource->AddressMin,
- (UINT32) Resource->AddressMax,
- (UINT32) Resource->Alignment,
- (UINT32) Resource->Length);
+ AcpiOsPrintf ("IO (%s,\n",
+ AcpiGbl_IoDecode [(Resource->Io.Flags & 1)]);
+
+ AcpiDmIndent (Level + 1);
+ AcpiDmDumpInteger16 (Resource->Io.Minimum, "Address Range Minimum");
+
+ AcpiDmIndent (Level + 1);
+ AcpiDmDumpInteger16 (Resource->Io.Maximum, "Address Range Maximum");
+
+ AcpiDmIndent (Level + 1);
+ AcpiDmDumpInteger8 (Resource->Io.Alignment, "Address Alignment");
+
+ AcpiDmIndent (Level + 1);
+ AcpiDmDumpInteger8 (Resource->Io.AddressLength, "Address Length");
+
+ AcpiDmIndent (Level + 1);
+ AcpiOsPrintf (")\n");
}
@@ -240,15 +256,22 @@ AcpiDmIoDescriptor (
void
AcpiDmFixedIoDescriptor (
- ASL_FIXED_IO_PORT_DESC *Resource,
+ AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
AcpiDmIndent (Level);
- AcpiOsPrintf ("FixedIO (0x%4.4X, 0x%2.2X)\n",
- (UINT32) Resource->BaseAddress,
- (UINT32) Resource->Length);
+ AcpiOsPrintf ("FixedIO (\n");
+
+ AcpiDmIndent (Level + 1);
+ AcpiDmDumpInteger16 (Resource->FixedIo.Address, "Address Base");
+
+ AcpiDmIndent (Level + 1);
+ AcpiDmDumpInteger8 (Resource->FixedIo.AddressLength, "Address Length");
+
+ AcpiDmIndent (Level + 1);
+ AcpiOsPrintf (")\n");
}
@@ -268,7 +291,7 @@ AcpiDmFixedIoDescriptor (
void
AcpiDmStartDependentDescriptor (
- ASL_START_DEPENDENT_DESC *Resource,
+ AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
@@ -278,8 +301,8 @@ AcpiDmStartDependentDescriptor (
if (Length & 1)
{
AcpiOsPrintf ("StartDependentFn (0x%2.2X, 0x%2.2X)\n",
- (UINT32) Resource->Flags & 3,
- (UINT32) (Resource->Flags >> 2) & 3);
+ (UINT32) Resource->StartDpf.Flags & 3,
+ (UINT32) (Resource->StartDpf.Flags >> 2) & 3);
}
else
{
@@ -307,7 +330,7 @@ AcpiDmStartDependentDescriptor (
void
AcpiDmEndDependentDescriptor (
- ASL_START_DEPENDENT_DESC *Resource,
+ AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
@@ -335,18 +358,15 @@ AcpiDmEndDependentDescriptor (
void
AcpiDmVendorSmallDescriptor (
- ASL_SMALL_VENDOR_DESC *Resource,
+ AML_RESOURCE *Resource,
UINT32 Length,
UINT32 Level)
{
- AcpiDmIndent (Level);
- AcpiOsPrintf ("VendorShort () {");
-
- AcpiDmDisasmByteList (0, (UINT8 *) Resource->VendorDefined, Length);
- AcpiOsPrintf ("}\n");
+ AcpiDmVendorCommon ("Short ()",
+ ((UINT8 *) Resource) + sizeof (AML_RESOURCE_SMALL_HEADER),
+ Length, Level);
}
#endif
-
OpenPOWER on IntegriCloud