ia64/xen-unstable

view tools/ioemu/cpu.h @ 8740:3d7ea7972b39

Update patches for linux 2.6.15.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Thu Feb 02 17:16:00 2006 +0000 (2006-02-02)
parents b29954d81e6d
children
line source
1 /*
2 * i386 virtual CPU header
3 *
4 * Copyright (c) 2003 Fabrice Bellard
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20 #ifndef CPU_I386_H
21 #define CPU_I386_H
23 #include "config.h"
25 #ifdef TARGET_X86_64
26 #define TARGET_LONG_BITS 64
27 #else
28 #define TARGET_LONG_BITS 32
29 #endif
31 /* target supports implicit self modifying code */
32 #define TARGET_HAS_SMC
33 /* support for self modifying code even if the modified instruction is
34 close to the modifying instruction */
35 #define TARGET_HAS_PRECISE_SMC
37 #include "cpu-defs.h"
39 #if defined(__i386__) && !defined(CONFIG_SOFTMMU)
40 #define USE_CODE_COPY
41 #endif
43 /* Empty for now */
44 typedef struct CPUX86State {
45 uint32_t a20_mask;
46 int interrupt_request;
47 int send_event;
48 } CPUX86State;
50 #ifndef IN_OP_I386
51 void cpu_x86_outb(CPUX86State *env, int addr, int val);
52 void cpu_x86_outw(CPUX86State *env, int addr, int val);
53 void cpu_x86_outl(CPUX86State *env, int addr, int val);
54 int cpu_x86_inb(CPUX86State *env, int addr);
55 int cpu_x86_inw(CPUX86State *env, int addr);
56 int cpu_x86_inl(CPUX86State *env, int addr);
57 #endif
59 CPUX86State *cpu_x86_init(void);
60 int cpu_x86_exec(CPUX86State *s);
61 void cpu_x86_close(CPUX86State *s);
62 int cpu_get_pic_interrupt(CPUX86State *s);
63 /* MSDOS compatibility mode FPU exception support */
64 void cpu_set_ferr(CPUX86State *s);
66 /* helper2.c */
67 void cpu_x86_set_a20(CPUX86State *env, int a20_state);
69 #if defined(__i386__) || defined(__x86_64__)
70 #define TARGET_PAGE_BITS 12
71 #elif defined(__ia64__)
72 #define TARGET_PAGE_BITS 14
73 #endif
74 #include "cpu-all.h"
76 #endif /* CPU_I386_H */