direct-io.hg

view tools/firmware/vmxassist/gen.c @ 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 29db5bded574
children
line source
1 /*
2 * gen.c: Generate assembler symbols.
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 #include <stdio.h>
21 #include <stddef.h>
22 #include <stdlib.h>
23 #include <vm86.h>
25 int
26 main(void)
27 {
28 printf("/* MACHINE GENERATED; DO NOT EDIT */\n");
29 printf("#define VMX_ASSIST_CTX_GS_SEL 0x%x\n",
30 (unsigned int)offsetof(struct vmx_assist_context, gs_sel));
31 printf("#define VMX_ASSIST_CTX_FS_SEL 0x%x\n",
32 (unsigned int)offsetof(struct vmx_assist_context, fs_sel));
33 printf("#define VMX_ASSIST_CTX_DS_SEL 0x%x\n",
34 (unsigned int)offsetof(struct vmx_assist_context, ds_sel));
35 printf("#define VMX_ASSIST_CTX_ES_SEL 0x%x\n",
36 (unsigned int)offsetof(struct vmx_assist_context, es_sel));
37 printf("#define VMX_ASSIST_CTX_SS_SEL 0x%x\n",
38 (unsigned int)offsetof(struct vmx_assist_context, ss_sel));
39 printf("#define VMX_ASSIST_CTX_ESP 0x%x\n",
40 (unsigned int)offsetof(struct vmx_assist_context, esp));
41 printf("#define VMX_ASSIST_CTX_EFLAGS 0x%x\n",
42 (unsigned int)offsetof(struct vmx_assist_context, eflags));
43 printf("#define VMX_ASSIST_CTX_CS_SEL 0x%x\n",
44 (unsigned int)offsetof(struct vmx_assist_context, cs_sel));
45 printf("#define VMX_ASSIST_CTX_EIP 0x%x\n",
46 (unsigned int)offsetof(struct vmx_assist_context, eip));
48 printf("#define VMX_ASSIST_CTX_CR0 0x%x\n",
49 (unsigned int)offsetof(struct vmx_assist_context, cr0));
51 return 0;
52 }