1*4882a593Smuzhiyun /**************************************************************************** 2*4882a593Smuzhiyun * 3*4882a593Smuzhiyun * Realmode X86 Emulator Library 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * Copyright (C) 1991-2004 SciTech Software, Inc. 6*4882a593Smuzhiyun * Copyright (C) David Mosberger-Tang 7*4882a593Smuzhiyun * Copyright (C) 1999 Egbert Eich 8*4882a593Smuzhiyun * 9*4882a593Smuzhiyun * ======================================================================== 10*4882a593Smuzhiyun * 11*4882a593Smuzhiyun * Permission to use, copy, modify, distribute, and sell this software and 12*4882a593Smuzhiyun * its documentation for any purpose is hereby granted without fee, 13*4882a593Smuzhiyun * provided that the above copyright notice appear in all copies and that 14*4882a593Smuzhiyun * both that copyright notice and this permission notice appear in 15*4882a593Smuzhiyun * supporting documentation, and that the name of the authors not be used 16*4882a593Smuzhiyun * in advertising or publicity pertaining to distribution of the software 17*4882a593Smuzhiyun * without specific, written prior permission. The authors makes no 18*4882a593Smuzhiyun * representations about the suitability of this software for any purpose. 19*4882a593Smuzhiyun * It is provided "as is" without express or implied warranty. 20*4882a593Smuzhiyun * 21*4882a593Smuzhiyun * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 22*4882a593Smuzhiyun * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 23*4882a593Smuzhiyun * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR 24*4882a593Smuzhiyun * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF 25*4882a593Smuzhiyun * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 26*4882a593Smuzhiyun * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 27*4882a593Smuzhiyun * PERFORMANCE OF THIS SOFTWARE. 28*4882a593Smuzhiyun * 29*4882a593Smuzhiyun * ======================================================================== 30*4882a593Smuzhiyun * 31*4882a593Smuzhiyun * Language: ANSI C 32*4882a593Smuzhiyun * Environment: Any 33*4882a593Smuzhiyun * Developer: Kendall Bennett 34*4882a593Smuzhiyun * 35*4882a593Smuzhiyun * Description: Header file for system specific functions. These functions 36*4882a593Smuzhiyun * are always compiled and linked in the OS depedent libraries, 37*4882a593Smuzhiyun * and never in a binary portable driver. 38*4882a593Smuzhiyun * 39*4882a593Smuzhiyun ****************************************************************************/ 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun #ifndef __X86EMU_X86EMUI_H 42*4882a593Smuzhiyun #define __X86EMU_X86EMUI_H 43*4882a593Smuzhiyun 44*4882a593Smuzhiyun /* If we are compiling in C++ mode, we can compile some functions as 45*4882a593Smuzhiyun * inline to increase performance (however the code size increases quite 46*4882a593Smuzhiyun * dramatically in this case). 47*4882a593Smuzhiyun */ 48*4882a593Smuzhiyun 49*4882a593Smuzhiyun #if defined(__cplusplus) && !defined(_NO_INLINE) 50*4882a593Smuzhiyun #define _INLINE inline 51*4882a593Smuzhiyun #else 52*4882a593Smuzhiyun #define _INLINE static 53*4882a593Smuzhiyun #endif 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun /* Get rid of unused parameters in C++ compilation mode */ 56*4882a593Smuzhiyun 57*4882a593Smuzhiyun #ifdef __cplusplus 58*4882a593Smuzhiyun #define X86EMU_UNUSED(v) 59*4882a593Smuzhiyun #else 60*4882a593Smuzhiyun #define X86EMU_UNUSED(v) v 61*4882a593Smuzhiyun #endif 62*4882a593Smuzhiyun 63*4882a593Smuzhiyun #include "x86emu.h" 64*4882a593Smuzhiyun #include "x86emu/regs.h" 65*4882a593Smuzhiyun #include "x86emu/debug.h" 66*4882a593Smuzhiyun #include "x86emu/decode.h" 67*4882a593Smuzhiyun #include "x86emu/ops.h" 68*4882a593Smuzhiyun #include "x86emu/prim_ops.h" 69*4882a593Smuzhiyun #ifndef __KERNEL__ 70*4882a593Smuzhiyun #include <stdio.h> 71*4882a593Smuzhiyun #include <stdlib.h> 72*4882a593Smuzhiyun #include <string.h> 73*4882a593Smuzhiyun #endif 74*4882a593Smuzhiyun 75*4882a593Smuzhiyun /*--------------------------- Inline Functions ----------------------------*/ 76*4882a593Smuzhiyun 77*4882a593Smuzhiyun #ifdef __cplusplus 78*4882a593Smuzhiyun extern "C" { /* Use "C" linkage when in C++ mode */ 79*4882a593Smuzhiyun #endif 80*4882a593Smuzhiyun 81*4882a593Smuzhiyun extern u8(X86APIP sys_rdb) (u32 addr); 82*4882a593Smuzhiyun extern u16(X86APIP sys_rdw) (u32 addr); 83*4882a593Smuzhiyun extern u32(X86APIP sys_rdl) (u32 addr); 84*4882a593Smuzhiyun extern void (X86APIP sys_wrb) (u32 addr, u8 val); 85*4882a593Smuzhiyun extern void (X86APIP sys_wrw) (u32 addr, u16 val); 86*4882a593Smuzhiyun extern void (X86APIP sys_wrl) (u32 addr, u32 val); 87*4882a593Smuzhiyun 88*4882a593Smuzhiyun extern u8(X86APIP sys_inb) (X86EMU_pioAddr addr); 89*4882a593Smuzhiyun extern u16(X86APIP sys_inw) (X86EMU_pioAddr addr); 90*4882a593Smuzhiyun extern u32(X86APIP sys_inl) (X86EMU_pioAddr addr); 91*4882a593Smuzhiyun extern void (X86APIP sys_outb) (X86EMU_pioAddr addr, u8 val); 92*4882a593Smuzhiyun extern void (X86APIP sys_outw) (X86EMU_pioAddr addr, u16 val); 93*4882a593Smuzhiyun extern void (X86APIP sys_outl) (X86EMU_pioAddr addr, u32 val); 94*4882a593Smuzhiyun 95*4882a593Smuzhiyun #ifdef __cplusplus 96*4882a593Smuzhiyun } /* End of "C" linkage for C++ */ 97*4882a593Smuzhiyun #endif 98*4882a593Smuzhiyun #endif /* __X86EMU_X86EMUI_H */ 99