Print this page
acpica-unix2-20130823
PANKOVs restructure

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/io/acpica/resources/rsirq.c
          +++ new/usr/src/common/acpica/components/resources/rsirq.c
   1    1  /*******************************************************************************
   2    2   *
   3    3   * Module Name: rsirq - IRQ resource descriptors
   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 ↓ 31 lines elided ↑ open up ↑
  50   50  #define _COMPONENT          ACPI_RESOURCES
  51   51          ACPI_MODULE_NAME    ("rsirq")
  52   52  
  53   53  
  54   54  /*******************************************************************************
  55   55   *
  56   56   * AcpiRsGetIrq
  57   57   *
  58   58   ******************************************************************************/
  59   59  
  60      -ACPI_RSCONVERT_INFO     AcpiRsGetIrq[8] =
       60 +ACPI_RSCONVERT_INFO     AcpiRsGetIrq[9] =
  61   61  {
  62   62      {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_IRQ,
  63   63                          ACPI_RS_SIZE (ACPI_RESOURCE_IRQ),
  64   64                          ACPI_RSC_TABLE_SIZE (AcpiRsGetIrq)},
  65   65  
  66   66      /* Get the IRQ mask (bytes 1:2) */
  67   67  
  68   68      {ACPI_RSC_BITMASK16,ACPI_RS_OFFSET (Data.Irq.Interrupts[0]),
  69   69                          AML_OFFSET (Irq.IrqMask),
  70   70                          ACPI_RS_OFFSET (Data.Irq.InterruptCount)},
↓ open down ↓ 7 lines elided ↑ open up ↑
  78   78      /* Get the descriptor length (2 or 3 for IRQ descriptor) */
  79   79  
  80   80      {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.Irq.DescriptorLength),
  81   81                          AML_OFFSET (Irq.DescriptorType),
  82   82                          0},
  83   83  
  84   84      /* All done if no flag byte present in descriptor */
  85   85  
  86   86      {ACPI_RSC_EXIT_NE,  ACPI_RSC_COMPARE_AML_LENGTH, 0, 3},
  87   87  
  88      -    /* Get flags: Triggering[0], Polarity[3], Sharing[4] */
       88 +    /* Get flags: Triggering[0], Polarity[3], Sharing[4], Wake[5] */
  89   89  
  90   90      {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Irq.Triggering),
  91   91                          AML_OFFSET (Irq.Flags),
  92   92                          0},
  93   93  
  94   94      {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Irq.Polarity),
  95   95                          AML_OFFSET (Irq.Flags),
  96   96                          3},
  97   97  
  98   98      {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Irq.Sharable),
  99   99                          AML_OFFSET (Irq.Flags),
 100      -                        4}
      100 +                        4},
      101 +
      102 +    {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Irq.WakeCapable),
      103 +                        AML_OFFSET (Irq.Flags),
      104 +                        5}
 101  105  };
 102  106  
 103  107  
 104  108  /*******************************************************************************
 105  109   *
 106  110   * AcpiRsSetIrq
 107  111   *
 108  112   ******************************************************************************/
 109  113  
 110      -ACPI_RSCONVERT_INFO     AcpiRsSetIrq[13] =
      114 +ACPI_RSCONVERT_INFO     AcpiRsSetIrq[14] =
 111  115  {
 112  116      /* Start with a default descriptor of length 3 */
 113  117  
 114  118      {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_IRQ,
 115  119                          sizeof (AML_RESOURCE_IRQ),
 116  120                          ACPI_RSC_TABLE_SIZE (AcpiRsSetIrq)},
 117  121  
 118  122      /* Convert interrupt list to 16-bit IRQ bitmask */
 119  123  
 120  124      {ACPI_RSC_BITMASK16,ACPI_RS_OFFSET (Data.Irq.Interrupts[0]),
 121  125                          AML_OFFSET (Irq.IrqMask),
 122  126                          ACPI_RS_OFFSET (Data.Irq.InterruptCount)},
 123  127  
 124      -    /* Set the flags byte */
      128 +    /* Set flags: Triggering[0], Polarity[3], Sharing[4], Wake[5] */
 125  129  
 126  130      {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Irq.Triggering),
 127  131                          AML_OFFSET (Irq.Flags),
 128  132                          0},
 129  133  
 130  134      {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Irq.Polarity),
 131  135                          AML_OFFSET (Irq.Flags),
 132  136                          3},
 133  137  
 134  138      {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Irq.Sharable),
 135  139                          AML_OFFSET (Irq.Flags),
 136  140                          4},
 137  141  
      142 +    {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Irq.WakeCapable),
      143 +                        AML_OFFSET (Irq.Flags),
      144 +                        5},
      145 +
 138  146      /*
 139  147       * All done if the output descriptor length is required to be 3
 140  148       * (i.e., optimization to 2 bytes cannot be attempted)
 141  149       */
 142  150      {ACPI_RSC_EXIT_EQ,  ACPI_RSC_COMPARE_VALUE,
 143  151                          ACPI_RS_OFFSET(Data.Irq.DescriptorLength),
 144  152                          3},
 145  153  
 146  154      /* Set length to 2 bytes (no flags byte) */
 147  155  
