Print this page
update to acpica-unix2-20131115
acpica-unix2-20130823
PANKOVs restructure

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/sys/acpi/acresrc.h
          +++ new/usr/src/common/acpica/include/acresrc.h
   1    1  /******************************************************************************
   2    2   *
   3    3   * Name: acresrc.h - Resource Manager function prototypes
   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 ↓ 49 lines elided ↑ open up ↑
  68   68  {
  69   69      UINT8                   Opcode;
  70   70      UINT8                   ResourceOffset;
  71   71      UINT8                   AmlOffset;
  72   72      UINT8                   Value;
  73   73  
  74   74  } ACPI_RSCONVERT_INFO;
  75   75  
  76   76  /* Resource conversion opcodes */
  77   77  
  78      -#define ACPI_RSC_INITGET                0
  79      -#define ACPI_RSC_INITSET                1
  80      -#define ACPI_RSC_FLAGINIT               2
  81      -#define ACPI_RSC_1BITFLAG               3
  82      -#define ACPI_RSC_2BITFLAG               4
  83      -#define ACPI_RSC_COUNT                  5
  84      -#define ACPI_RSC_COUNT16                6
  85      -#define ACPI_RSC_LENGTH                 7
  86      -#define ACPI_RSC_MOVE8                  8
  87      -#define ACPI_RSC_MOVE16                 9
  88      -#define ACPI_RSC_MOVE32                 10
  89      -#define ACPI_RSC_MOVE64                 11
  90      -#define ACPI_RSC_SET8                   12
  91      -#define ACPI_RSC_DATA8                  13
  92      -#define ACPI_RSC_ADDRESS                14
  93      -#define ACPI_RSC_SOURCE                 15
  94      -#define ACPI_RSC_SOURCEX                16
  95      -#define ACPI_RSC_BITMASK                17
  96      -#define ACPI_RSC_BITMASK16              18
  97      -#define ACPI_RSC_EXIT_NE                19
  98      -#define ACPI_RSC_EXIT_LE                20
  99      -#define ACPI_RSC_EXIT_EQ                21
       78 +typedef enum
       79 +{
       80 +    ACPI_RSC_INITGET        = 0,
       81 +    ACPI_RSC_INITSET,
       82 +    ACPI_RSC_FLAGINIT,
       83 +    ACPI_RSC_1BITFLAG,
       84 +    ACPI_RSC_2BITFLAG,
       85 +    ACPI_RSC_3BITFLAG,
       86 +    ACPI_RSC_ADDRESS,
       87 +    ACPI_RSC_BITMASK,
       88 +    ACPI_RSC_BITMASK16,
       89 +    ACPI_RSC_COUNT,
       90 +    ACPI_RSC_COUNT16,
       91 +    ACPI_RSC_COUNT_GPIO_PIN,
       92 +    ACPI_RSC_COUNT_GPIO_RES,
       93 +    ACPI_RSC_COUNT_GPIO_VEN,
       94 +    ACPI_RSC_COUNT_SERIAL_RES,
       95 +    ACPI_RSC_COUNT_SERIAL_VEN,
       96 +    ACPI_RSC_DATA8,
       97 +    ACPI_RSC_EXIT_EQ,
       98 +    ACPI_RSC_EXIT_LE,
       99 +    ACPI_RSC_EXIT_NE,
      100 +    ACPI_RSC_LENGTH,
      101 +    ACPI_RSC_MOVE_GPIO_PIN,
      102 +    ACPI_RSC_MOVE_GPIO_RES,
      103 +    ACPI_RSC_MOVE_SERIAL_RES,
      104 +    ACPI_RSC_MOVE_SERIAL_VEN,
      105 +    ACPI_RSC_MOVE8,
      106 +    ACPI_RSC_MOVE16,
      107 +    ACPI_RSC_MOVE32,
      108 +    ACPI_RSC_MOVE64,
      109 +    ACPI_RSC_SET8,
      110 +    ACPI_RSC_SOURCE,
      111 +    ACPI_RSC_SOURCEX
 100  112  
      113 +} ACPI_RSCONVERT_OPCODES;
      114 +
 101  115  /* Resource Conversion sub-opcodes */
 102  116  
 103  117  #define ACPI_RSC_COMPARE_AML_LENGTH     0
 104  118  #define ACPI_RSC_COMPARE_VALUE          1
 105  119  
 106  120  #define ACPI_RSC_TABLE_SIZE(d)          (sizeof (d) / sizeof (ACPI_RSCONVERT_INFO))
 107  121  
 108  122  #define ACPI_RS_OFFSET(f)               (UINT8) ACPI_OFFSET (ACPI_RESOURCE,f)
 109  123  #define AML_OFFSET(f)                   (UINT8) ACPI_OFFSET (AML_RESOURCE,f)
 110  124  
 111  125  
      126 +/*
      127 + * Individual entry for the resource dump tables
      128 + */
 112  129  typedef const struct acpi_rsdump_info
 113  130  {
 114  131      UINT8                   Opcode;
 115  132      UINT8                   Offset;
 116  133      char                    *Name;
 117  134      const char              **Pointer;
 118  135  
 119  136  } ACPI_RSDUMP_INFO;
 120  137  
 121  138  /* Values for the Opcode field above */
 122  139  
 123      -#define ACPI_RSD_TITLE                  0
 124      -#define ACPI_RSD_LITERAL                1
 125      -#define ACPI_RSD_STRING                 2
 126      -#define ACPI_RSD_UINT8                  3
 127      -#define ACPI_RSD_UINT16                 4
 128      -#define ACPI_RSD_UINT32                 5
 129      -#define ACPI_RSD_UINT64                 6
 130      -#define ACPI_RSD_1BITFLAG               7
 131      -#define ACPI_RSD_2BITFLAG               8
 132      -#define ACPI_RSD_SHORTLIST              9
 133      -#define ACPI_RSD_LONGLIST               10
 134      -#define ACPI_RSD_DWORDLIST              11
 135      -#define ACPI_RSD_ADDRESS                12
 136      -#define ACPI_RSD_SOURCE                 13
      140 +typedef enum
      141 +{
      142 +    ACPI_RSD_TITLE          = 0,
      143 +    ACPI_RSD_1BITFLAG,
      144 +    ACPI_RSD_2BITFLAG,
      145 +    ACPI_RSD_3BITFLAG,
      146 +    ACPI_RSD_ADDRESS,
      147 +    ACPI_RSD_DWORDLIST,
      148 +    ACPI_RSD_LITERAL,
      149 +    ACPI_RSD_LONGLIST,
      150 +    ACPI_RSD_SHORTLIST,
      151 +    ACPI_RSD_SHORTLISTX,
      152 +    ACPI_RSD_SOURCE,
      153 +    ACPI_RSD_STRING,
      154 +    ACPI_RSD_UINT8,
      155 +    ACPI_RSD_UINT16,
      156 +    ACPI_RSD_UINT32,
      157 +    ACPI_RSD_UINT64,
      158 +    ACPI_RSD_WORDLIST
 137  159  
      160 +} ACPI_RSDUMP_OPCODES;
      161 +
 138  162  /* restore default alignment */
 139  163  
 140  164  #pragma pack()
 141  165  
 142  166  
 143  167  /* Resource tables indexed by internal resource type */
 144  168  
 145  169  extern const UINT8              AcpiGbl_AmlResourceSizes[];
      170 +extern const UINT8              AcpiGbl_AmlResourceSerialBusSizes[];
 146  171  extern ACPI_RSCONVERT_INFO      *AcpiGbl_SetResourceDispatch[];
 147  172  
 148  173  /* Resource tables indexed by raw AML resource descriptor type */
 149  174  
 150  175  extern const UINT8              AcpiGbl_ResourceStructSizes[];
      176 +extern const UINT8              AcpiGbl_ResourceStructSerialBusSizes[];
 151  177  extern ACPI_RSCONVERT_INFO      *AcpiGbl_GetResourceDispatch[];
 152  178  
      179 +extern ACPI_RSCONVERT_INFO      *AcpiGbl_ConvertResourceSerialBusDispatch[];
 153  180  
 154  181  typedef struct acpi_vendor_walk_info
 155  182  {
 156  183      ACPI_VENDOR_UUID        *Uuid;
 157  184      ACPI_BUFFER             *Buffer;
 158  185      ACPI_STATUS             Status;
 159  186  
 160  187  } ACPI_VENDOR_WALK_INFO;
 161  188  
 162  189  
 163  190  /*
 164  191   * rscreate
 165  192   */
 166  193  ACPI_STATUS
 167  194  AcpiRsCreateResourceList (
 168  195      ACPI_OPERAND_OBJECT     *AmlBuffer,
 169  196      ACPI_BUFFER             *OutputBuffer);
 170  197  
 171  198  ACPI_STATUS
 172  199  AcpiRsCreateAmlResources (
 173      -    ACPI_RESOURCE           *LinkedListBuffer,
      200 +    ACPI_BUFFER             *ResourceList,
 174  201      ACPI_BUFFER             *OutputBuffer);
 175  202  
 176  203  ACPI_STATUS
 177  204  AcpiRsCreatePciRoutingTable (
 178  205      ACPI_OPERAND_OBJECT     *PackageObject,
 179  206      ACPI_BUFFER             *OutputBuffer);
 180  207  
 181  208  
 182  209  /*
 183  210   * rsutils
↓ open down ↓ 17 lines elided ↑ open up ↑
 201  228  AcpiRsGetMethodData (
 202  229      ACPI_HANDLE             Handle,
 203  230      char                    *Path,
 204  231      ACPI_BUFFER             *RetBuffer);
 205  232  
 206  233  ACPI_STATUS
 207  234  AcpiRsSetSrsMethodData (
 208  235      ACPI_NAMESPACE_NODE     *Node,
 209  236      ACPI_BUFFER             *RetBuffer);
 210  237  
      238 +ACPI_STATUS
      239 +AcpiRsGetAeiMethodData (
      240 +    ACPI_NAMESPACE_NODE     *Node,
      241 +    ACPI_BUFFER             *RetBuffer);
 211  242  
 212  243  /*
 213  244   * rscalc
 214  245   */
 215  246  ACPI_STATUS
 216  247  AcpiRsGetListLength (
 217  248      UINT8                   *AmlBuffer,
 218  249      UINT32                  AmlBufferLength,
 219  250      ACPI_SIZE               *SizeNeeded);
 220  251  
 221  252  ACPI_STATUS
 222  253  AcpiRsGetAmlLength (
 223      -    ACPI_RESOURCE           *LinkedListBuffer,
      254 +    ACPI_RESOURCE           *ResourceList,
      255 +    ACPI_SIZE               ResourceListSize,
 224  256      ACPI_SIZE               *SizeNeeded);
 225  257  
 226  258  ACPI_STATUS
 227  259  AcpiRsGetPciRoutingTableLength (
 228  260      ACPI_OPERAND_OBJECT     *PackageObject,
 229  261      ACPI_SIZE               *BufferSizeNeeded);
 230  262  
 231  263  ACPI_STATUS
 232  264  AcpiRsConvertAmlToResources (
 233  265      UINT8                   *Aml,
 234  266      UINT32                  Length,
 235  267      UINT32                  Offset,
 236  268      UINT8                   ResourceIndex,
 237      -    void                    *Context);
      269 +    void                    **Context);
 238  270  
 239  271  ACPI_STATUS
 240  272  AcpiRsConvertResourcesToAml (
 241  273      ACPI_RESOURCE           *Resource,
 242  274      ACPI_SIZE               AmlSizeNeeded,
 243  275      UINT8                   *OutputBuffer);
 244  276  
 245  277  
 246  278  /*
 247  279   * rsaddr
↓ open down ↓ 93 lines elided ↑ open up ↑
 341  373  extern ACPI_RSCONVERT_INFO      AcpiRsConvertEndTag[];
 342  374  extern ACPI_RSCONVERT_INFO      AcpiRsConvertMemory24[];
 343  375  extern ACPI_RSCONVERT_INFO      AcpiRsConvertGenericReg[];
 344  376  extern ACPI_RSCONVERT_INFO      AcpiRsConvertMemory32[];
 345  377  extern ACPI_RSCONVERT_INFO      AcpiRsConvertFixedMemory32[];
 346  378  extern ACPI_RSCONVERT_INFO      AcpiRsConvertAddress32[];
 347  379  extern ACPI_RSCONVERT_INFO      AcpiRsConvertAddress16[];
 348  380  extern ACPI_RSCONVERT_INFO      AcpiRsConvertExtIrq[];
 349  381  extern ACPI_RSCONVERT_INFO      AcpiRsConvertAddress64[];
 350  382  extern ACPI_RSCONVERT_INFO      AcpiRsConvertExtAddress64[];
      383 +extern ACPI_RSCONVERT_INFO      AcpiRsConvertGpio[];
      384 +extern ACPI_RSCONVERT_INFO      AcpiRsConvertFixedDma[];
      385 +extern ACPI_RSCONVERT_INFO      AcpiRsConvertI2cSerialBus[];
      386 +extern ACPI_RSCONVERT_INFO      AcpiRsConvertSpiSerialBus[];
      387 +extern ACPI_RSCONVERT_INFO      AcpiRsConvertUartSerialBus[];
 351  388  
 352  389  /* These resources require separate get/set tables */
 353  390  
 354  391  extern ACPI_RSCONVERT_INFO      AcpiRsGetIrq[];
 355  392  extern ACPI_RSCONVERT_INFO      AcpiRsGetStartDpf[];
 356  393  extern ACPI_RSCONVERT_INFO      AcpiRsGetVendorSmall[];
 357  394  extern ACPI_RSCONVERT_INFO      AcpiRsGetVendorLarge[];
 358  395  
 359  396  extern ACPI_RSCONVERT_INFO      AcpiRsSetIrq[];
 360  397  extern ACPI_RSCONVERT_INFO      AcpiRsSetStartDpf[];
 361  398  extern ACPI_RSCONVERT_INFO      AcpiRsSetVendor[];
 362  399  
 363  400  
 364  401  #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
 365  402  /*
 366  403   * rsinfo
 367  404   */
 368  405  extern ACPI_RSDUMP_INFO         *AcpiGbl_DumpResourceDispatch[];
      406 +extern ACPI_RSDUMP_INFO         *AcpiGbl_DumpSerialBusDispatch[];
 369  407  
 370  408  /*
 371      - * rsdump
      409 + * rsdumpinfo
 372  410   */
 373  411  extern ACPI_RSDUMP_INFO         AcpiRsDumpIrq[];
      412 +extern ACPI_RSDUMP_INFO         AcpiRsDumpPrt[];
 374  413  extern ACPI_RSDUMP_INFO         AcpiRsDumpDma[];
 375  414  extern ACPI_RSDUMP_INFO         AcpiRsDumpStartDpf[];
 376  415  extern ACPI_RSDUMP_INFO         AcpiRsDumpEndDpf[];
 377  416  extern ACPI_RSDUMP_INFO         AcpiRsDumpIo[];
      417 +extern ACPI_RSDUMP_INFO         AcpiRsDumpIoFlags[];
 378  418  extern ACPI_RSDUMP_INFO         AcpiRsDumpFixedIo[];
 379  419  extern ACPI_RSDUMP_INFO         AcpiRsDumpVendor[];
 380  420  extern ACPI_RSDUMP_INFO         AcpiRsDumpEndTag[];
 381  421  extern ACPI_RSDUMP_INFO         AcpiRsDumpMemory24[];
 382  422  extern ACPI_RSDUMP_INFO         AcpiRsDumpMemory32[];
      423 +extern ACPI_RSDUMP_INFO         AcpiRsDumpMemoryFlags[];
 383  424  extern ACPI_RSDUMP_INFO         AcpiRsDumpFixedMemory32[];
 384  425  extern ACPI_RSDUMP_INFO         AcpiRsDumpAddress16[];
 385  426  extern ACPI_RSDUMP_INFO         AcpiRsDumpAddress32[];
 386  427  extern ACPI_RSDUMP_INFO         AcpiRsDumpAddress64[];
 387  428  extern ACPI_RSDUMP_INFO         AcpiRsDumpExtAddress64[];
 388  429  extern ACPI_RSDUMP_INFO         AcpiRsDumpExtIrq[];
 389  430  extern ACPI_RSDUMP_INFO         AcpiRsDumpGenericReg[];
      431 +extern ACPI_RSDUMP_INFO         AcpiRsDumpGpio[];
      432 +extern ACPI_RSDUMP_INFO         AcpiRsDumpFixedDma[];
      433 +extern ACPI_RSDUMP_INFO         AcpiRsDumpCommonSerialBus[];
      434 +extern ACPI_RSDUMP_INFO         AcpiRsDumpI2cSerialBus[];
      435 +extern ACPI_RSDUMP_INFO         AcpiRsDumpSpiSerialBus[];
      436 +extern ACPI_RSDUMP_INFO         AcpiRsDumpUartSerialBus[];
      437 +extern ACPI_RSDUMP_INFO         AcpiRsDumpGeneralFlags[];
 390  438  #endif
 391  439  
 392  440  #endif  /* __ACRESRC_H__ */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX