167754Smsmith/******************************************************************************
267754Smsmith *
367754Smsmith * Name: acconfig.h - Global configuration constants
467754Smsmith *
567754Smsmith *****************************************************************************/
667754Smsmith
7316303Sjkim/******************************************************************************
8316303Sjkim *
9316303Sjkim * 1. Copyright Notice
10316303Sjkim *
11316303Sjkim * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp.
1270243Smsmith * All rights reserved.
1367754Smsmith *
14316303Sjkim * 2. License
15316303Sjkim *
16316303Sjkim * 2.1. This is your license from Intel Corp. under its intellectual property
17316303Sjkim * rights. You may have additional license terms from the party that provided
18316303Sjkim * you this software, covering your right to use that party's intellectual
19316303Sjkim * property rights.
20316303Sjkim *
21316303Sjkim * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22316303Sjkim * copy of the source code appearing in this file ("Covered Code") an
23316303Sjkim * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24316303Sjkim * base code distributed originally by Intel ("Original Intel Code") to copy,
25316303Sjkim * make derivatives, distribute, use and display any portion of the Covered
26316303Sjkim * Code in any form, with the right to sublicense such rights; and
27316303Sjkim *
28316303Sjkim * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29316303Sjkim * license (with the right to sublicense), under only those claims of Intel
30316303Sjkim * patents that are infringed by the Original Intel Code, to make, use, sell,
31316303Sjkim * offer to sell, and import the Covered Code and derivative works thereof
32316303Sjkim * solely to the minimum extent necessary to exercise the above copyright
33316303Sjkim * license, and in no event shall the patent license extend to any additions
34316303Sjkim * to or modifications of the Original Intel Code. No other license or right
35316303Sjkim * is granted directly or by implication, estoppel or otherwise;
36316303Sjkim *
37316303Sjkim * The above copyright and patent license is granted only if the following
38316303Sjkim * conditions are met:
39316303Sjkim *
40316303Sjkim * 3. Conditions
41316303Sjkim *
42316303Sjkim * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43316303Sjkim * Redistribution of source code of any substantial portion of the Covered
44316303Sjkim * Code or modification with rights to further distribute source must include
45316303Sjkim * the above Copyright Notice, the above License, this list of Conditions,
46316303Sjkim * and the following Disclaimer and Export Compliance provision. In addition,
47316303Sjkim * Licensee must cause all Covered Code to which Licensee contributes to
48316303Sjkim * contain a file documenting the changes Licensee made to create that Covered
49316303Sjkim * Code and the date of any change. Licensee must include in that file the
50316303Sjkim * documentation of any changes made by any predecessor Licensee. Licensee
51316303Sjkim * must include a prominent statement that the modification is derived,
52316303Sjkim * directly or indirectly, from Original Intel Code.
53316303Sjkim *
54316303Sjkim * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55316303Sjkim * Redistribution of source code of any substantial portion of the Covered
56316303Sjkim * Code or modification without rights to further distribute source must
57316303Sjkim * include the following Disclaimer and Export Compliance provision in the
58316303Sjkim * documentation and/or other materials provided with distribution. In
59316303Sjkim * addition, Licensee may not authorize further sublicense of source of any
60316303Sjkim * portion of the Covered Code, and must include terms to the effect that the
61316303Sjkim * license from Licensee to its licensee is limited to the intellectual
62316303Sjkim * property embodied in the software Licensee provides to its licensee, and
63316303Sjkim * not to intellectual property embodied in modifications its licensee may
64316303Sjkim * make.
65316303Sjkim *
66316303Sjkim * 3.3. Redistribution of Executable. Redistribution in executable form of any
67316303Sjkim * substantial portion of the Covered Code or modification must reproduce the
68316303Sjkim * above Copyright Notice, and the following Disclaimer and Export Compliance
69316303Sjkim * provision in the documentation and/or other materials provided with the
70316303Sjkim * distribution.
71316303Sjkim *
72316303Sjkim * 3.4. Intel retains all right, title, and interest in and to the Original
73316303Sjkim * Intel Code.
74316303Sjkim *
75316303Sjkim * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76316303Sjkim * Intel shall be used in advertising or otherwise to promote the sale, use or
77316303Sjkim * other dealings in products derived from or relating to the Covered Code
78316303Sjkim * without prior written authorization from Intel.
79316303Sjkim *
80316303Sjkim * 4. Disclaimer and Export Compliance
81316303Sjkim *
82316303Sjkim * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83316303Sjkim * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84316303Sjkim * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85316303Sjkim * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
86316303Sjkim * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
87316303Sjkim * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
88316303Sjkim * PARTICULAR PURPOSE.
89316303Sjkim *
90316303Sjkim * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91316303Sjkim * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92316303Sjkim * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93316303Sjkim * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94316303Sjkim * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95316303Sjkim * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
96316303Sjkim * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
97316303Sjkim * LIMITED REMEDY.
98316303Sjkim *
99316303Sjkim * 4.3. Licensee shall not export, either directly or indirectly, any of this
100316303Sjkim * software or system incorporating such software without first obtaining any
101316303Sjkim * required license or other approval from the U. S. Department of Commerce or
102316303Sjkim * any other agency or department of the United States Government. In the
103316303Sjkim * event Licensee exports any such software from the United States or
104316303Sjkim * re-exports any such software from a foreign destination, Licensee shall
105316303Sjkim * ensure that the distribution and export/re-export of the software is in
106316303Sjkim * compliance with all laws, regulations, orders, or other restrictions of the
107316303Sjkim * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108316303Sjkim * any of its subsidiaries will export/re-export any technical data, process,
109316303Sjkim * software, or service, directly or indirectly, to any country for which the
110316303Sjkim * United States government or any agency thereof requires an export license,
111316303Sjkim * other governmental approval, or letter of assurance, without first obtaining
112316303Sjkim * such license, approval or letter.
113316303Sjkim *
114316303Sjkim *****************************************************************************
115316303Sjkim *
116316303Sjkim * Alternatively, you may choose to be licensed under the terms of the
117316303Sjkim * following license:
118316303Sjkim *
119217365Sjkim * Redistribution and use in source and binary forms, with or without
120217365Sjkim * modification, are permitted provided that the following conditions
121217365Sjkim * are met:
122217365Sjkim * 1. Redistributions of source code must retain the above copyright
123217365Sjkim *    notice, this list of conditions, and the following disclaimer,
124217365Sjkim *    without modification.
125217365Sjkim * 2. Redistributions in binary form must reproduce at minimum a disclaimer
126217365Sjkim *    substantially similar to the "NO WARRANTY" disclaimer below
127217365Sjkim *    ("Disclaimer") and any redistribution must be conditioned upon
128217365Sjkim *    including a substantially similar Disclaimer requirement for further
129217365Sjkim *    binary redistribution.
130217365Sjkim * 3. Neither the names of the above-listed copyright holders nor the names
131217365Sjkim *    of any contributors may be used to endorse or promote products derived
132217365Sjkim *    from this software without specific prior written permission.
13367754Smsmith *
134316303Sjkim * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
135316303Sjkim * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
136316303Sjkim * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
137316303Sjkim * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
138316303Sjkim * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
139316303Sjkim * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
140316303Sjkim * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
141316303Sjkim * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
142316303Sjkim * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
143316303Sjkim * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
144316303Sjkim * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
145316303Sjkim *
146316303Sjkim * Alternatively, you may choose to be licensed under the terms of the
147217365Sjkim * GNU General Public License ("GPL") version 2 as published by the Free
148217365Sjkim * Software Foundation.
14967754Smsmith *
150316303Sjkim *****************************************************************************/
15167754Smsmith
15267754Smsmith#ifndef _ACCONFIG_H
15367754Smsmith#define _ACCONFIG_H
15467754Smsmith
15567754Smsmith
15667754Smsmith/******************************************************************************
15767754Smsmith *
158117521Snjl * Configuration options
15967754Smsmith *
16067754Smsmith *****************************************************************************/
16167754Smsmith
16267754Smsmith/*
163102550Siwasaki * ACPI_DEBUG_OUTPUT    - This switch enables all the debug facilities of the
164241973Sjkim *                        ACPI subsystem. This includes the DEBUG_PRINT output
165241973Sjkim *                        statements. When disabled, all DEBUG_PRINT
16687031Smsmith *                        statements are compiled out.
16767754Smsmith *
16867754Smsmith * ACPI_APPLICATION     - Use this switch if the subsystem is going to be run
16987031Smsmith *                        at the application level.
17067754Smsmith *
17167754Smsmith */
17267754Smsmith
173129684Snjl/*
174241973Sjkim * OS name, used for the _OS object. The _OS object is essentially obsolete,
175129684Snjl * but there is a large base of ASL/AML code in existing machines that check
176241973Sjkim * for the string below. The use of this string usually guarantees that
177241973Sjkim * the ASL will execute down the most tested code path. Also, there is some
178129684Snjl * code that will not execute the _OSI method unless _OS matches the string
179241973Sjkim * below. Therefore, change this string at your own risk.
180129684Snjl */
181129684Snjl#define ACPI_OS_NAME                    "Microsoft Windows NT"
182129684Snjl
183117521Snjl/* Maximum objects in the various object caches */
184117521Snjl
185151937Sjkim#define ACPI_MAX_STATE_CACHE_DEPTH      96          /* State objects */
186117521Snjl#define ACPI_MAX_PARSE_CACHE_DEPTH      96          /* Parse tree objects */
187151937Sjkim#define ACPI_MAX_EXTPARSE_CACHE_DEPTH   96          /* Parse tree objects */
188151937Sjkim#define ACPI_MAX_OBJECT_CACHE_DEPTH     96          /* Interpreter operand objects */
189167802Sjkim#define ACPI_MAX_NAMESPACE_CACHE_DEPTH  96          /* Namespace objects */
190316303Sjkim#define ACPI_MAX_COMMENT_CACHE_DEPTH    96          /* Comments for the -ca option */
191117521Snjl
192117521Snjl/*
193167802Sjkim * Should the subsystem abort the loading of an ACPI table if the
194117521Snjl * table checksum is incorrect?
195117521Snjl */
196272444Sjkim#ifndef ACPI_CHECKSUM_ABORT
197117521Snjl#define ACPI_CHECKSUM_ABORT             FALSE
198272444Sjkim#endif
199117521Snjl
200231844Sjkim/*
201231844Sjkim * Generate a version of ACPICA that only supports "reduced hardware"
202231844Sjkim * platforms (as defined in ACPI 5.0). Set to TRUE to generate a specialized
203231844Sjkim * version of ACPICA that ONLY supports the ACPI 5.0 "reduced hardware"
204231844Sjkim * model. In other words, no ACPI hardware is supported.
205231844Sjkim *
206231844Sjkim * If TRUE, this means no support for the following:
207231844Sjkim *      PM Event and Control registers
208231844Sjkim *      SCI interrupt (and handler)
209231844Sjkim *      Fixed Events
210231844Sjkim *      General Purpose Events (GPEs)
211231844Sjkim *      Global Lock
212231844Sjkim *      ACPI PM timer
213231844Sjkim *      FACS table (Waking vectors and Global Lock)
214231844Sjkim */
215272444Sjkim#ifndef ACPI_REDUCED_HARDWARE
216231844Sjkim#define ACPI_REDUCED_HARDWARE           FALSE
217272444Sjkim#endif
218117521Snjl
219231844Sjkim
22067754Smsmith/******************************************************************************
22167754Smsmith *
22267754Smsmith * Subsystem Constants
22367754Smsmith *
22467754Smsmith *****************************************************************************/
22567754Smsmith
22685756Smsmith/* Version of ACPI supported */
22767754Smsmith
228231844Sjkim#define ACPI_CA_SUPPORT_LEVEL           5
22985756Smsmith
23067754Smsmith/* Maximum count for a semaphore object */
23167754Smsmith
232114237Snjl#define ACPI_MAX_SEMAPHORE_COUNT        256
23367754Smsmith
234167802Sjkim/* Maximum object reference count (detects object deletion issues) */
23567754Smsmith
236167802Sjkim#define ACPI_MAX_REFERENCE_COUNT        0x800
23767754Smsmith
238199337Sjkim/* Default page size for use in mapping memory for operation regions */
23967754Smsmith
240199337Sjkim#define ACPI_DEFAULT_PAGE_SIZE          4096    /* Must be power of 2 */
24167754Smsmith
242167802Sjkim/* OwnerId tracking. 8 entries allows for 255 OwnerIds */
24367754Smsmith
244167802Sjkim#define ACPI_NUM_OWNERID_MASKS          8
245167802Sjkim
246167802Sjkim/* Size of the root table array is increased by this increment */
247167802Sjkim
248167802Sjkim#define ACPI_ROOT_TABLE_SIZE_INCREMENT  4
249167802Sjkim
250209746Sjkim/* Maximum sleep allowed via Sleep() operator */
251193267Sjkim
252228110Sjkim#define ACPI_MAX_SLEEP                  2000    /* 2000 millisec == two seconds */
253209746Sjkim
254229989Sjkim/* Address Range lists are per-SpaceId (Memory and I/O only) */
255209746Sjkim
256229989Sjkim#define ACPI_ADDRESS_RANGE_MAX          2
257229989Sjkim
258327557Sjkim/* Maximum time (default 30s) of While() loops before abort */
259229989Sjkim
260327557Sjkim#define ACPI_MAX_LOOP_TIMEOUT           30
261316303Sjkim
262316303Sjkim
26391116Smsmith/******************************************************************************
26491116Smsmith *
26567754Smsmith * ACPI Specification constants (Do not change unless the specification changes)
26667754Smsmith *
26767754Smsmith *****************************************************************************/
26867754Smsmith
269151937Sjkim/* Method info (in WALK_STATE), containing local variables and argumetns */
270151937Sjkim
271114237Snjl#define ACPI_METHOD_NUM_LOCALS          8
272114237Snjl#define ACPI_METHOD_MAX_LOCAL           7
27367754Smsmith
274114237Snjl#define ACPI_METHOD_NUM_ARGS            7
275114237Snjl#define ACPI_METHOD_MAX_ARG             6
27667754Smsmith
27767754Smsmith/*
278114237Snjl * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG
27967754Smsmith */
280114237Snjl#define ACPI_OBJ_NUM_OPERANDS           8
281114237Snjl#define ACPI_OBJ_MAX_OPERAND            7
28267754Smsmith
283167802Sjkim/* Number of elements in the Result Stack frame, can be an arbitrary value */
284167802Sjkim
285167802Sjkim#define ACPI_RESULTS_FRAME_OBJ_NUM      8
286167802Sjkim
287167802Sjkim/*
288167802Sjkim * Maximal number of elements the Result Stack can contain,
289167802Sjkim * it may be an arbitray value not exceeding the types of
290167802Sjkim * ResultSize and ResultCount (now UINT8).
291167802Sjkim */
292167802Sjkim#define ACPI_RESULTS_OBJ_NUM_MAX        255
293167802Sjkim
29467754Smsmith/* Constants used in searching for the RSDP in low memory */
29567754Smsmith
296131440Smarks#define ACPI_EBDA_PTR_LOCATION          0x0000040E     /* Physical Address */
297131440Smarks#define ACPI_EBDA_PTR_LENGTH            2
298131440Smarks#define ACPI_EBDA_WINDOW_SIZE           1024
299131440Smarks#define ACPI_HI_RSDP_WINDOW_BASE        0x000E0000     /* Physical Address */
300131440Smarks#define ACPI_HI_RSDP_WINDOW_SIZE        0x00020000
301114237Snjl#define ACPI_RSDP_SCAN_STEP             16
30267754Smsmith
30387031Smsmith/* Operation regions */
30487031Smsmith
30599679Siwasaki#define ACPI_USER_REGION_BEGIN          0x80
30687031Smsmith
30777424Smsmith/* Maximum SpaceIds for Operation Regions */
30867754Smsmith
30999679Siwasaki#define ACPI_MAX_ADDRESS_SPACE          255
310245582Sjkim#define ACPI_NUM_DEFAULT_SPACES         4
31177424Smsmith
312241973Sjkim/* Array sizes. Used for range checking also */
313100966Siwasaki
314167802Sjkim#define ACPI_MAX_MATCH_OPCODE           5
315100966Siwasaki
31691116Smsmith/* RSDP checksums */
31777424Smsmith
31899679Siwasaki#define ACPI_RSDP_CHECKSUM_LENGTH       20
31999679Siwasaki#define ACPI_RSDP_XCHECKSUM_LENGTH      36
32091116Smsmith
321228110Sjkim/* SMBus, GSBus and IPMI bidirectional buffer size */
32291116Smsmith
323107325Siwasaki#define ACPI_SMBUS_BUFFER_SIZE          34
324228110Sjkim#define ACPI_GSBUS_BUFFER_SIZE          34
325197104Sjkim#define ACPI_IPMI_BUFFER_SIZE           66
326107325Siwasaki
327197104Sjkim/* _SxD and _SxW control methods */
328107325Siwasaki
329197104Sjkim#define ACPI_NUM_SxD_METHODS            4
330197104Sjkim#define ACPI_NUM_SxW_METHODS            5
331197104Sjkim
332197104Sjkim
33391116Smsmith/******************************************************************************
33491116Smsmith *
335272444Sjkim * Miscellaneous constants
336272444Sjkim *
337272444Sjkim *****************************************************************************/
338272444Sjkim
339272444Sjkim/* UUID constants */
340272444Sjkim
341272444Sjkim#define UUID_BUFFER_LENGTH          16 /* Length of UUID in memory */
342272444Sjkim#define UUID_STRING_LENGTH          36 /* Total length of a UUID string */
343272444Sjkim
344272444Sjkim/* Positions for required hyphens (dashes) in UUID strings */
345272444Sjkim
346272444Sjkim#define UUID_HYPHEN1_OFFSET         8
347272444Sjkim#define UUID_HYPHEN2_OFFSET         13
348272444Sjkim#define UUID_HYPHEN3_OFFSET         18
349272444Sjkim#define UUID_HYPHEN4_OFFSET         23
350272444Sjkim
351272444Sjkim
352272444Sjkim/******************************************************************************
353272444Sjkim *
35491116Smsmith * ACPI AML Debugger
35591116Smsmith *
35691116Smsmith *****************************************************************************/
35791116Smsmith
358249663Sjkim#define ACPI_DEBUGGER_MAX_ARGS          ACPI_METHOD_NUM_ARGS + 4 /* Max command line arguments */
359222544Sjkim#define ACPI_DB_LINE_BUFFER_SIZE        512
36091116Smsmith
36199679Siwasaki#define ACPI_DEBUGGER_COMMAND_PROMPT    '-'
36299679Siwasaki#define ACPI_DEBUGGER_EXECUTE_PROMPT    '%'
36391116Smsmith
36491116Smsmith
36567754Smsmith#endif /* _ACCONFIG_H */
366