Home | History | Annotate | Line # | Download | only in acpihelp
ahaslkey.c revision 1.1.1.3.2.3
      1          1.1    jruoho /******************************************************************************
      2          1.1    jruoho  *
      3  1.1.1.3.2.2     skrll  * Module Name: ahaslkey - Table of all known ASL non-operator keywords and
      4  1.1.1.3.2.2     skrll  *                         table of iASL Preprocessor directives
      5          1.1    jruoho  *
      6          1.1    jruoho  *****************************************************************************/
      7          1.1    jruoho 
      8          1.1    jruoho /*
      9  1.1.1.3.2.3     skrll  * Copyright (C) 2000 - 2016, Intel Corp.
     10          1.1    jruoho  * All rights reserved.
     11          1.1    jruoho  *
     12          1.1    jruoho  * Redistribution and use in source and binary forms, with or without
     13          1.1    jruoho  * modification, are permitted provided that the following conditions
     14          1.1    jruoho  * are met:
     15          1.1    jruoho  * 1. Redistributions of source code must retain the above copyright
     16          1.1    jruoho  *    notice, this list of conditions, and the following disclaimer,
     17          1.1    jruoho  *    without modification.
     18          1.1    jruoho  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
     19          1.1    jruoho  *    substantially similar to the "NO WARRANTY" disclaimer below
     20          1.1    jruoho  *    ("Disclaimer") and any redistribution must be conditioned upon
     21          1.1    jruoho  *    including a substantially similar Disclaimer requirement for further
     22          1.1    jruoho  *    binary redistribution.
     23          1.1    jruoho  * 3. Neither the names of the above-listed copyright holders nor the names
     24          1.1    jruoho  *    of any contributors may be used to endorse or promote products derived
     25          1.1    jruoho  *    from this software without specific prior written permission.
     26          1.1    jruoho  *
     27          1.1    jruoho  * Alternatively, this software may be distributed under the terms of the
     28          1.1    jruoho  * GNU General Public License ("GPL") version 2 as published by the Free
     29          1.1    jruoho  * Software Foundation.
     30          1.1    jruoho  *
     31          1.1    jruoho  * NO WARRANTY
     32          1.1    jruoho  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     33          1.1    jruoho  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     34          1.1    jruoho  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
     35          1.1    jruoho  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     36          1.1    jruoho  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     37          1.1    jruoho  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     38          1.1    jruoho  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     39          1.1    jruoho  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
     40          1.1    jruoho  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
     41          1.1    jruoho  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     42          1.1    jruoho  * POSSIBILITY OF SUCH DAMAGES.
     43          1.1    jruoho  */
     44          1.1    jruoho 
     45          1.1    jruoho #include "acpihelp.h"
     46          1.1    jruoho 
     47          1.1    jruoho /*
     48          1.1    jruoho  * ASL Keyword types and associated actual keywords.
     49          1.1    jruoho  * This table was extracted from the ACPI specification.
     50          1.1    jruoho  */
     51          1.1    jruoho const AH_ASL_KEYWORD        AslKeywordInfo[] =
     52          1.1    jruoho {
     53      1.1.1.2  christos     {"AccessAttribKeyword", "Serial Bus Attributes (with legacy SMBus aliases)",
     54      1.1.1.2  christos         ":= AttribQuick (SMBusQuick) | AttribSendReceive (SMBusSendReceive) | "
     55      1.1.1.2  christos         "AttribByte (SMBusByte) | AttribWord (SMBusWord) | "
     56      1.1.1.2  christos         "AttribBlock (SMBusBlock) | AttribProcessCall (SMBusProcessCall) | "
     57      1.1.1.2  christos         "AttribBlockProcessCall (SMBusProcessCall)"},
     58          1.1    jruoho     {"AccessTypeKeyword", "Field Access Types",
     59          1.1    jruoho         ":= AnyAcc | ByteAcc | WordAcc | DWordAcc | QWordAcc | BufferAcc"},
     60      1.1.1.2  christos     {"AddressingModeKeyword", "Mode - Resource Descriptors",
     61      1.1.1.2  christos         ":= AddressingMode7Bit | AddressingMode10Bit"},
     62          1.1    jruoho     {"AddressKeyword", "ACPI memory range types",
     63          1.1    jruoho         ":= AddressRangeMemory | AddressRangeReserved | "
     64          1.1    jruoho         "AddressRangeNVS | AddressRangeACPI"},
     65          1.1    jruoho     {"AddressSpaceKeyword", "Operation Region Address Space Types",
     66          1.1    jruoho         ":= RegionSpaceKeyword | FFixedHW"},
     67          1.1    jruoho     {"BusMasterKeyword", "DMA Bus Mastering",
     68          1.1    jruoho         ":= BusMaster | NotBusMaster"},
     69      1.1.1.2  christos     {"ByteLengthKeyword", "Bits per Byte - Resource Descriptors",
     70      1.1.1.2  christos         ":= DataBitsFive | DataBitsSix | DataBitsSeven | DataBitsEight | DataBitsNine"},
     71      1.1.1.2  christos     {"ClockPhaseKeyword", "Resource Descriptors",
     72      1.1.1.2  christos         ":= ClockPhaseFirst | ClockPhaseSecond"},
     73      1.1.1.2  christos     {"ClockPolarityKeyword", "Resource Descriptors",
     74      1.1.1.2  christos         ":= ClockPolarityLow | ClockPolarityHigh"},
     75          1.1    jruoho     {"DecodeKeyword", "Type of Memory Decoding - Resource Descriptors",
     76          1.1    jruoho         ":= SubDecode | PosDecode"},
     77      1.1.1.2  christos     {"DmaTypeKeyword", "DMA Types - DMA Resource Descriptor",
     78          1.1    jruoho         ":= Compatibility | TypeA | TypeB | TypeF"},
     79      1.1.1.2  christos     {"EndianKeyword", "Endian type - Resource Descriptor",
     80      1.1.1.2  christos         ":= BigEndian | LittleEndian"},
     81      1.1.1.2  christos     {"ExtendedAttribKeyword", "Extended Bus Attributes",
     82      1.1.1.2  christos         ":= AttribBytes (AccessLength) | AttribRawBytes (AccessLength) | "
     83      1.1.1.2  christos         "AttribRawProcessBytes (AccessLength)"},
     84      1.1.1.2  christos     {"FlowControlKeyword", "Resource Descriptor",
     85      1.1.1.2  christos         ":= FlowControlNone | FlowControlXon | FlowControlHardware"},
     86      1.1.1.2  christos     {"InterruptLevelKeyword", "Interrupt Active Types",
     87      1.1.1.2  christos         ":= ActiveHigh | ActiveLow | ActiveBoth"},
     88          1.1    jruoho     {"InterruptTypeKeyword", "Interrupt Types",
     89          1.1    jruoho         ":= Edge | Level"},
     90      1.1.1.2  christos     {"IoDecodeKeyword", "I/O Decoding - IO Resource Descriptor",
     91          1.1    jruoho         ":= Decode16 | Decode10"},
     92      1.1.1.2  christos     {"IoRestrictionKeyword", "I/O Restriction - GPIO Resource Descriptors",
     93      1.1.1.2  christos         ":= IoRestrictionNone | IoRestrictionInputOnly | "
     94      1.1.1.2  christos         "IoRestrictionOutputOnly | IoRestrictionNoneAndPreserve"},
     95          1.1    jruoho     {"LockRuleKeyword", "Global Lock use for Field Operator",
     96          1.1    jruoho         ":= Lock | NoLock"},
     97          1.1    jruoho     {"MatchOpKeyword", "Types for Match Operator",
     98          1.1    jruoho         ":= MTR | MEQ | MLE | MLT | MGE | MGT"},
     99          1.1    jruoho     {"MaxKeyword", "Max Range Type - Resource Descriptors",
    100          1.1    jruoho         ":= MaxFixed | MaxNotFixed"},
    101          1.1    jruoho     {"MemTypeKeyword", "Memory Types - Resource Descriptors",
    102          1.1    jruoho         ":= Cacheable | WriteCombining | Prefetchable | NonCacheable"},
    103          1.1    jruoho     {"MinKeyword", "Min Range Type - Resource Descriptors",
    104          1.1    jruoho         ":= MinFixed | MinNotFixed"},
    105          1.1    jruoho     {"ObjectTypeKeyword", "ACPI Object Types",
    106          1.1    jruoho         ":= UnknownObj | IntObj | StrObj | BuffObj | PkgObj | FieldUnitObj | "
    107          1.1    jruoho         "DeviceObj | EventObj | MethodObj | MutexObj | OpRegionObj | PowerResObj | "
    108          1.1    jruoho         "ProcessorObj | ThermalZoneObj | BuffFieldObj | DDBHandleObj"},
    109      1.1.1.2  christos     {"ParityKeyword", "Resource Descriptors",
    110      1.1.1.2  christos         ":= ParityTypeNone | ParityTypeSpace | ParityTypeMark | "
    111      1.1.1.2  christos         "ParityTypeOdd | ParityTypeEven"},
    112      1.1.1.2  christos     {"PinConfigKeyword", "Pin Configuration - GPIO Resource Descriptors",
    113      1.1.1.2  christos         ":= PullDefault | PullUp | PullDown | PullNone"},
    114      1.1.1.2  christos     {"PolarityKeyword", "Resource Descriptors",
    115      1.1.1.2  christos         ":= PolarityHigh | PolarityLow"},
    116          1.1    jruoho     {"RangeTypeKeyword", "I/O Range Types - Resource Descriptors",
    117          1.1    jruoho         ":= ISAOnlyRanges | NonISAOnlyRanges | EntireRange"},
    118          1.1    jruoho     {"ReadWriteKeyword", "Memory Access Types - Resource Descriptors",
    119          1.1    jruoho         ":= ReadWrite | ReadOnly"},
    120          1.1    jruoho     {"RegionSpaceKeyword", "Operation Region Address Space Types",
    121          1.1    jruoho         ":= UserDefRegionSpace | SystemIO | SystemMemory | PCI_Config | "
    122      1.1.1.2  christos         "EmbeddedControl | SMBus | SystemCMOS | PciBarTarget | IPMI | "
    123      1.1.1.2  christos         "GeneralPurposeIo, GenericSerialBus"},
    124          1.1    jruoho     {"ResourceTypeKeyword", "Resource Usage - Resource Descriptors",
    125          1.1    jruoho         ":= ResourceConsumer | ResourceProducer"},
    126          1.1    jruoho     {"SerializeRuleKeyword", "Control Method Serialization",
    127          1.1    jruoho         ":= Serialized | NotSerialized"},
    128          1.1    jruoho     {"ShareTypeKeyword", "Interrupt Sharing - Resource Descriptors",
    129      1.1.1.2  christos         ":= Shared | Exclusive | SharedAndWake | ExclusiveAndWake"},
    130      1.1.1.2  christos     {"SlaveModeKeyword", "Resource Descriptors",
    131      1.1.1.2  christos         ":= ControllerInitiated | DeviceInitiated"},
    132      1.1.1.2  christos     {"StopBitsKeyword", "Resource Descriptors",
    133      1.1.1.2  christos         ":= StopBitsZero | StopBitsOne | StopBitsOnePlusHalf | StopBitsTwo"},
    134      1.1.1.2  christos     {"TransferWidthKeyword", "DMA Widths - Fixed DMA Resource Descriptor",
    135      1.1.1.2  christos         ":= Width8bit | Width16bit | Width32bit | Width64bit | "
    136      1.1.1.2  christos         "Width128bit | Width256bit"},
    137          1.1    jruoho     {"TranslationKeyword", "Translation Density Types - Resource Descriptors",
    138          1.1    jruoho         ":= SparseTranslation | DenseTranslation"},
    139          1.1    jruoho     {"TypeKeyword", "Translation Types - Resource Descriptors",
    140          1.1    jruoho         ":= TypeTranslation | TypeStatic"},
    141          1.1    jruoho     {"UpdateRuleKeyword", "Field Update Rules",
    142          1.1    jruoho         ":= Preserve | WriteAsOnes | WriteAsZeros"},
    143          1.1    jruoho     {"UserDefRegionSpace", "User defined address spaces",
    144          1.1    jruoho         ":= IntegerData => 0x80 - 0xFF"},
    145      1.1.1.2  christos     {"WireModeKeyword", "SPI Wire Mode - Resource Descriptors",
    146      1.1.1.2  christos         ":= ThreeWireMode | FourWireMode"},
    147          1.1    jruoho     {"XferTypeKeyword", "DMA Transfer Types",
    148          1.1    jruoho         ":= Transfer8 | Transfer16 | Transfer8_16"},
    149          1.1    jruoho     {NULL, NULL, NULL}
    150          1.1    jruoho };
    151  1.1.1.3.2.2     skrll 
    152  1.1.1.3.2.2     skrll /* Preprocessor directives */
    153  1.1.1.3.2.2     skrll 
    154  1.1.1.3.2.2     skrll const AH_DIRECTIVE_INFO      PreprocessorDirectives[] =
    155  1.1.1.3.2.2     skrll {
    156  1.1.1.3.2.2     skrll     {"#include \"Filename\"",               "Standard include of an ASCII ASL source code file"},
    157  1.1.1.3.2.2     skrll     {"#include <Filename>",                 "Alternate syntax for #include, alternate search path"},
    158  1.1.1.3.2.2     skrll     {"#includebuffer \"Filename\" <Name>",  "Include a binary file to create AML Buffer with ASL namepath"},
    159  1.1.1.3.2.2     skrll     {"#includebuffer <Filename> <Name>",    "Alternate syntax for #includebuffer, alternate search path"},
    160  1.1.1.3.2.2     skrll 
    161  1.1.1.3.2.2     skrll     {"",  ""},
    162  1.1.1.3.2.2     skrll     {"#define <Name>, <Defined name>",      "Simple macro definition (full macros not supported at this time)"},
    163  1.1.1.3.2.2     skrll     {"#define <Expression>, <Defined name>","Simple macro definition (full macros not supported at this time)"},
    164  1.1.1.3.2.2     skrll     {"#undef <Defined name>",               "Delete a previous #define"},
    165  1.1.1.3.2.2     skrll 
    166  1.1.1.3.2.2     skrll     {"",  ""},
    167  1.1.1.3.2.2     skrll     {"#if <Expression>",                    "Evaluate <Expression> and test return value"},
    168  1.1.1.3.2.2     skrll     {"#ifdef <Defined name>",               "Test existence of the <Defined Name>"},
    169  1.1.1.3.2.2     skrll     {"#ifndef <Defined name>",              "Test non-existence of the <Defined Name>"},
    170  1.1.1.3.2.2     skrll     {"#elif <Expression>",                  "Else-If contraction - evaluate #if <Expression>, test return value"},
    171  1.1.1.3.2.2     skrll     {"#else",                               "Execute alternate case for a previous #if, #ifdef or #ifndef block"},
    172  1.1.1.3.2.2     skrll     {"#endif",                              "Close a previous #if, #ifdef or #ifndef block"},
    173  1.1.1.3.2.2     skrll 
    174  1.1.1.3.2.2     skrll     {"",   ""},
    175  1.1.1.3.2.2     skrll     {"#line <LineNumber> [Filename]",       "Set the current ASL source code line number, optional filename"},
    176  1.1.1.3.2.2     skrll 
    177  1.1.1.3.2.2     skrll     {"",   ""},
    178  1.1.1.3.2.2     skrll     {"#error \"String\"",                   "Emit error message and abort compilation"},
    179  1.1.1.3.2.2     skrll     {"#warning \"String\"",                 "Emit an iASL warning at this location in the ASL source"},
    180  1.1.1.3.2.2     skrll 
    181  1.1.1.3.2.2     skrll     {"",  ""},
    182  1.1.1.3.2.2     skrll     {"#pragma disable (Error number)",      "Disable an iASL error or warning number"},
    183  1.1.1.3.2.2     skrll     {"#pragma message \"String\"",          "Emit an informational message to the output file(s)"},
    184  1.1.1.3.2.2     skrll 
    185  1.1.1.3.2.2     skrll     {"",  ""},
    186  1.1.1.3.2.2     skrll     {"__FILE__",                            "Return the simple filename of the current ASL file"},
    187  1.1.1.3.2.2     skrll     {"__PATH__",                            "Return the full pathname of the current ASL file"},
    188  1.1.1.3.2.2     skrll     {"__LINE__",                            "Return the current line number within the current ASL file"},
    189  1.1.1.3.2.2     skrll     {"__DATE__",                            "Return the current date"},
    190  1.1.1.3.2.2     skrll     {"__IASL__",                            "Permanently defined for the iASL compiler"},
    191  1.1.1.3.2.2     skrll     {NULL,                                   NULL}
    192  1.1.1.3.2.2     skrll };
    193