direct-io.hg

view tools/firmware/vmxassist/vm86.h @ 7477:5a7baecb1c70

Fix an issue for passing arguement from control panel to deivce model
for some arguemnt like 'localtime', 'isa', device model need an argument
"-localtime", instead of "-localtime 1"
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Sun Oct 23 16:51:47 2005 +0100 (2005-10-23)
parents b3a255e88810
children 9fc306e40a7c
line source
1 /*
2 * vm86.h: vm86 emulator definitions.
3 *
4 * Leendert van Doorn, leendert@watson.ibm.com
5 * Copyright (c) 2005, International Business Machines Corporation.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms and conditions of the GNU General Public License,
9 * version 2, as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
18 * Place - Suite 330, Boston, MA 02111-1307 USA.
19 */
20 #ifndef __VM86_H__
21 #define __VM86_H__
23 #ifndef __ASSEMBLY__
24 #include <stdint.h>
25 #endif
27 #include <xen/vmx_assist.h>
29 #define NR_EXCEPTION_HANDLER 32
30 #define NR_INTERRUPT_HANDLERS 16
31 #define NR_TRAPS (NR_EXCEPTION_HANDLER+NR_INTERRUPT_HANDLERS)
33 #ifndef __ASSEMBLY__
35 struct regs {
36 unsigned edi, esi, ebp, esp, ebx, edx, ecx, eax;
37 unsigned ds, es, fs, gs;
38 unsigned trapno, errno;
39 unsigned eip, cs, eflags, uesp, uss;
40 unsigned ves, vds, vfs, vgs;
41 };
43 enum vm86_mode {
44 VM86_REAL = 0,
45 VM86_REAL_TO_PROTECTED,
46 VM86_PROTECTED_TO_REAL,
47 VM86_PROTECTED
48 };
50 #ifdef DEBUG
51 #define TRACE(a) trace a
52 #else
53 #define TRACE(a)
54 #endif
56 extern enum vm86_mode prevmode, mode;
57 extern struct vmx_assist_context oldctx;
58 extern struct vmx_assist_context newctx;
60 extern void emulate(struct regs *);
61 extern void interrupt(struct regs *, int);
62 extern void dump_regs(struct regs *);
63 extern void trace(struct regs *, int, char *, ...);
65 extern void set_mode(struct regs *, enum vm86_mode);
66 extern void switch_to_real_mode(void);
67 extern void switch_to_protected_mode(void);
69 #endif /* __ASSEMBLY__ */
71 #endif /* __VM86_H__ */