acconfig.h revision 229989
167754Smsmith/******************************************************************************
267754Smsmith *
367754Smsmith * Name: acconfig.h - Global configuration constants
467754Smsmith *
567754Smsmith *****************************************************************************/
667754Smsmith
7217365Sjkim/*
8229989Sjkim * Copyright (C) 2000 - 2012, 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
126228110Sjkim#define ACPI_MAX_SLEEP                  2000    /* 2000 millisec == two seconds */
127209746Sjkim
128229989Sjkim/* Address Range lists are per-SpaceId (Memory and I/O only) */
129209746Sjkim
130229989Sjkim#define ACPI_ADDRESS_RANGE_MAX          2
131229989Sjkim
132229989Sjkim
13391116Smsmith/******************************************************************************
13491116Smsmith *
13567754Smsmith * ACPI Specification constants (Do not change unless the specification changes)
13667754Smsmith *
13767754Smsmith *****************************************************************************/
13867754Smsmith
139151937Sjkim/* Method info (in WALK_STATE), containing local variables and argumetns */
140151937Sjkim
141114237Snjl#define ACPI_METHOD_NUM_LOCALS          8
142114237Snjl#define ACPI_METHOD_MAX_LOCAL           7
14367754Smsmith
144114237Snjl#define ACPI_METHOD_NUM_ARGS            7
145114237Snjl#define ACPI_METHOD_MAX_ARG             6
14667754Smsmith
14767754Smsmith/*
148114237Snjl * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG
14967754Smsmith */
150114237Snjl#define ACPI_OBJ_NUM_OPERANDS           8
151114237Snjl#define ACPI_OBJ_MAX_OPERAND            7
15267754Smsmith
153167802Sjkim/* Number of elements in the Result Stack frame, can be an arbitrary value */
154167802Sjkim
155167802Sjkim#define ACPI_RESULTS_FRAME_OBJ_NUM      8
156167802Sjkim
157167802Sjkim/*
158167802Sjkim * Maximal number of elements the Result Stack can contain,
159167802Sjkim * it may be an arbitray value not exceeding the types of
160167802Sjkim * ResultSize and ResultCount (now UINT8).
161167802Sjkim */
162167802Sjkim#define ACPI_RESULTS_OBJ_NUM_MAX        255
163167802Sjkim
16467754Smsmith/* Constants used in searching for the RSDP in low memory */
16567754Smsmith
166131440Smarks#define ACPI_EBDA_PTR_LOCATION          0x0000040E     /* Physical Address */
167131440Smarks#define ACPI_EBDA_PTR_LENGTH            2
168131440Smarks#define ACPI_EBDA_WINDOW_SIZE           1024
169131440Smarks#define ACPI_HI_RSDP_WINDOW_BASE        0x000E0000     /* Physical Address */
170131440Smarks#define ACPI_HI_RSDP_WINDOW_SIZE        0x00020000
171114237Snjl#define ACPI_RSDP_SCAN_STEP             16
17267754Smsmith
17387031Smsmith/* Operation regions */
17487031Smsmith
17599679Siwasaki#define ACPI_USER_REGION_BEGIN          0x80
17687031Smsmith
17777424Smsmith/* Maximum SpaceIds for Operation Regions */
17867754Smsmith
17999679Siwasaki#define ACPI_MAX_ADDRESS_SPACE          255
18077424Smsmith
181100966Siwasaki/* Array sizes.  Used for range checking also */
182100966Siwasaki
183167802Sjkim#define ACPI_MAX_MATCH_OPCODE           5
184100966Siwasaki
18591116Smsmith/* RSDP checksums */
18677424Smsmith
18799679Siwasaki#define ACPI_RSDP_CHECKSUM_LENGTH       20
18899679Siwasaki#define ACPI_RSDP_XCHECKSUM_LENGTH      36
18991116Smsmith
190228110Sjkim/* SMBus, GSBus and IPMI bidirectional buffer size */
19191116Smsmith
192107325Siwasaki#define ACPI_SMBUS_BUFFER_SIZE          34
193228110Sjkim#define ACPI_GSBUS_BUFFER_SIZE          34
194197104Sjkim#define ACPI_IPMI_BUFFER_SIZE           66
195107325Siwasaki
196197104Sjkim/* _SxD and _SxW control methods */
197107325Siwasaki
198197104Sjkim#define ACPI_NUM_SxD_METHODS            4
199197104Sjkim#define ACPI_NUM_SxW_METHODS            5
200197104Sjkim
201197104Sjkim
20291116Smsmith/******************************************************************************
20391116Smsmith *
20491116Smsmith * ACPI AML Debugger
20591116Smsmith *
20691116Smsmith *****************************************************************************/
20791116Smsmith
208222544Sjkim#define ACPI_DEBUGGER_MAX_ARGS          ACPI_METHOD_NUM_ARGS + 2 /* Max command line arguments */
209222544Sjkim#define ACPI_DB_LINE_BUFFER_SIZE        512
21091116Smsmith
21199679Siwasaki#define ACPI_DEBUGGER_COMMAND_PROMPT    '-'
21299679Siwasaki#define ACPI_DEBUGGER_EXECUTE_PROMPT    '%'
21391116Smsmith
21491116Smsmith
21567754Smsmith#endif /* _ACCONFIG_H */
21667754Smsmith
217