Home | History | Annotate | Line # | Download | only in include
acconfig.h revision 1.1.1.19.2.1
      1           1.1    jruoho /******************************************************************************
      2           1.1    jruoho  *
      3           1.1    jruoho  * Name: acconfig.h - Global configuration constants
      4           1.1    jruoho  *
      5           1.1    jruoho  *****************************************************************************/
      6           1.1    jruoho 
      7       1.1.1.2    jruoho /*
      8      1.1.1.19  christos  * Copyright (C) 2000 - 2021, Intel Corp.
      9           1.1    jruoho  * All rights reserved.
     10           1.1    jruoho  *
     11       1.1.1.2    jruoho  * Redistribution and use in source and binary forms, with or without
     12       1.1.1.2    jruoho  * modification, are permitted provided that the following conditions
     13       1.1.1.2    jruoho  * are met:
     14       1.1.1.2    jruoho  * 1. Redistributions of source code must retain the above copyright
     15       1.1.1.2    jruoho  *    notice, this list of conditions, and the following disclaimer,
     16       1.1.1.2    jruoho  *    without modification.
     17       1.1.1.2    jruoho  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
     18       1.1.1.2    jruoho  *    substantially similar to the "NO WARRANTY" disclaimer below
     19       1.1.1.2    jruoho  *    ("Disclaimer") and any redistribution must be conditioned upon
     20       1.1.1.2    jruoho  *    including a substantially similar Disclaimer requirement for further
     21       1.1.1.2    jruoho  *    binary redistribution.
     22       1.1.1.2    jruoho  * 3. Neither the names of the above-listed copyright holders nor the names
     23       1.1.1.2    jruoho  *    of any contributors may be used to endorse or promote products derived
     24       1.1.1.2    jruoho  *    from this software without specific prior written permission.
     25       1.1.1.2    jruoho  *
     26       1.1.1.2    jruoho  * Alternatively, this software may be distributed under the terms of the
     27       1.1.1.2    jruoho  * GNU General Public License ("GPL") version 2 as published by the Free
     28       1.1.1.2    jruoho  * Software Foundation.
     29       1.1.1.2    jruoho  *
     30       1.1.1.2    jruoho  * NO WARRANTY
     31       1.1.1.2    jruoho  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     32       1.1.1.2    jruoho  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     33      1.1.1.19  christos  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     34       1.1.1.2    jruoho  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     35       1.1.1.2    jruoho  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     36       1.1.1.2    jruoho  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     37       1.1.1.2    jruoho  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     38       1.1.1.2    jruoho  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
     39       1.1.1.2    jruoho  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
     40       1.1.1.2    jruoho  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     41       1.1.1.2    jruoho  * POSSIBILITY OF SUCH DAMAGES.
     42       1.1.1.2    jruoho  */
     43           1.1    jruoho 
     44           1.1    jruoho #ifndef _ACCONFIG_H
     45           1.1    jruoho #define _ACCONFIG_H
     46           1.1    jruoho 
     47           1.1    jruoho 
     48           1.1    jruoho /******************************************************************************
     49           1.1    jruoho  *
     50           1.1    jruoho  * Configuration options
     51           1.1    jruoho  *
     52           1.1    jruoho  *****************************************************************************/
     53           1.1    jruoho 
     54           1.1    jruoho /*
     55           1.1    jruoho  * ACPI_DEBUG_OUTPUT    - This switch enables all the debug facilities of the
     56       1.1.1.4  christos  *                        ACPI subsystem. This includes the DEBUG_PRINT output
     57       1.1.1.4  christos  *                        statements. When disabled, all DEBUG_PRINT
     58           1.1    jruoho  *                        statements are compiled out.
     59           1.1    jruoho  *
     60           1.1    jruoho  * ACPI_APPLICATION     - Use this switch if the subsystem is going to be run
     61           1.1    jruoho  *                        at the application level.
     62           1.1    jruoho  *
     63           1.1    jruoho  */
     64           1.1    jruoho 
     65           1.1    jruoho /*
     66       1.1.1.4  christos  * OS name, used for the _OS object. The _OS object is essentially obsolete,
     67           1.1    jruoho  * but there is a large base of ASL/AML code in existing machines that check
     68       1.1.1.4  christos  * for the string below. The use of this string usually guarantees that
     69       1.1.1.4  christos  * the ASL will execute down the most tested code path. Also, there is some
     70           1.1    jruoho  * code that will not execute the _OSI method unless _OS matches the string
     71       1.1.1.4  christos  * below. Therefore, change this string at your own risk.
     72           1.1    jruoho  */
     73           1.1    jruoho #define ACPI_OS_NAME                    "Microsoft Windows NT"
     74           1.1    jruoho 
     75           1.1    jruoho /* Maximum objects in the various object caches */
     76           1.1    jruoho 
     77           1.1    jruoho #define ACPI_MAX_STATE_CACHE_DEPTH      96          /* State objects */
     78           1.1    jruoho #define ACPI_MAX_PARSE_CACHE_DEPTH      96          /* Parse tree objects */
     79           1.1    jruoho #define ACPI_MAX_EXTPARSE_CACHE_DEPTH   96          /* Parse tree objects */
     80           1.1    jruoho #define ACPI_MAX_OBJECT_CACHE_DEPTH     96          /* Interpreter operand objects */
     81           1.1    jruoho #define ACPI_MAX_NAMESPACE_CACHE_DEPTH  96          /* Namespace objects */
     82      1.1.1.10  christos #define ACPI_MAX_COMMENT_CACHE_DEPTH    96          /* Comments for the -ca option */
     83           1.1    jruoho 
     84           1.1    jruoho /*
     85           1.1    jruoho  * Should the subsystem abort the loading of an ACPI table if the
     86           1.1    jruoho  * table checksum is incorrect?
     87           1.1    jruoho  */
     88       1.1.1.4  christos #ifndef ACPI_CHECKSUM_ABORT
     89           1.1    jruoho #define ACPI_CHECKSUM_ABORT             FALSE
     90       1.1.1.4  christos #endif
     91       1.1.1.4  christos 
     92       1.1.1.4  christos /*
     93       1.1.1.4  christos  * Generate a version of ACPICA that only supports "reduced hardware"
     94       1.1.1.4  christos  * platforms (as defined in ACPI 5.0). Set to TRUE to generate a specialized
     95       1.1.1.4  christos  * version of ACPICA that ONLY supports the ACPI 5.0 "reduced hardware"
     96       1.1.1.4  christos  * model. In other words, no ACPI hardware is supported.
     97       1.1.1.4  christos  *
     98       1.1.1.4  christos  * If TRUE, this means no support for the following:
     99       1.1.1.4  christos  *      PM Event and Control registers
    100       1.1.1.4  christos  *      SCI interrupt (and handler)
    101       1.1.1.4  christos  *      Fixed Events
    102       1.1.1.4  christos  *      General Purpose Events (GPEs)
    103       1.1.1.4  christos  *      Global Lock
    104       1.1.1.4  christos  *      ACPI PM timer
    105       1.1.1.4  christos  *      FACS table (Waking vectors and Global Lock)
    106       1.1.1.4  christos  */
    107       1.1.1.4  christos #ifndef ACPI_REDUCED_HARDWARE
    108       1.1.1.4  christos #define ACPI_REDUCED_HARDWARE           FALSE
    109       1.1.1.4  christos #endif
    110           1.1    jruoho 
    111           1.1    jruoho 
    112           1.1    jruoho /******************************************************************************
    113           1.1    jruoho  *
    114           1.1    jruoho  * Subsystem Constants
    115           1.1    jruoho  *
    116           1.1    jruoho  *****************************************************************************/
    117           1.1    jruoho 
    118           1.1    jruoho /* Version of ACPI supported */
    119           1.1    jruoho 
    120       1.1.1.4  christos #define ACPI_CA_SUPPORT_LEVEL           5
    121           1.1    jruoho 
    122           1.1    jruoho /* Maximum count for a semaphore object */
    123           1.1    jruoho 
    124           1.1    jruoho #define ACPI_MAX_SEMAPHORE_COUNT        256
    125           1.1    jruoho 
    126           1.1    jruoho /* Maximum object reference count (detects object deletion issues) */
    127           1.1    jruoho 
    128      1.1.1.13  christos #define ACPI_MAX_REFERENCE_COUNT        0x4000
    129           1.1    jruoho 
    130           1.1    jruoho /* Default page size for use in mapping memory for operation regions */
    131           1.1    jruoho 
    132           1.1    jruoho #define ACPI_DEFAULT_PAGE_SIZE          4096    /* Must be power of 2 */
    133           1.1    jruoho 
    134      1.1.1.16  christos /* OwnerId tracking. 128 entries allows for 4095 OwnerIds */
    135           1.1    jruoho 
    136      1.1.1.16  christos #define ACPI_NUM_OWNERID_MASKS          128
    137           1.1    jruoho 
    138           1.1    jruoho /* Size of the root table array is increased by this increment */
    139           1.1    jruoho 
    140           1.1    jruoho #define ACPI_ROOT_TABLE_SIZE_INCREMENT  4
    141           1.1    jruoho 
    142           1.1    jruoho /* Maximum sleep allowed via Sleep() operator */
    143           1.1    jruoho 
    144       1.1.1.4  christos #define ACPI_MAX_SLEEP                  2000    /* 2000 millisec == two seconds */
    145       1.1.1.4  christos 
    146       1.1.1.4  christos /* Address Range lists are per-SpaceId (Memory and I/O only) */
    147       1.1.1.4  christos 
    148       1.1.1.4  christos #define ACPI_ADDRESS_RANGE_MAX          2
    149           1.1    jruoho 
    150      1.1.1.11  christos /* Maximum time (default 30s) of While() loops before abort */
    151       1.1.1.8  christos 
    152      1.1.1.11  christos #define ACPI_MAX_LOOP_TIMEOUT           30
    153       1.1.1.8  christos 
    154           1.1    jruoho 
    155           1.1    jruoho /******************************************************************************
    156           1.1    jruoho  *
    157           1.1    jruoho  * ACPI Specification constants (Do not change unless the specification changes)
    158           1.1    jruoho  *
    159           1.1    jruoho  *****************************************************************************/
    160           1.1    jruoho 
    161      1.1.1.18  christos /* Method info (in WALK_STATE), containing local variables and arguments */
    162           1.1    jruoho 
    163           1.1    jruoho #define ACPI_METHOD_NUM_LOCALS          8
    164           1.1    jruoho #define ACPI_METHOD_MAX_LOCAL           7
    165           1.1    jruoho 
    166           1.1    jruoho #define ACPI_METHOD_NUM_ARGS            7
    167           1.1    jruoho #define ACPI_METHOD_MAX_ARG             6
    168           1.1    jruoho 
    169           1.1    jruoho /*
    170           1.1    jruoho  * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG
    171           1.1    jruoho  */
    172           1.1    jruoho #define ACPI_OBJ_NUM_OPERANDS           8
    173           1.1    jruoho #define ACPI_OBJ_MAX_OPERAND            7
    174           1.1    jruoho 
    175           1.1    jruoho /* Number of elements in the Result Stack frame, can be an arbitrary value */
    176           1.1    jruoho 
    177           1.1    jruoho #define ACPI_RESULTS_FRAME_OBJ_NUM      8
    178           1.1    jruoho 
    179           1.1    jruoho /*
    180           1.1    jruoho  * Maximal number of elements the Result Stack can contain,
    181      1.1.1.15  christos  * it may be an arbitrary value not exceeding the types of
    182           1.1    jruoho  * ResultSize and ResultCount (now UINT8).
    183           1.1    jruoho  */
    184           1.1    jruoho #define ACPI_RESULTS_OBJ_NUM_MAX        255
    185           1.1    jruoho 
    186           1.1    jruoho /* Constants used in searching for the RSDP in low memory */
    187           1.1    jruoho 
    188           1.1    jruoho #define ACPI_EBDA_PTR_LOCATION          0x0000040E     /* Physical Address */
    189           1.1    jruoho #define ACPI_EBDA_PTR_LENGTH            2
    190           1.1    jruoho #define ACPI_EBDA_WINDOW_SIZE           1024
    191           1.1    jruoho #define ACPI_HI_RSDP_WINDOW_BASE        0x000E0000     /* Physical Address */
    192           1.1    jruoho #define ACPI_HI_RSDP_WINDOW_SIZE        0x00020000
    193           1.1    jruoho #define ACPI_RSDP_SCAN_STEP             16
    194           1.1    jruoho 
    195           1.1    jruoho /* Operation regions */
    196           1.1    jruoho 
    197           1.1    jruoho #define ACPI_USER_REGION_BEGIN          0x80
    198           1.1    jruoho 
    199           1.1    jruoho /* Maximum SpaceIds for Operation Regions */
    200           1.1    jruoho 
    201           1.1    jruoho #define ACPI_MAX_ADDRESS_SPACE          255
    202       1.1.1.4  christos #define ACPI_NUM_DEFAULT_SPACES         4
    203           1.1    jruoho 
    204       1.1.1.4  christos /* Array sizes. Used for range checking also */
    205           1.1    jruoho 
    206           1.1    jruoho #define ACPI_MAX_MATCH_OPCODE           5
    207           1.1    jruoho 
    208           1.1    jruoho /* RSDP checksums */
    209           1.1    jruoho 
    210           1.1    jruoho #define ACPI_RSDP_CHECKSUM_LENGTH       20
    211           1.1    jruoho #define ACPI_RSDP_XCHECKSUM_LENGTH      36
    212           1.1    jruoho 
    213      1.1.1.14  christos /*
    214      1.1.1.14  christos  * SMBus, GSBus and IPMI buffer sizes. All have a 2-byte header,
    215      1.1.1.14  christos  * containing both Status and Length.
    216      1.1.1.14  christos  */
    217      1.1.1.14  christos #define ACPI_SERIAL_HEADER_SIZE         2   /* Common for below. Status and Length fields */
    218      1.1.1.14  christos 
    219      1.1.1.14  christos #define ACPI_SMBUS_DATA_SIZE            32
    220      1.1.1.14  christos #define ACPI_SMBUS_BUFFER_SIZE          ACPI_SERIAL_HEADER_SIZE + ACPI_SMBUS_DATA_SIZE
    221      1.1.1.14  christos 
    222      1.1.1.14  christos #define ACPI_IPMI_DATA_SIZE             64
    223      1.1.1.14  christos #define ACPI_IPMI_BUFFER_SIZE           ACPI_SERIAL_HEADER_SIZE + ACPI_IPMI_DATA_SIZE
    224      1.1.1.14  christos 
    225      1.1.1.14  christos #define ACPI_MAX_GSBUS_DATA_SIZE        255
    226      1.1.1.14  christos #define ACPI_MAX_GSBUS_BUFFER_SIZE      ACPI_SERIAL_HEADER_SIZE + ACPI_MAX_GSBUS_DATA_SIZE
    227           1.1    jruoho 
    228  1.1.1.19.2.1   thorpej #define ACPI_PRM_INPUT_BUFFER_SIZE      26
    229           1.1    jruoho 
    230           1.1    jruoho /* _SxD and _SxW control methods */
    231           1.1    jruoho 
    232           1.1    jruoho #define ACPI_NUM_SxD_METHODS            4
    233           1.1    jruoho #define ACPI_NUM_SxW_METHODS            5
    234           1.1    jruoho 
    235           1.1    jruoho 
    236           1.1    jruoho /******************************************************************************
    237           1.1    jruoho  *
    238       1.1.1.5  christos  * Miscellaneous constants
    239       1.1.1.5  christos  *
    240       1.1.1.5  christos  *****************************************************************************/
    241       1.1.1.5  christos 
    242       1.1.1.5  christos /* UUID constants */
    243       1.1.1.5  christos 
    244       1.1.1.5  christos #define UUID_BUFFER_LENGTH          16 /* Length of UUID in memory */
    245       1.1.1.5  christos #define UUID_STRING_LENGTH          36 /* Total length of a UUID string */
    246       1.1.1.5  christos 
    247       1.1.1.5  christos /* Positions for required hyphens (dashes) in UUID strings */
    248       1.1.1.5  christos 
    249       1.1.1.5  christos #define UUID_HYPHEN1_OFFSET         8
    250       1.1.1.5  christos #define UUID_HYPHEN2_OFFSET         13
    251       1.1.1.5  christos #define UUID_HYPHEN3_OFFSET         18
    252       1.1.1.5  christos #define UUID_HYPHEN4_OFFSET         23
    253       1.1.1.5  christos 
    254       1.1.1.5  christos 
    255       1.1.1.5  christos /******************************************************************************
    256       1.1.1.5  christos  *
    257           1.1    jruoho  * ACPI AML Debugger
    258           1.1    jruoho  *
    259           1.1    jruoho  *****************************************************************************/
    260           1.1    jruoho 
    261       1.1.1.4  christos #define ACPI_DEBUGGER_MAX_ARGS          ACPI_METHOD_NUM_ARGS + 4 /* Max command line arguments */
    262       1.1.1.3    jruoho #define ACPI_DB_LINE_BUFFER_SIZE        512
    263           1.1    jruoho 
    264           1.1    jruoho #define ACPI_DEBUGGER_COMMAND_PROMPT    '-'
    265           1.1    jruoho #define ACPI_DEBUGGER_EXECUTE_PROMPT    '%'
    266           1.1    jruoho 
    267           1.1    jruoho 
    268           1.1    jruoho #endif /* _ACCONFIG_H */
    269