Home | History | Annotate | Line # | Download | only in acpihelp
acpihelp.h revision 1.1.1.3.2.4
      1          1.1    jruoho /******************************************************************************
      2          1.1    jruoho  *
      3          1.1    jruoho  * Module Name: acpihelp.h - Include file for AcpiHelp utility
      4          1.1    jruoho  *
      5          1.1    jruoho  *****************************************************************************/
      6          1.1    jruoho 
      7          1.1    jruoho /*
      8  1.1.1.3.2.3     skrll  * Copyright (C) 2000 - 2016, Intel Corp.
      9          1.1    jruoho  * All rights reserved.
     10          1.1    jruoho  *
     11          1.1    jruoho  * Redistribution and use in source and binary forms, with or without
     12          1.1    jruoho  * modification, are permitted provided that the following conditions
     13          1.1    jruoho  * are met:
     14          1.1    jruoho  * 1. Redistributions of source code must retain the above copyright
     15          1.1    jruoho  *    notice, this list of conditions, and the following disclaimer,
     16          1.1    jruoho  *    without modification.
     17          1.1    jruoho  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
     18          1.1    jruoho  *    substantially similar to the "NO WARRANTY" disclaimer below
     19          1.1    jruoho  *    ("Disclaimer") and any redistribution must be conditioned upon
     20          1.1    jruoho  *    including a substantially similar Disclaimer requirement for further
     21          1.1    jruoho  *    binary redistribution.
     22          1.1    jruoho  * 3. Neither the names of the above-listed copyright holders nor the names
     23          1.1    jruoho  *    of any contributors may be used to endorse or promote products derived
     24          1.1    jruoho  *    from this software without specific prior written permission.
     25          1.1    jruoho  *
     26          1.1    jruoho  * Alternatively, this software may be distributed under the terms of the
     27          1.1    jruoho  * GNU General Public License ("GPL") version 2 as published by the Free
     28          1.1    jruoho  * Software Foundation.
     29          1.1    jruoho  *
     30          1.1    jruoho  * NO WARRANTY
     31          1.1    jruoho  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     32          1.1    jruoho  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     33          1.1    jruoho  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
     34          1.1    jruoho  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     35          1.1    jruoho  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     36          1.1    jruoho  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     37          1.1    jruoho  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     38          1.1    jruoho  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
     39          1.1    jruoho  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
     40          1.1    jruoho  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     41          1.1    jruoho  * POSSIBILITY OF SUCH DAMAGES.
     42          1.1    jruoho  */
     43          1.1    jruoho 
     44          1.1    jruoho #ifndef __ACPIHELP_H
     45          1.1    jruoho #define __ACPIHELP_H
     46          1.1    jruoho 
     47          1.1    jruoho 
     48          1.1    jruoho #include "acpi.h"
     49          1.1    jruoho #include "accommon.h"
     50          1.1    jruoho #include "acapps.h"
     51          1.1    jruoho 
     52          1.1    jruoho #include <sys/types.h>
     53          1.1    jruoho #ifdef WIN32
     54          1.1    jruoho #include <io.h>
     55          1.1    jruoho #include <direct.h>
     56          1.1    jruoho #endif
     57          1.1    jruoho 
     58          1.1    jruoho 
     59  1.1.1.3.2.2     skrll typedef enum
     60  1.1.1.3.2.2     skrll {
     61  1.1.1.3.2.2     skrll     AH_DECODE_DEFAULT           = 0,
     62  1.1.1.3.2.2     skrll     AH_DECODE_ASL,
     63  1.1.1.3.2.2     skrll     AH_DECODE_ASL_KEYWORD,
     64  1.1.1.3.2.2     skrll     AH_DECODE_PREDEFINED_NAME,
     65  1.1.1.3.2.2     skrll     AH_DECODE_AML,
     66  1.1.1.3.2.2     skrll     AH_DECODE_AML_OPCODE,
     67  1.1.1.3.2.4     skrll     AH_DECODE_AML_TYPE,
     68  1.1.1.3.2.2     skrll     AH_DECODE_ASL_AML,
     69  1.1.1.3.2.4     skrll     AH_DECODE_EXCEPTION,
     70  1.1.1.3.2.4     skrll 
     71  1.1.1.3.2.4     skrll     AH_DISPLAY_DEVICE_IDS,
     72  1.1.1.3.2.2     skrll     AH_DISPLAY_UUIDS,
     73  1.1.1.3.2.2     skrll     AH_DISPLAY_TABLES,
     74  1.1.1.3.2.2     skrll     AH_DISPLAY_DIRECTIVES
     75  1.1.1.3.2.2     skrll 
     76  1.1.1.3.2.2     skrll } AH_OPTION_TYPES;
     77          1.1    jruoho 
     78          1.1    jruoho #define     AH_MAX_ASL_LINE_LENGTH      70
     79          1.1    jruoho #define     AH_MAX_AML_LINE_LENGTH      100
     80          1.1    jruoho 
     81          1.1    jruoho 
     82          1.1    jruoho typedef struct ah_aml_opcode
     83          1.1    jruoho {
     84          1.1    jruoho     UINT16          OpcodeRangeStart;
     85          1.1    jruoho     UINT16          OpcodeRangeEnd;
     86          1.1    jruoho     char            *OpcodeString;
     87          1.1    jruoho     char            *OpcodeName;
     88          1.1    jruoho     char            *Type;
     89          1.1    jruoho     char            *FixedArguments;
     90          1.1    jruoho     char            *VariableArguments;
     91          1.1    jruoho     char            *Grammar;
     92          1.1    jruoho 
     93          1.1    jruoho } AH_AML_OPCODE;
     94          1.1    jruoho 
     95  1.1.1.3.2.4     skrll typedef struct ah_aml_type
     96  1.1.1.3.2.4     skrll {
     97  1.1.1.3.2.4     skrll     char            *Name;
     98  1.1.1.3.2.4     skrll     char            *Description;
     99  1.1.1.3.2.4     skrll 
    100  1.1.1.3.2.4     skrll } AH_AML_TYPE;
    101  1.1.1.3.2.4     skrll 
    102          1.1    jruoho typedef struct ah_asl_operator
    103          1.1    jruoho {
    104          1.1    jruoho     char            *Name;
    105          1.1    jruoho     char            *Syntax;
    106          1.1    jruoho     char            *Description;
    107          1.1    jruoho 
    108          1.1    jruoho } AH_ASL_OPERATOR;
    109          1.1    jruoho 
    110          1.1    jruoho typedef struct ah_asl_keyword
    111          1.1    jruoho {
    112          1.1    jruoho     char            *Name;
    113          1.1    jruoho     char            *Description;
    114          1.1    jruoho     char            *KeywordList;
    115          1.1    jruoho 
    116          1.1    jruoho } AH_ASL_KEYWORD;
    117          1.1    jruoho 
    118  1.1.1.3.2.2     skrll typedef struct ah_directive_info
    119  1.1.1.3.2.2     skrll {
    120  1.1.1.3.2.2     skrll     char            *Name;
    121  1.1.1.3.2.2     skrll     char            *Description;
    122  1.1.1.3.2.2     skrll 
    123  1.1.1.3.2.2     skrll } AH_DIRECTIVE_INFO;
    124          1.1    jruoho 
    125          1.1    jruoho extern const AH_AML_OPCODE          AmlOpcodeInfo[];
    126  1.1.1.3.2.4     skrll extern const AH_AML_TYPE            AmlTypesInfo[];
    127          1.1    jruoho extern const AH_ASL_OPERATOR        AslOperatorInfo[];
    128          1.1    jruoho extern const AH_ASL_KEYWORD         AslKeywordInfo[];
    129      1.1.1.3  christos extern const AH_UUID                AcpiUuids[];
    130  1.1.1.3.2.2     skrll extern const AH_DIRECTIVE_INFO      PreprocessorDirectives[];
    131  1.1.1.3.2.2     skrll extern const AH_TABLE               AcpiSupportedTables[];
    132          1.1    jruoho extern BOOLEAN                      AhDisplayAll;
    133          1.1    jruoho 
    134          1.1    jruoho void
    135          1.1    jruoho AhFindAmlOpcode (
    136          1.1    jruoho     char                    *Name);
    137          1.1    jruoho 
    138          1.1    jruoho void
    139          1.1    jruoho AhDecodeAmlOpcode (
    140          1.1    jruoho     char                    *Name);
    141          1.1    jruoho 
    142          1.1    jruoho void
    143      1.1.1.2  christos AhDecodeException (
    144      1.1.1.2  christos     char                    *Name);
    145      1.1.1.2  christos 
    146      1.1.1.2  christos void
    147          1.1    jruoho AhFindPredefinedNames (
    148          1.1    jruoho     char                    *Name);
    149          1.1    jruoho 
    150          1.1    jruoho void
    151      1.1.1.3  christos AhFindAslAndAmlOperators (
    152      1.1.1.3  christos     char                    *Name);
    153      1.1.1.3  christos 
    154      1.1.1.3  christos UINT32
    155          1.1    jruoho AhFindAslOperators (
    156          1.1    jruoho     char                    *Name);
    157          1.1    jruoho 
    158          1.1    jruoho void
    159          1.1    jruoho AhFindAslKeywords (
    160          1.1    jruoho     char                    *Name);
    161          1.1    jruoho 
    162      1.1.1.2  christos void
    163  1.1.1.3.2.4     skrll AhFindAmlTypes (
    164  1.1.1.3.2.4     skrll     char                    *Name);
    165  1.1.1.3.2.4     skrll 
    166  1.1.1.3.2.4     skrll void
    167      1.1.1.2  christos AhDisplayDeviceIds (
    168      1.1.1.3  christos     char                    *Name);
    169      1.1.1.3  christos 
    170      1.1.1.3  christos void
    171  1.1.1.3.2.2     skrll AhDisplayTables (
    172  1.1.1.3.2.2     skrll     void);
    173  1.1.1.3.2.2     skrll 
    174  1.1.1.3.2.2     skrll const AH_TABLE *
    175  1.1.1.3.2.2     skrll AcpiAhGetTableInfo (
    176  1.1.1.3.2.2     skrll     char                    *Signature);
    177  1.1.1.3.2.2     skrll 
    178  1.1.1.3.2.2     skrll void
    179      1.1.1.3  christos AhDisplayUuids (
    180      1.1.1.2  christos     void);
    181      1.1.1.2  christos 
    182  1.1.1.3.2.2     skrll void
    183  1.1.1.3.2.2     skrll AhDisplayDirectives (
    184  1.1.1.3.2.2     skrll     void);
    185  1.1.1.3.2.2     skrll 
    186          1.1    jruoho #endif /* __ACPIHELP_H */
    187