acconfig.h revision 217365
167754Smsmith/******************************************************************************
267754Smsmith *
367754Smsmith * Name: acconfig.h - Global configuration constants
467754Smsmith *
567754Smsmith *****************************************************************************/
667754Smsmith
7217365Sjkim/*
8217365Sjkim * Copyright (C) 2000 - 2011, Intel Corp.
970243Smsmith * All rights reserved.
1067754Smsmith *
11217365Sjkim * Redistribution and use in source and binary forms, with or without
12217365Sjkim * modification, are permitted provided that the following conditions
13217365Sjkim * are met:
14217365Sjkim * 1. Redistributions of source code must retain the above copyright
15217365Sjkim *    notice, this list of conditions, and the following disclaimer,
16217365Sjkim *    without modification.
17217365Sjkim * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18217365Sjkim *    substantially similar to the "NO WARRANTY" disclaimer below
19217365Sjkim *    ("Disclaimer") and any redistribution must be conditioned upon
20217365Sjkim *    including a substantially similar Disclaimer requirement for further
21217365Sjkim *    binary redistribution.
22217365Sjkim * 3. Neither the names of the above-listed copyright holders nor the names
23217365Sjkim *    of any contributors may be used to endorse or promote products derived
24217365Sjkim *    from this software without specific prior written permission.
2567754Smsmith *
26217365Sjkim * Alternatively, this software may be distributed under the terms of the
27217365Sjkim * GNU General Public License ("GPL") version 2 as published by the Free
28217365Sjkim * Software Foundation.
2967754Smsmith *
30217365Sjkim * NO WARRANTY
31217365Sjkim * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32217365Sjkim * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33217365Sjkim * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34217365Sjkim * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35217365Sjkim * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36217365Sjkim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37217365Sjkim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38217365Sjkim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39217365Sjkim * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40217365Sjkim * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41217365Sjkim * POSSIBILITY OF SUCH DAMAGES.
42217365Sjkim */
4367754Smsmith
4467754Smsmith#ifndef _ACCONFIG_H
4567754Smsmith#define _ACCONFIG_H
4667754Smsmith
4767754Smsmith
4867754Smsmith/******************************************************************************
4967754Smsmith *
50117521Snjl * Configuration options
5167754Smsmith *
5267754Smsmith *****************************************************************************/
5367754Smsmith
5467754Smsmith/*
55102550Siwasaki * ACPI_DEBUG_OUTPUT    - This switch enables all the debug facilities of the
5691116Smsmith *                        ACPI subsystem.  This includes the DEBUG_PRINT output
5791116Smsmith *                        statements.  When disabled, all DEBUG_PRINT
5887031Smsmith *                        statements are compiled out.
5967754Smsmith *
6067754Smsmith * ACPI_APPLICATION     - Use this switch if the subsystem is going to be run
6187031Smsmith *                        at the application level.
6267754Smsmith *
6367754Smsmith */
6467754Smsmith
65129684Snjl/*
66129684Snjl * OS name, used for the _OS object.  The _OS object is essentially obsolete,
67129684Snjl * but there is a large base of ASL/AML code in existing machines that check
68138287Smarks * for the string below.  The use of this string usually guarantees that
69129684Snjl * the ASL will execute down the most tested code path.  Also, there is some
70129684Snjl * code that will not execute the _OSI method unless _OS matches the string
71129684Snjl * below.  Therefore, change this string at your own risk.
72129684Snjl */
73129684Snjl#define ACPI_OS_NAME                    "Microsoft Windows NT"
74129684Snjl
75117521Snjl/* Maximum objects in the various object caches */
76117521Snjl
77151937Sjkim#define ACPI_MAX_STATE_CACHE_DEPTH      96          /* State objects */
78117521Snjl#define ACPI_MAX_PARSE_CACHE_DEPTH      96          /* Parse tree objects */
79151937Sjkim#define ACPI_MAX_EXTPARSE_CACHE_DEPTH   96          /* Parse tree objects */
80151937Sjkim#define ACPI_MAX_OBJECT_CACHE_DEPTH     96          /* Interpreter operand objects */
81167802Sjkim#define ACPI_MAX_NAMESPACE_CACHE_DEPTH  96          /* Namespace objects */
82117521Snjl
83117521Snjl/*
84167802Sjkim * Should the subsystem abort the loading of an ACPI table if the
85117521Snjl * table checksum is incorrect?
86117521Snjl */
87117521Snjl#define ACPI_CHECKSUM_ABORT             FALSE
88117521Snjl
89117521Snjl
9067754Smsmith/******************************************************************************
9167754Smsmith *
9267754Smsmith * Subsystem Constants
9367754Smsmith *
9467754Smsmith *****************************************************************************/
9567754Smsmith
9685756Smsmith/* Version of ACPI supported */
9767754Smsmith
98151937Sjkim#define ACPI_CA_SUPPORT_LEVEL           3
9985756Smsmith
10067754Smsmith/* Maximum count for a semaphore object */
10167754Smsmith
102114237Snjl#define ACPI_MAX_SEMAPHORE_COUNT        256
10367754Smsmith
104167802Sjkim/* Maximum object reference count (detects object deletion issues) */
10567754Smsmith
106167802Sjkim#define ACPI_MAX_REFERENCE_COUNT        0x800
10767754Smsmith
108199337Sjkim/* Default page size for use in mapping memory for operation regions */
10967754Smsmith
110199337Sjkim#define ACPI_DEFAULT_PAGE_SIZE          4096    /* Must be power of 2 */
11167754Smsmith
112167802Sjkim/* OwnerId tracking. 8 entries allows for 255 OwnerIds */
11367754Smsmith
114167802Sjkim#define ACPI_NUM_OWNERID_MASKS          8
115167802Sjkim
116167802Sjkim/* Size of the root table array is increased by this increment */
117167802Sjkim
118167802Sjkim#define ACPI_ROOT_TABLE_SIZE_INCREMENT  4
119167802Sjkim
120193267Sjkim/* Maximum number of While() loop iterations before forced abort */
121167802Sjkim
122193267Sjkim#define ACPI_MAX_LOOP_ITERATIONS        0xFFFF
123193267Sjkim
124209746Sjkim/* Maximum sleep allowed via Sleep() operator */
125193267Sjkim
126209746Sjkim#define ACPI_MAX_SLEEP                  20000   /* Two seconds */
127209746Sjkim
128209746Sjkim
12991116Smsmith/******************************************************************************
13091116Smsmith *
13167754Smsmith * ACPI Specification constants (Do not change unless the specification changes)
13267754Smsmith *
13367754Smsmith *****************************************************************************/
13467754Smsmith
135151937Sjkim/* Method info (in WALK_STATE), containing local variables and argumetns */
136151937Sjkim
137114237Snjl#define ACPI_METHOD_NUM_LOCALS          8
138114237Snjl#define ACPI_METHOD_MAX_LOCAL           7
13967754Smsmith
140114237Snjl#define ACPI_METHOD_NUM_ARGS            7
141114237Snjl#define ACPI_METHOD_MAX_ARG             6
14267754Smsmith
14367754Smsmith/*
144114237Snjl * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG
14567754Smsmith */
146114237Snjl#define ACPI_OBJ_NUM_OPERANDS           8
147114237Snjl#define ACPI_OBJ_MAX_OPERAND            7
14867754Smsmith
149167802Sjkim/* Number of elements in the Result Stack frame, can be an arbitrary value */
150167802Sjkim
151167802Sjkim#define ACPI_RESULTS_FRAME_OBJ_NUM      8
152167802Sjkim
153167802Sjkim/*
154167802Sjkim * Maximal number of elements the Result Stack can contain,
155167802Sjkim * it may be an arbitray value not exceeding the types of
156167802Sjkim * ResultSize and ResultCount (now UINT8).
157167802Sjkim */
158167802Sjkim#define ACPI_RESULTS_OBJ_NUM_MAX        255
159167802Sjkim
16067754Smsmith/* Constants used in searching for the RSDP in low memory */
16167754Smsmith
162131440Smarks#define ACPI_EBDA_PTR_LOCATION          0x0000040E     /* Physical Address */
163131440Smarks#define ACPI_EBDA_PTR_LENGTH            2
164131440Smarks#define ACPI_EBDA_WINDOW_SIZE           1024
165131440Smarks#define ACPI_HI_RSDP_WINDOW_BASE        0x000E0000     /* Physical Address */
166131440Smarks#define ACPI_HI_RSDP_WINDOW_SIZE        0x00020000
167114237Snjl#define ACPI_RSDP_SCAN_STEP             16
16867754Smsmith
16987031Smsmith/* Operation regions */
17087031Smsmith
171197104Sjkim#define ACPI_NUM_PREDEFINED_REGIONS     9
17299679Siwasaki#define ACPI_USER_REGION_BEGIN          0x80
17387031Smsmith
17477424Smsmith/* Maximum SpaceIds for Operation Regions */
17567754Smsmith
17699679Siwasaki#define ACPI_MAX_ADDRESS_SPACE          255
17777424Smsmith
178100966Siwasaki/* Array sizes.  Used for range checking also */
179100966Siwasaki
180167802Sjkim#define ACPI_MAX_MATCH_OPCODE           5
181100966Siwasaki
18291116Smsmith/* RSDP checksums */
18377424Smsmith
18499679Siwasaki#define ACPI_RSDP_CHECKSUM_LENGTH       20
18599679Siwasaki#define ACPI_RSDP_XCHECKSUM_LENGTH      36
18691116Smsmith
187197104Sjkim/* SMBus and IPMI bidirectional buffer size */
18891116Smsmith
189107325Siwasaki#define ACPI_SMBUS_BUFFER_SIZE          34
190197104Sjkim#define ACPI_IPMI_BUFFER_SIZE           66
191107325Siwasaki
192197104Sjkim/* _SxD and _SxW control methods */
193107325Siwasaki
194197104Sjkim#define ACPI_NUM_SxD_METHODS            4
195197104Sjkim#define ACPI_NUM_SxW_METHODS            5
196197104Sjkim
197197104Sjkim
19891116Smsmith/******************************************************************************
19991116Smsmith *
20091116Smsmith * ACPI AML Debugger
20191116Smsmith *
20291116Smsmith *****************************************************************************/
20391116Smsmith
20499679Siwasaki#define ACPI_DEBUGGER_MAX_ARGS          8  /* Must be max method args + 1 */
20591116Smsmith
20699679Siwasaki#define ACPI_DEBUGGER_COMMAND_PROMPT    '-'
20799679Siwasaki#define ACPI_DEBUGGER_EXECUTE_PROMPT    '%'
20891116Smsmith
20991116Smsmith
21067754Smsmith#endif /* _ACCONFIG_H */
21167754Smsmith
212