acintel.h revision 347:04ff98e42cf2
143412Snewton/******************************************************************************
243412Snewton *
343412Snewton * Name: acintel.h - VC specific defines, etc.
443412Snewton *       $Revision: 13 $
543412Snewton *
643412Snewton *****************************************************************************/
743412Snewton
843412Snewton/******************************************************************************
943412Snewton *
1043412Snewton * 1. Copyright Notice
1143412Snewton *
1243412Snewton * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
1343412Snewton * All rights reserved.
1443412Snewton *
1543412Snewton * 2. License
1643412Snewton *
1743412Snewton * 2.1. This is your license from Intel Corp. under its intellectual property
1843412Snewton * rights.  You may have additional license terms from the party that provided
1943412Snewton * you this software, covering your right to use that party's intellectual
2043412Snewton * property rights.
2143412Snewton *
2243412Snewton * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
2343412Snewton * copy of the source code appearing in this file ("Covered Code") an
2443412Snewton * irrevocable, perpetual, worldwide license under Intel's copyrights in the
2543412Snewton * base code distributed originally by Intel ("Original Intel Code") to copy,
2643412Snewton * make derivatives, distribute, use and display any portion of the Covered
2743412Snewton * Code in any form, with the right to sublicense such rights; and
2843412Snewton *
2943412Snewton * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
3043412Snewton * license (with the right to sublicense), under only those claims of Intel
3143412Snewton * patents that are infringed by the Original Intel Code, to make, use, sell,
3243412Snewton * offer to sell, and import the Covered Code and derivative works thereof
3343412Snewton * solely to the minimum extent necessary to exercise the above copyright
3443412Snewton * license, and in no event shall the patent license extend to any additions
3543412Snewton * to or modifications of the Original Intel Code.  No other license or right
3643412Snewton * is granted directly or by implication, estoppel or otherwise;
3743412Snewton *
3843412Snewton * The above copyright and patent license is granted only if the following
3943412Snewton * conditions are met:
4043412Snewton *
4143412Snewton * 3. Conditions
4243412Snewton *
4343412Snewton * 3.1. Redistribution of Source with Rights to Further Distribute Source.
4443412Snewton * Redistribution of source code of any substantial portion of the Covered
4543412Snewton * Code or modification with rights to further distribute source must include
4643412Snewton * the above Copyright Notice, the above License, this list of Conditions,
4743412Snewton * and the following Disclaimer and Export Compliance provision.  In addition,
4843412Snewton * Licensee must cause all Covered Code to which Licensee contributes to
4943412Snewton * contain a file documenting the changes Licensee made to create that Covered
5043412Snewton * Code and the date of any change.  Licensee must include in that file the
5143412Snewton * documentation of any changes made by any predecessor Licensee.  Licensee
5243412Snewton * must include a prominent statement that the modification is derived,
5343412Snewton * directly or indirectly, from Original Intel Code.
5443412Snewton *
5543412Snewton * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
5643412Snewton * Redistribution of source code of any substantial portion of the Covered
5743412Snewton * Code or modification without rights to further distribute source must
5843412Snewton * include the following Disclaimer and Export Compliance provision in the
5943412Snewton * documentation and/or other materials provided with distribution.  In
6043412Snewton * addition, Licensee may not authorize further sublicense of source of any
6143412Snewton * portion of the Covered Code, and must include terms to the effect that the
6243412Snewton * license from Licensee to its licensee is limited to the intellectual
6343412Snewton * property embodied in the software Licensee provides to its licensee, and
6443412Snewton * not to intellectual property embodied in modifications its licensee may
6543412Snewton * make.
6643412Snewton *
6743412Snewton * 3.3. Redistribution of Executable. Redistribution in executable form of any
6843412Snewton * substantial portion of the Covered Code or modification must reproduce the
6943412Snewton * above Copyright Notice, and the following Disclaimer and Export Compliance
7043412Snewton * provision in the documentation and/or other materials provided with the
7143412Snewton * distribution.
7243412Snewton *
7343412Snewton * 3.4. Intel retains all right, title, and interest in and to the Original
7443412Snewton * Intel Code.
7543412Snewton *
7643412Snewton * 3.5. Neither the name Intel nor any other trademark owned or controlled by
7743412Snewton * Intel shall be used in advertising or otherwise to promote the sale, use or
7843412Snewton * other dealings in products derived from or relating to the Covered Code
7943412Snewton * without prior written authorization from Intel.
8043412Snewton *
8143412Snewton * 4. Disclaimer and Export Compliance
8243412Snewton *
8343412Snewton * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
8443412Snewton * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
8543412Snewton * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
8643412Snewton * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
8743412Snewton * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
8843412Snewton * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
8943412Snewton * PARTICULAR PURPOSE.
9043412Snewton *
9143412Snewton * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
9243412Snewton * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
9343412Snewton * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
9443412Snewton * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
9543412Snewton * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
9643412Snewton * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
9743412Snewton * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
9843412Snewton * LIMITED REMEDY.
9943412Snewton *
10043412Snewton * 4.3. Licensee shall not export, either directly or indirectly, any of this
10143412Snewton * software or system incorporating such software without first obtaining any
10243412Snewton * required license or other approval from the U. S. Department of Commerce or
10343412Snewton * any other agency or department of the United States Government.  In the
10443412Snewton * event Licensee exports any such software from the United States or
10543412Snewton * re-exports any such software from a foreign destination, Licensee shall
10643412Snewton * ensure that the distribution and export/re-export of the software is in
10743412Snewton * compliance with all laws, regulations, orders, or other restrictions of the
10843412Snewton * U.S. Export Administration Regulations. Licensee agrees that neither it nor
10943412Snewton * any of its subsidiaries will export/re-export any technical data, process,
11043412Snewton * software, or service, directly or indirectly, to any country for which the
11143412Snewton * United States government or any agency thereof requires an export license,
11243412Snewton * other governmental approval, or letter of assurance, without first obtaining
11343412Snewton * such license, approval or letter.
11443412Snewton *
11543412Snewton *****************************************************************************/
11643412Snewton
11743412Snewton#ifndef __ACINTEL_H__
11843412Snewton#define __ACINTEL_H__
11943412Snewton
12043412Snewton
12143412Snewton#define COMPILER_DEPENDENT_INT64   __int64
12243412Snewton#define COMPILER_DEPENDENT_UINT64  unsigned __int64
12343412Snewton
12443412Snewton/*
12543412Snewton * Calling conventions:
12643412Snewton *
12743412Snewton * ACPI_SYSTEM_XFACE        - Interfaces to host OS (handlers, threads)
12843412Snewton * ACPI_EXTERNAL_XFACE      - External ACPI interfaces
12943412Snewton * ACPI_INTERNAL_XFACE      - Internal ACPI interfaces
13043412Snewton * ACPI_INTERNAL_VAR_XFACE  - Internal variable-parameter list interfaces
131 */
132#define ACPI_SYSTEM_XFACE
133#define ACPI_EXTERNAL_XFACE
134#define ACPI_INTERNAL_XFACE
135#define ACPI_INTERNAL_VAR_XFACE
136
137/*
138 * Math helper functions
139 */
140#define ACPI_DIV_64_BY_32(n, n_hi, n_lo, d32, q32, r32) \
141{ \
142    q32 = n / d32; \
143    r32 = n % d32; \
144}
145
146#define ACPI_SHIFT_RIGHT_64(n, n_hi, n_lo) \
147{ \
148    n <<= 1; \
149}
150
151/* remark 981 - operands evaluated in no particular order */
152#pragma warning(disable:981)
153
154/* warn C4100: unreferenced formal parameter */
155#pragma warning(disable:4100)
156
157/* warn C4127: conditional expression is constant */
158#pragma warning(disable:4127)
159
160/* warn C4706: assignment within conditional expression */
161#pragma warning(disable:4706)
162
163/* This macro is used to tag functions as "printf-like" because
164 * some compilers can catch printf format string problems. MSVC
165 * doesn't, so this is proprocessed away.
166 */
167#define ACPI_PRINTF_LIKE_FUNC
168
169/* Some compilers complain about unused variables. Sometimes we don't want to
170 * use all the variables (for example, _AcpiModuleName). This allows us
171 * to to tell the compiler warning in a per-variable manner that a variable
172 * is unused. However, MSVC doesn't do this.
173 */
174#define ACPI_UNUSED_VAR
175
176#endif /* __ACINTEL_H__ */
177