acconfig.h revision 107325
1169689Skan/******************************************************************************
2169689Skan *
3132718Skan * Name: acconfig.h - Global configuration constants
4132718Skan *       $Revision: 118 $
5132718Skan *
6132718Skan *****************************************************************************/
7132718Skan
8132718Skan/******************************************************************************
9132718Skan *
10132718Skan * 1. Copyright Notice
11132718Skan *
12132718Skan * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
13132718Skan * All rights reserved.
14132718Skan *
15132718Skan * 2. License
16132718Skan *
17132718Skan * 2.1. This is your license from Intel Corp. under its intellectual property
18132718Skan * rights.  You may have additional license terms from the party that provided
19169689Skan * you this software, covering your right to use that party's intellectual
20169689Skan * property rights.
21132718Skan *
22169689Skan * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
23169689Skan * copy of the source code appearing in this file ("Covered Code") an
24169689Skan * irrevocable, perpetual, worldwide license under Intel's copyrights in the
25169689Skan * base code distributed originally by Intel ("Original Intel Code") to copy,
26169689Skan * make derivatives, distribute, use and display any portion of the Covered
27169689Skan * Code in any form, with the right to sublicense such rights; and
28169689Skan *
29169689Skan * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
30169689Skan * license (with the right to sublicense), under only those claims of Intel
31169689Skan * patents that are infringed by the Original Intel Code, to make, use, sell,
32169689Skan * offer to sell, and import the Covered Code and derivative works thereof
33169689Skan * solely to the minimum extent necessary to exercise the above copyright
34169689Skan * license, and in no event shall the patent license extend to any additions
35169689Skan * to or modifications of the Original Intel Code.  No other license or right
36169689Skan * is granted directly or by implication, estoppel or otherwise;
37169689Skan *
38169689Skan * The above copyright and patent license is granted only if the following
39169689Skan * conditions are met:
40169689Skan *
41169689Skan * 3. Conditions
42169689Skan *
43169689Skan * 3.1. Redistribution of Source with Rights to Further Distribute Source.
44169689Skan * Redistribution of source code of any substantial portion of the Covered
45169689Skan * Code or modification with rights to further distribute source must include
46169689Skan * the above Copyright Notice, the above License, this list of Conditions,
47169689Skan * and the following Disclaimer and Export Compliance provision.  In addition,
48169689Skan * Licensee must cause all Covered Code to which Licensee contributes to
49169689Skan * contain a file documenting the changes Licensee made to create that Covered
50169689Skan * Code and the date of any change.  Licensee must include in that file the
51169689Skan * documentation of any changes made by any predecessor Licensee.  Licensee
52169689Skan * must include a prominent statement that the modification is derived,
53169689Skan * directly or indirectly, from Original Intel Code.
54169689Skan *
55169689Skan * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
56169689Skan * Redistribution of source code of any substantial portion of the Covered
57169689Skan * Code or modification without rights to further distribute source must
58169689Skan * include the following Disclaimer and Export Compliance provision in the
59169689Skan * documentation and/or other materials provided with distribution.  In
60169689Skan * addition, Licensee may not authorize further sublicense of source of any
61169689Skan * portion of the Covered Code, and must include terms to the effect that the
62169689Skan * license from Licensee to its licensee is limited to the intellectual
63169689Skan * property embodied in the software Licensee provides to its licensee, and
64169689Skan * not to intellectual property embodied in modifications its licensee may
65169689Skan * make.
66169689Skan *
67169689Skan * 3.3. Redistribution of Executable. Redistribution in executable form of any
68169689Skan * substantial portion of the Covered Code or modification must reproduce the
69169689Skan * above Copyright Notice, and the following Disclaimer and Export Compliance
70169689Skan * provision in the documentation and/or other materials provided with the
71169689Skan * distribution.
72169689Skan *
73169689Skan * 3.4. Intel retains all right, title, and interest in and to the Original
74169689Skan * Intel Code.
75169689Skan *
76169689Skan * 3.5. Neither the name Intel nor any other trademark owned or controlled by
77169689Skan * Intel shall be used in advertising or otherwise to promote the sale, use or
78169689Skan * other dealings in products derived from or relating to the Covered Code
79169689Skan * without prior written authorization from Intel.
80169689Skan *
81169689Skan * 4. Disclaimer and Export Compliance
82169689Skan *
83169689Skan * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
84169689Skan * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
85169689Skan * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
86169689Skan * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
87169689Skan * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
88169689Skan * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
89169689Skan * PARTICULAR PURPOSE.
90169689Skan *
91169689Skan * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
92169689Skan * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
93169689Skan * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
94169689Skan * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
95169689Skan * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
96169689Skan * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
97169689Skan * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
98169689Skan * LIMITED REMEDY.
99169689Skan *
100169689Skan * 4.3. Licensee shall not export, either directly or indirectly, any of this
101169689Skan * software or system incorporating such software without first obtaining any
102169689Skan * required license or other approval from the U. S. Department of Commerce or
103169689Skan * any other agency or department of the United States Government.  In the
104169689Skan * event Licensee exports any such software from the United States or
105169689Skan * re-exports any such software from a foreign destination, Licensee shall
106169689Skan * ensure that the distribution and export/re-export of the software is in
107169689Skan * compliance with all laws, regulations, orders, or other restrictions of the
108169689Skan * U.S. Export Administration Regulations. Licensee agrees that neither it nor
109169689Skan * any of its subsidiaries will export/re-export any technical data, process,
110169689Skan * software, or service, directly or indirectly, to any country for which the
111169689Skan * United States government or any agency thereof requires an export license,
112169689Skan * other governmental approval, or letter of assurance, without first obtaining
113169689Skan * such license, approval or letter.
114169689Skan *
115169689Skan *****************************************************************************/
116169689Skan
117169689Skan#ifndef _ACCONFIG_H
118169689Skan#define _ACCONFIG_H
119169689Skan
120169689Skan
121169689Skan/******************************************************************************
122169689Skan *
123169689Skan * Compile-time options
124169689Skan *
125169689Skan *****************************************************************************/
126169689Skan
127169689Skan/*
128169689Skan * ACPI_DEBUG_OUTPUT    - This switch enables all the debug facilities of the
129169689Skan *                        ACPI subsystem.  This includes the DEBUG_PRINT output
130169689Skan *                        statements.  When disabled, all DEBUG_PRINT
131169689Skan *                        statements are compiled out.
132169689Skan *
133169689Skan * ACPI_APPLICATION     - Use this switch if the subsystem is going to be run
134169689Skan *                        at the application level.
135169689Skan *
136169689Skan */
137169689Skan
138169689Skan
139169689Skan/******************************************************************************
140169689Skan *
141169689Skan * Subsystem Constants
142132718Skan *
143132718Skan *****************************************************************************/
144132718Skan
145132718Skan
146132718Skan/* Version string */
147169689Skan
148169689Skan#define ACPI_CA_VERSION                 0x20021115
149132718Skan
150132718Skan/* Version of ACPI supported */
151169689Skan
152132718Skan#define ACPI_CA_SUPPORT_LEVEL           2
153132718Skan
154132718Skan/* Maximum objects in the various object caches */
155132718Skan
156132718Skan#define MAX_STATE_CACHE_DEPTH           64          /* State objects for stacks */
157132718Skan#define MAX_PARSE_CACHE_DEPTH           96          /* Parse tree objects */
158132718Skan#define MAX_EXTPARSE_CACHE_DEPTH        64          /* Parse tree objects */
159132718Skan#define MAX_OBJECT_CACHE_DEPTH          64          /* Interpreter operand objects */
160132718Skan#define MAX_WALK_CACHE_DEPTH            4           /* Objects for parse tree walks */
161132718Skan
162132718Skan/* String size constants */
163132718Skan
164132718Skan#define MAX_STRING_LENGTH               512
165169689Skan#define PATHNAME_MAX                    256         /* A full namespace pathname */
166169689Skan
167169689Skan/* Maximum count for a semaphore object */
168169689Skan
169132718Skan#define MAX_SEMAPHORE_COUNT             256
170132718Skan
171132718Skan/* Max reference count (for debug only) */
172132718Skan
173169689Skan#define MAX_REFERENCE_COUNT             0x400
174169689Skan
175169689Skan/* Size of cached memory mapping for system memory operation region */
176132718Skan
177169689Skan#define SYSMEM_REGION_WINDOW_SIZE       4096
178169689Skan
179132718Skan
180169689Skan/******************************************************************************
181132718Skan *
182132718Skan * Configuration of subsystem behavior
183169689Skan *
184169689Skan *****************************************************************************/
185132718Skan
186169689Skan
187169689Skan/*
188132718Skan * Should the subystem abort the loading of an ACPI table if the
189132718Skan * table checksum is incorrect?
190132718Skan */
191132718Skan#define ACPI_CHECKSUM_ABORT             FALSE
192132718Skan
193132718Skan
194132718Skan/******************************************************************************
195132718Skan *
196169689Skan * ACPI Specification constants (Do not change unless the specification changes)
197169689Skan *
198169689Skan *****************************************************************************/
199169689Skan
200169689Skan/* Number of distinct GPE register blocks */
201169689Skan
202169689Skan#define ACPI_MAX_GPE_BLOCKS             2
203169689Skan
204169689Skan/*
205169689Skan * Method info (in WALK_STATE), containing local variables and argumetns
206169689Skan */
207169689Skan#define MTH_NUM_LOCALS                  8
208169689Skan#define MTH_MAX_LOCAL                   7
209169689Skan
210169689Skan#define MTH_NUM_ARGS                    7
211169689Skan#define MTH_MAX_ARG                     6
212169689Skan
213169689Skan/* Maximum length of resulting string when converting from a buffer */
214169689Skan
215169689Skan#define ACPI_MAX_STRING_CONVERSION      200
216169689Skan
217169689Skan/*
218132718Skan * Operand Stack (in WALK_STATE), Must be large enough to contain MTH_MAX_ARG
219132718Skan */
220132718Skan#define OBJ_NUM_OPERANDS                8
221132718Skan#define OBJ_MAX_OPERAND                 7
222132718Skan
223132718Skan/* Names within the namespace are 4 bytes long */
224132718Skan
225169689Skan#define ACPI_NAME_SIZE                  4
226169689Skan#define PATH_SEGMENT_LENGTH             5           /* 4 chars for name + 1 char for separator */
227169689Skan#define PATH_SEPARATOR                  '.'
228169689Skan
229169689Skan/* Constants used in searching for the RSDP in low memory */
230169689Skan
231169689Skan#define LO_RSDP_WINDOW_BASE             0           /* Physical Address */
232169689Skan#define HI_RSDP_WINDOW_BASE             0xE0000     /* Physical Address */
233169689Skan#define LO_RSDP_WINDOW_SIZE             0x400
234169689Skan#define HI_RSDP_WINDOW_SIZE             0x20000
235169689Skan#define RSDP_SCAN_STEP                  16
236169689Skan
237169689Skan/* Operation regions */
238132718Skan
239132718Skan#define ACPI_NUM_PREDEFINED_REGIONS     8
240132718Skan#define ACPI_USER_REGION_BEGIN          0x80
241132718Skan
242132718Skan/* Maximum SpaceIds for Operation Regions */
243132718Skan
244132718Skan#define ACPI_MAX_ADDRESS_SPACE          255
245132718Skan
246132718Skan/* Array sizes.  Used for range checking also */
247132718Skan
248132718Skan#define NUM_ACCESS_TYPES                6
249132718Skan#define NUM_UPDATE_RULES                3
250132718Skan#define NUM_LOCK_RULES                  2
251132718Skan#define NUM_MATCH_OPS                   6
252132718Skan#define NUM_OPCODES                     256
253132718Skan#define NUM_FIELD_NAMES                 2
254169689Skan
255169689Skan/* RSDP checksums */
256169689Skan
257169689Skan#define ACPI_RSDP_CHECKSUM_LENGTH       20
258169689Skan#define ACPI_RSDP_XCHECKSUM_LENGTH      36
259169689Skan
260132718Skan/* SMBus bidirectional buffer size */
261132718Skan
262132718Skan#define ACPI_SMBUS_BUFFER_SIZE          34
263132718Skan
264132718Skan
265132718Skan/******************************************************************************
266132718Skan *
267169689Skan * ACPI AML Debugger
268169689Skan *
269132718Skan *****************************************************************************/
270132718Skan
271132718Skan
272132718Skan#define ACPI_DEBUGGER_MAX_ARGS          8  /* Must be max method args + 1 */
273132718Skan
274169689Skan#define ACPI_DEBUGGER_COMMAND_PROMPT    '-'
275169689Skan#define ACPI_DEBUGGER_EXECUTE_PROMPT    '%'
276169689Skan
277169689Skan
278169689Skan#endif /* _ACCONFIG_H */
279169689Skan
280169689Skan