↓ open down ↓ 34 lines elided ↑ open up ↑
 182  190      {ACPI_RSC_LENGTH,   0, 0, sizeof (AML_RESOURCE_IRQ_NOFLAGS)}
 183  191  };
 184  192  
 185  193  
 186  194  /*******************************************************************************
 187  195   *
 188  196   * AcpiRsConvertExtIrq
 189  197   *
 190  198   ******************************************************************************/
 191  199  
 192      -ACPI_RSCONVERT_INFO     AcpiRsConvertExtIrq[9] =
      200 +ACPI_RSCONVERT_INFO     AcpiRsConvertExtIrq[10] =
 193  201  {
 194  202      {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_EXTENDED_IRQ,
 195  203                          ACPI_RS_SIZE (ACPI_RESOURCE_EXTENDED_IRQ),
 196  204                          ACPI_RSC_TABLE_SIZE (AcpiRsConvertExtIrq)},
 197  205  
 198  206      {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_EXTENDED_IRQ,
 199  207                          sizeof (AML_RESOURCE_EXTENDED_IRQ),
 200  208                          0},
 201  209  
 202      -    /* Flag bits */
 203      -
      210 +    /*
      211 +     * Flags: Producer/Consumer[0], Triggering[1], Polarity[2],
      212 +     *        Sharing[3], Wake[4]
      213 +     */
 204  214      {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.ExtendedIrq.ProducerConsumer),
 205  215                          AML_OFFSET (ExtendedIrq.Flags),
 206  216                          0},
 207  217  
 208  218      {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.ExtendedIrq.Triggering),
 209  219                          AML_OFFSET (ExtendedIrq.Flags),
 210  220                          1},
 211  221  
 212  222      {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.ExtendedIrq.Polarity),
 213  223                          AML_OFFSET (ExtendedIrq.Flags),
 214  224                          2},
 215  225  
 216  226      {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.ExtendedIrq.Sharable),
 217  227                          AML_OFFSET (ExtendedIrq.Flags),
 218  228                          3},
 219  229  
      230 +    {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.ExtendedIrq.WakeCapable),
      231 +                        AML_OFFSET (ExtendedIrq.Flags),
      232 +                        4},
      233 +
 220  234      /* IRQ Table length (Byte4) */
 221  235  
 222  236      {ACPI_RSC_COUNT,    ACPI_RS_OFFSET (Data.ExtendedIrq.InterruptCount),
 223  237                          AML_OFFSET (ExtendedIrq.InterruptCount),
 224  238                          sizeof (UINT32)},
 225  239  
 226  240      /* Copy every IRQ in the table, each is 32 bits */
 227  241  
 228  242      {ACPI_RSC_MOVE32,   ACPI_RS_OFFSET (Data.ExtendedIrq.Interrupts[0]),
 229  243                          AML_OFFSET (ExtendedIrq.Interrupts[0]),
↓ open down ↓ 37 lines elided ↑ open up ↑
 267  281                          AML_OFFSET (Dma.Flags),
 268  282                          5},
 269  283  
 270  284      /* DMA channel mask bits */
 271  285  
 272  286      {ACPI_RSC_BITMASK,  ACPI_RS_OFFSET (Data.Dma.Channels[0]),
 273  287                          AML_OFFSET (Dma.DmaChannelMask),
 274  288                          ACPI_RS_OFFSET (Data.Dma.ChannelCount)}
 275  289  };
 276  290  
      291 +
      292 +/*******************************************************************************
      293 + *
      294 + * AcpiRsConvertFixedDma
      295 + *
      296 + ******************************************************************************/
      297 +
      298 +ACPI_RSCONVERT_INFO     AcpiRsConvertFixedDma[4] =
      299 +{
      300 +    {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_FIXED_DMA,
      301 +                        ACPI_RS_SIZE (ACPI_RESOURCE_FIXED_DMA),
      302 +                        ACPI_RSC_TABLE_SIZE (AcpiRsConvertFixedDma)},
      303 +
      304 +    {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_FIXED_DMA,
      305 +                        sizeof (AML_RESOURCE_FIXED_DMA),
      306 +                        0},
      307 +
      308 +    /*
      309 +     * These fields are contiguous in both the source and destination:
      310 +     * RequestLines
      311 +     * Channels
      312 +     */
      313 +    {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.FixedDma.RequestLines),
      314 +                        AML_OFFSET (FixedDma.RequestLines),
      315 +                        2},
      316 +
      317 +    {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.FixedDma.Width),
      318 +                        AML_OFFSET (FixedDma.Width),
      319 +                        1},
      320 +};
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX