1433d6423SLionel Sambuc /****************************************************************************** 2433d6423SLionel Sambuc * 3433d6423SLionel Sambuc * Name: acconfig.h - Global configuration constants 4433d6423SLionel Sambuc * 5433d6423SLionel Sambuc *****************************************************************************/ 6433d6423SLionel Sambuc 7*29492bb7SDavid van Moolenbroek /* 8*29492bb7SDavid van Moolenbroek * Copyright (C) 2000 - 2014, Intel Corp. 9433d6423SLionel Sambuc * All rights reserved. 10433d6423SLionel Sambuc * 11*29492bb7SDavid van Moolenbroek * Redistribution and use in source and binary forms, with or without 12*29492bb7SDavid van Moolenbroek * modification, are permitted provided that the following conditions 13*29492bb7SDavid van Moolenbroek * are met: 14*29492bb7SDavid van Moolenbroek * 1. Redistributions of source code must retain the above copyright 15*29492bb7SDavid van Moolenbroek * notice, this list of conditions, and the following disclaimer, 16*29492bb7SDavid van Moolenbroek * without modification. 17*29492bb7SDavid van Moolenbroek * 2. Redistributions in binary form must reproduce at minimum a disclaimer 18*29492bb7SDavid van Moolenbroek * substantially similar to the "NO WARRANTY" disclaimer below 19*29492bb7SDavid van Moolenbroek * ("Disclaimer") and any redistribution must be conditioned upon 20*29492bb7SDavid van Moolenbroek * including a substantially similar Disclaimer requirement for further 21*29492bb7SDavid van Moolenbroek * binary redistribution. 22*29492bb7SDavid van Moolenbroek * 3. Neither the names of the above-listed copyright holders nor the names 23*29492bb7SDavid van Moolenbroek * of any contributors may be used to endorse or promote products derived 24*29492bb7SDavid van Moolenbroek * from this software without specific prior written permission. 25433d6423SLionel Sambuc * 26*29492bb7SDavid van Moolenbroek * Alternatively, this software may be distributed under the terms of the 27*29492bb7SDavid van Moolenbroek * GNU General Public License ("GPL") version 2 as published by the Free 28*29492bb7SDavid van Moolenbroek * Software Foundation. 29433d6423SLionel Sambuc * 30*29492bb7SDavid van Moolenbroek * NO WARRANTY 31*29492bb7SDavid van Moolenbroek * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 32*29492bb7SDavid van Moolenbroek * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 33*29492bb7SDavid van Moolenbroek * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 34*29492bb7SDavid van Moolenbroek * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 35*29492bb7SDavid van Moolenbroek * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 36*29492bb7SDavid van Moolenbroek * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 37*29492bb7SDavid van Moolenbroek * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 38*29492bb7SDavid van Moolenbroek * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 39*29492bb7SDavid van Moolenbroek * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 40*29492bb7SDavid van Moolenbroek * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41*29492bb7SDavid van Moolenbroek * POSSIBILITY OF SUCH DAMAGES. 42*29492bb7SDavid van Moolenbroek */ 43433d6423SLionel Sambuc 44433d6423SLionel Sambuc #ifndef _ACCONFIG_H 45433d6423SLionel Sambuc #define _ACCONFIG_H 46433d6423SLionel Sambuc 47433d6423SLionel Sambuc 48433d6423SLionel Sambuc /****************************************************************************** 49433d6423SLionel Sambuc * 50433d6423SLionel Sambuc * Configuration options 51433d6423SLionel Sambuc * 52433d6423SLionel Sambuc *****************************************************************************/ 53433d6423SLionel Sambuc 54433d6423SLionel Sambuc /* 55433d6423SLionel Sambuc * ACPI_DEBUG_OUTPUT - This switch enables all the debug facilities of the 56433d6423SLionel Sambuc * ACPI subsystem. This includes the DEBUG_PRINT output 57433d6423SLionel Sambuc * statements. When disabled, all DEBUG_PRINT 58433d6423SLionel Sambuc * statements are compiled out. 59433d6423SLionel Sambuc * 60433d6423SLionel Sambuc * ACPI_APPLICATION - Use this switch if the subsystem is going to be run 61433d6423SLionel Sambuc * at the application level. 62433d6423SLionel Sambuc * 63433d6423SLionel Sambuc */ 64433d6423SLionel Sambuc 65433d6423SLionel Sambuc /* 66433d6423SLionel Sambuc * OS name, used for the _OS object. The _OS object is essentially obsolete, 67433d6423SLionel Sambuc * but there is a large base of ASL/AML code in existing machines that check 68433d6423SLionel Sambuc * for the string below. The use of this string usually guarantees that 69433d6423SLionel Sambuc * the ASL will execute down the most tested code path. Also, there is some 70433d6423SLionel Sambuc * code that will not execute the _OSI method unless _OS matches the string 71433d6423SLionel Sambuc * below. Therefore, change this string at your own risk. 72433d6423SLionel Sambuc */ 73433d6423SLionel Sambuc #define ACPI_OS_NAME "Microsoft Windows NT" 74433d6423SLionel Sambuc 75433d6423SLionel Sambuc /* Maximum objects in the various object caches */ 76433d6423SLionel Sambuc 77433d6423SLionel Sambuc #define ACPI_MAX_STATE_CACHE_DEPTH 96 /* State objects */ 78433d6423SLionel Sambuc #define ACPI_MAX_PARSE_CACHE_DEPTH 96 /* Parse tree objects */ 79433d6423SLionel Sambuc #define ACPI_MAX_EXTPARSE_CACHE_DEPTH 96 /* Parse tree objects */ 80433d6423SLionel Sambuc #define ACPI_MAX_OBJECT_CACHE_DEPTH 96 /* Interpreter operand objects */ 81433d6423SLionel Sambuc #define ACPI_MAX_NAMESPACE_CACHE_DEPTH 96 /* Namespace objects */ 82433d6423SLionel Sambuc 83433d6423SLionel Sambuc /* 84433d6423SLionel Sambuc * Should the subsystem abort the loading of an ACPI table if the 85433d6423SLionel Sambuc * table checksum is incorrect? 86433d6423SLionel Sambuc */ 87*29492bb7SDavid van Moolenbroek #ifndef ACPI_CHECKSUM_ABORT 88433d6423SLionel Sambuc #define ACPI_CHECKSUM_ABORT FALSE 89*29492bb7SDavid van Moolenbroek #endif 90*29492bb7SDavid van Moolenbroek 91*29492bb7SDavid van Moolenbroek /* 92*29492bb7SDavid van Moolenbroek * Generate a version of ACPICA that only supports "reduced hardware" 93*29492bb7SDavid van Moolenbroek * platforms (as defined in ACPI 5.0). Set to TRUE to generate a specialized 94*29492bb7SDavid van Moolenbroek * version of ACPICA that ONLY supports the ACPI 5.0 "reduced hardware" 95*29492bb7SDavid van Moolenbroek * model. In other words, no ACPI hardware is supported. 96*29492bb7SDavid van Moolenbroek * 97*29492bb7SDavid van Moolenbroek * If TRUE, this means no support for the following: 98*29492bb7SDavid van Moolenbroek * PM Event and Control registers 99*29492bb7SDavid van Moolenbroek * SCI interrupt (and handler) 100*29492bb7SDavid van Moolenbroek * Fixed Events 101*29492bb7SDavid van Moolenbroek * General Purpose Events (GPEs) 102*29492bb7SDavid van Moolenbroek * Global Lock 103*29492bb7SDavid van Moolenbroek * ACPI PM timer 104*29492bb7SDavid van Moolenbroek * FACS table (Waking vectors and Global Lock) 105*29492bb7SDavid van Moolenbroek */ 106*29492bb7SDavid van Moolenbroek #ifndef ACPI_REDUCED_HARDWARE 107*29492bb7SDavid van Moolenbroek #define ACPI_REDUCED_HARDWARE FALSE 108*29492bb7SDavid van Moolenbroek #endif 109433d6423SLionel Sambuc 110433d6423SLionel Sambuc 111433d6423SLionel Sambuc /****************************************************************************** 112433d6423SLionel Sambuc * 113433d6423SLionel Sambuc * Subsystem Constants 114433d6423SLionel Sambuc * 115433d6423SLionel Sambuc *****************************************************************************/ 116433d6423SLionel Sambuc 117433d6423SLionel Sambuc /* Version of ACPI supported */ 118433d6423SLionel Sambuc 119*29492bb7SDavid van Moolenbroek #define ACPI_CA_SUPPORT_LEVEL 5 120433d6423SLionel Sambuc 121433d6423SLionel Sambuc /* Maximum count for a semaphore object */ 122433d6423SLionel Sambuc 123433d6423SLionel Sambuc #define ACPI_MAX_SEMAPHORE_COUNT 256 124433d6423SLionel Sambuc 125433d6423SLionel Sambuc /* Maximum object reference count (detects object deletion issues) */ 126433d6423SLionel Sambuc 127433d6423SLionel Sambuc #define ACPI_MAX_REFERENCE_COUNT 0x800 128433d6423SLionel Sambuc 129433d6423SLionel Sambuc /* Default page size for use in mapping memory for operation regions */ 130433d6423SLionel Sambuc 131433d6423SLionel Sambuc #define ACPI_DEFAULT_PAGE_SIZE 4096 /* Must be power of 2 */ 132433d6423SLionel Sambuc 133433d6423SLionel Sambuc /* OwnerId tracking. 8 entries allows for 255 OwnerIds */ 134433d6423SLionel Sambuc 135433d6423SLionel Sambuc #define ACPI_NUM_OWNERID_MASKS 8 136433d6423SLionel Sambuc 137433d6423SLionel Sambuc /* Size of the root table array is increased by this increment */ 138433d6423SLionel Sambuc 139433d6423SLionel Sambuc #define ACPI_ROOT_TABLE_SIZE_INCREMENT 4 140433d6423SLionel Sambuc 141433d6423SLionel Sambuc /* Maximum number of While() loop iterations before forced abort */ 142433d6423SLionel Sambuc 143433d6423SLionel Sambuc #define ACPI_MAX_LOOP_ITERATIONS 0xFFFF 144433d6423SLionel Sambuc 145433d6423SLionel Sambuc /* Maximum sleep allowed via Sleep() operator */ 146433d6423SLionel Sambuc 147*29492bb7SDavid van Moolenbroek #define ACPI_MAX_SLEEP 2000 /* 2000 millisec == two seconds */ 148*29492bb7SDavid van Moolenbroek 149*29492bb7SDavid van Moolenbroek /* Address Range lists are per-SpaceId (Memory and I/O only) */ 150*29492bb7SDavid van Moolenbroek 151*29492bb7SDavid van Moolenbroek #define ACPI_ADDRESS_RANGE_MAX 2 152433d6423SLionel Sambuc 153433d6423SLionel Sambuc 154433d6423SLionel Sambuc /****************************************************************************** 155433d6423SLionel Sambuc * 156433d6423SLionel Sambuc * ACPI Specification constants (Do not change unless the specification changes) 157433d6423SLionel Sambuc * 158433d6423SLionel Sambuc *****************************************************************************/ 159433d6423SLionel Sambuc 160433d6423SLionel Sambuc /* Method info (in WALK_STATE), containing local variables and argumetns */ 161433d6423SLionel Sambuc 162433d6423SLionel Sambuc #define ACPI_METHOD_NUM_LOCALS 8 163433d6423SLionel Sambuc #define ACPI_METHOD_MAX_LOCAL 7 164433d6423SLionel Sambuc 165433d6423SLionel Sambuc #define ACPI_METHOD_NUM_ARGS 7 166433d6423SLionel Sambuc #define ACPI_METHOD_MAX_ARG 6 167433d6423SLionel Sambuc 168433d6423SLionel Sambuc /* 169433d6423SLionel Sambuc * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG 170433d6423SLionel Sambuc */ 171433d6423SLionel Sambuc #define ACPI_OBJ_NUM_OPERANDS 8 172433d6423SLionel Sambuc #define ACPI_OBJ_MAX_OPERAND 7 173433d6423SLionel Sambuc 174433d6423SLionel Sambuc /* Number of elements in the Result Stack frame, can be an arbitrary value */ 175433d6423SLionel Sambuc 176433d6423SLionel Sambuc #define ACPI_RESULTS_FRAME_OBJ_NUM 8 177433d6423SLionel Sambuc 178433d6423SLionel Sambuc /* 179433d6423SLionel Sambuc * Maximal number of elements the Result Stack can contain, 180433d6423SLionel Sambuc * it may be an arbitray value not exceeding the types of 181433d6423SLionel Sambuc * ResultSize and ResultCount (now UINT8). 182433d6423SLionel Sambuc */ 183433d6423SLionel Sambuc #define ACPI_RESULTS_OBJ_NUM_MAX 255 184433d6423SLionel Sambuc 185433d6423SLionel Sambuc /* Constants used in searching for the RSDP in low memory */ 186433d6423SLionel Sambuc 187433d6423SLionel Sambuc #define ACPI_EBDA_PTR_LOCATION 0x0000040E /* Physical Address */ 188433d6423SLionel Sambuc #define ACPI_EBDA_PTR_LENGTH 2 189433d6423SLionel Sambuc #define ACPI_EBDA_WINDOW_SIZE 1024 190433d6423SLionel Sambuc #define ACPI_HI_RSDP_WINDOW_BASE 0x000E0000 /* Physical Address */ 191433d6423SLionel Sambuc #define ACPI_HI_RSDP_WINDOW_SIZE 0x00020000 192433d6423SLionel Sambuc #define ACPI_RSDP_SCAN_STEP 16 193433d6423SLionel Sambuc 194433d6423SLionel Sambuc /* Operation regions */ 195433d6423SLionel Sambuc 196433d6423SLionel Sambuc #define ACPI_USER_REGION_BEGIN 0x80 197433d6423SLionel Sambuc 198433d6423SLionel Sambuc /* Maximum SpaceIds for Operation Regions */ 199433d6423SLionel Sambuc 200433d6423SLionel Sambuc #define ACPI_MAX_ADDRESS_SPACE 255 201*29492bb7SDavid van Moolenbroek #define ACPI_NUM_DEFAULT_SPACES 4 202433d6423SLionel Sambuc 203433d6423SLionel Sambuc /* Array sizes. Used for range checking also */ 204433d6423SLionel Sambuc 205433d6423SLionel Sambuc #define ACPI_MAX_MATCH_OPCODE 5 206433d6423SLionel Sambuc 207433d6423SLionel Sambuc /* RSDP checksums */ 208433d6423SLionel Sambuc 209433d6423SLionel Sambuc #define ACPI_RSDP_CHECKSUM_LENGTH 20 210433d6423SLionel Sambuc #define ACPI_RSDP_XCHECKSUM_LENGTH 36 211433d6423SLionel Sambuc 212*29492bb7SDavid van Moolenbroek /* SMBus, GSBus and IPMI bidirectional buffer size */ 213433d6423SLionel Sambuc 214433d6423SLionel Sambuc #define ACPI_SMBUS_BUFFER_SIZE 34 215*29492bb7SDavid van Moolenbroek #define ACPI_GSBUS_BUFFER_SIZE 34 216433d6423SLionel Sambuc #define ACPI_IPMI_BUFFER_SIZE 66 217433d6423SLionel Sambuc 218433d6423SLionel Sambuc /* _SxD and _SxW control methods */ 219433d6423SLionel Sambuc 220433d6423SLionel Sambuc #define ACPI_NUM_SxD_METHODS 4 221433d6423SLionel Sambuc #define ACPI_NUM_SxW_METHODS 5 222433d6423SLionel Sambuc 223433d6423SLionel Sambuc 224433d6423SLionel Sambuc /****************************************************************************** 225433d6423SLionel Sambuc * 226*29492bb7SDavid van Moolenbroek * Miscellaneous constants 227*29492bb7SDavid van Moolenbroek * 228*29492bb7SDavid van Moolenbroek *****************************************************************************/ 229*29492bb7SDavid van Moolenbroek 230*29492bb7SDavid van Moolenbroek /* UUID constants */ 231*29492bb7SDavid van Moolenbroek 232*29492bb7SDavid van Moolenbroek #define UUID_BUFFER_LENGTH 16 /* Length of UUID in memory */ 233*29492bb7SDavid van Moolenbroek #define UUID_STRING_LENGTH 36 /* Total length of a UUID string */ 234*29492bb7SDavid van Moolenbroek 235*29492bb7SDavid van Moolenbroek /* Positions for required hyphens (dashes) in UUID strings */ 236*29492bb7SDavid van Moolenbroek 237*29492bb7SDavid van Moolenbroek #define UUID_HYPHEN1_OFFSET 8 238*29492bb7SDavid van Moolenbroek #define UUID_HYPHEN2_OFFSET 13 239*29492bb7SDavid van Moolenbroek #define UUID_HYPHEN3_OFFSET 18 240*29492bb7SDavid van Moolenbroek #define UUID_HYPHEN4_OFFSET 23 241*29492bb7SDavid van Moolenbroek 242*29492bb7SDavid van Moolenbroek 243*29492bb7SDavid van Moolenbroek /****************************************************************************** 244*29492bb7SDavid van Moolenbroek * 245433d6423SLionel Sambuc * ACPI AML Debugger 246433d6423SLionel Sambuc * 247433d6423SLionel Sambuc *****************************************************************************/ 248433d6423SLionel Sambuc 249*29492bb7SDavid van Moolenbroek #define ACPI_DEBUGGER_MAX_ARGS ACPI_METHOD_NUM_ARGS + 4 /* Max command line arguments */ 250*29492bb7SDavid van Moolenbroek #define ACPI_DB_LINE_BUFFER_SIZE 512 251433d6423SLionel Sambuc 252433d6423SLionel Sambuc #define ACPI_DEBUGGER_COMMAND_PROMPT '-' 253433d6423SLionel Sambuc #define ACPI_DEBUGGER_EXECUTE_PROMPT '%' 254433d6423SLionel Sambuc 255433d6423SLionel Sambuc 256433d6423SLionel Sambuc #endif /* _ACCONFIG_H */ 257