1 /****************************************************************************
3 * SciTech OS Portability Manager Library
5 * ========================================================================
7 * The contents of this file are subject to the SciTech MGL Public
8 * License Version 1.0 (the "License"); you may not use this file
9 * except in compliance with the License. You may obtain a copy of
10 * the License at http://www.scitechsoft.com/mgl-license.txt
12 * Software distributed under the License is distributed on an
13 * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
14 * implied. See the License for the specific language governing
15 * rights and limitations under the License.
17 * The Original Code is Copyright (C) 1991-1998 SciTech Software, Inc.
19 * The Initial Developer of the Original Code is SciTech Software, Inc.
20 * All Rights Reserved.
22 * ========================================================================
27 * Description: Include file defining the external ring 0 helper functions
28 * needed by the MTRR module. These functions may be included
29 * directly for native ring 0 device drivers, or they may
30 * be calls down to a ring 0 helper device driver where
31 * appropriate (or the entire MTRR module may be located in
32 * the device driver if the device driver is 32-bit).
34 ****************************************************************************/
41 /*--------------------------- Function Prototypes -------------------------*/
44 extern "C" { /* Use "C" linkage when in C++ mode */
47 /* Internal functions (requires ring 0 access or helper functions!) */
50 int MTRR_enableWriteCombine(ulong base,ulong size,uint type);
52 /* External assembler helper functions */
54 ibool _ASMAPI _MTRR_isRing0(void);
55 ulong _ASMAPI _MTRR_disableInt(void);
56 void _ASMAPI _MTRR_restoreInt(ulong flags);
57 ulong _ASMAPI _MTRR_saveCR4(void);
58 void _ASMAPI _MTRR_restoreCR4(ulong cr4Val);
59 uchar _ASMAPI _MTRR_getCx86(uchar reg);
60 void _ASMAPI _MTRR_setCx86(uchar reg,uchar data);
62 void _ASMAPI _MTRR_readMSR(ulong reg, ulong far *eax, ulong far *edx);
64 void _ASMAPI _MTRR_readMSR(ulong reg, ulong *eax, ulong *edx);
66 void _ASMAPI _MTRR_writeMSR(ulong reg, ulong eax, ulong edx);
69 } /* End of "C" linkage for C++ */