Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
0002 /******************************************************************************
0003  *
0004  * Name: acconfig.h - Global configuration constants
0005  *
0006  * Copyright (C) 2000 - 2022, Intel Corp.
0007  *
0008  *****************************************************************************/
0009 
0010 #ifndef _ACCONFIG_H
0011 #define _ACCONFIG_H
0012 
0013 /******************************************************************************
0014  *
0015  * Configuration options
0016  *
0017  *****************************************************************************/
0018 
0019 /*
0020  * ACPI_DEBUG_OUTPUT    - This switch enables all the debug facilities of the
0021  *                        ACPI subsystem.  This includes the DEBUG_PRINT output
0022  *                        statements.  When disabled, all DEBUG_PRINT
0023  *                        statements are compiled out.
0024  *
0025  * ACPI_APPLICATION     - Use this switch if the subsystem is going to be run
0026  *                        at the application level.
0027  *
0028  */
0029 
0030 /*
0031  * OS name, used for the _OS object.  The _OS object is essentially obsolete,
0032  * but there is a large base of ASL/AML code in existing machines that check
0033  * for the string below.  The use of this string usually guarantees that
0034  * the ASL will execute down the most tested code path.  Also, there is some
0035  * code that will not execute the _OSI method unless _OS matches the string
0036  * below.  Therefore, change this string at your own risk.
0037  */
0038 #define ACPI_OS_NAME                    "Microsoft Windows NT"
0039 
0040 /* Maximum objects in the various object caches */
0041 
0042 #define ACPI_MAX_STATE_CACHE_DEPTH      96  /* State objects */
0043 #define ACPI_MAX_PARSE_CACHE_DEPTH      96  /* Parse tree objects */
0044 #define ACPI_MAX_EXTPARSE_CACHE_DEPTH   96  /* Parse tree objects */
0045 #define ACPI_MAX_OBJECT_CACHE_DEPTH     96  /* Interpreter operand objects */
0046 #define ACPI_MAX_NAMESPACE_CACHE_DEPTH  96  /* Namespace objects */
0047 #define ACPI_MAX_COMMENT_CACHE_DEPTH    96  /* Comments for the -ca option */
0048 
0049 /*
0050  * Should the subsystem abort the loading of an ACPI table if the
0051  * table checksum is incorrect?
0052  */
0053 #ifndef ACPI_CHECKSUM_ABORT
0054 #define ACPI_CHECKSUM_ABORT             FALSE
0055 #endif
0056 
0057 /*
0058  * Generate a version of ACPICA that only supports "reduced hardware"
0059  * platforms (as defined in ACPI 5.0). Set to TRUE to generate a specialized
0060  * version of ACPICA that ONLY supports the ACPI 5.0 "reduced hardware"
0061  * model. In other words, no ACPI hardware is supported.
0062  *
0063  * If TRUE, this means no support for the following:
0064  *      PM Event and Control registers
0065  *      SCI interrupt (and handler)
0066  *      Fixed Events
0067  *      General Purpose Events (GPEs)
0068  *      Global Lock
0069  *      ACPI PM timer
0070  *      FACS table (Waking vectors and Global Lock)
0071  */
0072 #ifndef ACPI_REDUCED_HARDWARE
0073 #define ACPI_REDUCED_HARDWARE           FALSE
0074 #endif
0075 
0076 /******************************************************************************
0077  *
0078  * Subsystem Constants
0079  *
0080  *****************************************************************************/
0081 
0082 /* Version of ACPI supported */
0083 
0084 #define ACPI_CA_SUPPORT_LEVEL           5
0085 
0086 /* Maximum count for a semaphore object */
0087 
0088 #define ACPI_MAX_SEMAPHORE_COUNT        256
0089 
0090 /* Maximum object reference count (detects object deletion issues) */
0091 
0092 #define ACPI_MAX_REFERENCE_COUNT        0x4000
0093 
0094 /* Default page size for use in mapping memory for operation regions */
0095 
0096 #define ACPI_DEFAULT_PAGE_SIZE          4096    /* Must be power of 2 */
0097 
0098 /* owner_id tracking. 128 entries allows for 4095 owner_ids */
0099 
0100 #define ACPI_NUM_OWNERID_MASKS          128
0101 
0102 /* Size of the root table array is increased by this increment */
0103 
0104 #define ACPI_ROOT_TABLE_SIZE_INCREMENT  4
0105 
0106 /* Maximum sleep allowed via Sleep() operator */
0107 
0108 #define ACPI_MAX_SLEEP                  2000    /* 2000 millisec == two seconds */
0109 
0110 /* Address Range lists are per-space_id (Memory and I/O only) */
0111 
0112 #define ACPI_ADDRESS_RANGE_MAX          2
0113 
0114 /* Maximum time (default 30s) of While() loops before abort */
0115 
0116 #define ACPI_MAX_LOOP_TIMEOUT           30
0117 
0118 /******************************************************************************
0119  *
0120  * ACPI Specification constants (Do not change unless the specification changes)
0121  *
0122  *****************************************************************************/
0123 
0124 /* Method info (in WALK_STATE), containing local variables and arguments */
0125 
0126 #define ACPI_METHOD_NUM_LOCALS          8
0127 #define ACPI_METHOD_MAX_LOCAL           7
0128 
0129 #define ACPI_METHOD_NUM_ARGS            7
0130 #define ACPI_METHOD_MAX_ARG             6
0131 
0132 /*
0133  * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG
0134  */
0135 #define ACPI_OBJ_NUM_OPERANDS           8
0136 #define ACPI_OBJ_MAX_OPERAND            7
0137 
0138 /* Number of elements in the Result Stack frame, can be an arbitrary value */
0139 
0140 #define ACPI_RESULTS_FRAME_OBJ_NUM      8
0141 
0142 /*
0143  * Maximal number of elements the Result Stack can contain,
0144  * it may be an arbitrary value not exceeding the types of
0145  * result_size and result_count (now u8).
0146  */
0147 #define ACPI_RESULTS_OBJ_NUM_MAX        255
0148 
0149 /* Constants used in searching for the RSDP in low memory */
0150 
0151 #define ACPI_EBDA_PTR_LOCATION          0x0000040E  /* Physical Address */
0152 #define ACPI_EBDA_PTR_LENGTH            2
0153 #define ACPI_EBDA_WINDOW_SIZE           1024
0154 #define ACPI_HI_RSDP_WINDOW_BASE        0x000E0000  /* Physical Address */
0155 #define ACPI_HI_RSDP_WINDOW_SIZE        0x00020000
0156 #define ACPI_RSDP_SCAN_STEP             16
0157 
0158 /* Operation regions */
0159 
0160 #define ACPI_USER_REGION_BEGIN          0x80
0161 
0162 /* Maximum space_ids for Operation Regions */
0163 
0164 #define ACPI_MAX_ADDRESS_SPACE          255
0165 #define ACPI_NUM_DEFAULT_SPACES         4
0166 
0167 /* Array sizes.  Used for range checking also */
0168 
0169 #define ACPI_MAX_MATCH_OPCODE           5
0170 
0171 /* RSDP checksums */
0172 
0173 #define ACPI_RSDP_CHECKSUM_LENGTH       20
0174 #define ACPI_RSDP_XCHECKSUM_LENGTH      36
0175 
0176 /*
0177  * SMBus, GSBus and IPMI buffer sizes. All have a 2-byte header,
0178  * containing both Status and Length.
0179  */
0180 #define ACPI_SERIAL_HEADER_SIZE         2   /* Common for below. Status and Length fields */
0181 
0182 #define ACPI_SMBUS_DATA_SIZE            32
0183 #define ACPI_SMBUS_BUFFER_SIZE          ACPI_SERIAL_HEADER_SIZE + ACPI_SMBUS_DATA_SIZE
0184 
0185 #define ACPI_IPMI_DATA_SIZE             64
0186 #define ACPI_IPMI_BUFFER_SIZE           ACPI_SERIAL_HEADER_SIZE + ACPI_IPMI_DATA_SIZE
0187 
0188 #define ACPI_MAX_GSBUS_DATA_SIZE        255
0189 #define ACPI_MAX_GSBUS_BUFFER_SIZE      ACPI_SERIAL_HEADER_SIZE + ACPI_MAX_GSBUS_DATA_SIZE
0190 
0191 #define ACPI_PRM_INPUT_BUFFER_SIZE      26
0192 
0193 /* _sx_d and _sx_w control methods */
0194 
0195 #define ACPI_NUM_sx_d_METHODS           4
0196 #define ACPI_NUM_sx_w_METHODS           5
0197 
0198 /******************************************************************************
0199  *
0200  * Miscellaneous constants
0201  *
0202  *****************************************************************************/
0203 
0204 /* UUID constants */
0205 
0206 #define UUID_BUFFER_LENGTH          16  /* Length of UUID in memory */
0207 #define UUID_STRING_LENGTH          36  /* Total length of a UUID string */
0208 
0209 /* Positions for required hyphens (dashes) in UUID strings */
0210 
0211 #define UUID_HYPHEN1_OFFSET         8
0212 #define UUID_HYPHEN2_OFFSET         13
0213 #define UUID_HYPHEN3_OFFSET         18
0214 #define UUID_HYPHEN4_OFFSET         23
0215 
0216 /******************************************************************************
0217  *
0218  * ACPI AML Debugger
0219  *
0220  *****************************************************************************/
0221 
0222 #define ACPI_DEBUGGER_MAX_ARGS          ACPI_METHOD_NUM_ARGS + 4    /* Max command line arguments */
0223 #define ACPI_DB_LINE_BUFFER_SIZE        512
0224 
0225 #define ACPI_DEBUGGER_COMMAND_PROMPT    '-'
0226 #define ACPI_DEBUGGER_EXECUTE_PROMPT    '%'
0227 
0228 #endif              /* _ACCONFIG_H */