Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


2dcb229ee81293d75b82ec36b3772f761a80bace
[palacios.git] / palacios / src / vmboot / vmxassist / gen.c
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>
24
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));
47
48         printf("#define VMX_ASSIST_CTX_CR0      0x%x\n",
49                 (unsigned int)offsetof(struct vmx_assist_context, cr0));
50
51         return 0;
52 }