17c478bd9Sstevel@tonic-gate /****************************************************************************** 27c478bd9Sstevel@tonic-gate * 3aa2aa9a6SDana Myers * Name: acenv.h - Host and compiler configuration 47c478bd9Sstevel@tonic-gate * 57c478bd9Sstevel@tonic-gate *****************************************************************************/ 67c478bd9Sstevel@tonic-gate 7*35786f68SRobert Mustacchi /****************************************************************************** 8*35786f68SRobert Mustacchi * 9*35786f68SRobert Mustacchi * 1. Copyright Notice 10*35786f68SRobert Mustacchi * 11*35786f68SRobert Mustacchi * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. 127c478bd9Sstevel@tonic-gate * All rights reserved. 137c478bd9Sstevel@tonic-gate * 14*35786f68SRobert Mustacchi * 2. License 15*35786f68SRobert Mustacchi * 16*35786f68SRobert Mustacchi * 2.1. This is your license from Intel Corp. under its intellectual property 17*35786f68SRobert Mustacchi * rights. You may have additional license terms from the party that provided 18*35786f68SRobert Mustacchi * you this software, covering your right to use that party's intellectual 19*35786f68SRobert Mustacchi * property rights. 20*35786f68SRobert Mustacchi * 21*35786f68SRobert Mustacchi * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 22*35786f68SRobert Mustacchi * copy of the source code appearing in this file ("Covered Code") an 23*35786f68SRobert Mustacchi * irrevocable, perpetual, worldwide license under Intel's copyrights in the 24*35786f68SRobert Mustacchi * base code distributed originally by Intel ("Original Intel Code") to copy, 25*35786f68SRobert Mustacchi * make derivatives, distribute, use and display any portion of the Covered 26*35786f68SRobert Mustacchi * Code in any form, with the right to sublicense such rights; and 27*35786f68SRobert Mustacchi * 28*35786f68SRobert Mustacchi * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 29*35786f68SRobert Mustacchi * license (with the right to sublicense), under only those claims of Intel 30*35786f68SRobert Mustacchi * patents that are infringed by the Original Intel Code, to make, use, sell, 31*35786f68SRobert Mustacchi * offer to sell, and import the Covered Code and derivative works thereof 32*35786f68SRobert Mustacchi * solely to the minimum extent necessary to exercise the above copyright 33*35786f68SRobert Mustacchi * license, and in no event shall the patent license extend to any additions 34*35786f68SRobert Mustacchi * to or modifications of the Original Intel Code. No other license or right 35*35786f68SRobert Mustacchi * is granted directly or by implication, estoppel or otherwise; 36*35786f68SRobert Mustacchi * 37*35786f68SRobert Mustacchi * The above copyright and patent license is granted only if the following 38*35786f68SRobert Mustacchi * conditions are met: 39*35786f68SRobert Mustacchi * 40*35786f68SRobert Mustacchi * 3. Conditions 41*35786f68SRobert Mustacchi * 42*35786f68SRobert Mustacchi * 3.1. Redistribution of Source with Rights to Further Distribute Source. 43*35786f68SRobert Mustacchi * Redistribution of source code of any substantial portion of the Covered 44*35786f68SRobert Mustacchi * Code or modification with rights to further distribute source must include 45*35786f68SRobert Mustacchi * the above Copyright Notice, the above License, this list of Conditions, 46*35786f68SRobert Mustacchi * and the following Disclaimer and Export Compliance provision. In addition, 47*35786f68SRobert Mustacchi * Licensee must cause all Covered Code to which Licensee contributes to 48*35786f68SRobert Mustacchi * contain a file documenting the changes Licensee made to create that Covered 49*35786f68SRobert Mustacchi * Code and the date of any change. Licensee must include in that file the 50*35786f68SRobert Mustacchi * documentation of any changes made by any predecessor Licensee. Licensee 51*35786f68SRobert Mustacchi * must include a prominent statement that the modification is derived, 52*35786f68SRobert Mustacchi * directly or indirectly, from Original Intel Code. 53*35786f68SRobert Mustacchi * 54*35786f68SRobert Mustacchi * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 55*35786f68SRobert Mustacchi * Redistribution of source code of any substantial portion of the Covered 56*35786f68SRobert Mustacchi * Code or modification without rights to further distribute source must 57*35786f68SRobert Mustacchi * include the following Disclaimer and Export Compliance provision in the 58*35786f68SRobert Mustacchi * documentation and/or other materials provided with distribution. In 59*35786f68SRobert Mustacchi * addition, Licensee may not authorize further sublicense of source of any 60*35786f68SRobert Mustacchi * portion of the Covered Code, and must include terms to the effect that the 61*35786f68SRobert Mustacchi * license from Licensee to its licensee is limited to the intellectual 62*35786f68SRobert Mustacchi * property embodied in the software Licensee provides to its licensee, and 63*35786f68SRobert Mustacchi * not to intellectual property embodied in modifications its licensee may 64*35786f68SRobert Mustacchi * make. 65*35786f68SRobert Mustacchi * 66*35786f68SRobert Mustacchi * 3.3. Redistribution of Executable. Redistribution in executable form of any 67*35786f68SRobert Mustacchi * substantial portion of the Covered Code or modification must reproduce the 68*35786f68SRobert Mustacchi * above Copyright Notice, and the following Disclaimer and Export Compliance 69*35786f68SRobert Mustacchi * provision in the documentation and/or other materials provided with the 70*35786f68SRobert Mustacchi * distribution. 71*35786f68SRobert Mustacchi * 72*35786f68SRobert Mustacchi * 3.4. Intel retains all right, title, and interest in and to the Original 73*35786f68SRobert Mustacchi * Intel Code. 74*35786f68SRobert Mustacchi * 75*35786f68SRobert Mustacchi * 3.5. Neither the name Intel nor any other trademark owned or controlled by 76*35786f68SRobert Mustacchi * Intel shall be used in advertising or otherwise to promote the sale, use or 77*35786f68SRobert Mustacchi * other dealings in products derived from or relating to the Covered Code 78*35786f68SRobert Mustacchi * without prior written authorization from Intel. 79*35786f68SRobert Mustacchi * 80*35786f68SRobert Mustacchi * 4. Disclaimer and Export Compliance 81*35786f68SRobert Mustacchi * 82*35786f68SRobert Mustacchi * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 83*35786f68SRobert Mustacchi * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 84*35786f68SRobert Mustacchi * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 85*35786f68SRobert Mustacchi * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 86*35786f68SRobert Mustacchi * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 87*35786f68SRobert Mustacchi * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 88*35786f68SRobert Mustacchi * PARTICULAR PURPOSE. 89*35786f68SRobert Mustacchi * 90*35786f68SRobert Mustacchi * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 91*35786f68SRobert Mustacchi * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 92*35786f68SRobert Mustacchi * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 93*35786f68SRobert Mustacchi * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 94*35786f68SRobert Mustacchi * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 95*35786f68SRobert Mustacchi * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 96*35786f68SRobert Mustacchi * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 97*35786f68SRobert Mustacchi * LIMITED REMEDY. 98*35786f68SRobert Mustacchi * 99*35786f68SRobert Mustacchi * 4.3. Licensee shall not export, either directly or indirectly, any of this 100*35786f68SRobert Mustacchi * software or system incorporating such software without first obtaining any 101*35786f68SRobert Mustacchi * required license or other approval from the U. S. Department of Commerce or 102*35786f68SRobert Mustacchi * any other agency or department of the United States Government. In the 103*35786f68SRobert Mustacchi * event Licensee exports any such software from the United States or 104*35786f68SRobert Mustacchi * re-exports any such software from a foreign destination, Licensee shall 105*35786f68SRobert Mustacchi * ensure that the distribution and export/re-export of the software is in 106*35786f68SRobert Mustacchi * compliance with all laws, regulations, orders, or other restrictions of the 107*35786f68SRobert Mustacchi * U.S. Export Administration Regulations. Licensee agrees that neither it nor 108*35786f68SRobert Mustacchi * any of its subsidiaries will export/re-export any technical data, process, 109*35786f68SRobert Mustacchi * software, or service, directly or indirectly, to any country for which the 110*35786f68SRobert Mustacchi * United States government or any agency thereof requires an export license, 111*35786f68SRobert Mustacchi * other governmental approval, or letter of assurance, without first obtaining 112*35786f68SRobert Mustacchi * such license, approval or letter. 113*35786f68SRobert Mustacchi * 114*35786f68SRobert Mustacchi ***************************************************************************** 115*35786f68SRobert Mustacchi * 116*35786f68SRobert Mustacchi * Alternatively, you may choose to be licensed under the terms of the 117*35786f68SRobert Mustacchi * following license: 118*35786f68SRobert Mustacchi * 11926f3cdf0SGordon Ross * Redistribution and use in source and binary forms, with or without 12026f3cdf0SGordon Ross * modification, are permitted provided that the following conditions 12126f3cdf0SGordon Ross * are met: 12226f3cdf0SGordon Ross * 1. Redistributions of source code must retain the above copyright 12326f3cdf0SGordon Ross * notice, this list of conditions, and the following disclaimer, 12426f3cdf0SGordon Ross * without modification. 12526f3cdf0SGordon Ross * 2. Redistributions in binary form must reproduce at minimum a disclaimer 12626f3cdf0SGordon Ross * substantially similar to the "NO WARRANTY" disclaimer below 12726f3cdf0SGordon Ross * ("Disclaimer") and any redistribution must be conditioned upon 12826f3cdf0SGordon Ross * including a substantially similar Disclaimer requirement for further 12926f3cdf0SGordon Ross * binary redistribution. 13026f3cdf0SGordon Ross * 3. Neither the names of the above-listed copyright holders nor the names 13126f3cdf0SGordon Ross * of any contributors may be used to endorse or promote products derived 13226f3cdf0SGordon Ross * from this software without specific prior written permission. 13326f3cdf0SGordon Ross * 13426f3cdf0SGordon Ross * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 13526f3cdf0SGordon Ross * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 136*35786f68SRobert Mustacchi * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 13726f3cdf0SGordon Ross * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 138*35786f68SRobert Mustacchi * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 139*35786f68SRobert Mustacchi * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 140*35786f68SRobert Mustacchi * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 141*35786f68SRobert Mustacchi * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 142*35786f68SRobert Mustacchi * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 143*35786f68SRobert Mustacchi * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 144*35786f68SRobert Mustacchi * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 145*35786f68SRobert Mustacchi * 146*35786f68SRobert Mustacchi * Alternatively, you may choose to be licensed under the terms of the 147*35786f68SRobert Mustacchi * GNU General Public License ("GPL") version 2 as published by the Free 148*35786f68SRobert Mustacchi * Software Foundation. 149*35786f68SRobert Mustacchi * 150*35786f68SRobert Mustacchi *****************************************************************************/ 1517c478bd9Sstevel@tonic-gate 1527c478bd9Sstevel@tonic-gate #ifndef __ACENV_H__ 1537c478bd9Sstevel@tonic-gate #define __ACENV_H__ 1547c478bd9Sstevel@tonic-gate 1557c478bd9Sstevel@tonic-gate /* 156aa2aa9a6SDana Myers * Environment configuration. The purpose of this file is to interface ACPICA 157aa2aa9a6SDana Myers * to the local environment. This includes compiler-specific, OS-specific, 158aa2aa9a6SDana Myers * and machine-specific configuration. 1597c478bd9Sstevel@tonic-gate */ 1607c478bd9Sstevel@tonic-gate 161aa2aa9a6SDana Myers /* Types for ACPI_MUTEX_TYPE */ 162aa2aa9a6SDana Myers 163aa2aa9a6SDana Myers #define ACPI_BINARY_SEMAPHORE 0 164aa2aa9a6SDana Myers #define ACPI_OSL_MUTEX 1 165aa2aa9a6SDana Myers 166aa2aa9a6SDana Myers /* Types for DEBUGGER_THREADING */ 167aa2aa9a6SDana Myers 168aa2aa9a6SDana Myers #define DEBUGGER_SINGLE_THREADED 0 169aa2aa9a6SDana Myers #define DEBUGGER_MULTI_THREADED 1 170aa2aa9a6SDana Myers 171aa2aa9a6SDana Myers 172aa2aa9a6SDana Myers /****************************************************************************** 173aa2aa9a6SDana Myers * 174aa2aa9a6SDana Myers * Configuration for ACPI tools and utilities 175aa2aa9a6SDana Myers * 176aa2aa9a6SDana Myers *****************************************************************************/ 177aa2aa9a6SDana Myers 1787b1019a6SJerry Jelinek /* Common application configuration. All single threaded except for AcpiExec. */ 1797b1019a6SJerry Jelinek 1807b1019a6SJerry Jelinek #if (defined ACPI_ASL_COMPILER) || \ 1817b1019a6SJerry Jelinek (defined ACPI_BIN_APP) || \ 1827b1019a6SJerry Jelinek (defined ACPI_DUMP_APP) || \ 1837b1019a6SJerry Jelinek (defined ACPI_HELP_APP) || \ 1847b1019a6SJerry Jelinek (defined ACPI_NAMES_APP) || \ 1857b1019a6SJerry Jelinek (defined ACPI_SRC_APP) || \ 1867b1019a6SJerry Jelinek (defined ACPI_XTRACT_APP) || \ 187*35786f68SRobert Mustacchi (defined ACPI_EXAMPLE_APP) || \ 188*35786f68SRobert Mustacchi (defined ACPI_EFI_HELLO) 1897b1019a6SJerry Jelinek #define ACPI_APPLICATION 1907b1019a6SJerry Jelinek #define ACPI_SINGLE_THREADED 191*35786f68SRobert Mustacchi #define USE_NATIVE_ALLOCATE_ZEROED 1927b1019a6SJerry Jelinek #endif 1937b1019a6SJerry Jelinek 194aa2aa9a6SDana Myers /* iASL configuration */ 195450d6964Smyers 19627f7c583Smyers #ifdef ACPI_ASL_COMPILER 197aa2aa9a6SDana Myers #define ACPI_DEBUG_OUTPUT 19827f7c583Smyers #define ACPI_CONSTANT_EVAL_ONLY 19927f7c583Smyers #define ACPI_LARGE_NAMESPACE_NODE 20027f7c583Smyers #define ACPI_DATA_TABLE_DISASSEMBLY 2017b1019a6SJerry Jelinek #define ACPI_32BIT_PHYSICAL_ADDRESS 2027b1019a6SJerry Jelinek #define ACPI_DISASSEMBLER 1 2037c478bd9Sstevel@tonic-gate #endif 2047c478bd9Sstevel@tonic-gate 2057b1019a6SJerry Jelinek /* AcpiExec configuration. Multithreaded with full AML debugger */ 206aa2aa9a6SDana Myers 207450d6964Smyers #ifdef ACPI_EXEC_APP 2087c478bd9Sstevel@tonic-gate #define ACPI_APPLICATION 209aa2aa9a6SDana Myers #define ACPI_FULL_DEBUG 210186507a7Smyers #define ACPI_MUTEX_DEBUG 21127f7c583Smyers #define ACPI_DBG_TRACK_ALLOCATIONS 2127c478bd9Sstevel@tonic-gate #endif 2137c478bd9Sstevel@tonic-gate 2147b1019a6SJerry Jelinek /* AcpiHelp configuration. Error messages disabled. */ 2157b1019a6SJerry Jelinek 2167b1019a6SJerry Jelinek #ifdef ACPI_HELP_APP 2177b1019a6SJerry Jelinek #define ACPI_NO_ERROR_MESSAGES 2187b1019a6SJerry Jelinek #endif 2197b1019a6SJerry Jelinek 2207b1019a6SJerry Jelinek /* AcpiNames configuration. Debug output enabled. */ 2217b1019a6SJerry Jelinek 2227b1019a6SJerry Jelinek #ifdef ACPI_NAMES_APP 2237b1019a6SJerry Jelinek #define ACPI_DEBUG_OUTPUT 2247b1019a6SJerry Jelinek #endif 2257b1019a6SJerry Jelinek 2267b1019a6SJerry Jelinek /* AcpiExec/AcpiNames/Example configuration. Native RSDP used. */ 2277b1019a6SJerry Jelinek 2287b1019a6SJerry Jelinek #if (defined ACPI_EXEC_APP) || \ 2297b1019a6SJerry Jelinek (defined ACPI_EXAMPLE_APP) || \ 2307b1019a6SJerry Jelinek (defined ACPI_NAMES_APP) 2317b1019a6SJerry Jelinek #define ACPI_USE_NATIVE_RSDP_POINTER 2327b1019a6SJerry Jelinek #endif 2337b1019a6SJerry Jelinek 2347b1019a6SJerry Jelinek /* AcpiDump configuration. Native mapping used if provided by the host */ 2357b1019a6SJerry Jelinek 2367b1019a6SJerry Jelinek #ifdef ACPI_DUMP_APP 2377b1019a6SJerry Jelinek #define ACPI_USE_NATIVE_MEMORY_MAPPING 2387b1019a6SJerry Jelinek #endif 2397b1019a6SJerry Jelinek 2407b1019a6SJerry Jelinek /* AcpiNames/Example configuration. Hardware disabled */ 2417b1019a6SJerry Jelinek 2427b1019a6SJerry Jelinek #if (defined ACPI_EXAMPLE_APP) || \ 2437b1019a6SJerry Jelinek (defined ACPI_NAMES_APP) 2447b1019a6SJerry Jelinek #define ACPI_REDUCED_HARDWARE 1 24526f3cdf0SGordon Ross #endif 24626f3cdf0SGordon Ross 2477b1019a6SJerry Jelinek /* Linkable ACPICA library. Two versions, one with full debug. */ 248aa2aa9a6SDana Myers 249aa2aa9a6SDana Myers #ifdef ACPI_LIBRARY 250aa2aa9a6SDana Myers #define ACPI_USE_LOCAL_CACHE 2517b1019a6SJerry Jelinek #define ACPI_DEBUGGER 1 2527b1019a6SJerry Jelinek #define ACPI_DISASSEMBLER 1 2537b1019a6SJerry Jelinek 2547b1019a6SJerry Jelinek #ifdef _DEBUG 2557b1019a6SJerry Jelinek #define ACPI_DEBUG_OUTPUT 2567b1019a6SJerry Jelinek #endif 257450d6964Smyers #endif 258450d6964Smyers 259aa2aa9a6SDana Myers /* Common for all ACPICA applications */ 260aa2aa9a6SDana Myers 261450d6964Smyers #ifdef ACPI_APPLICATION 262450d6964Smyers #define ACPI_USE_LOCAL_CACHE 2637c478bd9Sstevel@tonic-gate #endif 2647c478bd9Sstevel@tonic-gate 2657b1019a6SJerry Jelinek /* Common debug/disassembler support */ 266aa2aa9a6SDana Myers 26727f7c583Smyers #ifdef ACPI_FULL_DEBUG 26827f7c583Smyers #define ACPI_DEBUG_OUTPUT 2697b1019a6SJerry Jelinek #define ACPI_DEBUGGER 1 2707b1019a6SJerry Jelinek #define ACPI_DISASSEMBLER 1 27127f7c583Smyers #endif 27227f7c583Smyers 273aa2aa9a6SDana Myers /*! [Begin] no source code translation */ 274aa2aa9a6SDana Myers 275aa2aa9a6SDana Myers /****************************************************************************** 2767c478bd9Sstevel@tonic-gate * 277aa2aa9a6SDana Myers * Host configuration files. The compiler configuration files are included 278*35786f68SRobert Mustacchi * first. 2797c478bd9Sstevel@tonic-gate * 280aa2aa9a6SDana Myers *****************************************************************************/ 2817c478bd9Sstevel@tonic-gate 282*35786f68SRobert Mustacchi #if defined(__GNUC__) && !defined(__INTEL_COMPILER) 283*35786f68SRobert Mustacchi #include "acgcc.h" 284*35786f68SRobert Mustacchi 285*35786f68SRobert Mustacchi #elif defined(_MSC_VER) 286*35786f68SRobert Mustacchi #include "acmsvc.h" 287*35786f68SRobert Mustacchi 288*35786f68SRobert Mustacchi #elif defined(__INTEL_COMPILER) 289*35786f68SRobert Mustacchi #include "acintel.h" 290*35786f68SRobert Mustacchi 291*35786f68SRobert Mustacchi #endif 292*35786f68SRobert Mustacchi 293db2bae30SDana Myers #if defined(_LINUX) || defined(__linux__) 2947c478bd9Sstevel@tonic-gate #include "aclinux.h" 2957c478bd9Sstevel@tonic-gate 2967b1019a6SJerry Jelinek #elif defined(_APPLE) || defined(__APPLE__) 2977b1019a6SJerry Jelinek #include "acmacosx.h" 2987b1019a6SJerry Jelinek 2997b1019a6SJerry Jelinek #elif defined(__DragonFly__) 3007b1019a6SJerry Jelinek #include "acdragonfly.h" 3017b1019a6SJerry Jelinek 30227f7c583Smyers #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) 3037c478bd9Sstevel@tonic-gate #include "acfreebsd.h" 3047c478bd9Sstevel@tonic-gate 3057c478bd9Sstevel@tonic-gate #elif defined(__NetBSD__) 3067c478bd9Sstevel@tonic-gate #include "acnetbsd.h" 3077c478bd9Sstevel@tonic-gate 308aa2aa9a6SDana Myers #elif defined(__sun) 309aa2aa9a6SDana Myers #include "acsolaris.h" 310aa2aa9a6SDana Myers 3117c478bd9Sstevel@tonic-gate #elif defined(MODESTO) 3127c478bd9Sstevel@tonic-gate #include "acmodesto.h" 3137c478bd9Sstevel@tonic-gate 3147c478bd9Sstevel@tonic-gate #elif defined(NETWARE) 3157c478bd9Sstevel@tonic-gate #include "acnetware.h" 3167c478bd9Sstevel@tonic-gate 317aa2aa9a6SDana Myers #elif defined(_CYGWIN) 318aa2aa9a6SDana Myers #include "accygwin.h" 319aa2aa9a6SDana Myers 320aa2aa9a6SDana Myers #elif defined(WIN32) 321aa2aa9a6SDana Myers #include "acwin.h" 322aa2aa9a6SDana Myers 323aa2aa9a6SDana Myers #elif defined(WIN64) 324aa2aa9a6SDana Myers #include "acwin64.h" 325aa2aa9a6SDana Myers 326aa2aa9a6SDana Myers #elif defined(_WRS_LIB_BUILD) 327aa2aa9a6SDana Myers #include "acvxworks.h" 3287c478bd9Sstevel@tonic-gate 329db2bae30SDana Myers #elif defined(__OS2__) 330db2bae30SDana Myers #include "acos2.h" 331db2bae30SDana Myers 3327b1019a6SJerry Jelinek #elif defined(__HAIKU__) 3337b1019a6SJerry Jelinek #include "achaiku.h" 3347b1019a6SJerry Jelinek 3357b1019a6SJerry Jelinek #elif defined(__QNX__) 3367b1019a6SJerry Jelinek #include "acqnx.h" 3377b1019a6SJerry Jelinek 338*35786f68SRobert Mustacchi /* 339*35786f68SRobert Mustacchi * EFI applications can be built with -nostdlib, in this case, it must be 340*35786f68SRobert Mustacchi * included after including all other host environmental definitions, in 341*35786f68SRobert Mustacchi * order to override the definitions. 342*35786f68SRobert Mustacchi */ 343*35786f68SRobert Mustacchi #elif defined(_AED_EFI) || defined(_GNU_EFI) || defined(_EDK2_EFI) 344*35786f68SRobert Mustacchi #include "acefi.h" 345*35786f68SRobert Mustacchi 3467c478bd9Sstevel@tonic-gate #else 3477c478bd9Sstevel@tonic-gate 348aa2aa9a6SDana Myers /* Unknown environment */ 3497c478bd9Sstevel@tonic-gate 350aa2aa9a6SDana Myers #error Unknown target environment 351aa2aa9a6SDana Myers #endif 3527c478bd9Sstevel@tonic-gate 353aa2aa9a6SDana Myers /*! [End] no source code translation !*/ 354aa2aa9a6SDana Myers 355aa2aa9a6SDana Myers 356aa2aa9a6SDana Myers /****************************************************************************** 357aa2aa9a6SDana Myers * 358aa2aa9a6SDana Myers * Setup defaults for the required symbols that were not defined in one of 359aa2aa9a6SDana Myers * the host/compiler files above. 360aa2aa9a6SDana Myers * 361aa2aa9a6SDana Myers *****************************************************************************/ 362aa2aa9a6SDana Myers 363aa2aa9a6SDana Myers /* 64-bit data types */ 364aa2aa9a6SDana Myers 365aa2aa9a6SDana Myers #ifndef COMPILER_DEPENDENT_INT64 3667c478bd9Sstevel@tonic-gate #define COMPILER_DEPENDENT_INT64 long long 367aa2aa9a6SDana Myers #endif 368aa2aa9a6SDana Myers 369aa2aa9a6SDana Myers #ifndef COMPILER_DEPENDENT_UINT64 3707c478bd9Sstevel@tonic-gate #define COMPILER_DEPENDENT_UINT64 unsigned long long 371aa2aa9a6SDana Myers #endif 3727c478bd9Sstevel@tonic-gate 373aa2aa9a6SDana Myers /* Type of mutex supported by host. Default is binary semaphores. */ 374aa2aa9a6SDana Myers 375aa2aa9a6SDana Myers #ifndef ACPI_MUTEX_TYPE 376aa2aa9a6SDana Myers #define ACPI_MUTEX_TYPE ACPI_BINARY_SEMAPHORE 3777c478bd9Sstevel@tonic-gate #endif 3787c478bd9Sstevel@tonic-gate 379aa2aa9a6SDana Myers /* Global Lock acquire/release */ 380aa2aa9a6SDana Myers 381aa2aa9a6SDana Myers #ifndef ACPI_ACQUIRE_GLOBAL_LOCK 38226f3cdf0SGordon Ross #define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acquired) Acquired = 1 383aa2aa9a6SDana Myers #endif 384aa2aa9a6SDana Myers 385aa2aa9a6SDana Myers #ifndef ACPI_RELEASE_GLOBAL_LOCK 38626f3cdf0SGordon Ross #define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Pending) Pending = 0 387aa2aa9a6SDana Myers #endif 388aa2aa9a6SDana Myers 389aa2aa9a6SDana Myers /* Flush CPU cache - used when going to sleep. Wbinvd or similar. */ 390aa2aa9a6SDana Myers 391aa2aa9a6SDana Myers #ifndef ACPI_FLUSH_CPU_CACHE 392aa2aa9a6SDana Myers #define ACPI_FLUSH_CPU_CACHE() 393aa2aa9a6SDana Myers #endif 394aa2aa9a6SDana Myers 39526f3cdf0SGordon Ross /* "inline" keywords - configurable since inline is not standardized */ 39626f3cdf0SGordon Ross 39726f3cdf0SGordon Ross #ifndef ACPI_INLINE 39826f3cdf0SGordon Ross #define ACPI_INLINE 39926f3cdf0SGordon Ross #endif 40026f3cdf0SGordon Ross 401*35786f68SRobert Mustacchi /* Use ordered initialization if compiler doesn't support designated. */ 402*35786f68SRobert Mustacchi #ifndef ACPI_STRUCT_INIT 403*35786f68SRobert Mustacchi #define ACPI_STRUCT_INIT(field, value) value 404*35786f68SRobert Mustacchi #endif 405*35786f68SRobert Mustacchi 406aa2aa9a6SDana Myers /* 407aa2aa9a6SDana Myers * Configurable calling conventions: 408aa2aa9a6SDana Myers * 409aa2aa9a6SDana Myers * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads) 410aa2aa9a6SDana Myers * ACPI_EXTERNAL_XFACE - External ACPI interfaces 411aa2aa9a6SDana Myers * ACPI_INTERNAL_XFACE - Internal ACPI interfaces 412aa2aa9a6SDana Myers * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces 413aa2aa9a6SDana Myers */ 414aa2aa9a6SDana Myers #ifndef ACPI_SYSTEM_XFACE 415aa2aa9a6SDana Myers #define ACPI_SYSTEM_XFACE 416aa2aa9a6SDana Myers #endif 417aa2aa9a6SDana Myers 418aa2aa9a6SDana Myers #ifndef ACPI_EXTERNAL_XFACE 419aa2aa9a6SDana Myers #define ACPI_EXTERNAL_XFACE 420aa2aa9a6SDana Myers #endif 421aa2aa9a6SDana Myers 422aa2aa9a6SDana Myers #ifndef ACPI_INTERNAL_XFACE 423aa2aa9a6SDana Myers #define ACPI_INTERNAL_XFACE 424aa2aa9a6SDana Myers #endif 4257c478bd9Sstevel@tonic-gate 426aa2aa9a6SDana Myers #ifndef ACPI_INTERNAL_VAR_XFACE 427aa2aa9a6SDana Myers #define ACPI_INTERNAL_VAR_XFACE 428aa2aa9a6SDana Myers #endif 4297c478bd9Sstevel@tonic-gate 4307b1019a6SJerry Jelinek 4317c478bd9Sstevel@tonic-gate /* 4327c478bd9Sstevel@tonic-gate * Debugger threading model 4337c478bd9Sstevel@tonic-gate * Use single threaded if the entire subsystem is contained in an application 4347c478bd9Sstevel@tonic-gate * Use multiple threaded when the subsystem is running in the kernel. 4357c478bd9Sstevel@tonic-gate * 4367c478bd9Sstevel@tonic-gate * By default the model is single threaded if ACPI_APPLICATION is set, 4377c478bd9Sstevel@tonic-gate * multi-threaded if ACPI_APPLICATION is not set. 4387c478bd9Sstevel@tonic-gate */ 4397c478bd9Sstevel@tonic-gate #ifndef DEBUGGER_THREADING 4407b1019a6SJerry Jelinek #if !defined (ACPI_APPLICATION) || defined (ACPI_EXEC_APP) 4417b1019a6SJerry Jelinek #define DEBUGGER_THREADING DEBUGGER_MULTI_THREADED 4427c478bd9Sstevel@tonic-gate 4437c478bd9Sstevel@tonic-gate #else 4447b1019a6SJerry Jelinek #define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED 4457c478bd9Sstevel@tonic-gate #endif 4467c478bd9Sstevel@tonic-gate #endif /* !DEBUGGER_THREADING */ 4477c478bd9Sstevel@tonic-gate 4487c478bd9Sstevel@tonic-gate 4497c478bd9Sstevel@tonic-gate /****************************************************************************** 4507c478bd9Sstevel@tonic-gate * 4517c478bd9Sstevel@tonic-gate * C library configuration 4527c478bd9Sstevel@tonic-gate * 4537c478bd9Sstevel@tonic-gate *****************************************************************************/ 4547c478bd9Sstevel@tonic-gate 4557c478bd9Sstevel@tonic-gate /* 456aa2aa9a6SDana Myers * ACPI_USE_SYSTEM_CLIBRARY - Define this if linking to an actual C library. 457aa2aa9a6SDana Myers * Otherwise, local versions of string/memory functions will be used. 458aa2aa9a6SDana Myers * ACPI_USE_STANDARD_HEADERS - Define this if linking to a C library and 459*35786f68SRobert Mustacchi * the standard header files may be used. Defining this implies that 460*35786f68SRobert Mustacchi * ACPI_USE_SYSTEM_CLIBRARY has been defined. 461aa2aa9a6SDana Myers * 4627b1019a6SJerry Jelinek * The ACPICA subsystem only uses low level C library functions that do not 4637b1019a6SJerry Jelinek * call operating system services and may therefore be inlined in the code. 464aa2aa9a6SDana Myers * 465aa2aa9a6SDana Myers * It may be necessary to tailor these include files to the target 466aa2aa9a6SDana Myers * generation environment. 4677c478bd9Sstevel@tonic-gate */ 468aa2aa9a6SDana Myers 4697b1019a6SJerry Jelinek /* Use the standard C library headers. We want to keep these to a minimum. */ 470aa2aa9a6SDana Myers 4717c478bd9Sstevel@tonic-gate #ifdef ACPI_USE_STANDARD_HEADERS 472aa2aa9a6SDana Myers 473aa2aa9a6SDana Myers /* Use the standard headers from the standard locations */ 474aa2aa9a6SDana Myers 4757c478bd9Sstevel@tonic-gate #include <stdlib.h> 4767c478bd9Sstevel@tonic-gate #include <string.h> 4777c478bd9Sstevel@tonic-gate #include <ctype.h> 478*35786f68SRobert Mustacchi #if defined (ACPI_APPLICATION) || defined(ACPI_LIBRARY) 479*35786f68SRobert Mustacchi #include <stdio.h> 480*35786f68SRobert Mustacchi #include <fcntl.h> 481*35786f68SRobert Mustacchi #include <errno.h> 482*35786f68SRobert Mustacchi #include <time.h> 483*35786f68SRobert Mustacchi #include <signal.h> 484*35786f68SRobert Mustacchi #endif 4857c478bd9Sstevel@tonic-gate 4867c478bd9Sstevel@tonic-gate #endif /* ACPI_USE_STANDARD_HEADERS */ 4877c478bd9Sstevel@tonic-gate 4887b1019a6SJerry Jelinek #ifdef ACPI_APPLICATION 4897b1019a6SJerry Jelinek #define ACPI_FILE FILE * 4907b1019a6SJerry Jelinek #define ACPI_FILE_OUT stdout 4917b1019a6SJerry Jelinek #define ACPI_FILE_ERR stderr 4927b1019a6SJerry Jelinek #else 4937b1019a6SJerry Jelinek #define ACPI_FILE void * 4947b1019a6SJerry Jelinek #define ACPI_FILE_OUT NULL 4957b1019a6SJerry Jelinek #define ACPI_FILE_ERR NULL 4967b1019a6SJerry Jelinek #endif /* ACPI_APPLICATION */ 497*35786f68SRobert Mustacchi 498*35786f68SRobert Mustacchi #ifndef ACPI_INIT_FUNCTION 499*35786f68SRobert Mustacchi #define ACPI_INIT_FUNCTION 500*35786f68SRobert Mustacchi #endif 5017b1019a6SJerry Jelinek 5027c478bd9Sstevel@tonic-gate #endif /* __ACENV_H__ */ 503