acintel.h revision 941:49d0d4c2eea8
10SN/A/****************************************************************************** 21033Sclanger * 30SN/A * Name: acintel.h - VC specific defines, etc. 40SN/A * $Revision: 1.14 $ 51033Sclanger * 61033Sclanger *****************************************************************************/ 71033Sclanger 81033Sclanger/****************************************************************************** 91033Sclanger * 101033Sclanger * 1. Copyright Notice 110SN/A * 120SN/A * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp. 130SN/A * All rights reserved. 140SN/A * 150SN/A * 2. License 160SN/A * 170SN/A * 2.1. This is your license from Intel Corp. under its intellectual property 180SN/A * rights. You may have additional license terms from the party that provided 190SN/A * you this software, covering your right to use that party's intellectual 201033Sclanger * property rights. 210SN/A * 220SN/A * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 231033Sclanger * copy of the source code appearing in this file ("Covered Code") an 241033Sclanger * irrevocable, perpetual, worldwide license under Intel's copyrights in the 250SN/A * base code distributed originally by Intel ("Original Intel Code") to copy, 26599SN/A * make derivatives, distribute, use and display any portion of the Covered 27599SN/A * Code in any form, with the right to sublicense such rights; and 28599SN/A * 29599SN/A * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 300SN/A * license (with the right to sublicense), under only those claims of Intel 310SN/A * patents that are infringed by the Original Intel Code, to make, use, sell, 320SN/A * offer to sell, and import the Covered Code and derivative works thereof 330SN/A * solely to the minimum extent necessary to exercise the above copyright 340SN/A * license, and in no event shall the patent license extend to any additions 350SN/A * to or modifications of the Original Intel Code. No other license or right 360SN/A * is granted directly or by implication, estoppel or otherwise; 370SN/A * 380SN/A * The above copyright and patent license is granted only if the following 390SN/A * conditions are met: 400SN/A * 410SN/A * 3. Conditions 420SN/A * 430SN/A * 3.1. Redistribution of Source with Rights to Further Distribute Source. 440SN/A * Redistribution of source code of any substantial portion of the Covered 450SN/A * Code or modification with rights to further distribute source must include 460SN/A * the above Copyright Notice, the above License, this list of Conditions, 470SN/A * and the following Disclaimer and Export Compliance provision. In addition, 480SN/A * Licensee must cause all Covered Code to which Licensee contributes to 490SN/A * contain a file documenting the changes Licensee made to create that Covered 500SN/A * Code and the date of any change. Licensee must include in that file the 510SN/A * documentation of any changes made by any predecessor Licensee. Licensee 520SN/A * must include a prominent statement that the modification is derived, 530SN/A * directly or indirectly, from Original Intel Code. 540SN/A * 550SN/A * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 560SN/A * Redistribution of source code of any substantial portion of the Covered 571033Sclanger * Code or modification without rights to further distribute source must 580SN/A * include the following Disclaimer and Export Compliance provision in the 590SN/A * documentation and/or other materials provided with distribution. In 600SN/A * addition, Licensee may not authorize further sublicense of source of any 610SN/A * portion of the Covered Code, and must include terms to the effect that the 620SN/A * license from Licensee to its licensee is limited to the intellectual 630SN/A * property embodied in the software Licensee provides to its licensee, and 640SN/A * not to intellectual property embodied in modifications its licensee may 650SN/A * make. 660SN/A * 670SN/A * 3.3. Redistribution of Executable. Redistribution in executable form of any 680SN/A * substantial portion of the Covered Code or modification must reproduce the 690SN/A * above Copyright Notice, and the following Disclaimer and Export Compliance 700SN/A * provision in the documentation and/or other materials provided with the 710SN/A * distribution. 721033Sclanger * 730SN/A * 3.4. Intel retains all right, title, and interest in and to the Original 740SN/A * Intel Code. 750SN/A * 760SN/A * 3.5. Neither the name Intel nor any other trademark owned or controlled by 770SN/A * Intel shall be used in advertising or otherwise to promote the sale, use or 780SN/A * other dealings in products derived from or relating to the Covered Code 790SN/A * without prior written authorization from Intel. 801033Sclanger * 810SN/A * 4. Disclaimer and Export Compliance 820SN/A * 830SN/A * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 840SN/A * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 850SN/A * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 860SN/A * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 870SN/A * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 880SN/A * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 890SN/A * PARTICULAR PURPOSE. 900SN/A * 910SN/A * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 920SN/A * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 930SN/A * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 940SN/A * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 950SN/A * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 961055Sfyuan * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 971055Sfyuan * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 981055Sfyuan * LIMITED REMEDY. 990SN/A * 1001055Sfyuan * 4.3. Licensee shall not export, either directly or indirectly, any of this 1010SN/A * software or system incorporating such software without first obtaining any 1020SN/A * required license or other approval from the U. S. Department of Commerce or 1030SN/A * any other agency or department of the United States Government. In the 1040SN/A * event Licensee exports any such software from the United States or 1050SN/A * re-exports any such software from a foreign destination, Licensee shall 1060SN/A * ensure that the distribution and export/re-export of the software is in 1070SN/A * compliance with all laws, regulations, orders, or other restrictions of the 108599SN/A * U.S. Export Administration Regulations. Licensee agrees that neither it nor 1090SN/A * any of its subsidiaries will export/re-export any technical data, process, 1100SN/A * software, or service, directly or indirectly, to any country for which the 1110SN/A * United States government or any agency thereof requires an export license, 1120SN/A * other governmental approval, or letter of assurance, without first obtaining 113599SN/A * such license, approval or letter. 1140SN/A * 1150SN/A *****************************************************************************/ 1160SN/A 1170SN/A#ifndef __ACINTEL_H__ 1180SN/A#define __ACINTEL_H__ 1190SN/A 1200SN/A 1210SN/A#define COMPILER_DEPENDENT_INT64 __int64 1220SN/A#define COMPILER_DEPENDENT_UINT64 unsigned __int64 1230SN/A 124599SN/A/* 1250SN/A * Calling conventions: 1260SN/A * 1270SN/A * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads) 1280SN/A * ACPI_EXTERNAL_XFACE - External ACPI interfaces 1290SN/A * ACPI_INTERNAL_XFACE - Internal ACPI interfaces 1300SN/A * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces 1310SN/A */ 1320SN/A#define ACPI_SYSTEM_XFACE 1330SN/A#define ACPI_EXTERNAL_XFACE 1340SN/A#define ACPI_INTERNAL_XFACE 1350SN/A#define ACPI_INTERNAL_VAR_XFACE 1360SN/A 137293SN/A/* 138293SN/A * Math helper functions 139293SN/A */ 140293SN/A#define ACPI_DIV_64_BY_32(n, n_hi, n_lo, d32, q32, r32) \ 141293SN/A{ \ 1420SN/A q32 = n / d32; \ 1430SN/A r32 = n % d32; \ 1440SN/A} 1451033Sclanger 1460SN/A#define ACPI_SHIFT_RIGHT_64(n, n_hi, n_lo) \ 1470SN/A{ \ 1480SN/A n <<= 1; \ 1491055Sfyuan} 1500SN/A 1510SN/A/* remark 981 - operands evaluated in no particular order */ 1520SN/A#pragma warning(disable:981) 1530SN/A 154599SN/A/* warn C4100: unreferenced formal parameter */ 1550SN/A#pragma warning(disable:4100) 1560SN/A 1570SN/A/* warn C4127: conditional expression is constant */ 1580SN/A#pragma warning(disable:4127) 159599SN/A 1600SN/A/* warn C4706: assignment within conditional expression */ 1610SN/A#pragma warning(disable:4706) 1620SN/A 1630SN/A/* warn C4214: bit field types other than int */ 1640SN/A#pragma warning(disable:4214) 1650SN/A 1660SN/A/* This macro is used to tag functions as "printf-like" because 1670SN/A * some compilers can catch printf format string problems. MSVC 1680SN/A * doesn't, so this is proprocessed away. 1690SN/A */ 1700SN/A#define ACPI_PRINTF_LIKE_FUNC 1710SN/A 1720SN/A/* Some compilers complain about unused variables. Sometimes we don't want to 1730SN/A * use all the variables (for example, _AcpiModuleName). This allows us 1740SN/A * to to tell the compiler warning in a per-variable manner that a variable 1750SN/A * is unused. However, MSVC doesn't do this. 1760SN/A */ 1770SN/A#define ACPI_UNUSED_VAR 1780SN/A 1790SN/A#endif /* __ACINTEL_H__ */ 1800SN/A