acconfig.h revision 245582
167754Smsmith/******************************************************************************
267754Smsmith *
367754Smsmith * Name: acconfig.h - Global configuration constants
467754Smsmith *
567754Smsmith *****************************************************************************/
667754Smsmith
7217365Sjkim/*
8245582Sjkim * Copyright (C) 2000 - 2013, 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 */
87117521Snjl#define ACPI_CHECKSUM_ABORT             FALSE
88117521Snjl
89231844Sjkim/*
90231844Sjkim * Generate a version of ACPICA that only supports "reduced hardware"
91231844Sjkim * platforms (as defined in ACPI 5.0). Set to TRUE to generate a specialized
92231844Sjkim * version of ACPICA that ONLY supports the ACPI 5.0 "reduced hardware"
93231844Sjkim * model. In other words, no ACPI hardware is supported.
94231844Sjkim *
95231844Sjkim * If TRUE, this means no support for the following:
96231844Sjkim *      PM Event and Control registers
97231844Sjkim *      SCI interrupt (and handler)
98231844Sjkim *      Fixed Events
99231844Sjkim *      General Purpose Events (GPEs)
100231844Sjkim *      Global Lock
101231844Sjkim *      ACPI PM timer
102231844Sjkim *      FACS table (Waking vectors and Global Lock)
103231844Sjkim */
104231844Sjkim#define ACPI_REDUCED_HARDWARE           FALSE
105117521Snjl
106231844Sjkim
10767754Smsmith/******************************************************************************
10867754Smsmith *
10967754Smsmith * Subsystem Constants
11067754Smsmith *
11167754Smsmith *****************************************************************************/
11267754Smsmith
11385756Smsmith/* Version of ACPI supported */
11467754Smsmith
115231844Sjkim#define ACPI_CA_SUPPORT_LEVEL           5
11685756Smsmith
11767754Smsmith/* Maximum count for a semaphore object */
11867754Smsmith
119114237Snjl#define ACPI_MAX_SEMAPHORE_COUNT        256
12067754Smsmith
121167802Sjkim/* Maximum object reference count (detects object deletion issues) */
12267754Smsmith
123167802Sjkim#define ACPI_MAX_REFERENCE_COUNT        0x800
12467754Smsmith
125199337Sjkim/* Default page size for use in mapping memory for operation regions */
12667754Smsmith
127199337Sjkim#define ACPI_DEFAULT_PAGE_SIZE          4096    /* Must be power of 2 */
12867754Smsmith
129167802Sjkim/* OwnerId tracking. 8 entries allows for 255 OwnerIds */
13067754Smsmith
131167802Sjkim#define ACPI_NUM_OWNERID_MASKS          8
132167802Sjkim
133167802Sjkim/* Size of the root table array is increased by this increment */
134167802Sjkim
135167802Sjkim#define ACPI_ROOT_TABLE_SIZE_INCREMENT  4
136167802Sjkim
137193267Sjkim/* Maximum number of While() loop iterations before forced abort */
138167802Sjkim
139193267Sjkim#define ACPI_MAX_LOOP_ITERATIONS        0xFFFF
140193267Sjkim
141209746Sjkim/* Maximum sleep allowed via Sleep() operator */
142193267Sjkim
143228110Sjkim#define ACPI_MAX_SLEEP                  2000    /* 2000 millisec == two seconds */
144209746Sjkim
145229989Sjkim/* Address Range lists are per-SpaceId (Memory and I/O only) */
146209746Sjkim
147229989Sjkim#define ACPI_ADDRESS_RANGE_MAX          2
148229989Sjkim
149229989Sjkim
15091116Smsmith/******************************************************************************
15191116Smsmith *
15267754Smsmith * ACPI Specification constants (Do not change unless the specification changes)
15367754Smsmith *
15467754Smsmith *****************************************************************************/
15567754Smsmith
156151937Sjkim/* Method info (in WALK_STATE), containing local variables and argumetns */
157151937Sjkim
158114237Snjl#define ACPI_METHOD_NUM_LOCALS          8
159114237Snjl#define ACPI_METHOD_MAX_LOCAL           7
16067754Smsmith
161114237Snjl#define ACPI_METHOD_NUM_ARGS            7
162114237Snjl#define ACPI_METHOD_MAX_ARG             6
16367754Smsmith
16467754Smsmith/*
165114237Snjl * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG
16667754Smsmith */
167114237Snjl#define ACPI_OBJ_NUM_OPERANDS           8
168114237Snjl#define ACPI_OBJ_MAX_OPERAND            7
16967754Smsmith
170167802Sjkim/* Number of elements in the Result Stack frame, can be an arbitrary value */
171167802Sjkim
172167802Sjkim#define ACPI_RESULTS_FRAME_OBJ_NUM      8
173167802Sjkim
174167802Sjkim/*
175167802Sjkim * Maximal number of elements the Result Stack can contain,
176167802Sjkim * it may be an arbitray value not exceeding the types of
177167802Sjkim * ResultSize and ResultCount (now UINT8).
178167802Sjkim */
179167802Sjkim#define ACPI_RESULTS_OBJ_NUM_MAX        255
180167802Sjkim
18167754Smsmith/* Constants used in searching for the RSDP in low memory */
18267754Smsmith
183131440Smarks#define ACPI_EBDA_PTR_LOCATION          0x0000040E     /* Physical Address */
184131440Smarks#define ACPI_EBDA_PTR_LENGTH            2
185131440Smarks#define ACPI_EBDA_WINDOW_SIZE           1024
186131440Smarks#define ACPI_HI_RSDP_WINDOW_BASE        0x000E0000     /* Physical Address */
187131440Smarks#define ACPI_HI_RSDP_WINDOW_SIZE        0x00020000
188114237Snjl#define ACPI_RSDP_SCAN_STEP             16
18967754Smsmith
19087031Smsmith/* Operation regions */
19187031Smsmith
19299679Siwasaki#define ACPI_USER_REGION_BEGIN          0x80
19387031Smsmith
19477424Smsmith/* Maximum SpaceIds for Operation Regions */
19567754Smsmith
19699679Siwasaki#define ACPI_MAX_ADDRESS_SPACE          255
197245582Sjkim#define ACPI_NUM_DEFAULT_SPACES         4
19877424Smsmith
199241973Sjkim/* Array sizes. Used for range checking also */
200100966Siwasaki
201167802Sjkim#define ACPI_MAX_MATCH_OPCODE           5
202100966Siwasaki
20391116Smsmith/* RSDP checksums */
20477424Smsmith
20599679Siwasaki#define ACPI_RSDP_CHECKSUM_LENGTH       20
20699679Siwasaki#define ACPI_RSDP_XCHECKSUM_LENGTH      36
20791116Smsmith
208228110Sjkim/* SMBus, GSBus and IPMI bidirectional buffer size */
20991116Smsmith
210107325Siwasaki#define ACPI_SMBUS_BUFFER_SIZE          34
211228110Sjkim#define ACPI_GSBUS_BUFFER_SIZE          34
212197104Sjkim#define ACPI_IPMI_BUFFER_SIZE           66
213107325Siwasaki
214197104Sjkim/* _SxD and _SxW control methods */
215107325Siwasaki
216197104Sjkim#define ACPI_NUM_SxD_METHODS            4
217197104Sjkim#define ACPI_NUM_SxW_METHODS            5
218197104Sjkim
219197104Sjkim
22091116Smsmith/******************************************************************************
22191116Smsmith *
22291116Smsmith * ACPI AML Debugger
22391116Smsmith *
22491116Smsmith *****************************************************************************/
22591116Smsmith
226222544Sjkim#define ACPI_DEBUGGER_MAX_ARGS          ACPI_METHOD_NUM_ARGS + 2 /* Max command line arguments */
227222544Sjkim#define ACPI_DB_LINE_BUFFER_SIZE        512
22891116Smsmith
22999679Siwasaki#define ACPI_DEBUGGER_COMMAND_PROMPT    '-'
23099679Siwasaki#define ACPI_DEBUGGER_EXECUTE_PROMPT    '%'
23191116Smsmith
23291116Smsmith
23367754Smsmith#endif /* _ACCONFIG_H */
234