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.


ea1d55a7ba2c612374d6d723e309ac5288ca54fb
[palacios.git] / palacios / include / devices / apic_regs.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
22 struct lapic_id_reg {
23   union {
24     uint32_t val;
25     struct {
26       uint_t rsvd          : 24;
27       uint_t apic_id       : 8;
28     } __attribute__((packed));
29   } __attribute__((packed));
30 } __attribute__((packed));
31
32 struct apic_ver_reg {
33   union {
34     uint32_t val;
35     struct {
36       uint_t ver           : 8;
37       uint_t rsvd1         : 8;
38       uint_t max_lvts      : 8;
39       uint_t rsvd2         : 7;
40       uint_t ext_reg_present : 1;
41     } __attribute__((packed));
42   } __attribute__((packed));
43 } __attribute__((packed));
44
45
46 struct ext_apic_ctrl_reg {
47   union {
48     uint32_t val;
49     struct {
50       uint_t ver           : 1;
51       uint_t seoi_enable   : 1;
52       uint_t ext_id_enable : 1;
53       uint_t rsvd2         : 29;
54     } __attribute__((packed));
55   } __attribute__((packed));
56 } __attribute__((packed));
57
58
59 struct local_vec_tbl_reg {
60   union {
61     uint32_t val;
62     struct {
63       uint_t vec           : 8;
64       uint_t msg_type      : 3;
65       uint_t rsvd1         : 1;
66       uint_t del_status    : 1;
67       uint_t rsvd2         : 1;
68       uint_t rem_irr       : 1;
69       uint_t trig_mode     : 1;
70       uint_t mask          : 1;
71       uint_t tmr_mode      : 1;
72       uint_t rsvd3         : 14;
73     } __attribute__((packed));
74   } __attribute__((packed));
75 } __attribute__((packed));
76
77
78 struct tmr_vec_tbl_reg {
79   union {
80     uint32_t val;
81     struct {
82       uint_t vec           : 8;
83       uint_t rsvd          : 4;
84       uint_t del_status    : 1;
85       uint_t rsvd2         : 3;
86       uint_t mask          : 1;
87       uint_t tmr_mode      : 1;
88       uint_t rsvd3         : 14;
89     } __attribute__((packed));
90   } __attribute__((packed));
91 } __attribute__((packed));
92
93
94 struct div_cfg_reg {
95   union {
96     uint32_t val;
97     struct {
98       uint_t div_val       : 2;
99       uint_t rsvd          : 1;
100       uint_t div_val2      : 1;
101       uint_t rsvd2         : 28;
102     } __attribute__((packed));
103   } __attribute__((packed));
104 } __attribute__((packed));
105
106
107 struct lint_vec_tbl_reg {
108   union {
109     uint32_t val;
110     struct {
111       uint_t vec           : 8;
112       uint_t msg_type      : 3;
113       uint_t rsvd1         : 1;
114       uint_t del_status    : 1;
115       uint_t rsvd2         : 1;
116       uint_t rem_irr       : 1;
117       uint_t trig_mode     : 1;
118       uint_t mask          : 1;
119       uint_t rsvd3         : 15;
120     } __attribute__((packed));
121   } __attribute__((packed));
122 } __attribute__((packed));
123
124
125 struct perf_ctr_loc_vec_tbl_reg {
126   union {
127     uint32_t val;
128     struct {
129       uint_t vec           : 8;
130       uint_t msg_type      : 3;
131       uint_t rsvd1         : 1;
132       uint_t del_status    : 1;
133       uint_t rsvd2         : 3;
134       uint_t mask          : 1;
135       uint_t rsvd3         : 15;
136     } __attribute__((packed));
137   } __attribute__((packed));
138 } __attribute__((packed));
139
140
141 struct therm_loc_vec_tbl_reg {
142   union {
143     uint32_t val;
144     struct {
145       uint_t vec           : 8;
146       uint_t msg_type      : 3;
147       uint_t rsvd1         : 1;
148       uint_t del_status    : 1;
149       uint_t rsvd2         : 3;
150       uint_t mask          : 1;
151       uint_t rsvd3         : 15;
152     } __attribute__((packed));
153   } __attribute__((packed));
154 } __attribute__((packed));
155
156 struct err_vec_tbl_reg {
157   union {
158     uint32_t val;
159     struct {
160       uint_t vec           : 8;
161       uint_t msg_type      : 3;
162       uint_t rsvd1         : 1;
163       uint_t del_status    : 1;
164       uint_t rsvd2         : 3;
165       uint_t mask          : 1;
166       uint_t rsvd3         : 15;
167     } __attribute__((packed));
168   } __attribute__((packed));
169 } __attribute__((packed));
170
171
172 struct err_status_reg {
173   union {
174     uint32_t val;
175     struct {
176       uint_t rsvd1         : 2;
177       uint_t sent_acc_err  : 1;
178       uint_t recv_acc_err  : 1;
179       uint_t rsvd2         : 1;
180       uint_t sent_ill_err  : 1;
181       uint_t recv_ill_err  : 1;
182       uint_t ill_reg_addr  : 1;
183       uint_t rsvd3         : 24;
184     } __attribute__((packed));
185   } __attribute__((packed));
186 } __attribute__((packed));
187
188
189 struct spurious_int_reg {
190   union {
191     uint32_t val;
192     struct {
193       uint_t vec           : 8;
194       uint_t apic_soft_en  : 1;
195       uint_t foc_cpu_chk   : 1;
196       uint_t rsvd1         : 22;
197     } __attribute__((packed));
198   } __attribute__((packed));
199 } __attribute__((packed));
200
201 struct int_cmd_reg {
202   union {
203     uint64_t val;
204
205     struct {
206       uint32_t lo;
207       uint32_t hi;
208     } __attribute__((packed));
209
210     struct {
211       uint_t vec           : 8;
212       uint_t msg_type      : 3;
213       uint_t dst_mode      : 1;
214       uint_t del_status    : 1;
215       uint_t rsvd1         : 1;
216       uint_t lvl           : 1;
217       uint_t trig_mode     : 1;
218       uint_t rem_rd_status : 2;
219       uint_t dst_shorthand : 2;
220       uint64_t rsvd2       : 36;
221       uint32_t dst         : 8;
222     } __attribute__((packed));
223   } __attribute__((packed));
224 } __attribute__((packed));
225
226
227 struct loc_dst_reg {
228   union {
229     uint32_t val;
230     struct {
231       uint_t rsvd1         : 24;
232       uint_t dst_log_id    : 8;
233     } __attribute__((packed));
234   } __attribute__((packed));
235 } __attribute__((packed));
236
237
238 struct dst_fmt_reg {
239   union {
240     uint32_t val;
241     struct {
242       uint_t rsvd1         : 28;
243       uint_t model         : 4;
244     } __attribute__((packed));
245   } __attribute__((packed));
246 } __attribute__((packed));
247
248
249 struct arb_prio_reg {
250   union {
251     uint32_t val;
252     struct {
253       uint_t arb_prio_sub  : 4;
254       uint_t arb_prio      : 4;
255       uint_t rsvd1         : 24;
256     } __attribute__((packed));
257   } __attribute__((packed));
258 } __attribute__((packed));
259
260
261
262
263 struct task_prio_reg {
264   union {
265     uint32_t val;
266     struct {
267       uint_t task_prio_sub  : 4;
268       uint_t task_prio      : 4;
269       uint_t rsvd1         : 24;
270     } __attribute__((packed));
271   } __attribute__((packed));
272 } __attribute__((packed));
273
274
275
276 struct proc_prio_reg {
277   union {
278     uint32_t val;
279     struct {
280       uint_t proc_prio_sub  : 4;
281       uint_t proc_prio      : 4;
282       uint_t rsvd1         : 24;
283     } __attribute__((packed));
284   } __attribute__((packed));
285 } __attribute__((packed));
286
287 struct ext_apic_feature_reg {
288   union {
289     uint32_t val;
290     struct {
291       uint_t int_en_reg_cap : 1;
292       uint_t spec_eoi_cap   : 1;
293       uint_t ext_apic_id_cap: 1;
294       uint_t rsvd1          : 13;
295       uint_t ext_lvt_cnt    : 8;
296       uint_t rsvd2          : 8;
297     } __attribute__((packed));
298   } __attribute__((packed));
299 } __attribute__((packed));
300
301
302 struct spec_eoi_reg {
303   union {
304     uint32_t val;
305     struct {
306       uint_t vec           : 8;
307       uint_t rsvd1         : 24;
308     } __attribute__((packed));
309   } __attribute__((packed));
310 } __attribute__((packed));
311
312