1a9f12690SJung-uk Kim /****************************************************************************** 2a9f12690SJung-uk Kim * 3a9f12690SJung-uk Kim * Name: acconfig.h - Global configuration constants 4a9f12690SJung-uk Kim * 5a9f12690SJung-uk Kim *****************************************************************************/ 6a9f12690SJung-uk Kim 7d244b227SJung-uk Kim /* 8*ec3fc72fSJung-uk Kim * Copyright (C) 2000 - 2012, Intel Corp. 9a9f12690SJung-uk Kim * All rights reserved. 10a9f12690SJung-uk Kim * 11d244b227SJung-uk Kim * Redistribution and use in source and binary forms, with or without 12d244b227SJung-uk Kim * modification, are permitted provided that the following conditions 13d244b227SJung-uk Kim * are met: 14d244b227SJung-uk Kim * 1. Redistributions of source code must retain the above copyright 15d244b227SJung-uk Kim * notice, this list of conditions, and the following disclaimer, 16d244b227SJung-uk Kim * without modification. 17d244b227SJung-uk Kim * 2. Redistributions in binary form must reproduce at minimum a disclaimer 18d244b227SJung-uk Kim * substantially similar to the "NO WARRANTY" disclaimer below 19d244b227SJung-uk Kim * ("Disclaimer") and any redistribution must be conditioned upon 20d244b227SJung-uk Kim * including a substantially similar Disclaimer requirement for further 21d244b227SJung-uk Kim * binary redistribution. 22d244b227SJung-uk Kim * 3. Neither the names of the above-listed copyright holders nor the names 23d244b227SJung-uk Kim * of any contributors may be used to endorse or promote products derived 24d244b227SJung-uk Kim * from this software without specific prior written permission. 25a9f12690SJung-uk Kim * 26d244b227SJung-uk Kim * Alternatively, this software may be distributed under the terms of the 27d244b227SJung-uk Kim * GNU General Public License ("GPL") version 2 as published by the Free 28d244b227SJung-uk Kim * Software Foundation. 29a9f12690SJung-uk Kim * 30d244b227SJung-uk Kim * NO WARRANTY 31d244b227SJung-uk Kim * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 32d244b227SJung-uk Kim * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 33d244b227SJung-uk Kim * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 34d244b227SJung-uk Kim * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 35d244b227SJung-uk Kim * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 36d244b227SJung-uk Kim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 37d244b227SJung-uk Kim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 38d244b227SJung-uk Kim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 39d244b227SJung-uk Kim * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 40d244b227SJung-uk Kim * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41d244b227SJung-uk Kim * POSSIBILITY OF SUCH DAMAGES. 42d244b227SJung-uk Kim */ 43a9f12690SJung-uk Kim 44a9f12690SJung-uk Kim #ifndef _ACCONFIG_H 45a9f12690SJung-uk Kim #define _ACCONFIG_H 46a9f12690SJung-uk Kim 47a9f12690SJung-uk Kim 48a9f12690SJung-uk Kim /****************************************************************************** 49a9f12690SJung-uk Kim * 50a9f12690SJung-uk Kim * Configuration options 51a9f12690SJung-uk Kim * 52a9f12690SJung-uk Kim *****************************************************************************/ 53a9f12690SJung-uk Kim 54a9f12690SJung-uk Kim /* 55a9f12690SJung-uk Kim * ACPI_DEBUG_OUTPUT - This switch enables all the debug facilities of the 56a9f12690SJung-uk Kim * ACPI subsystem. This includes the DEBUG_PRINT output 57a9f12690SJung-uk Kim * statements. When disabled, all DEBUG_PRINT 58a9f12690SJung-uk Kim * statements are compiled out. 59a9f12690SJung-uk Kim * 60a9f12690SJung-uk Kim * ACPI_APPLICATION - Use this switch if the subsystem is going to be run 61a9f12690SJung-uk Kim * at the application level. 62a9f12690SJung-uk Kim * 63a9f12690SJung-uk Kim */ 64a9f12690SJung-uk Kim 65a9f12690SJung-uk Kim /* 66a9f12690SJung-uk Kim * OS name, used for the _OS object. The _OS object is essentially obsolete, 67a9f12690SJung-uk Kim * but there is a large base of ASL/AML code in existing machines that check 68a9f12690SJung-uk Kim * for the string below. The use of this string usually guarantees that 69a9f12690SJung-uk Kim * the ASL will execute down the most tested code path. Also, there is some 70a9f12690SJung-uk Kim * code that will not execute the _OSI method unless _OS matches the string 71a9f12690SJung-uk Kim * below. Therefore, change this string at your own risk. 72a9f12690SJung-uk Kim */ 73a9f12690SJung-uk Kim #define ACPI_OS_NAME "Microsoft Windows NT" 74a9f12690SJung-uk Kim 75a9f12690SJung-uk Kim /* Maximum objects in the various object caches */ 76a9f12690SJung-uk Kim 77a9f12690SJung-uk Kim #define ACPI_MAX_STATE_CACHE_DEPTH 96 /* State objects */ 78a9f12690SJung-uk Kim #define ACPI_MAX_PARSE_CACHE_DEPTH 96 /* Parse tree objects */ 79a9f12690SJung-uk Kim #define ACPI_MAX_EXTPARSE_CACHE_DEPTH 96 /* Parse tree objects */ 80a9f12690SJung-uk Kim #define ACPI_MAX_OBJECT_CACHE_DEPTH 96 /* Interpreter operand objects */ 81a9f12690SJung-uk Kim #define ACPI_MAX_NAMESPACE_CACHE_DEPTH 96 /* Namespace objects */ 82a9f12690SJung-uk Kim 83a9f12690SJung-uk Kim /* 84a9f12690SJung-uk Kim * Should the subsystem abort the loading of an ACPI table if the 85a9f12690SJung-uk Kim * table checksum is incorrect? 86a9f12690SJung-uk Kim */ 87a9f12690SJung-uk Kim #define ACPI_CHECKSUM_ABORT FALSE 88a9f12690SJung-uk Kim 89a9f12690SJung-uk Kim 90a9f12690SJung-uk Kim /****************************************************************************** 91a9f12690SJung-uk Kim * 92a9f12690SJung-uk Kim * Subsystem Constants 93a9f12690SJung-uk Kim * 94a9f12690SJung-uk Kim *****************************************************************************/ 95a9f12690SJung-uk Kim 96a9f12690SJung-uk Kim /* Version of ACPI supported */ 97a9f12690SJung-uk Kim 98a9f12690SJung-uk Kim #define ACPI_CA_SUPPORT_LEVEL 3 99a9f12690SJung-uk Kim 100a9f12690SJung-uk Kim /* Maximum count for a semaphore object */ 101a9f12690SJung-uk Kim 102a9f12690SJung-uk Kim #define ACPI_MAX_SEMAPHORE_COUNT 256 103a9f12690SJung-uk Kim 104a9f12690SJung-uk Kim /* Maximum object reference count (detects object deletion issues) */ 105a9f12690SJung-uk Kim 106a9f12690SJung-uk Kim #define ACPI_MAX_REFERENCE_COUNT 0x800 107a9f12690SJung-uk Kim 1082272d050SJung-uk Kim /* Default page size for use in mapping memory for operation regions */ 109a9f12690SJung-uk Kim 1102272d050SJung-uk Kim #define ACPI_DEFAULT_PAGE_SIZE 4096 /* Must be power of 2 */ 111a9f12690SJung-uk Kim 112a9f12690SJung-uk Kim /* OwnerId tracking. 8 entries allows for 255 OwnerIds */ 113a9f12690SJung-uk Kim 114a9f12690SJung-uk Kim #define ACPI_NUM_OWNERID_MASKS 8 115a9f12690SJung-uk Kim 116a9f12690SJung-uk Kim /* Size of the root table array is increased by this increment */ 117a9f12690SJung-uk Kim 118a9f12690SJung-uk Kim #define ACPI_ROOT_TABLE_SIZE_INCREMENT 4 119a9f12690SJung-uk Kim 120a9f12690SJung-uk Kim /* Maximum number of While() loop iterations before forced abort */ 121a9f12690SJung-uk Kim 122a9f12690SJung-uk Kim #define ACPI_MAX_LOOP_ITERATIONS 0xFFFF 123a9f12690SJung-uk Kim 124a88e22b7SJung-uk Kim /* Maximum sleep allowed via Sleep() operator */ 125a88e22b7SJung-uk Kim 1263f0275a0SJung-uk Kim #define ACPI_MAX_SLEEP 2000 /* 2000 millisec == two seconds */ 127a88e22b7SJung-uk Kim 128*ec3fc72fSJung-uk Kim /* Address Range lists are per-SpaceId (Memory and I/O only) */ 129*ec3fc72fSJung-uk Kim 130*ec3fc72fSJung-uk Kim #define ACPI_ADDRESS_RANGE_MAX 2 131*ec3fc72fSJung-uk Kim 132a9f12690SJung-uk Kim 133a9f12690SJung-uk Kim /****************************************************************************** 134a9f12690SJung-uk Kim * 135a9f12690SJung-uk Kim * ACPI Specification constants (Do not change unless the specification changes) 136a9f12690SJung-uk Kim * 137a9f12690SJung-uk Kim *****************************************************************************/ 138a9f12690SJung-uk Kim 139a9f12690SJung-uk Kim /* Method info (in WALK_STATE), containing local variables and argumetns */ 140a9f12690SJung-uk Kim 141a9f12690SJung-uk Kim #define ACPI_METHOD_NUM_LOCALS 8 142a9f12690SJung-uk Kim #define ACPI_METHOD_MAX_LOCAL 7 143a9f12690SJung-uk Kim 144a9f12690SJung-uk Kim #define ACPI_METHOD_NUM_ARGS 7 145a9f12690SJung-uk Kim #define ACPI_METHOD_MAX_ARG 6 146a9f12690SJung-uk Kim 147a9f12690SJung-uk Kim /* 148a9f12690SJung-uk Kim * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG 149a9f12690SJung-uk Kim */ 150a9f12690SJung-uk Kim #define ACPI_OBJ_NUM_OPERANDS 8 151a9f12690SJung-uk Kim #define ACPI_OBJ_MAX_OPERAND 7 152a9f12690SJung-uk Kim 153a9f12690SJung-uk Kim /* Number of elements in the Result Stack frame, can be an arbitrary value */ 154a9f12690SJung-uk Kim 155a9f12690SJung-uk Kim #define ACPI_RESULTS_FRAME_OBJ_NUM 8 156a9f12690SJung-uk Kim 157a9f12690SJung-uk Kim /* 158a9f12690SJung-uk Kim * Maximal number of elements the Result Stack can contain, 159a9f12690SJung-uk Kim * it may be an arbitray value not exceeding the types of 160a9f12690SJung-uk Kim * ResultSize and ResultCount (now UINT8). 161a9f12690SJung-uk Kim */ 162a9f12690SJung-uk Kim #define ACPI_RESULTS_OBJ_NUM_MAX 255 163a9f12690SJung-uk Kim 164a9f12690SJung-uk Kim /* Constants used in searching for the RSDP in low memory */ 165a9f12690SJung-uk Kim 166a9f12690SJung-uk Kim #define ACPI_EBDA_PTR_LOCATION 0x0000040E /* Physical Address */ 167a9f12690SJung-uk Kim #define ACPI_EBDA_PTR_LENGTH 2 168a9f12690SJung-uk Kim #define ACPI_EBDA_WINDOW_SIZE 1024 169a9f12690SJung-uk Kim #define ACPI_HI_RSDP_WINDOW_BASE 0x000E0000 /* Physical Address */ 170a9f12690SJung-uk Kim #define ACPI_HI_RSDP_WINDOW_SIZE 0x00020000 171a9f12690SJung-uk Kim #define ACPI_RSDP_SCAN_STEP 16 172a9f12690SJung-uk Kim 173a9f12690SJung-uk Kim /* Operation regions */ 174a9f12690SJung-uk Kim 175a9f12690SJung-uk Kim #define ACPI_USER_REGION_BEGIN 0x80 176a9f12690SJung-uk Kim 177a9f12690SJung-uk Kim /* Maximum SpaceIds for Operation Regions */ 178a9f12690SJung-uk Kim 179a9f12690SJung-uk Kim #define ACPI_MAX_ADDRESS_SPACE 255 180a9f12690SJung-uk Kim 181a9f12690SJung-uk Kim /* Array sizes. Used for range checking also */ 182a9f12690SJung-uk Kim 183a9f12690SJung-uk Kim #define ACPI_MAX_MATCH_OPCODE 5 184a9f12690SJung-uk Kim 185a9f12690SJung-uk Kim /* RSDP checksums */ 186a9f12690SJung-uk Kim 187a9f12690SJung-uk Kim #define ACPI_RSDP_CHECKSUM_LENGTH 20 188a9f12690SJung-uk Kim #define ACPI_RSDP_XCHECKSUM_LENGTH 36 189a9f12690SJung-uk Kim 1903f0275a0SJung-uk Kim /* SMBus, GSBus and IPMI bidirectional buffer size */ 191a9f12690SJung-uk Kim 192a9f12690SJung-uk Kim #define ACPI_SMBUS_BUFFER_SIZE 34 1933f0275a0SJung-uk Kim #define ACPI_GSBUS_BUFFER_SIZE 34 194d6dd1baeSJung-uk Kim #define ACPI_IPMI_BUFFER_SIZE 66 195d6dd1baeSJung-uk Kim 196d6dd1baeSJung-uk Kim /* _SxD and _SxW control methods */ 197d6dd1baeSJung-uk Kim 198d6dd1baeSJung-uk Kim #define ACPI_NUM_SxD_METHODS 4 199d6dd1baeSJung-uk Kim #define ACPI_NUM_SxW_METHODS 5 200a9f12690SJung-uk Kim 201a9f12690SJung-uk Kim 202a9f12690SJung-uk Kim /****************************************************************************** 203a9f12690SJung-uk Kim * 204a9f12690SJung-uk Kim * ACPI AML Debugger 205a9f12690SJung-uk Kim * 206a9f12690SJung-uk Kim *****************************************************************************/ 207a9f12690SJung-uk Kim 20842e58c03SJung-uk Kim #define ACPI_DEBUGGER_MAX_ARGS ACPI_METHOD_NUM_ARGS + 2 /* Max command line arguments */ 20942e58c03SJung-uk Kim #define ACPI_DB_LINE_BUFFER_SIZE 512 210a9f12690SJung-uk Kim 211a9f12690SJung-uk Kim #define ACPI_DEBUGGER_COMMAND_PROMPT '-' 212a9f12690SJung-uk Kim #define ACPI_DEBUGGER_EXECUTE_PROMPT '%' 213a9f12690SJung-uk Kim 214a9f12690SJung-uk Kim 215a9f12690SJung-uk Kim #endif /* _ACCONFIG_H */ 216a9f12690SJung-uk Kim 217