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.


added new copyright and license
[palacios.releases.git] / palacios / include / palacios / vmm_debug.h
1 /*
2  * This file is part of the Palacios Virtual Machine Monitor developed
3  * by the V3VEE Project with funding from the United States National 
4  * Science Foundation and the Department of Energy.  
5  *
6  * The V3VEE Project is a joint project between Northwestern University
7  * and the University of New Mexico.  You can find out more at 
8  * http://www.v3vee.org
9  *
10  * Copyright (c) 2008, Jack Lange <jarusl@cs.northwestern.edu> 
11  * Copyright (c) 2008, The V3VEE Project <http://www.v3vee.org> 
12  * All rights reserved.
13  *
14  * Author: Jack Lange <jarusl@cs.northwestern.edu>
15  *
16  * This is free software.  You are permitted to use,
17  * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
18  */
19
20
21 #ifndef __VMM_DEBUG_H
22 #define __VMM_DEBUG_H
23
24
25 #ifdef __V3VEE__
26 #include <palacios/vmm.h>
27
28 struct dbg_bp32 {
29   uint_t breakpoint : 32;
30 };
31
32 struct dbg_bp64 {
33   ullong_t breakpoint;
34 };
35
36 struct dr6_32 {
37   uint_t bp0 : 1;
38   uint_t bp1 : 1;
39   uint_t bp2 : 1;
40   uint_t bp3 : 1;
41   uint_t rsvd1 : 8; // read as ones
42   uint_t rsvd2 : 1; // read as zero
43   uint_t bd  : 1; 
44   uint_t bs  : 1;
45   uint_t bt  : 1;
46   uint_t rsvd3 : 16; // read as one
47 };
48
49
50 struct dr6_64 {
51   uint_t bp0 : 1;
52   uint_t bp1 : 1;
53   uint_t bp2 : 1;
54   uint_t bp3 : 1;
55   uint_t rsvd1 : 8; // read as ones
56   uint_t rsvd2 : 1; // read as zero
57   uint_t bd  : 1; 
58   uint_t bs  : 1;
59   uint_t bt  : 1;
60   uint_t rsvd3 : 16; // read as one
61   uint_t rsvd4 : 32; // MBZ
62 };
63
64
65 struct dr7_32 {
66   uint_t L0   : 1;
67   uint_t G0   : 1;
68   uint_t L1   : 1;
69   uint_t G1   : 1;
70   uint_t L2   : 1;
71   uint_t G2   : 1;
72   uint_t L3   : 1;
73   uint_t G3   : 1;
74   uint_t LE   : 1;
75   uint_t GE   : 1;
76   uint_t rsvd1 : 1; // Read as one
77   uint_t rsvd2 : 2; // Read as zero
78   uint_t GD   : 1;
79   uint_t rsvd3 : 2; // Read as zero
80   uint_t rw0  : 1;
81   uint_t len0 : 1;
82   uint_t rw1  : 1;
83   uint_t len1 : 1;
84   uint_t rw2  : 1;
85   uint_t len2 : 1;
86   uint_t rw3  : 1;
87   uint_t len3 : 1;
88 };
89
90
91 struct dr7_64 {
92   uint_t L0   : 1;
93   uint_t G0   : 1;
94   uint_t L1   : 1;
95   uint_t G1   : 1;
96   uint_t L2   : 1;
97   uint_t G2   : 1;
98   uint_t L3   : 1;
99   uint_t G3   : 1;
100   uint_t LE   : 1;
101   uint_t GE   : 1;
102   uint_t rsvd1 : 1; // Read as one
103   uint_t rsvd2 : 2; // Read as zero
104   uint_t GD   : 1;
105   uint_t rsvd3 : 2; // Read as zero
106   uint_t rw0  : 1;
107   uint_t len0 : 1;
108   uint_t rw1  : 1;
109   uint_t len1 : 1;
110   uint_t rw2  : 1;
111   uint_t len2 : 1;
112   uint_t rw3  : 1;
113   uint_t len3 : 1;
114   uint_t rsvd4 : 32; // MBZ
115 };
116
117
118
119
120
121
122 void PrintDebugHex(unsigned char x);
123 void PrintDebugMemDump(unsigned char *start, int n);
124
125
126
127 #endif // !__V3VEE__
128
129 #endif