acconfig.h revision 209746
167754Smsmith/******************************************************************************
267754Smsmith *
367754Smsmith * Name: acconfig.h - Global configuration constants
467754Smsmith *
567754Smsmith *****************************************************************************/
667754Smsmith
767754Smsmith/******************************************************************************
867754Smsmith *
967754Smsmith * 1. Copyright Notice
1067754Smsmith *
11202771Sjkim * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp.
1270243Smsmith * All rights reserved.
1367754Smsmith *
1467754Smsmith * 2. License
1567754Smsmith *
1667754Smsmith * 2.1. This is your license from Intel Corp. under its intellectual property
1767754Smsmith * rights.  You may have additional license terms from the party that provided
1867754Smsmith * you this software, covering your right to use that party's intellectual
1967754Smsmith * property rights.
2067754Smsmith *
2167754Smsmith * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
2267754Smsmith * copy of the source code appearing in this file ("Covered Code") an
2367754Smsmith * irrevocable, perpetual, worldwide license under Intel's copyrights in the
2467754Smsmith * base code distributed originally by Intel ("Original Intel Code") to copy,
2567754Smsmith * make derivatives, distribute, use and display any portion of the Covered
2667754Smsmith * Code in any form, with the right to sublicense such rights; and
2767754Smsmith *
2867754Smsmith * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
2967754Smsmith * license (with the right to sublicense), under only those claims of Intel
3067754Smsmith * patents that are infringed by the Original Intel Code, to make, use, sell,
3167754Smsmith * offer to sell, and import the Covered Code and derivative works thereof
3267754Smsmith * solely to the minimum extent necessary to exercise the above copyright
3367754Smsmith * license, and in no event shall the patent license extend to any additions
3467754Smsmith * to or modifications of the Original Intel Code.  No other license or right
3567754Smsmith * is granted directly or by implication, estoppel or otherwise;
3667754Smsmith *
3767754Smsmith * The above copyright and patent license is granted only if the following
3867754Smsmith * conditions are met:
3967754Smsmith *
4067754Smsmith * 3. Conditions
4167754Smsmith *
4267754Smsmith * 3.1. Redistribution of Source with Rights to Further Distribute Source.
4367754Smsmith * Redistribution of source code of any substantial portion of the Covered
4467754Smsmith * Code or modification with rights to further distribute source must include
4567754Smsmith * the above Copyright Notice, the above License, this list of Conditions,
4667754Smsmith * and the following Disclaimer and Export Compliance provision.  In addition,
4767754Smsmith * Licensee must cause all Covered Code to which Licensee contributes to
4867754Smsmith * contain a file documenting the changes Licensee made to create that Covered
4967754Smsmith * Code and the date of any change.  Licensee must include in that file the
5067754Smsmith * documentation of any changes made by any predecessor Licensee.  Licensee
5167754Smsmith * must include a prominent statement that the modification is derived,
5267754Smsmith * directly or indirectly, from Original Intel Code.
5367754Smsmith *
5467754Smsmith * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
5567754Smsmith * Redistribution of source code of any substantial portion of the Covered
5667754Smsmith * Code or modification without rights to further distribute source must
5767754Smsmith * include the following Disclaimer and Export Compliance provision in the
5867754Smsmith * documentation and/or other materials provided with distribution.  In
5967754Smsmith * addition, Licensee may not authorize further sublicense of source of any
6067754Smsmith * portion of the Covered Code, and must include terms to the effect that the
6167754Smsmith * license from Licensee to its licensee is limited to the intellectual
6267754Smsmith * property embodied in the software Licensee provides to its licensee, and
6367754Smsmith * not to intellectual property embodied in modifications its licensee may
6467754Smsmith * make.
6567754Smsmith *
6667754Smsmith * 3.3. Redistribution of Executable. Redistribution in executable form of any
6767754Smsmith * substantial portion of the Covered Code or modification must reproduce the
6867754Smsmith * above Copyright Notice, and the following Disclaimer and Export Compliance
6967754Smsmith * provision in the documentation and/or other materials provided with the
7067754Smsmith * distribution.
7167754Smsmith *
7267754Smsmith * 3.4. Intel retains all right, title, and interest in and to the Original
7367754Smsmith * Intel Code.
7467754Smsmith *
7567754Smsmith * 3.5. Neither the name Intel nor any other trademark owned or controlled by
7667754Smsmith * Intel shall be used in advertising or otherwise to promote the sale, use or
7767754Smsmith * other dealings in products derived from or relating to the Covered Code
7867754Smsmith * without prior written authorization from Intel.
7967754Smsmith *
8067754Smsmith * 4. Disclaimer and Export Compliance
8167754Smsmith *
8267754Smsmith * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
8367754Smsmith * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
8467754Smsmith * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
8567754Smsmith * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
8667754Smsmith * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
8767754Smsmith * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
8867754Smsmith * PARTICULAR PURPOSE.
8967754Smsmith *
9067754Smsmith * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
9167754Smsmith * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
9267754Smsmith * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
9367754Smsmith * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
9467754Smsmith * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
9567754Smsmith * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
9667754Smsmith * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
9767754Smsmith * LIMITED REMEDY.
9867754Smsmith *
9967754Smsmith * 4.3. Licensee shall not export, either directly or indirectly, any of this
10067754Smsmith * software or system incorporating such software without first obtaining any
10167754Smsmith * required license or other approval from the U. S. Department of Commerce or
10267754Smsmith * any other agency or department of the United States Government.  In the
10367754Smsmith * event Licensee exports any such software from the United States or
10467754Smsmith * re-exports any such software from a foreign destination, Licensee shall
10567754Smsmith * ensure that the distribution and export/re-export of the software is in
10667754Smsmith * compliance with all laws, regulations, orders, or other restrictions of the
10767754Smsmith * U.S. Export Administration Regulations. Licensee agrees that neither it nor
10867754Smsmith * any of its subsidiaries will export/re-export any technical data, process,
10967754Smsmith * software, or service, directly or indirectly, to any country for which the
11067754Smsmith * United States government or any agency thereof requires an export license,
11167754Smsmith * other governmental approval, or letter of assurance, without first obtaining
11267754Smsmith * such license, approval or letter.
11367754Smsmith *
11467754Smsmith *****************************************************************************/
11567754Smsmith
11667754Smsmith#ifndef _ACCONFIG_H
11767754Smsmith#define _ACCONFIG_H
11867754Smsmith
11967754Smsmith
12067754Smsmith/******************************************************************************
12167754Smsmith *
122117521Snjl * Configuration options
12367754Smsmith *
12467754Smsmith *****************************************************************************/
12567754Smsmith
12667754Smsmith/*
127102550Siwasaki * ACPI_DEBUG_OUTPUT    - This switch enables all the debug facilities of the
12891116Smsmith *                        ACPI subsystem.  This includes the DEBUG_PRINT output
12991116Smsmith *                        statements.  When disabled, all DEBUG_PRINT
13087031Smsmith *                        statements are compiled out.
13167754Smsmith *
13267754Smsmith * ACPI_APPLICATION     - Use this switch if the subsystem is going to be run
13387031Smsmith *                        at the application level.
13467754Smsmith *
13567754Smsmith */
13667754Smsmith
137129684Snjl/*
138129684Snjl * OS name, used for the _OS object.  The _OS object is essentially obsolete,
139129684Snjl * but there is a large base of ASL/AML code in existing machines that check
140138287Smarks * for the string below.  The use of this string usually guarantees that
141129684Snjl * the ASL will execute down the most tested code path.  Also, there is some
142129684Snjl * code that will not execute the _OSI method unless _OS matches the string
143129684Snjl * below.  Therefore, change this string at your own risk.
144129684Snjl */
145129684Snjl#define ACPI_OS_NAME                    "Microsoft Windows NT"
146129684Snjl
147117521Snjl/* Maximum objects in the various object caches */
148117521Snjl
149151937Sjkim#define ACPI_MAX_STATE_CACHE_DEPTH      96          /* State objects */
150117521Snjl#define ACPI_MAX_PARSE_CACHE_DEPTH      96          /* Parse tree objects */
151151937Sjkim#define ACPI_MAX_EXTPARSE_CACHE_DEPTH   96          /* Parse tree objects */
152151937Sjkim#define ACPI_MAX_OBJECT_CACHE_DEPTH     96          /* Interpreter operand objects */
153167802Sjkim#define ACPI_MAX_NAMESPACE_CACHE_DEPTH  96          /* Namespace objects */
154117521Snjl
155117521Snjl/*
156167802Sjkim * Should the subsystem abort the loading of an ACPI table if the
157117521Snjl * table checksum is incorrect?
158117521Snjl */
159117521Snjl#define ACPI_CHECKSUM_ABORT             FALSE
160117521Snjl
161117521Snjl
16267754Smsmith/******************************************************************************
16367754Smsmith *
16467754Smsmith * Subsystem Constants
16567754Smsmith *
16667754Smsmith *****************************************************************************/
16767754Smsmith
16885756Smsmith/* Version of ACPI supported */
16967754Smsmith
170151937Sjkim#define ACPI_CA_SUPPORT_LEVEL           3
17185756Smsmith
17267754Smsmith/* Maximum count for a semaphore object */
17367754Smsmith
174114237Snjl#define ACPI_MAX_SEMAPHORE_COUNT        256
17567754Smsmith
176167802Sjkim/* Maximum object reference count (detects object deletion issues) */
17767754Smsmith
178167802Sjkim#define ACPI_MAX_REFERENCE_COUNT        0x800
17967754Smsmith
180199337Sjkim/* Default page size for use in mapping memory for operation regions */
18167754Smsmith
182199337Sjkim#define ACPI_DEFAULT_PAGE_SIZE          4096    /* Must be power of 2 */
18367754Smsmith
184167802Sjkim/* OwnerId tracking. 8 entries allows for 255 OwnerIds */
18567754Smsmith
186167802Sjkim#define ACPI_NUM_OWNERID_MASKS          8
187167802Sjkim
188167802Sjkim/* Size of the root table array is increased by this increment */
189167802Sjkim
190167802Sjkim#define ACPI_ROOT_TABLE_SIZE_INCREMENT  4
191167802Sjkim
192193267Sjkim/* Maximum number of While() loop iterations before forced abort */
193167802Sjkim
194193267Sjkim#define ACPI_MAX_LOOP_ITERATIONS        0xFFFF
195193267Sjkim
196209746Sjkim/* Maximum sleep allowed via Sleep() operator */
197193267Sjkim
198209746Sjkim#define ACPI_MAX_SLEEP                  20000   /* Two seconds */
199209746Sjkim
200209746Sjkim
20191116Smsmith/******************************************************************************
20291116Smsmith *
20367754Smsmith * ACPI Specification constants (Do not change unless the specification changes)
20467754Smsmith *
20567754Smsmith *****************************************************************************/
20667754Smsmith
207151937Sjkim/* Method info (in WALK_STATE), containing local variables and argumetns */
208151937Sjkim
209114237Snjl#define ACPI_METHOD_NUM_LOCALS          8
210114237Snjl#define ACPI_METHOD_MAX_LOCAL           7
21167754Smsmith
212114237Snjl#define ACPI_METHOD_NUM_ARGS            7
213114237Snjl#define ACPI_METHOD_MAX_ARG             6
21467754Smsmith
21567754Smsmith/*
216114237Snjl * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG
21767754Smsmith */
218114237Snjl#define ACPI_OBJ_NUM_OPERANDS           8
219114237Snjl#define ACPI_OBJ_MAX_OPERAND            7
22067754Smsmith
221167802Sjkim/* Number of elements in the Result Stack frame, can be an arbitrary value */
222167802Sjkim
223167802Sjkim#define ACPI_RESULTS_FRAME_OBJ_NUM      8
224167802Sjkim
225167802Sjkim/*
226167802Sjkim * Maximal number of elements the Result Stack can contain,
227167802Sjkim * it may be an arbitray value not exceeding the types of
228167802Sjkim * ResultSize and ResultCount (now UINT8).
229167802Sjkim */
230167802Sjkim#define ACPI_RESULTS_OBJ_NUM_MAX        255
231167802Sjkim
23267754Smsmith/* Constants used in searching for the RSDP in low memory */
23367754Smsmith
234131440Smarks#define ACPI_EBDA_PTR_LOCATION          0x0000040E     /* Physical Address */
235131440Smarks#define ACPI_EBDA_PTR_LENGTH            2
236131440Smarks#define ACPI_EBDA_WINDOW_SIZE           1024
237131440Smarks#define ACPI_HI_RSDP_WINDOW_BASE        0x000E0000     /* Physical Address */
238131440Smarks#define ACPI_HI_RSDP_WINDOW_SIZE        0x00020000
239114237Snjl#define ACPI_RSDP_SCAN_STEP             16
24067754Smsmith
24187031Smsmith/* Operation regions */
24287031Smsmith
243197104Sjkim#define ACPI_NUM_PREDEFINED_REGIONS     9
24499679Siwasaki#define ACPI_USER_REGION_BEGIN          0x80
24587031Smsmith
24677424Smsmith/* Maximum SpaceIds for Operation Regions */
24767754Smsmith
24899679Siwasaki#define ACPI_MAX_ADDRESS_SPACE          255
24977424Smsmith
250100966Siwasaki/* Array sizes.  Used for range checking also */
251100966Siwasaki
252167802Sjkim#define ACPI_MAX_MATCH_OPCODE           5
253100966Siwasaki
25491116Smsmith/* RSDP checksums */
25577424Smsmith
25699679Siwasaki#define ACPI_RSDP_CHECKSUM_LENGTH       20
25799679Siwasaki#define ACPI_RSDP_XCHECKSUM_LENGTH      36
25891116Smsmith
259197104Sjkim/* SMBus and IPMI bidirectional buffer size */
26091116Smsmith
261107325Siwasaki#define ACPI_SMBUS_BUFFER_SIZE          34
262197104Sjkim#define ACPI_IPMI_BUFFER_SIZE           66
263107325Siwasaki
264197104Sjkim/* _SxD and _SxW control methods */
265107325Siwasaki
266197104Sjkim#define ACPI_NUM_SxD_METHODS            4
267197104Sjkim#define ACPI_NUM_SxW_METHODS            5
268197104Sjkim
269197104Sjkim
27091116Smsmith/******************************************************************************
27191116Smsmith *
27291116Smsmith * ACPI AML Debugger
27391116Smsmith *
27491116Smsmith *****************************************************************************/
27591116Smsmith
27699679Siwasaki#define ACPI_DEBUGGER_MAX_ARGS          8  /* Must be max method args + 1 */
27791116Smsmith
27899679Siwasaki#define ACPI_DEBUGGER_COMMAND_PROMPT    '-'
27999679Siwasaki#define ACPI_DEBUGGER_EXECUTE_PROMPT    '%'
28091116Smsmith
28191116Smsmith
28267754Smsmith#endif /* _ACCONFIG_H */
28367754Smsmith
284