acconfig.h revision 272444
167754Smsmith/******************************************************************************
267754Smsmith *
367754Smsmith * Name: acconfig.h - Global configuration constants
467754Smsmith *
567754Smsmith *****************************************************************************/
667754Smsmith
7217365Sjkim/*
8272444Sjkim * Copyright (C) 2000 - 2014, 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
56241973Sjkim *                        ACPI subsystem. This includes the DEBUG_PRINT output
57241973Sjkim *                        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/*
66241973Sjkim * 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
68241973Sjkim * for the string below. The use of this string usually guarantees that
69241973Sjkim * 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
71241973Sjkim * 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 */
87272444Sjkim#ifndef ACPI_CHECKSUM_ABORT
88117521Snjl#define ACPI_CHECKSUM_ABORT             FALSE
89272444Sjkim#endif
90117521Snjl
91231844Sjkim/*
92231844Sjkim * Generate a version of ACPICA that only supports "reduced hardware"
93231844Sjkim * platforms (as defined in ACPI 5.0). Set to TRUE to generate a specialized
94231844Sjkim * version of ACPICA that ONLY supports the ACPI 5.0 "reduced hardware"
95231844Sjkim * model. In other words, no ACPI hardware is supported.
96231844Sjkim *
97231844Sjkim * If TRUE, this means no support for the following:
98231844Sjkim *      PM Event and Control registers
99231844Sjkim *      SCI interrupt (and handler)
100231844Sjkim *      Fixed Events
101231844Sjkim *      General Purpose Events (GPEs)
102231844Sjkim *      Global Lock
103231844Sjkim *      ACPI PM timer
104231844Sjkim *      FACS table (Waking vectors and Global Lock)
105231844Sjkim */
106272444Sjkim#ifndef ACPI_REDUCED_HARDWARE
107231844Sjkim#define ACPI_REDUCED_HARDWARE           FALSE
108272444Sjkim#endif
109117521Snjl
110231844Sjkim
11167754Smsmith/******************************************************************************
11267754Smsmith *
11367754Smsmith * Subsystem Constants
11467754Smsmith *
11567754Smsmith *****************************************************************************/
11667754Smsmith
11785756Smsmith/* Version of ACPI supported */
11867754Smsmith
119231844Sjkim#define ACPI_CA_SUPPORT_LEVEL           5
12085756Smsmith
12167754Smsmith/* Maximum count for a semaphore object */
12267754Smsmith
123114237Snjl#define ACPI_MAX_SEMAPHORE_COUNT        256
12467754Smsmith
125167802Sjkim/* Maximum object reference count (detects object deletion issues) */
12667754Smsmith
127167802Sjkim#define ACPI_MAX_REFERENCE_COUNT        0x800
12867754Smsmith
129199337Sjkim/* Default page size for use in mapping memory for operation regions */
13067754Smsmith
131199337Sjkim#define ACPI_DEFAULT_PAGE_SIZE          4096    /* Must be power of 2 */
13267754Smsmith
133167802Sjkim/* OwnerId tracking. 8 entries allows for 255 OwnerIds */
13467754Smsmith
135167802Sjkim#define ACPI_NUM_OWNERID_MASKS          8
136167802Sjkim
137167802Sjkim/* Size of the root table array is increased by this increment */
138167802Sjkim
139167802Sjkim#define ACPI_ROOT_TABLE_SIZE_INCREMENT  4
140167802Sjkim
141193267Sjkim/* Maximum number of While() loop iterations before forced abort */
142167802Sjkim
143193267Sjkim#define ACPI_MAX_LOOP_ITERATIONS        0xFFFF
144193267Sjkim
145209746Sjkim/* Maximum sleep allowed via Sleep() operator */
146193267Sjkim
147228110Sjkim#define ACPI_MAX_SLEEP                  2000    /* 2000 millisec == two seconds */
148209746Sjkim
149229989Sjkim/* Address Range lists are per-SpaceId (Memory and I/O only) */
150209746Sjkim
151229989Sjkim#define ACPI_ADDRESS_RANGE_MAX          2
152229989Sjkim
153229989Sjkim
15491116Smsmith/******************************************************************************
15591116Smsmith *
15667754Smsmith * ACPI Specification constants (Do not change unless the specification changes)
15767754Smsmith *
15867754Smsmith *****************************************************************************/
15967754Smsmith
160151937Sjkim/* Method info (in WALK_STATE), containing local variables and argumetns */
161151937Sjkim
162114237Snjl#define ACPI_METHOD_NUM_LOCALS          8
163114237Snjl#define ACPI_METHOD_MAX_LOCAL           7
16467754Smsmith
165114237Snjl#define ACPI_METHOD_NUM_ARGS            7
166114237Snjl#define ACPI_METHOD_MAX_ARG             6
16767754Smsmith
16867754Smsmith/*
169114237Snjl * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG
17067754Smsmith */
171114237Snjl#define ACPI_OBJ_NUM_OPERANDS           8
172114237Snjl#define ACPI_OBJ_MAX_OPERAND            7
17367754Smsmith
174167802Sjkim/* Number of elements in the Result Stack frame, can be an arbitrary value */
175167802Sjkim
176167802Sjkim#define ACPI_RESULTS_FRAME_OBJ_NUM      8
177167802Sjkim
178167802Sjkim/*
179167802Sjkim * Maximal number of elements the Result Stack can contain,
180167802Sjkim * it may be an arbitray value not exceeding the types of
181167802Sjkim * ResultSize and ResultCount (now UINT8).
182167802Sjkim */
183167802Sjkim#define ACPI_RESULTS_OBJ_NUM_MAX        255
184167802Sjkim
18567754Smsmith/* Constants used in searching for the RSDP in low memory */
18667754Smsmith
187131440Smarks#define ACPI_EBDA_PTR_LOCATION          0x0000040E     /* Physical Address */
188131440Smarks#define ACPI_EBDA_PTR_LENGTH            2
189131440Smarks#define ACPI_EBDA_WINDOW_SIZE           1024
190131440Smarks#define ACPI_HI_RSDP_WINDOW_BASE        0x000E0000     /* Physical Address */
191131440Smarks#define ACPI_HI_RSDP_WINDOW_SIZE        0x00020000
192114237Snjl#define ACPI_RSDP_SCAN_STEP             16
19367754Smsmith
19487031Smsmith/* Operation regions */
19587031Smsmith
19699679Siwasaki#define ACPI_USER_REGION_BEGIN          0x80
19787031Smsmith
19877424Smsmith/* Maximum SpaceIds for Operation Regions */
19967754Smsmith
20099679Siwasaki#define ACPI_MAX_ADDRESS_SPACE          255
201245582Sjkim#define ACPI_NUM_DEFAULT_SPACES         4
20277424Smsmith
203241973Sjkim/* Array sizes. Used for range checking also */
204100966Siwasaki
205167802Sjkim#define ACPI_MAX_MATCH_OPCODE           5
206100966Siwasaki
20791116Smsmith/* RSDP checksums */
20877424Smsmith
20999679Siwasaki#define ACPI_RSDP_CHECKSUM_LENGTH       20
21099679Siwasaki#define ACPI_RSDP_XCHECKSUM_LENGTH      36
21191116Smsmith
212228110Sjkim/* SMBus, GSBus and IPMI bidirectional buffer size */
21391116Smsmith
214107325Siwasaki#define ACPI_SMBUS_BUFFER_SIZE          34
215228110Sjkim#define ACPI_GSBUS_BUFFER_SIZE          34
216197104Sjkim#define ACPI_IPMI_BUFFER_SIZE           66
217107325Siwasaki
218197104Sjkim/* _SxD and _SxW control methods */
219107325Siwasaki
220197104Sjkim#define ACPI_NUM_SxD_METHODS            4
221197104Sjkim#define ACPI_NUM_SxW_METHODS            5
222197104Sjkim
223197104Sjkim
22491116Smsmith/******************************************************************************
22591116Smsmith *
226272444Sjkim * Miscellaneous constants
227272444Sjkim *
228272444Sjkim *****************************************************************************/
229272444Sjkim
230272444Sjkim/* UUID constants */
231272444Sjkim
232272444Sjkim#define UUID_BUFFER_LENGTH          16 /* Length of UUID in memory */
233272444Sjkim#define UUID_STRING_LENGTH          36 /* Total length of a UUID string */
234272444Sjkim
235272444Sjkim/* Positions for required hyphens (dashes) in UUID strings */
236272444Sjkim
237272444Sjkim#define UUID_HYPHEN1_OFFSET         8
238272444Sjkim#define UUID_HYPHEN2_OFFSET         13
239272444Sjkim#define UUID_HYPHEN3_OFFSET         18
240272444Sjkim#define UUID_HYPHEN4_OFFSET         23
241272444Sjkim
242272444Sjkim
243272444Sjkim/******************************************************************************
244272444Sjkim *
24591116Smsmith * ACPI AML Debugger
24691116Smsmith *
24791116Smsmith *****************************************************************************/
24891116Smsmith
249249663Sjkim#define ACPI_DEBUGGER_MAX_ARGS          ACPI_METHOD_NUM_ARGS + 4 /* Max command line arguments */
250222544Sjkim#define ACPI_DB_LINE_BUFFER_SIZE        512
25191116Smsmith
25299679Siwasaki#define ACPI_DEBUGGER_COMMAND_PROMPT    '-'
25399679Siwasaki#define ACPI_DEBUGGER_EXECUTE_PROMPT    '%'
25491116Smsmith
25591116Smsmith
25667754Smsmith#endif /* _ACCONFIG_H */
257