Print this page
update to acpica-unix2-20140114
acpica-unix2-20130823
PANKOVs restructure
   1 /******************************************************************************
   2  *
   3  * Name: amlcode.h - Definitions for AML, as included in "definition blocks"
   4  *                   Declarations and definitions contained herein are derived
   5  *                   directly from the ACPI specification.
   6  *
   7  *****************************************************************************/
   8 
   9 /*
  10  * Copyright (C) 2000 - 2011, Intel Corp.
  11  * All rights reserved.
  12  *
  13  * Redistribution and use in source and binary forms, with or without
  14  * modification, are permitted provided that the following conditions
  15  * are met:
  16  * 1. Redistributions of source code must retain the above copyright
  17  *    notice, this list of conditions, and the following disclaimer,
  18  *    without modification.
  19  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  20  *    substantially similar to the "NO WARRANTY" disclaimer below
  21  *    ("Disclaimer") and any redistribution must be conditioned upon
  22  *    including a substantially similar Disclaimer requirement for further
  23  *    binary redistribution.
  24  * 3. Neither the names of the above-listed copyright holders nor the names
  25  *    of any contributors may be used to endorse or promote products derived
  26  *    from this software without specific prior written permission.
  27  *
  28  * Alternatively, this software may be distributed under the terms of the
  29  * GNU General Public License ("GPL") version 2 as published by the Free
  30  * Software Foundation.


 174 #define AML_FIELD_OP                (UINT16) 0x5b81
 175 #define AML_DEVICE_OP               (UINT16) 0x5b82
 176 #define AML_PROCESSOR_OP            (UINT16) 0x5b83
 177 #define AML_POWER_RES_OP            (UINT16) 0x5b84
 178 #define AML_THERMAL_ZONE_OP         (UINT16) 0x5b85
 179 #define AML_INDEX_FIELD_OP          (UINT16) 0x5b86
 180 #define AML_BANK_FIELD_OP           (UINT16) 0x5b87
 181 #define AML_DATA_REGION_OP          (UINT16) 0x5b88     /* ACPI 2.0 */
 182 
 183 
 184 /*
 185  * Combination opcodes (actually two one-byte opcodes)
 186  * Used by the disassembler and iASL compiler
 187  */
 188 #define AML_LGREATEREQUAL_OP        (UINT16) 0x9295
 189 #define AML_LLESSEQUAL_OP           (UINT16) 0x9294
 190 #define AML_LNOTEQUAL_OP            (UINT16) 0x9293
 191 
 192 
 193 /*









 194  * Internal opcodes
 195  * Use only "Unknown" AML opcodes, don't attempt to use
 196  * any valid ACPI ASCII values (A-Z, 0-9, '-')
 197  */
 198 #define AML_INT_NAMEPATH_OP         (UINT16) 0x002d
 199 #define AML_INT_NAMEDFIELD_OP       (UINT16) 0x0030
 200 #define AML_INT_RESERVEDFIELD_OP    (UINT16) 0x0031
 201 #define AML_INT_ACCESSFIELD_OP      (UINT16) 0x0032
 202 #define AML_INT_BYTELIST_OP         (UINT16) 0x0033
 203 #define AML_INT_STATICSTRING_OP     (UINT16) 0x0034
 204 #define AML_INT_METHODCALL_OP       (UINT16) 0x0035
 205 #define AML_INT_RETURN_VALUE_OP     (UINT16) 0x0036
 206 #define AML_INT_EVAL_SUBTREE_OP     (UINT16) 0x0037


 207 
 208 
 209 #define ARG_NONE                    0x0
 210 
 211 /*
 212  * Argument types for the AML Parser
 213  * Each field in the ArgTypes UINT32 is 5 bits, allowing for a maximum of 6 arguments.
 214  * There can be up to 31 unique argument types
 215  * Zero is reserved as end-of-list indicator
 216  */
 217 #define ARGP_BYTEDATA               0x01
 218 #define ARGP_BYTELIST               0x02
 219 #define ARGP_CHARLIST               0x03
 220 #define ARGP_DATAOBJ                0x04
 221 #define ARGP_DATAOBJLIST            0x05
 222 #define ARGP_DWORDDATA              0x06
 223 #define ARGP_FIELDLIST              0x07
 224 #define ARGP_NAME                   0x08
 225 #define ARGP_NAMESTRING             0x09
 226 #define ARGP_OBJLIST                0x0A
 227 #define ARGP_PKGLENGTH              0x0B
 228 #define ARGP_SUPERNAME              0x0C


 461 
 462 
 463 /* 3) Field Update Rules */
 464 
 465 typedef enum
 466 {
 467     AML_FIELD_UPDATE_PRESERVE       = 0x00,
 468     AML_FIELD_UPDATE_WRITE_AS_ONES  = 0x20,
 469     AML_FIELD_UPDATE_WRITE_AS_ZEROS = 0x40
 470 
 471 } AML_UPDATE_RULE;
 472 
 473 
 474 /*
 475  * Field Access Attributes.
 476  * This byte is extracted from the AML via the
 477  * AccessAs keyword
 478  */
 479 typedef enum
 480 {
 481     AML_FIELD_ATTRIB_SMB_QUICK      = 0x02,
 482     AML_FIELD_ATTRIB_SMB_SEND_RCV   = 0x04,
 483     AML_FIELD_ATTRIB_SMB_BYTE       = 0x06,
 484     AML_FIELD_ATTRIB_SMB_WORD       = 0x08,
 485     AML_FIELD_ATTRIB_SMB_BLOCK      = 0x0A,
 486     AML_FIELD_ATTRIB_SMB_WORD_CALL  = 0x0C,
 487     AML_FIELD_ATTRIB_SMB_BLOCK_CALL = 0x0D



 488 
 489 } AML_ACCESS_ATTRIBUTE;
 490 
 491 
 492 /* Bit fields in the AML MethodFlags byte */
 493 
 494 #define AML_METHOD_ARG_COUNT        0x07
 495 #define AML_METHOD_SERIALIZED       0x08
 496 #define AML_METHOD_SYNC_LEVEL       0xF0
 497 
 498 
 499 #endif /* __AMLCODE_H__ */
   1 /******************************************************************************
   2  *
   3  * Name: amlcode.h - Definitions for AML, as included in "definition blocks"
   4  *                   Declarations and definitions contained herein are derived
   5  *                   directly from the ACPI specification.
   6  *
   7  *****************************************************************************/
   8 
   9 /*
  10  * Copyright (C) 2000 - 2014, Intel Corp.
  11  * All rights reserved.
  12  *
  13  * Redistribution and use in source and binary forms, with or without
  14  * modification, are permitted provided that the following conditions
  15  * are met:
  16  * 1. Redistributions of source code must retain the above copyright
  17  *    notice, this list of conditions, and the following disclaimer,
  18  *    without modification.
  19  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  20  *    substantially similar to the "NO WARRANTY" disclaimer below
  21  *    ("Disclaimer") and any redistribution must be conditioned upon
  22  *    including a substantially similar Disclaimer requirement for further
  23  *    binary redistribution.
  24  * 3. Neither the names of the above-listed copyright holders nor the names
  25  *    of any contributors may be used to endorse or promote products derived
  26  *    from this software without specific prior written permission.
  27  *
  28  * Alternatively, this software may be distributed under the terms of the
  29  * GNU General Public License ("GPL") version 2 as published by the Free
  30  * Software Foundation.


 174 #define AML_FIELD_OP                (UINT16) 0x5b81
 175 #define AML_DEVICE_OP               (UINT16) 0x5b82
 176 #define AML_PROCESSOR_OP            (UINT16) 0x5b83
 177 #define AML_POWER_RES_OP            (UINT16) 0x5b84
 178 #define AML_THERMAL_ZONE_OP         (UINT16) 0x5b85
 179 #define AML_INDEX_FIELD_OP          (UINT16) 0x5b86
 180 #define AML_BANK_FIELD_OP           (UINT16) 0x5b87
 181 #define AML_DATA_REGION_OP          (UINT16) 0x5b88     /* ACPI 2.0 */
 182 
 183 
 184 /*
 185  * Combination opcodes (actually two one-byte opcodes)
 186  * Used by the disassembler and iASL compiler
 187  */
 188 #define AML_LGREATEREQUAL_OP        (UINT16) 0x9295
 189 #define AML_LLESSEQUAL_OP           (UINT16) 0x9294
 190 #define AML_LNOTEQUAL_OP            (UINT16) 0x9293
 191 
 192 
 193 /*
 194  * Opcodes for "Field" operators
 195  */
 196 #define AML_FIELD_OFFSET_OP         (UINT8) 0x00
 197 #define AML_FIELD_ACCESS_OP         (UINT8) 0x01
 198 #define AML_FIELD_CONNECTION_OP     (UINT8) 0x02        /* ACPI 5.0 */
 199 #define AML_FIELD_EXT_ACCESS_OP     (UINT8) 0x03        /* ACPI 5.0 */
 200 
 201 
 202 /*
 203  * Internal opcodes
 204  * Use only "Unknown" AML opcodes, don't attempt to use
 205  * any valid ACPI ASCII values (A-Z, 0-9, '-')
 206  */
 207 #define AML_INT_NAMEPATH_OP         (UINT16) 0x002d
 208 #define AML_INT_NAMEDFIELD_OP       (UINT16) 0x0030
 209 #define AML_INT_RESERVEDFIELD_OP    (UINT16) 0x0031
 210 #define AML_INT_ACCESSFIELD_OP      (UINT16) 0x0032
 211 #define AML_INT_BYTELIST_OP         (UINT16) 0x0033
 212 #define AML_INT_STATICSTRING_OP     (UINT16) 0x0034
 213 #define AML_INT_METHODCALL_OP       (UINT16) 0x0035
 214 #define AML_INT_RETURN_VALUE_OP     (UINT16) 0x0036
 215 #define AML_INT_EVAL_SUBTREE_OP     (UINT16) 0x0037
 216 #define AML_INT_CONNECTION_OP       (UINT16) 0x0038
 217 #define AML_INT_EXTACCESSFIELD_OP   (UINT16) 0x0039
 218 

 219 #define ARG_NONE                    0x0
 220 
 221 /*
 222  * Argument types for the AML Parser
 223  * Each field in the ArgTypes UINT32 is 5 bits, allowing for a maximum of 6 arguments.
 224  * There can be up to 31 unique argument types
 225  * Zero is reserved as end-of-list indicator
 226  */
 227 #define ARGP_BYTEDATA               0x01
 228 #define ARGP_BYTELIST               0x02
 229 #define ARGP_CHARLIST               0x03
 230 #define ARGP_DATAOBJ                0x04
 231 #define ARGP_DATAOBJLIST            0x05
 232 #define ARGP_DWORDDATA              0x06
 233 #define ARGP_FIELDLIST              0x07
 234 #define ARGP_NAME                   0x08
 235 #define ARGP_NAMESTRING             0x09
 236 #define ARGP_OBJLIST                0x0A
 237 #define ARGP_PKGLENGTH              0x0B
 238 #define ARGP_SUPERNAME              0x0C


 471 
 472 
 473 /* 3) Field Update Rules */
 474 
 475 typedef enum
 476 {
 477     AML_FIELD_UPDATE_PRESERVE       = 0x00,
 478     AML_FIELD_UPDATE_WRITE_AS_ONES  = 0x20,
 479     AML_FIELD_UPDATE_WRITE_AS_ZEROS = 0x40
 480 
 481 } AML_UPDATE_RULE;
 482 
 483 
 484 /*
 485  * Field Access Attributes.
 486  * This byte is extracted from the AML via the
 487  * AccessAs keyword
 488  */
 489 typedef enum
 490 {
 491     AML_FIELD_ATTRIB_QUICK          = 0x02,
 492     AML_FIELD_ATTRIB_SEND_RCV       = 0x04,
 493     AML_FIELD_ATTRIB_BYTE           = 0x06,
 494     AML_FIELD_ATTRIB_WORD           = 0x08,
 495     AML_FIELD_ATTRIB_BLOCK          = 0x0A,
 496     AML_FIELD_ATTRIB_MULTIBYTE      = 0x0B,
 497     AML_FIELD_ATTRIB_WORD_CALL      = 0x0C,
 498     AML_FIELD_ATTRIB_BLOCK_CALL     = 0x0D,
 499     AML_FIELD_ATTRIB_RAW_BYTES      = 0x0E,
 500     AML_FIELD_ATTRIB_RAW_PROCESS    = 0x0F
 501 
 502 } AML_ACCESS_ATTRIBUTE;
 503 
 504 
 505 /* Bit fields in the AML MethodFlags byte */
 506 
 507 #define AML_METHOD_ARG_COUNT        0x07
 508 #define AML_METHOD_SERIALIZED       0x08
 509 #define AML_METHOD_SYNC_LEVEL       0xF0
 510 
 511 
 512 #endif /* __AMLCODE_H__ */