Print this page
acpica-unix2-20130823
PANKOVs restructure

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/io/acpica/disassembler/dmresrcs.c
          +++ new/usr/src/common/acpica/components/disassembler/dmresrcs.c
   1    1  /*******************************************************************************
   2    2   *
   3    3   * Module Name: dmresrcs.c - "Small" Resource Descriptor disassembly
   4    4   *
   5    5   ******************************************************************************/
   6    6  
   7    7  /*
   8      - * Copyright (C) 2000 - 2011, Intel Corp.
        8 + * Copyright (C) 2000 - 2013, Intel Corp.
   9    9   * All rights reserved.
  10   10   *
  11   11   * Redistribution and use in source and binary forms, with or without
  12   12   * modification, are permitted provided that the following conditions
  13   13   * are met:
  14   14   * 1. Redistributions of source code must retain the above copyright
  15   15   *    notice, this list of conditions, and the following disclaimer,
  16   16   *    without modification.
  17   17   * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  18   18   *    substantially similar to the "NO WARRANTY" disclaimer below
↓ open down ↓ 50 lines elided ↑ open up ↑
  69   69  
  70   70  void
  71   71  AcpiDmIrqDescriptor (
  72   72      AML_RESOURCE            *Resource,
  73   73      UINT32                  Length,
  74   74      UINT32                  Level)
  75   75  {
  76   76  
  77   77      AcpiDmIndent (Level);
  78   78      AcpiOsPrintf ("%s (",
  79      -        AcpiGbl_IrqDecode [Length & 1]);
       79 +        AcpiGbl_IrqDecode [ACPI_GET_1BIT_FLAG (Length)]);
  80   80  
  81   81      /* Decode flags byte if present */
  82   82  
  83   83      if (Length & 1)
  84   84      {
  85   85          AcpiOsPrintf ("%s, %s, %s, ",
  86      -            AcpiGbl_HeDecode [Resource->Irq.Flags & 1],
  87      -            AcpiGbl_LlDecode [(Resource->Irq.Flags >> 3) & 1],
  88      -            AcpiGbl_ShrDecode [(Resource->Irq.Flags >> 4) & 1]);
       86 +            AcpiGbl_HeDecode [ACPI_GET_1BIT_FLAG (Resource->Irq.Flags)],
       87 +            AcpiGbl_LlDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->Irq.Flags, 3)],
       88 +            AcpiGbl_ShrDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->Irq.Flags, 4)]);
  89   89      }
  90   90  
  91   91      /* Insert a descriptor name */
  92   92  
  93   93      AcpiDmDescriptorName ();
  94   94      AcpiOsPrintf (")\n");
  95   95  
  96   96      AcpiDmIndent (Level + 1);
  97   97      AcpiDmBitList (Resource->Irq.IrqMask);
  98   98  }
