xref: /titanic_51/usr/src/uts/intel/sys/acpi/acconfig.h (revision 385cc6b4ad1792caef3f84eb61eed3f27085801f)
17c478bd9Sstevel@tonic-gate /******************************************************************************
27c478bd9Sstevel@tonic-gate  *
37c478bd9Sstevel@tonic-gate  * Name: acconfig.h - Global configuration constants
47c478bd9Sstevel@tonic-gate  *
57c478bd9Sstevel@tonic-gate  *****************************************************************************/
67c478bd9Sstevel@tonic-gate 
726f3cdf0SGordon Ross /*
8*385cc6b4SJerry Jelinek  * Copyright (C) 2000 - 2016, Intel Corp.
97c478bd9Sstevel@tonic-gate  * All rights reserved.
107c478bd9Sstevel@tonic-gate  *
1126f3cdf0SGordon Ross  * Redistribution and use in source and binary forms, with or without
1226f3cdf0SGordon Ross  * modification, are permitted provided that the following conditions
1326f3cdf0SGordon Ross  * are met:
1426f3cdf0SGordon Ross  * 1. Redistributions of source code must retain the above copyright
1526f3cdf0SGordon Ross  *    notice, this list of conditions, and the following disclaimer,
1626f3cdf0SGordon Ross  *    without modification.
1726f3cdf0SGordon Ross  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
1826f3cdf0SGordon Ross  *    substantially similar to the "NO WARRANTY" disclaimer below
1926f3cdf0SGordon Ross  *    ("Disclaimer") and any redistribution must be conditioned upon
2026f3cdf0SGordon Ross  *    including a substantially similar Disclaimer requirement for further
2126f3cdf0SGordon Ross  *    binary redistribution.
2226f3cdf0SGordon Ross  * 3. Neither the names of the above-listed copyright holders nor the names
2326f3cdf0SGordon Ross  *    of any contributors may be used to endorse or promote products derived
2426f3cdf0SGordon Ross  *    from this software without specific prior written permission.
257c478bd9Sstevel@tonic-gate  *
2626f3cdf0SGordon Ross  * Alternatively, this software may be distributed under the terms of the
2726f3cdf0SGordon Ross  * GNU General Public License ("GPL") version 2 as published by the Free
2826f3cdf0SGordon Ross  * Software Foundation.
297c478bd9Sstevel@tonic-gate  *
3026f3cdf0SGordon Ross  * NO WARRANTY
3126f3cdf0SGordon Ross  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3226f3cdf0SGordon Ross  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3326f3cdf0SGordon Ross  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
3426f3cdf0SGordon Ross  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3526f3cdf0SGordon Ross  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3626f3cdf0SGordon Ross  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3726f3cdf0SGordon Ross  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3826f3cdf0SGordon Ross  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
3926f3cdf0SGordon Ross  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
4026f3cdf0SGordon Ross  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4126f3cdf0SGordon Ross  * POSSIBILITY OF SUCH DAMAGES.
4226f3cdf0SGordon Ross  */
437c478bd9Sstevel@tonic-gate 
447c478bd9Sstevel@tonic-gate #ifndef _ACCONFIG_H
457c478bd9Sstevel@tonic-gate #define _ACCONFIG_H
467c478bd9Sstevel@tonic-gate 
477c478bd9Sstevel@tonic-gate 
487c478bd9Sstevel@tonic-gate /******************************************************************************
497c478bd9Sstevel@tonic-gate  *
507c478bd9Sstevel@tonic-gate  * Configuration options
517c478bd9Sstevel@tonic-gate  *
527c478bd9Sstevel@tonic-gate  *****************************************************************************/
537c478bd9Sstevel@tonic-gate 
547c478bd9Sstevel@tonic-gate /*
557c478bd9Sstevel@tonic-gate  * ACPI_DEBUG_OUTPUT    - This switch enables all the debug facilities of the
567c478bd9Sstevel@tonic-gate  *                        ACPI subsystem. This includes the DEBUG_PRINT output
577c478bd9Sstevel@tonic-gate  *                        statements. When disabled, all DEBUG_PRINT
587c478bd9Sstevel@tonic-gate  *                        statements are compiled out.
597c478bd9Sstevel@tonic-gate  *
607c478bd9Sstevel@tonic-gate  * ACPI_APPLICATION     - Use this switch if the subsystem is going to be run
617c478bd9Sstevel@tonic-gate  *                        at the application level.
627c478bd9Sstevel@tonic-gate  *
637c478bd9Sstevel@tonic-gate  */
647c478bd9Sstevel@tonic-gate 
657c478bd9Sstevel@tonic-gate /*
667c478bd9Sstevel@tonic-gate  * OS name, used for the _OS object. The _OS object is essentially obsolete,
677c478bd9Sstevel@tonic-gate  * but there is a large base of ASL/AML code in existing machines that check
687c478bd9Sstevel@tonic-gate  * for the string below. The use of this string usually guarantees that
697c478bd9Sstevel@tonic-gate  * the ASL will execute down the most tested code path. Also, there is some
707c478bd9Sstevel@tonic-gate  * code that will not execute the _OSI method unless _OS matches the string
717c478bd9Sstevel@tonic-gate  * below. Therefore, change this string at your own risk.
727c478bd9Sstevel@tonic-gate  */
737c478bd9Sstevel@tonic-gate #define ACPI_OS_NAME                    "Microsoft Windows NT"
747c478bd9Sstevel@tonic-gate 
757c478bd9Sstevel@tonic-gate /* Maximum objects in the various object caches */
767c478bd9Sstevel@tonic-gate 
77450d6964Smyers #define ACPI_MAX_STATE_CACHE_DEPTH      96          /* State objects */
787c478bd9Sstevel@tonic-gate #define ACPI_MAX_PARSE_CACHE_DEPTH      96          /* Parse tree objects */
79450d6964Smyers #define ACPI_MAX_EXTPARSE_CACHE_DEPTH   96          /* Parse tree objects */
80450d6964Smyers #define ACPI_MAX_OBJECT_CACHE_DEPTH     96          /* Interpreter operand objects */
8127f7c583Smyers #define ACPI_MAX_NAMESPACE_CACHE_DEPTH  96          /* Namespace objects */
827c478bd9Sstevel@tonic-gate 
837c478bd9Sstevel@tonic-gate /*
8430082d0cSmyers  * Should the subsystem abort the loading of an ACPI table if the
857c478bd9Sstevel@tonic-gate  * table checksum is incorrect?
867c478bd9Sstevel@tonic-gate  */
87*385cc6b4SJerry Jelinek #ifndef ACPI_CHECKSUM_ABORT
887c478bd9Sstevel@tonic-gate #define ACPI_CHECKSUM_ABORT             FALSE
89*385cc6b4SJerry Jelinek #endif
90*385cc6b4SJerry Jelinek 
91*385cc6b4SJerry Jelinek /*
92*385cc6b4SJerry Jelinek  * Generate a version of ACPICA that only supports "reduced hardware"
93*385cc6b4SJerry Jelinek  * platforms (as defined in ACPI 5.0). Set to TRUE to generate a specialized
94*385cc6b4SJerry Jelinek  * version of ACPICA that ONLY supports the ACPI 5.0 "reduced hardware"
95*385cc6b4SJerry Jelinek  * model. In other words, no ACPI hardware is supported.
96*385cc6b4SJerry Jelinek  *
97*385cc6b4SJerry Jelinek  * If TRUE, this means no support for the following:
98*385cc6b4SJerry Jelinek  *      PM Event and Control registers
99*385cc6b4SJerry Jelinek  *      SCI interrupt (and handler)
100*385cc6b4SJerry Jelinek  *      Fixed Events
101*385cc6b4SJerry Jelinek  *      General Purpose Events (GPEs)
102*385cc6b4SJerry Jelinek  *      Global Lock
103*385cc6b4SJerry Jelinek  *      ACPI PM timer
104*385cc6b4SJerry Jelinek  *      FACS table (Waking vectors and Global Lock)
105*385cc6b4SJerry Jelinek  */
106*385cc6b4SJerry Jelinek #ifndef ACPI_REDUCED_HARDWARE
107*385cc6b4SJerry Jelinek #define ACPI_REDUCED_HARDWARE           FALSE
108*385cc6b4SJerry Jelinek #endif
1097c478bd9Sstevel@tonic-gate 
1107c478bd9Sstevel@tonic-gate 
1117c478bd9Sstevel@tonic-gate /******************************************************************************
1127c478bd9Sstevel@tonic-gate  *
1137c478bd9Sstevel@tonic-gate  * Subsystem Constants
1147c478bd9Sstevel@tonic-gate  *
1157c478bd9Sstevel@tonic-gate  *****************************************************************************/
1167c478bd9Sstevel@tonic-gate 
1177c478bd9Sstevel@tonic-gate /* Version of ACPI supported */
1187c478bd9Sstevel@tonic-gate 
119*385cc6b4SJerry Jelinek #define ACPI_CA_SUPPORT_LEVEL           5
1207c478bd9Sstevel@tonic-gate 
1217c478bd9Sstevel@tonic-gate /* Maximum count for a semaphore object */
1227c478bd9Sstevel@tonic-gate 
1237c478bd9Sstevel@tonic-gate #define ACPI_MAX_SEMAPHORE_COUNT        256
1247c478bd9Sstevel@tonic-gate 
12527f7c583Smyers /* Maximum object reference count (detects object deletion issues) */
1267c478bd9Sstevel@tonic-gate 
12727f7c583Smyers #define ACPI_MAX_REFERENCE_COUNT        0x800
1287c478bd9Sstevel@tonic-gate 
12957190917SDana Myers /* Default page size for use in mapping memory for operation regions */
1307c478bd9Sstevel@tonic-gate 
13157190917SDana Myers #define ACPI_DEFAULT_PAGE_SIZE          4096    /* Must be power of 2 */
1327c478bd9Sstevel@tonic-gate 
13330082d0cSmyers /* OwnerId tracking. 8 entries allows for 255 OwnerIds */
13430082d0cSmyers 
13530082d0cSmyers #define ACPI_NUM_OWNERID_MASKS          8
13630082d0cSmyers 
137db2bae30SDana Myers /* Size of the root table array is increased by this increment */
138db2bae30SDana Myers 
139db2bae30SDana Myers #define ACPI_ROOT_TABLE_SIZE_INCREMENT  4
140db2bae30SDana Myers 
14126f3cdf0SGordon Ross /* Maximum sleep allowed via Sleep() operator */
14226f3cdf0SGordon Ross 
143*385cc6b4SJerry Jelinek #define ACPI_MAX_SLEEP                  2000    /* 2000 millisec == two seconds */
144*385cc6b4SJerry Jelinek 
145*385cc6b4SJerry Jelinek /* Address Range lists are per-SpaceId (Memory and I/O only) */
146*385cc6b4SJerry Jelinek 
147*385cc6b4SJerry Jelinek #define ACPI_ADDRESS_RANGE_MAX          2
14826f3cdf0SGordon Ross 
1497c478bd9Sstevel@tonic-gate 
1507c478bd9Sstevel@tonic-gate /******************************************************************************
1517c478bd9Sstevel@tonic-gate  *
1527c478bd9Sstevel@tonic-gate  * ACPI Specification constants (Do not change unless the specification changes)
1537c478bd9Sstevel@tonic-gate  *
1547c478bd9Sstevel@tonic-gate  *****************************************************************************/
1557c478bd9Sstevel@tonic-gate 
1567c478bd9Sstevel@tonic-gate /* Method info (in WALK_STATE), containing local variables and argumetns */
1577c478bd9Sstevel@tonic-gate 
1587c478bd9Sstevel@tonic-gate #define ACPI_METHOD_NUM_LOCALS          8
1597c478bd9Sstevel@tonic-gate #define ACPI_METHOD_MAX_LOCAL           7
1607c478bd9Sstevel@tonic-gate 
1617c478bd9Sstevel@tonic-gate #define ACPI_METHOD_NUM_ARGS            7
1627c478bd9Sstevel@tonic-gate #define ACPI_METHOD_MAX_ARG             6
1637c478bd9Sstevel@tonic-gate 
1647c478bd9Sstevel@tonic-gate /*
1657c478bd9Sstevel@tonic-gate  * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG
1667c478bd9Sstevel@tonic-gate  */
1677c478bd9Sstevel@tonic-gate #define ACPI_OBJ_NUM_OPERANDS           8
1687c478bd9Sstevel@tonic-gate #define ACPI_OBJ_MAX_OPERAND            7
1697c478bd9Sstevel@tonic-gate 
170db2bae30SDana Myers /* Number of elements in the Result Stack frame, can be an arbitrary value */
171db2bae30SDana Myers 
172db2bae30SDana Myers #define ACPI_RESULTS_FRAME_OBJ_NUM      8
173db2bae30SDana Myers 
174db2bae30SDana Myers /*
175db2bae30SDana Myers  * Maximal number of elements the Result Stack can contain,
176db2bae30SDana Myers  * it may be an arbitray value not exceeding the types of
177db2bae30SDana Myers  * ResultSize and ResultCount (now UINT8).
178db2bae30SDana Myers  */
179db2bae30SDana Myers #define ACPI_RESULTS_OBJ_NUM_MAX        255
180db2bae30SDana Myers 
1817c478bd9Sstevel@tonic-gate /* Constants used in searching for the RSDP in low memory */
1827c478bd9Sstevel@tonic-gate 
1837c478bd9Sstevel@tonic-gate #define ACPI_EBDA_PTR_LOCATION          0x0000040E     /* Physical Address */
1847c478bd9Sstevel@tonic-gate #define ACPI_EBDA_PTR_LENGTH            2
1857c478bd9Sstevel@tonic-gate #define ACPI_EBDA_WINDOW_SIZE           1024
1867c478bd9Sstevel@tonic-gate #define ACPI_HI_RSDP_WINDOW_BASE        0x000E0000     /* Physical Address */
1877c478bd9Sstevel@tonic-gate #define ACPI_HI_RSDP_WINDOW_SIZE        0x00020000
1887c478bd9Sstevel@tonic-gate #define ACPI_RSDP_SCAN_STEP             16
1897c478bd9Sstevel@tonic-gate 
1907c478bd9Sstevel@tonic-gate /* Operation regions */
1917c478bd9Sstevel@tonic-gate 
1927c478bd9Sstevel@tonic-gate #define ACPI_USER_REGION_BEGIN          0x80
1937c478bd9Sstevel@tonic-gate 
1947c478bd9Sstevel@tonic-gate /* Maximum SpaceIds for Operation Regions */
1957c478bd9Sstevel@tonic-gate 
1967c478bd9Sstevel@tonic-gate #define ACPI_MAX_ADDRESS_SPACE          255
197*385cc6b4SJerry Jelinek #define ACPI_NUM_DEFAULT_SPACES         4
1987c478bd9Sstevel@tonic-gate 
1997c478bd9Sstevel@tonic-gate /* Array sizes. Used for range checking also */
2007c478bd9Sstevel@tonic-gate 
20127f7c583Smyers #define ACPI_MAX_MATCH_OPCODE           5
2027c478bd9Sstevel@tonic-gate 
2037c478bd9Sstevel@tonic-gate /* RSDP checksums */
2047c478bd9Sstevel@tonic-gate 
2057c478bd9Sstevel@tonic-gate #define ACPI_RSDP_CHECKSUM_LENGTH       20
2067c478bd9Sstevel@tonic-gate #define ACPI_RSDP_XCHECKSUM_LENGTH      36
2077c478bd9Sstevel@tonic-gate 
208*385cc6b4SJerry Jelinek /* SMBus, GSBus and IPMI bidirectional buffer size */
2097c478bd9Sstevel@tonic-gate 
2107c478bd9Sstevel@tonic-gate #define ACPI_SMBUS_BUFFER_SIZE          34
211*385cc6b4SJerry Jelinek #define ACPI_GSBUS_BUFFER_SIZE          34
21257190917SDana Myers #define ACPI_IPMI_BUFFER_SIZE           66
21357190917SDana Myers 
21457190917SDana Myers /* _SxD and _SxW control methods */
21557190917SDana Myers 
21657190917SDana Myers #define ACPI_NUM_SxD_METHODS            4
21757190917SDana Myers #define ACPI_NUM_SxW_METHODS            5
2187c478bd9Sstevel@tonic-gate 
2197c478bd9Sstevel@tonic-gate 
2207c478bd9Sstevel@tonic-gate /******************************************************************************
2217c478bd9Sstevel@tonic-gate  *
222*385cc6b4SJerry Jelinek  * Miscellaneous constants
223*385cc6b4SJerry Jelinek  *
224*385cc6b4SJerry Jelinek  *****************************************************************************/
225*385cc6b4SJerry Jelinek 
226*385cc6b4SJerry Jelinek /* UUID constants */
227*385cc6b4SJerry Jelinek 
228*385cc6b4SJerry Jelinek #define UUID_BUFFER_LENGTH          16 /* Length of UUID in memory */
229*385cc6b4SJerry Jelinek #define UUID_STRING_LENGTH          36 /* Total length of a UUID string */
230*385cc6b4SJerry Jelinek 
231*385cc6b4SJerry Jelinek /* Positions for required hyphens (dashes) in UUID strings */
232*385cc6b4SJerry Jelinek 
233*385cc6b4SJerry Jelinek #define UUID_HYPHEN1_OFFSET         8
234*385cc6b4SJerry Jelinek #define UUID_HYPHEN2_OFFSET         13
235*385cc6b4SJerry Jelinek #define UUID_HYPHEN3_OFFSET         18
236*385cc6b4SJerry Jelinek #define UUID_HYPHEN4_OFFSET         23
237*385cc6b4SJerry Jelinek 
238*385cc6b4SJerry Jelinek 
239*385cc6b4SJerry Jelinek /******************************************************************************
240*385cc6b4SJerry Jelinek  *
2417c478bd9Sstevel@tonic-gate  * ACPI AML Debugger
2427c478bd9Sstevel@tonic-gate  *
2437c478bd9Sstevel@tonic-gate  *****************************************************************************/
2447c478bd9Sstevel@tonic-gate 
245*385cc6b4SJerry Jelinek #define ACPI_DEBUGGER_MAX_ARGS          ACPI_METHOD_NUM_ARGS + 4 /* Max command line arguments */
24626f3cdf0SGordon Ross #define ACPI_DB_LINE_BUFFER_SIZE        512
2477c478bd9Sstevel@tonic-gate 
2487c478bd9Sstevel@tonic-gate #define ACPI_DEBUGGER_COMMAND_PROMPT    '-'
2497c478bd9Sstevel@tonic-gate #define ACPI_DEBUGGER_EXECUTE_PROMPT    '%'
2507c478bd9Sstevel@tonic-gate 
2517c478bd9Sstevel@tonic-gate 
2527c478bd9Sstevel@tonic-gate #endif /* _ACCONFIG_H */
253