17c478bdstevel@tonic-gate/******************************************************************************
27c478bdstevel@tonic-gate *
326f3cdfGordon Ross * Name: acwin64.h - OS specific defines, etc.
47c478bdstevel@tonic-gate *
57c478bdstevel@tonic-gate *****************************************************************************/
67c478bdstevel@tonic-gate
735786f6Robert Mustacchi/******************************************************************************
835786f6Robert Mustacchi *
935786f6Robert Mustacchi * 1. Copyright Notice
1035786f6Robert Mustacchi *
1135786f6Robert Mustacchi * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp.
127c478bdstevel@tonic-gate * All rights reserved.
137c478bdstevel@tonic-gate *
1435786f6Robert Mustacchi * 2. License
1535786f6Robert Mustacchi *
1635786f6Robert Mustacchi * 2.1. This is your license from Intel Corp. under its intellectual property
1735786f6Robert Mustacchi * rights. You may have additional license terms from the party that provided
1835786f6Robert Mustacchi * you this software, covering your right to use that party's intellectual
1935786f6Robert Mustacchi * property rights.
2035786f6Robert Mustacchi *
2135786f6Robert Mustacchi * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
2235786f6Robert Mustacchi * copy of the source code appearing in this file ("Covered Code") an
2335786f6Robert Mustacchi * irrevocable, perpetual, worldwide license under Intel's copyrights in the
2435786f6Robert Mustacchi * base code distributed originally by Intel ("Original Intel Code") to copy,
2535786f6Robert Mustacchi * make derivatives, distribute, use and display any portion of the Covered
2635786f6Robert Mustacchi * Code in any form, with the right to sublicense such rights; and
2735786f6Robert Mustacchi *
2835786f6Robert Mustacchi * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
2935786f6Robert Mustacchi * license (with the right to sublicense), under only those claims of Intel
3035786f6Robert Mustacchi * patents that are infringed by the Original Intel Code, to make, use, sell,
3135786f6Robert Mustacchi * offer to sell, and import the Covered Code and derivative works thereof
3235786f6Robert Mustacchi * solely to the minimum extent necessary to exercise the above copyright
3335786f6Robert Mustacchi * license, and in no event shall the patent license extend to any additions
3435786f6Robert Mustacchi * to or modifications of the Original Intel Code. No other license or right
3535786f6Robert Mustacchi * is granted directly or by implication, estoppel or otherwise;
3635786f6Robert Mustacchi *
3735786f6Robert Mustacchi * The above copyright and patent license is granted only if the following
3835786f6Robert Mustacchi * conditions are met:
3935786f6Robert Mustacchi *
4035786f6Robert Mustacchi * 3. Conditions
4135786f6Robert Mustacchi *
4235786f6Robert Mustacchi * 3.1. Redistribution of Source with Rights to Further Distribute Source.
4335786f6Robert Mustacchi * Redistribution of source code of any substantial portion of the Covered
4435786f6Robert Mustacchi * Code or modification with rights to further distribute source must include
4535786f6Robert Mustacchi * the above Copyright Notice, the above License, this list of Conditions,
4635786f6Robert Mustacchi * and the following Disclaimer and Export Compliance provision. In addition,
4735786f6Robert Mustacchi * Licensee must cause all Covered Code to which Licensee contributes to
4835786f6Robert Mustacchi * contain a file documenting the changes Licensee made to create that Covered
4935786f6Robert Mustacchi * Code and the date of any change. Licensee must include in that file the
5035786f6Robert Mustacchi * documentation of any changes made by any predecessor Licensee. Licensee
5135786f6Robert Mustacchi * must include a prominent statement that the modification is derived,
5235786f6Robert Mustacchi * directly or indirectly, from Original Intel Code.
5335786f6Robert Mustacchi *
5435786f6Robert Mustacchi * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
5535786f6Robert Mustacchi * Redistribution of source code of any substantial portion of the Covered
5635786f6Robert Mustacchi * Code or modification without rights to further distribute source must
5735786f6Robert Mustacchi * include the following Disclaimer and Export Compliance provision in the
5835786f6Robert Mustacchi * documentation and/or other materials provided with distribution. In
5935786f6Robert Mustacchi * addition, Licensee may not authorize further sublicense of source of any
6035786f6Robert Mustacchi * portion of the Covered Code, and must include terms to the effect that the
6135786f6Robert Mustacchi * license from Licensee to its licensee is limited to the intellectual
6235786f6Robert Mustacchi * property embodied in the software Licensee provides to its licensee, and
6335786f6Robert Mustacchi * not to intellectual property embodied in modifications its licensee may
6435786f6Robert Mustacchi * make.
6535786f6Robert Mustacchi *
6635786f6Robert Mustacchi * 3.3. Redistribution of Executable. Redistribution in executable form of any
6735786f6Robert Mustacchi * substantial portion of the Covered Code or modification must reproduce the
6835786f6Robert Mustacchi * above Copyright Notice, and the following Disclaimer and Export Compliance
6935786f6Robert Mustacchi * provision in the documentation and/or other materials provided with the
7035786f6Robert Mustacchi * distribution.
7135786f6Robert Mustacchi *
7235786f6Robert Mustacchi * 3.4. Intel retains all right, title, and interest in and to the Original
7335786f6Robert Mustacchi * Intel Code.
7435786f6Robert Mustacchi *
7535786f6Robert Mustacchi * 3.5. Neither the name Intel nor any other trademark owned or controlled by
7635786f6Robert Mustacchi * Intel shall be used in advertising or otherwise to promote the sale, use or
7735786f6Robert Mustacchi * other dealings in products derived from or relating to the Covered Code
7835786f6Robert Mustacchi * without prior written authorization from Intel.
7935786f6Robert Mustacchi *
8035786f6Robert Mustacchi * 4. Disclaimer and Export Compliance
8135786f6Robert Mustacchi *
8235786f6Robert Mustacchi * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
8335786f6Robert Mustacchi * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
8435786f6Robert Mustacchi * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
8535786f6Robert Mustacchi * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
8635786f6Robert Mustacchi * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
8735786f6Robert Mustacchi * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
8835786f6Robert Mustacchi * PARTICULAR PURPOSE.
8935786f6Robert Mustacchi *
9035786f6Robert Mustacchi * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
9135786f6Robert Mustacchi * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
9235786f6Robert Mustacchi * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
9335786f6Robert Mustacchi * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
9435786f6Robert Mustacchi * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
9535786f6Robert Mustacchi * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
9635786f6Robert Mustacchi * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
9735786f6Robert Mustacchi * LIMITED REMEDY.
9835786f6Robert Mustacchi *
9935786f6Robert Mustacchi * 4.3. Licensee shall not export, either directly or indirectly, any of this
10035786f6Robert Mustacchi * software or system incorporating such software without first obtaining any
10135786f6Robert Mustacchi * required license or other approval from the U. S. Department of Commerce or
10235786f6Robert Mustacchi * any other agency or department of the United States Government. In the
10335786f6Robert Mustacchi * event Licensee exports any such software from the United States or
10435786f6Robert Mustacchi * re-exports any such software from a foreign destination, Licensee shall
10535786f6Robert Mustacchi * ensure that the distribution and export/re-export of the software is in
10635786f6Robert Mustacchi * compliance with all laws, regulations, orders, or other restrictions of the
10735786f6Robert Mustacchi * U.S. Export Administration Regulations. Licensee agrees that neither it nor
10835786f6Robert Mustacchi * any of its subsidiaries will export/re-export any technical data, process,
10935786f6Robert Mustacchi * software, or service, directly or indirectly, to any country for which the
11035786f6Robert Mustacchi * United States government or any agency thereof requires an export license,
11135786f6Robert Mustacchi * other governmental approval, or letter of assurance, without first obtaining
11235786f6Robert Mustacchi * such license, approval or letter.
11335786f6Robert Mustacchi *
11435786f6Robert Mustacchi *****************************************************************************
11535786f6Robert Mustacchi *
11635786f6Robert Mustacchi * Alternatively, you may choose to be licensed under the terms of the
11735786f6Robert Mustacchi * following license:
11835786f6Robert Mustacchi *
11926f3cdfGordon Ross * Redistribution and use in source and binary forms, with or without
12026f3cdfGordon Ross * modification, are permitted provided that the following conditions
12126f3cdfGordon Ross * are met:
12226f3cdfGordon Ross * 1. Redistributions of source code must retain the above copyright
12326f3cdfGordon Ross *    notice, this list of conditions, and the following disclaimer,
12426f3cdfGordon Ross *    without modification.
12526f3cdfGordon Ross * 2. Redistributions in binary form must reproduce at minimum a disclaimer
12626f3cdfGordon Ross *    substantially similar to the "NO WARRANTY" disclaimer below
12726f3cdfGordon Ross *    ("Disclaimer") and any redistribution must be conditioned upon
12826f3cdfGordon Ross *    including a substantially similar Disclaimer requirement for further
12926f3cdfGordon Ross *    binary redistribution.
13026f3cdfGordon Ross * 3. Neither the names of the above-listed copyright holders nor the names
13126f3cdfGordon Ross *    of any contributors may be used to endorse or promote products derived
13226f3cdfGordon Ross *    from this software without specific prior written permission.
13326f3cdfGordon Ross *
13426f3cdfGordon Ross * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13526f3cdfGordon Ross * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
13635786f6Robert Mustacchi * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
13726f3cdfGordon Ross * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
13835786f6Robert Mustacchi * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
13935786f6Robert Mustacchi * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
14035786f6Robert Mustacchi * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
14135786f6Robert Mustacchi * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
14235786f6Robert Mustacchi * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
14335786f6Robert Mustacchi * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
14435786f6Robert Mustacchi * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14535786f6Robert Mustacchi *
14635786f6Robert Mustacchi * Alternatively, you may choose to be licensed under the terms of the
14735786f6Robert Mustacchi * GNU General Public License ("GPL") version 2 as published by the Free
14835786f6Robert Mustacchi * Software Foundation.
14935786f6Robert Mustacchi *
15035786f6Robert Mustacchi *****************************************************************************/
1517c478bdstevel@tonic-gate
1527c478bdstevel@tonic-gate#ifndef __ACWIN64_H__
1537c478bdstevel@tonic-gate#define __ACWIN64_H__
1547c478bdstevel@tonic-gate
15535786f6Robert Mustacchi#define ACPI_USE_STANDARD_HEADERS
15635786f6Robert Mustacchi#define ACPI_USE_SYSTEM_CLIBRARY
1577c478bdstevel@tonic-gate
1587c478bdstevel@tonic-gate#define ACPI_MACHINE_WIDTH          64
1597c478bdstevel@tonic-gate
16035786f6Robert Mustacchi/*
16135786f6Robert Mustacchi * Map low I/O functions for MS. This allows us to disable MS language
16235786f6Robert Mustacchi * extensions for maximum portability.
16335786f6Robert Mustacchi */
16435786f6Robert Mustacchi#define open            _open
16535786f6Robert Mustacchi#define read            _read
16635786f6Robert Mustacchi#define write           _write
16735786f6Robert Mustacchi#define close           _close
16835786f6Robert Mustacchi#define stat            _stat
16935786f6Robert Mustacchi#define fstat           _fstat
17035786f6Robert Mustacchi#define mkdir           _mkdir
17135786f6Robert Mustacchi#define snprintf        _snprintf
17235786f6Robert Mustacchi#if _MSC_VER <= 1200 /* Versions below VC++ 6 */
17335786f6Robert Mustacchi#define vsnprintf       _vsnprintf
17435786f6Robert Mustacchi#endif
17535786f6Robert Mustacchi#define O_RDONLY        _O_RDONLY
17635786f6Robert Mustacchi#define O_BINARY        _O_BINARY
17735786f6Robert Mustacchi#define O_CREAT         _O_CREAT
17835786f6Robert Mustacchi#define O_WRONLY        _O_WRONLY
17935786f6Robert Mustacchi#define O_TRUNC         _O_TRUNC
18035786f6Robert Mustacchi#define S_IREAD         _S_IREAD
18135786f6Robert Mustacchi#define S_IWRITE        _S_IWRITE
18235786f6Robert Mustacchi#define S_IFDIR         _S_IFDIR
1837c478bdstevel@tonic-gate
1847c478bdstevel@tonic-gate/*
1857c478bdstevel@tonic-gate * Handle platform- and compiler-specific assembly language differences.
1867c478bdstevel@tonic-gate *
1877c478bdstevel@tonic-gate * Notes:
1887c478bdstevel@tonic-gate * 1) Interrupt 3 is used to break into a debugger
1897c478bdstevel@tonic-gate * 2) Interrupts are turned off during ACPI register setup
1907c478bdstevel@tonic-gate */
1917c478bdstevel@tonic-gate
1927c478bdstevel@tonic-gate/*! [Begin] no source code translation  */
1937c478bdstevel@tonic-gate
1947c478bdstevel@tonic-gate#define ACPI_FLUSH_CPU_CACHE()
1957c478bdstevel@tonic-gate
1967c478bdstevel@tonic-gate/*
1977c478bdstevel@tonic-gate * For Acpi applications, we don't want to try to access the global lock
1987c478bdstevel@tonic-gate */
1997c478bdstevel@tonic-gate#ifdef ACPI_APPLICATION
2007c478bdstevel@tonic-gate#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq)       if (AcpiGbl_GlobalLockPresent) {Acq = 0xFF;} else {Acq = 0;}
2017c478bdstevel@tonic-gate#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Pnd)       if (AcpiGbl_GlobalLockPresent) {Pnd = 0xFF;} else {Pnd = 0;}
2027c478bdstevel@tonic-gate#else
2037c478bdstevel@tonic-gate
2047c478bdstevel@tonic-gate#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq)
2057c478bdstevel@tonic-gate
2067c478bdstevel@tonic-gate#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Pnd)
2077c478bdstevel@tonic-gate
2087c478bdstevel@tonic-gate#endif
2097c478bdstevel@tonic-gate
2107b1019aJerry Jelinek/*! [End] no source code translation !*/
2117c478bdstevel@tonic-gate
2127c478bdstevel@tonic-gate#endif /* __ACWIN_H__ */
213