↓ open down ↓ 15 lines elided ↑ open up ↑
 114  114  
 115  115  void
 116  116  AcpiDmDmaDescriptor (
 117  117      AML_RESOURCE            *Resource,
 118  118      UINT32                  Length,
 119  119      UINT32                  Level)
 120  120  {
 121  121  
 122  122      AcpiDmIndent (Level);
 123  123      AcpiOsPrintf ("DMA (%s, %s, %s, ",
 124      -            AcpiGbl_TypDecode [(Resource->Dma.Flags >> 5) & 3],
 125      -            AcpiGbl_BmDecode  [(Resource->Dma.Flags >> 2) & 1],
 126      -            AcpiGbl_SizDecode [(Resource->Dma.Flags >> 0) & 3]);
      124 +        AcpiGbl_TypDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->Dma.Flags, 5)],
      125 +        AcpiGbl_BmDecode  [ACPI_EXTRACT_1BIT_FLAG (Resource->Dma.Flags, 2)],
      126 +        AcpiGbl_SizDecode [ACPI_GET_2BIT_FLAG (Resource->Dma.Flags)]);
 127  127  
 128  128      /* Insert a descriptor name */
 129  129  
 130  130      AcpiDmDescriptorName ();
 131  131      AcpiOsPrintf (")\n");
 132  132  
 133  133      AcpiDmIndent (Level + 1);
 134  134      AcpiDmBitList (Resource->Dma.DmaChannelMask);
 135  135  }
 136  136  
 137  137  
 138  138  /*******************************************************************************
 139  139   *
      140 + * FUNCTION:    AcpiDmFixedDmaDescriptor
      141 + *
      142 + * PARAMETERS:  Resource            - Pointer to the resource descriptor
      143 + *              Length              - Length of the descriptor in bytes
      144 + *              Level               - Current source code indentation level
      145 + *
      146 + * RETURN:      None
      147 + *
      148 + * DESCRIPTION: Decode a FixedDMA descriptor
      149 + *
      150 + ******************************************************************************/
      151 +
      152 +void
      153 +AcpiDmFixedDmaDescriptor (
      154 +    AML_RESOURCE            *Resource,
      155 +    UINT32                  Length,
      156 +    UINT32                  Level)
      157 +{
      158 +
      159 +    AcpiDmIndent (Level);
      160 +    AcpiOsPrintf ("FixedDMA (0x%4.4X, 0x%4.4X, ",
      161 +        Resource->FixedDma.RequestLines,
      162 +        Resource->FixedDma.Channels);
      163 +
      164 +    if (Resource->FixedDma.Width <= 5)
      165 +    {
      166 +        AcpiOsPrintf ("%s, ",
      167 +            AcpiGbl_DtsDecode [Resource->FixedDma.Width]);
      168 +    }
      169 +    else
      170 +    {
      171 +        AcpiOsPrintf ("%X /* INVALID DMA WIDTH */, ", Resource->FixedDma.Width);
      172 +    }
      173 +
      174 +    /* Insert a descriptor name */
      175 +
      176 +    AcpiDmDescriptorName ();
      177 +    AcpiOsPrintf (")\n");
      178 +}
      179 +
      180 +
      181 +/*******************************************************************************
      182 + *
 140  183   * FUNCTION:    AcpiDmIoDescriptor
 141  184   *
 142  185   * PARAMETERS:  Resource            - Pointer to the resource descriptor
 143  186   *              Length              - Length of the descriptor in bytes
 144  187   *              Level               - Current source code indentation level
 145  188   *
 146  189   * RETURN:      None
 147  190   *
 148  191   * DESCRIPTION: Decode an IO descriptor
 149  192   *
↓ open down ↓ 1 lines elided ↑ open up ↑
 151  194  
 152  195  void
 153  196  AcpiDmIoDescriptor (
 154  197      AML_RESOURCE            *Resource,
 155  198      UINT32                  Length,
 156  199      UINT32                  Level)
 157  200  {
 158  201  
 159  202      AcpiDmIndent (Level);
 160  203      AcpiOsPrintf ("IO (%s,\n",
 161      -        AcpiGbl_IoDecode [(Resource->Io.Flags & 1)]);
      204 +        AcpiGbl_IoDecode [ACPI_GET_1BIT_FLAG (Resource->Io.Flags)]);
 162  205  
 163  206      AcpiDmIndent (Level + 1);
 164  207      AcpiDmDumpInteger16 (Resource->Io.Minimum, "Range Minimum");
 165  208  
 166  209      AcpiDmIndent (Level + 1);
 167  210      AcpiDmDumpInteger16 (Resource->Io.Maximum, "Range Maximum");
 168  211  
 169  212      AcpiDmIndent (Level + 1);
 170  213      AcpiDmDumpInteger8 (Resource->Io.Alignment, "Alignment");
 171  214  
↓ open down ↓ 65 lines elided ↑ open up ↑
 237  280      AML_RESOURCE            *Resource,
 238  281      UINT32                  Length,
 239  282      UINT32                  Level)
 240  283  {
 241  284  
 242  285      AcpiDmIndent (Level);
 243  286  
 244  287      if (Length & 1)
 245  288      {
 246  289          AcpiOsPrintf ("StartDependentFn (0x%2.2X, 0x%2.2X)\n",
 247      -            (UINT32) Resource->StartDpf.Flags & 3,
 248      -            (UINT32) (Resource->StartDpf.Flags >> 2) & 3);
      290 +            (UINT32) ACPI_GET_2BIT_FLAG (Resource->StartDpf.Flags),
      291 +            (UINT32) ACPI_EXTRACT_2BIT_FLAG (Resource->StartDpf.Flags, 2));
 249  292      }
 250  293      else
 251  294      {
 252  295          AcpiOsPrintf ("StartDependentFnNoPri ()\n");
 253  296      }
 254  297  
 255  298      AcpiDmIndent (Level);
 256  299      AcpiOsPrintf ("{\n");
 257  300  }
 258  301  
↓ open down ↓ 46 lines elided ↑ open up ↑
 305  348      UINT32                  Length,
 306  349      UINT32                  Level)
 307  350  {
 308  351  
 309  352      AcpiDmVendorCommon ("Short",
 310  353          ACPI_ADD_PTR (UINT8, Resource, sizeof (AML_RESOURCE_SMALL_HEADER)),
 311  354          Length, Level);
 312  355  }
 313  356  
 314  357  #endif
 315      -
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX