acconfig.h revision 1.1.1.7.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.7 christos * Copyright (C) 2000 - 2016, 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.2 jruoho * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY 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 jruoho
83 1.1 jruoho /*
84 1.1 jruoho * Should the subsystem abort the loading of an ACPI table if the
85 1.1 jruoho * table checksum is incorrect?
86 1.1 jruoho */
87 1.1.1.4 christos #ifndef ACPI_CHECKSUM_ABORT
88 1.1 jruoho #define ACPI_CHECKSUM_ABORT FALSE
89 1.1.1.4 christos #endif
90 1.1.1.4 christos
91 1.1.1.4 christos /*
92 1.1.1.4 christos * Generate a version of ACPICA that only supports "reduced hardware"
93 1.1.1.4 christos * platforms (as defined in ACPI 5.0). Set to TRUE to generate a specialized
94 1.1.1.4 christos * version of ACPICA that ONLY supports the ACPI 5.0 "reduced hardware"
95 1.1.1.4 christos * model. In other words, no ACPI hardware is supported.
96 1.1.1.4 christos *
97 1.1.1.4 christos * If TRUE, this means no support for the following:
98 1.1.1.4 christos * PM Event and Control registers
99 1.1.1.4 christos * SCI interrupt (and handler)
100 1.1.1.4 christos * Fixed Events
101 1.1.1.4 christos * General Purpose Events (GPEs)
102 1.1.1.4 christos * Global Lock
103 1.1.1.4 christos * ACPI PM timer
104 1.1.1.4 christos * FACS table (Waking vectors and Global Lock)
105 1.1.1.4 christos */
106 1.1.1.4 christos #ifndef ACPI_REDUCED_HARDWARE
107 1.1.1.4 christos #define ACPI_REDUCED_HARDWARE FALSE
108 1.1.1.4 christos #endif
109 1.1 jruoho
110 1.1 jruoho
111 1.1 jruoho /******************************************************************************
112 1.1 jruoho *
113 1.1 jruoho * Subsystem Constants
114 1.1 jruoho *
115 1.1 jruoho *****************************************************************************/
116 1.1 jruoho
117 1.1 jruoho /* Version of ACPI supported */
118 1.1 jruoho
119 1.1.1.4 christos #define ACPI_CA_SUPPORT_LEVEL 5
120 1.1 jruoho
121 1.1 jruoho /* Maximum count for a semaphore object */
122 1.1 jruoho
123 1.1 jruoho #define ACPI_MAX_SEMAPHORE_COUNT 256
124 1.1 jruoho
125 1.1 jruoho /* Maximum object reference count (detects object deletion issues) */
126 1.1 jruoho
127 1.1 jruoho #define ACPI_MAX_REFERENCE_COUNT 0x800
128 1.1 jruoho
129 1.1 jruoho /* Default page size for use in mapping memory for operation regions */
130 1.1 jruoho
131 1.1 jruoho #define ACPI_DEFAULT_PAGE_SIZE 4096 /* Must be power of 2 */
132 1.1 jruoho
133 1.1 jruoho /* OwnerId tracking. 8 entries allows for 255 OwnerIds */
134 1.1 jruoho
135 1.1 jruoho #define ACPI_NUM_OWNERID_MASKS 8
136 1.1 jruoho
137 1.1 jruoho /* Size of the root table array is increased by this increment */
138 1.1 jruoho
139 1.1 jruoho #define ACPI_ROOT_TABLE_SIZE_INCREMENT 4
140 1.1 jruoho
141 1.1 jruoho /* Maximum sleep allowed via Sleep() operator */
142 1.1 jruoho
143 1.1.1.4 christos #define ACPI_MAX_SLEEP 2000 /* 2000 millisec == two seconds */
144 1.1.1.4 christos
145 1.1.1.4 christos /* Address Range lists are per-SpaceId (Memory and I/O only) */
146 1.1.1.4 christos
147 1.1.1.4 christos #define ACPI_ADDRESS_RANGE_MAX 2
148 1.1 jruoho
149 1.1.1.7.2.1 pgoyette /* Maximum number of While() loops before abort */
150 1.1.1.7.2.1 pgoyette
151 1.1.1.7.2.1 pgoyette #define ACPI_MAX_LOOP_COUNT 0x000FFFFF
152 1.1.1.7.2.1 pgoyette
153 1.1 jruoho
154 1.1 jruoho /******************************************************************************
155 1.1 jruoho *
156 1.1 jruoho * ACPI Specification constants (Do not change unless the specification changes)
157 1.1 jruoho *
158 1.1 jruoho *****************************************************************************/
159 1.1 jruoho
160 1.1 jruoho /* Method info (in WALK_STATE), containing local variables and argumetns */
161 1.1 jruoho
162 1.1 jruoho #define ACPI_METHOD_NUM_LOCALS 8
163 1.1 jruoho #define ACPI_METHOD_MAX_LOCAL 7
164 1.1 jruoho
165 1.1 jruoho #define ACPI_METHOD_NUM_ARGS 7
166 1.1 jruoho #define ACPI_METHOD_MAX_ARG 6
167 1.1 jruoho
168 1.1 jruoho /*
169 1.1 jruoho * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG
170 1.1 jruoho */
171 1.1 jruoho #define ACPI_OBJ_NUM_OPERANDS 8
172 1.1 jruoho #define ACPI_OBJ_MAX_OPERAND 7
173 1.1 jruoho
174 1.1 jruoho /* Number of elements in the Result Stack frame, can be an arbitrary value */
175 1.1 jruoho
176 1.1 jruoho #define ACPI_RESULTS_FRAME_OBJ_NUM 8
177 1.1 jruoho
178 1.1 jruoho /*
179 1.1 jruoho * Maximal number of elements the Result Stack can contain,
180 1.1 jruoho * it may be an arbitray value not exceeding the types of
181 1.1 jruoho * ResultSize and ResultCount (now UINT8).
182 1.1 jruoho */
183 1.1 jruoho #define ACPI_RESULTS_OBJ_NUM_MAX 255
184 1.1 jruoho
185 1.1 jruoho /* Constants used in searching for the RSDP in low memory */
186 1.1 jruoho
187 1.1 jruoho #define ACPI_EBDA_PTR_LOCATION 0x0000040E /* Physical Address */
188 1.1 jruoho #define ACPI_EBDA_PTR_LENGTH 2
189 1.1 jruoho #define ACPI_EBDA_WINDOW_SIZE 1024
190 1.1 jruoho #define ACPI_HI_RSDP_WINDOW_BASE 0x000E0000 /* Physical Address */
191 1.1 jruoho #define ACPI_HI_RSDP_WINDOW_SIZE 0x00020000
192 1.1 jruoho #define ACPI_RSDP_SCAN_STEP 16
193 1.1 jruoho
194 1.1 jruoho /* Operation regions */
195 1.1 jruoho
196 1.1 jruoho #define ACPI_USER_REGION_BEGIN 0x80
197 1.1 jruoho
198 1.1 jruoho /* Maximum SpaceIds for Operation Regions */
199 1.1 jruoho
200 1.1 jruoho #define ACPI_MAX_ADDRESS_SPACE 255
201 1.1.1.4 christos #define ACPI_NUM_DEFAULT_SPACES 4
202 1.1 jruoho
203 1.1.1.4 christos /* Array sizes. Used for range checking also */
204 1.1 jruoho
205 1.1 jruoho #define ACPI_MAX_MATCH_OPCODE 5
206 1.1 jruoho
207 1.1 jruoho /* RSDP checksums */
208 1.1 jruoho
209 1.1 jruoho #define ACPI_RSDP_CHECKSUM_LENGTH 20
210 1.1 jruoho #define ACPI_RSDP_XCHECKSUM_LENGTH 36
211 1.1 jruoho
212 1.1.1.4 christos /* SMBus, GSBus and IPMI bidirectional buffer size */
213 1.1 jruoho
214 1.1 jruoho #define ACPI_SMBUS_BUFFER_SIZE 34
215 1.1.1.4 christos #define ACPI_GSBUS_BUFFER_SIZE 34
216 1.1 jruoho #define ACPI_IPMI_BUFFER_SIZE 66
217 1.1 jruoho
218 1.1 jruoho /* _SxD and _SxW control methods */
219 1.1 jruoho
220 1.1 jruoho #define ACPI_NUM_SxD_METHODS 4
221 1.1 jruoho #define ACPI_NUM_SxW_METHODS 5
222 1.1 jruoho
223 1.1 jruoho
224 1.1 jruoho /******************************************************************************
225 1.1 jruoho *
226 1.1.1.5 christos * Miscellaneous constants
227 1.1.1.5 christos *
228 1.1.1.5 christos *****************************************************************************/
229 1.1.1.5 christos
230 1.1.1.5 christos /* UUID constants */
231 1.1.1.5 christos
232 1.1.1.5 christos #define UUID_BUFFER_LENGTH 16 /* Length of UUID in memory */
233 1.1.1.5 christos #define UUID_STRING_LENGTH 36 /* Total length of a UUID string */
234 1.1.1.5 christos
235 1.1.1.5 christos /* Positions for required hyphens (dashes) in UUID strings */
236 1.1.1.5 christos
237 1.1.1.5 christos #define UUID_HYPHEN1_OFFSET 8
238 1.1.1.5 christos #define UUID_HYPHEN2_OFFSET 13
239 1.1.1.5 christos #define UUID_HYPHEN3_OFFSET 18
240 1.1.1.5 christos #define UUID_HYPHEN4_OFFSET 23
241 1.1.1.5 christos
242 1.1.1.5 christos
243 1.1.1.5 christos /******************************************************************************
244 1.1.1.5 christos *
245 1.1 jruoho * ACPI AML Debugger
246 1.1 jruoho *
247 1.1 jruoho *****************************************************************************/
248 1.1 jruoho
249 1.1.1.4 christos #define ACPI_DEBUGGER_MAX_ARGS ACPI_METHOD_NUM_ARGS + 4 /* Max command line arguments */
250 1.1.1.3 jruoho #define ACPI_DB_LINE_BUFFER_SIZE 512
251 1.1 jruoho
252 1.1 jruoho #define ACPI_DEBUGGER_COMMAND_PROMPT '-'
253 1.1 jruoho #define ACPI_DEBUGGER_EXECUTE_PROMPT '%'
254 1.1 jruoho
255 1.1 jruoho
256 1.1 jruoho #endif /* _ACCONFIG_H */
257