debuggers.hg

view xen/include/asm-x86/vmx_platform.h @ 3705:4294cfa9fad3

bitkeeper revision 1.1159.212.95 (4204aa0ee0re5Xx1zWrJ9ejxzgRs3w)

Various cleanups. Remove PDB pending simpler GDB stub and/or NetBSD debugger.
Force emacs mode to appropriate tabbing in various files.
Signed-off-by: keir.fraser@cl.cam.ac.uk
author kaf24@scramble.cl.cam.ac.uk
date Sat Feb 05 11:12:14 2005 +0000 (2005-02-05)
parents d03ad25af1a8
children 88957a238191
line source
1 /*
2 * vmx_platform.h: VMX platform support
3 * Copyright (c) 2004, Intel Corporation.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16 * Place - Suite 330, Boston, MA 02111-1307 USA.
17 *
18 */
19 #ifndef __ASM_X86_VMX_PLATFORM_H__
20 #define __ASM_X86_VMX_PLATFORM_H__
22 #include <public/xen.h>
23 #include <asm/e820.h>
25 #define MAX_OPERAND_NUM 3
26 #define I_NAME_LEN 16
28 #define mk_operand(size, index, seg, flag) \
29 (((size) << 24) | ((index) << 16) | ((seg) << 8) | (flag))
31 #define operand_size(operand) \
32 ((operand >> 24) & 0xFF)
34 #define operand_index(operand) \
35 ((operand >> 16) & 0xFF)
36 //For instruction.operand[].size
37 #define BYTE 1
38 #define WORD 2
39 #define LONG 4
40 #define QUAD 8
42 //For instruction.operand[].flag
43 #define REGISTER 0x1
44 #define MEMORY 0x2
45 #define IMMEDIATE 0x4
46 #define WZEROEXTEND 0x8
48 //For instruction.flags
49 #define REPZ 0x1
50 #define REPNZ 0x2
52 struct instruction {
53 __s8 i_name[I_NAME_LEN]; //Instruction's name
54 __s16 op_size; //The operand's bit size, e.g. 16-bit or 32-bit.
56 __u64 offset; //The effective address
57 //offset = Base + (Index * Scale) + Displacement
59 __u64 immediate;
61 __u16 seg_sel; //Segmentation selector
63 __u32 operand[MAX_OPERAND_NUM]; //The order of operand is from AT&T Assembly
64 __s16 op_num; //The operand numbers
66 __u32 flags; //
67 };
69 #define VGA_SPACE_START 0xA0000
70 #define VGA_SPACE_END 0xC0000
71 #define MAX_INST_LEN 32
73 struct mi_per_cpu_info
74 {
75 unsigned long mmio_target;
76 struct xen_regs *inst_decoder_regs;
77 };
79 struct virutal_platform_def {
80 unsigned long *real_mode_data; /* E820, etc. */
81 unsigned long shared_page_va;
82 struct mi_per_cpu_info mpci; /* MMIO */
83 };
85 extern void handle_mmio(unsigned long, unsigned long, unsigned long);
86 extern int vmx_setup_platform(struct exec_domain *, execution_context_t *);
88 static inline int mmio_space(unsigned long gpa)
89 {
90 if (gpa >= VGA_SPACE_START && gpa < VGA_SPACE_END) {
91 return 1;
92 }
93 return 0;
94 }
96 #endif