debuggers.hg

view xen/include/asm-x86/msr-index.h @ 0:7d21f7218375

Exact replica of unstable on 051908 + README-this
author Mukesh Rathor
date Mon May 19 15:34:57 2008 -0700 (2008-05-19)
parents
children 5c0bf00e371d
line source
1 #ifndef __ASM_MSR_INDEX_H
2 #define __ASM_MSR_INDEX_H
4 /* CPU model specific register (MSR) numbers */
6 /* x86-64 specific MSRs */
7 #define MSR_EFER 0xc0000080 /* extended feature register */
8 #define MSR_STAR 0xc0000081 /* legacy mode SYSCALL target */
9 #define MSR_LSTAR 0xc0000082 /* long mode SYSCALL target */
10 #define MSR_CSTAR 0xc0000083 /* compat mode SYSCALL target */
11 #define MSR_SYSCALL_MASK 0xc0000084 /* EFLAGS mask for syscall */
12 #define MSR_FS_BASE 0xc0000100 /* 64bit FS base */
13 #define MSR_GS_BASE 0xc0000101 /* 64bit GS base */
14 #define MSR_SHADOW_GS_BASE 0xc0000102 /* SwapGS GS shadow */
16 /* EFER bits: */
17 #define _EFER_SCE 0 /* SYSCALL/SYSRET */
18 #define _EFER_LME 8 /* Long mode enable */
19 #define _EFER_LMA 10 /* Long mode active (read-only) */
20 #define _EFER_NX 11 /* No execute enable */
21 #define _EFER_SVME 12 /* AMD: SVM enable */
22 #define _EFER_LMSLE 13 /* AMD: Long-mode segment limit enable */
23 #define _EFER_FFXSE 14 /* AMD: Fast FXSAVE/FXRSTOR enable */
25 #define EFER_SCE (1<<_EFER_SCE)
26 #define EFER_LME (1<<_EFER_LME)
27 #define EFER_LMA (1<<_EFER_LMA)
28 #define EFER_NX (1<<_EFER_NX)
29 #define EFER_SVME (1<<_EFER_SVME)
30 #define EFER_LMSLE (1<<_EFER_LMSLE)
31 #define EFER_FFXSE (1<<_EFER_FFXSE)
33 /* Intel MSRs. Some also available on other CPUs */
34 #define MSR_IA32_PERFCTR0 0x000000c1
35 #define MSR_IA32_PERFCTR1 0x000000c2
36 #define MSR_FSB_FREQ 0x000000cd
38 #define MSR_MTRRcap 0x000000fe
39 #define MSR_IA32_BBL_CR_CTL 0x00000119
41 #define MSR_IA32_SYSENTER_CS 0x00000174
42 #define MSR_IA32_SYSENTER_ESP 0x00000175
43 #define MSR_IA32_SYSENTER_EIP 0x00000176
45 #define MSR_IA32_MCG_CAP 0x00000179
46 #define MSR_IA32_MCG_STATUS 0x0000017a
47 #define MSR_IA32_MCG_CTL 0x0000017b
49 #define MSR_IA32_PEBS_ENABLE 0x000003f1
50 #define MSR_IA32_DS_AREA 0x00000600
51 #define MSR_IA32_PERF_CAPABILITIES 0x00000345
53 #define MSR_MTRRfix64K_00000 0x00000250
54 #define MSR_MTRRfix16K_80000 0x00000258
55 #define MSR_MTRRfix16K_A0000 0x00000259
56 #define MSR_MTRRfix4K_C0000 0x00000268
57 #define MSR_MTRRfix4K_C8000 0x00000269
58 #define MSR_MTRRfix4K_D0000 0x0000026a
59 #define MSR_MTRRfix4K_D8000 0x0000026b
60 #define MSR_MTRRfix4K_E0000 0x0000026c
61 #define MSR_MTRRfix4K_E8000 0x0000026d
62 #define MSR_MTRRfix4K_F0000 0x0000026e
63 #define MSR_MTRRfix4K_F8000 0x0000026f
64 #define MSR_MTRRdefType 0x000002ff
66 #define MSR_IA32_DEBUGCTLMSR 0x000001d9
67 #define MSR_IA32_LASTBRANCHFROMIP 0x000001db
68 #define MSR_IA32_LASTBRANCHTOIP 0x000001dc
69 #define MSR_IA32_LASTINTFROMIP 0x000001dd
70 #define MSR_IA32_LASTINTTOIP 0x000001de
72 #define MSR_IA32_MTRR_PHYSBASE0 0x00000200
73 #define MSR_IA32_MTRR_PHYSMASK0 0x00000201
74 #define MSR_IA32_MTRR_PHYSBASE1 0x00000202
75 #define MSR_IA32_MTRR_PHYSMASK1 0x00000203
76 #define MSR_IA32_MTRR_PHYSBASE2 0x00000204
77 #define MSR_IA32_MTRR_PHYSMASK2 0x00000205
78 #define MSR_IA32_MTRR_PHYSBASE3 0x00000206
79 #define MSR_IA32_MTRR_PHYSMASK3 0x00000207
80 #define MSR_IA32_MTRR_PHYSBASE4 0x00000208
81 #define MSR_IA32_MTRR_PHYSMASK4 0x00000209
82 #define MSR_IA32_MTRR_PHYSBASE5 0x0000020a
83 #define MSR_IA32_MTRR_PHYSMASK5 0x0000020b
84 #define MSR_IA32_MTRR_PHYSBASE6 0x0000020c
85 #define MSR_IA32_MTRR_PHYSMASK6 0x0000020d
86 #define MSR_IA32_MTRR_PHYSBASE7 0x0000020e
87 #define MSR_IA32_MTRR_PHYSMASK7 0x0000020f
89 #define MSR_IA32_CR_PAT 0x00000277
91 #define MSR_IA32_MC0_CTL 0x00000400
92 #define MSR_IA32_MC0_STATUS 0x00000401
93 #define MSR_IA32_MC0_ADDR 0x00000402
94 #define MSR_IA32_MC0_MISC 0x00000403
96 #define MSR_IA32_MC1_CTL 0x00000404
97 #define MSR_IA32_MC1_STATUS 0x00000405
98 #define MSR_IA32_MC1_ADDR 0x00000406
99 #define MSR_IA32_MC1_MISC 0x00000407
101 #define MSR_IA32_MC2_CTL 0x00000408
102 #define MSR_IA32_MC2_STATUS 0x00000409
103 #define MSR_IA32_MC2_ADDR 0x0000040A
104 #define MSR_IA32_MC2_MISC 0x0000040B
106 #define MSR_IA32_MC3_CTL 0x0000040C
107 #define MSR_IA32_MC3_STATUS 0x0000040D
108 #define MSR_IA32_MC3_ADDR 0x0000040E
109 #define MSR_IA32_MC3_MISC 0x0000040F
111 #define MSR_IA32_MC4_CTL 0x00000410
112 #define MSR_IA32_MC4_STATUS 0x00000411
113 #define MSR_IA32_MC4_ADDR 0x00000412
114 #define MSR_IA32_MC4_MISC 0x00000413
116 #define MSR_IA32_MC5_CTL 0x00000414
117 #define MSR_IA32_MC5_STATUS 0x00000415
118 #define MSR_IA32_MC5_ADDR 0x00000416
119 #define MSR_IA32_MC5_MISC 0x00000417
121 #define MSR_P6_PERFCTR0 0x000000c1
122 #define MSR_P6_PERFCTR1 0x000000c2
123 #define MSR_P6_EVNTSEL0 0x00000186
124 #define MSR_P6_EVNTSEL1 0x00000187
126 /* MSRs & bits used for VMX enabling */
127 #define MSR_IA32_VMX_BASIC 0x480
128 #define MSR_IA32_VMX_PINBASED_CTLS 0x481
129 #define MSR_IA32_VMX_PROCBASED_CTLS 0x482
130 #define MSR_IA32_VMX_EXIT_CTLS 0x483
131 #define MSR_IA32_VMX_ENTRY_CTLS 0x484
132 #define MSR_IA32_VMX_MISC 0x485
133 #define MSR_IA32_VMX_CR0_FIXED0 0x486
134 #define MSR_IA32_VMX_CR0_FIXED1 0x487
135 #define MSR_IA32_VMX_CR4_FIXED0 0x488
136 #define MSR_IA32_VMX_CR4_FIXED1 0x489
137 #define MSR_IA32_VMX_PROCBASED_CTLS2 0x48b
138 #define MSR_IA32_VMX_TRUE_PINBASED_CTLS 0x48d
139 #define MSR_IA32_VMX_TRUE_PROCBASED_CTLS 0x48e
140 #define MSR_IA32_VMX_TRUE_EXIT_CTLS 0x48f
141 #define MSR_IA32_VMX_TRUE_ENTRY_CTLS 0x490
142 #define IA32_FEATURE_CONTROL_MSR 0x3a
143 #define IA32_FEATURE_CONTROL_MSR_LOCK 0x0001
144 #define IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_INSIDE_SMX 0x0002
145 #define IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_OUTSIDE_SMX 0x0004
146 #define IA32_FEATURE_CONTROL_MSR_SENTER_PARAM_CTL 0x7f00
147 #define IA32_FEATURE_CONTROL_MSR_ENABLE_SENTER 0x8000
149 /* K7/K8 MSRs. Not complete. See the architecture manual for a more
150 complete list. */
151 #define MSR_K7_EVNTSEL0 0xc0010000
152 #define MSR_K7_PERFCTR0 0xc0010004
153 #define MSR_K7_EVNTSEL1 0xc0010001
154 #define MSR_K7_PERFCTR1 0xc0010005
155 #define MSR_K7_EVNTSEL2 0xc0010002
156 #define MSR_K7_PERFCTR2 0xc0010006
157 #define MSR_K7_EVNTSEL3 0xc0010003
158 #define MSR_K7_PERFCTR3 0xc0010007
159 #define MSR_K8_TOP_MEM1 0xc001001a
160 #define MSR_K7_CLK_CTL 0xc001001b
161 #define MSR_K8_TOP_MEM2 0xc001001d
162 #define MSR_K8_SYSCFG 0xc0010010
164 #define K8_MTRRFIXRANGE_DRAM_ENABLE 0x00040000 /* MtrrFixDramEn bit */
165 #define K8_MTRRFIXRANGE_DRAM_MODIFY 0x00080000 /* MtrrFixDramModEn bit */
166 #define K8_MTRR_RDMEM_WRMEM_MASK 0x18181818 /* Mask: RdMem|WrMem */
168 #define MSR_K7_HWCR 0xc0010015
169 #define MSR_K8_HWCR 0xc0010015
170 #define MSR_K7_FID_VID_CTL 0xc0010041
171 #define MSR_K7_FID_VID_STATUS 0xc0010042
172 #define MSR_K8_PSTATE_LIMIT 0xc0010061
173 #define MSR_K8_PSTATE_CTRL 0xc0010062
174 #define MSR_K8_PSTATE_STATUS 0xc0010063
175 #define MSR_K8_PSTATE0 0xc0010064
176 #define MSR_K8_PSTATE1 0xc0010065
177 #define MSR_K8_PSTATE2 0xc0010066
178 #define MSR_K8_PSTATE3 0xc0010067
179 #define MSR_K8_PSTATE4 0xc0010068
180 #define MSR_K8_PSTATE5 0xc0010069
181 #define MSR_K8_PSTATE6 0xc001006A
182 #define MSR_K8_PSTATE7 0xc001006B
183 #define MSR_K8_ENABLE_C1E 0xc0010055
184 #define MSR_K8_VM_CR 0xc0010114
185 #define MSR_K8_VM_HSAVE_PA 0xc0010117
187 /* MSR_K8_VM_CR bits: */
188 #define _K8_VMCR_SVME_DISABLE 4
189 #define K8_VMCR_SVME_DISABLE (1 << _K8_VMCR_SVME_DISABLE)
191 /* AMD Family10h machine check MSRs */
192 #define MSR_F10_MC4_MISC1 0xc0000408
193 #define MSR_F10_MC4_MISC2 0xc0000409
194 #define MSR_F10_MC4_MISC3 0xc000040A
196 /* K6 MSRs */
197 #define MSR_K6_EFER 0xc0000080
198 #define MSR_K6_STAR 0xc0000081
199 #define MSR_K6_WHCR 0xc0000082
200 #define MSR_K6_UWCCR 0xc0000085
201 #define MSR_K6_EPMR 0xc0000086
202 #define MSR_K6_PSOR 0xc0000087
203 #define MSR_K6_PFIR 0xc0000088
205 /* Centaur-Hauls/IDT defined MSRs. */
206 #define MSR_IDT_FCR1 0x00000107
207 #define MSR_IDT_FCR2 0x00000108
208 #define MSR_IDT_FCR3 0x00000109
209 #define MSR_IDT_FCR4 0x0000010a
211 #define MSR_IDT_MCR0 0x00000110
212 #define MSR_IDT_MCR1 0x00000111
213 #define MSR_IDT_MCR2 0x00000112
214 #define MSR_IDT_MCR3 0x00000113
215 #define MSR_IDT_MCR4 0x00000114
216 #define MSR_IDT_MCR5 0x00000115
217 #define MSR_IDT_MCR6 0x00000116
218 #define MSR_IDT_MCR7 0x00000117
219 #define MSR_IDT_MCR_CTRL 0x00000120
221 /* VIA Cyrix defined MSRs*/
222 #define MSR_VIA_FCR 0x00001107
223 #define MSR_VIA_LONGHAUL 0x0000110a
224 #define MSR_VIA_RNG 0x0000110b
225 #define MSR_VIA_BCR2 0x00001147
227 /* Transmeta defined MSRs */
228 #define MSR_TMTA_LONGRUN_CTRL 0x80868010
229 #define MSR_TMTA_LONGRUN_FLAGS 0x80868011
230 #define MSR_TMTA_LRTI_READOUT 0x80868018
231 #define MSR_TMTA_LRTI_VOLT_MHZ 0x8086801a
233 /* Intel defined MSRs. */
234 #define MSR_IA32_P5_MC_ADDR 0x00000000
235 #define MSR_IA32_P5_MC_TYPE 0x00000001
236 #define MSR_IA32_TSC 0x00000010
237 #define MSR_IA32_PLATFORM_ID 0x00000017
238 #define MSR_IA32_EBL_CR_POWERON 0x0000002a
239 #define MSR_IA32_EBC_FREQUENCY_ID 0x0000002c
241 #define MSR_IA32_APICBASE 0x0000001b
242 #define MSR_IA32_APICBASE_BSP (1<<8)
243 #define MSR_IA32_APICBASE_EXTD (1<<10)
244 #define MSR_IA32_APICBASE_ENABLE (1<<11)
245 #define MSR_IA32_APICBASE_BASE (0xfffff<<12)
247 #define MSR_IA32_UCODE_WRITE 0x00000079
248 #define MSR_IA32_UCODE_REV 0x0000008b
250 #define MSR_IA32_PERF_STATUS 0x00000198
251 #define MSR_IA32_PERF_CTL 0x00000199
253 #define MSR_IA32_MPERF 0x000000e7
254 #define MSR_IA32_APERF 0x000000e8
256 #define MSR_IA32_THERM_CONTROL 0x0000019a
257 #define MSR_IA32_THERM_INTERRUPT 0x0000019b
258 #define MSR_IA32_THERM_STATUS 0x0000019c
259 #define MSR_IA32_MISC_ENABLE 0x000001a0
260 #define MSR_IA32_MISC_ENABLE_PERF_AVAIL (1<<7)
261 #define MSR_IA32_MISC_ENABLE_BTS_UNAVAIL (1<<11)
262 #define MSR_IA32_MISC_ENABLE_PEBS_UNAVAIL (1<<12)
263 #define MSR_IA32_MISC_ENABLE_MONITOR_ENABLE (1<<18)
264 #define MSR_IA32_MISC_ENABLE_XTPR_DISABLE (1<<23)
266 /* Intel Model 6 */
267 #define MSR_P6_EVNTSEL0 0x00000186
268 #define MSR_P6_EVNTSEL1 0x00000187
270 /* P4/Xeon+ specific */
271 #define MSR_IA32_MCG_EAX 0x00000180
272 #define MSR_IA32_MCG_EBX 0x00000181
273 #define MSR_IA32_MCG_ECX 0x00000182
274 #define MSR_IA32_MCG_EDX 0x00000183
275 #define MSR_IA32_MCG_ESI 0x00000184
276 #define MSR_IA32_MCG_EDI 0x00000185
277 #define MSR_IA32_MCG_EBP 0x00000186
278 #define MSR_IA32_MCG_ESP 0x00000187
279 #define MSR_IA32_MCG_EFLAGS 0x00000188
280 #define MSR_IA32_MCG_EIP 0x00000189
281 #define MSR_IA32_MCG_RESERVED 0x0000018a
283 /* Pentium IV performance counter MSRs */
284 #define MSR_P4_BPU_PERFCTR0 0x00000300
285 #define MSR_P4_BPU_PERFCTR1 0x00000301
286 #define MSR_P4_BPU_PERFCTR2 0x00000302
287 #define MSR_P4_BPU_PERFCTR3 0x00000303
288 #define MSR_P4_MS_PERFCTR0 0x00000304
289 #define MSR_P4_MS_PERFCTR1 0x00000305
290 #define MSR_P4_MS_PERFCTR2 0x00000306
291 #define MSR_P4_MS_PERFCTR3 0x00000307
292 #define MSR_P4_FLAME_PERFCTR0 0x00000308
293 #define MSR_P4_FLAME_PERFCTR1 0x00000309
294 #define MSR_P4_FLAME_PERFCTR2 0x0000030a
295 #define MSR_P4_FLAME_PERFCTR3 0x0000030b
296 #define MSR_P4_IQ_PERFCTR0 0x0000030c
297 #define MSR_P4_IQ_PERFCTR1 0x0000030d
298 #define MSR_P4_IQ_PERFCTR2 0x0000030e
299 #define MSR_P4_IQ_PERFCTR3 0x0000030f
300 #define MSR_P4_IQ_PERFCTR4 0x00000310
301 #define MSR_P4_IQ_PERFCTR5 0x00000311
302 #define MSR_P4_BPU_CCCR0 0x00000360
303 #define MSR_P4_BPU_CCCR1 0x00000361
304 #define MSR_P4_BPU_CCCR2 0x00000362
305 #define MSR_P4_BPU_CCCR3 0x00000363
306 #define MSR_P4_MS_CCCR0 0x00000364
307 #define MSR_P4_MS_CCCR1 0x00000365
308 #define MSR_P4_MS_CCCR2 0x00000366
309 #define MSR_P4_MS_CCCR3 0x00000367
310 #define MSR_P4_FLAME_CCCR0 0x00000368
311 #define MSR_P4_FLAME_CCCR1 0x00000369
312 #define MSR_P4_FLAME_CCCR2 0x0000036a
313 #define MSR_P4_FLAME_CCCR3 0x0000036b
314 #define MSR_P4_IQ_CCCR0 0x0000036c
315 #define MSR_P4_IQ_CCCR1 0x0000036d
316 #define MSR_P4_IQ_CCCR2 0x0000036e
317 #define MSR_P4_IQ_CCCR3 0x0000036f
318 #define MSR_P4_IQ_CCCR4 0x00000370
319 #define MSR_P4_IQ_CCCR5 0x00000371
320 #define MSR_P4_ALF_ESCR0 0x000003ca
321 #define MSR_P4_ALF_ESCR1 0x000003cb
322 #define MSR_P4_BPU_ESCR0 0x000003b2
323 #define MSR_P4_BPU_ESCR1 0x000003b3
324 #define MSR_P4_BSU_ESCR0 0x000003a0
325 #define MSR_P4_BSU_ESCR1 0x000003a1
326 #define MSR_P4_CRU_ESCR0 0x000003b8
327 #define MSR_P4_CRU_ESCR1 0x000003b9
328 #define MSR_P4_CRU_ESCR2 0x000003cc
329 #define MSR_P4_CRU_ESCR3 0x000003cd
330 #define MSR_P4_CRU_ESCR4 0x000003e0
331 #define MSR_P4_CRU_ESCR5 0x000003e1
332 #define MSR_P4_DAC_ESCR0 0x000003a8
333 #define MSR_P4_DAC_ESCR1 0x000003a9
334 #define MSR_P4_FIRM_ESCR0 0x000003a4
335 #define MSR_P4_FIRM_ESCR1 0x000003a5
336 #define MSR_P4_FLAME_ESCR0 0x000003a6
337 #define MSR_P4_FLAME_ESCR1 0x000003a7
338 #define MSR_P4_FSB_ESCR0 0x000003a2
339 #define MSR_P4_FSB_ESCR1 0x000003a3
340 #define MSR_P4_IQ_ESCR0 0x000003ba
341 #define MSR_P4_IQ_ESCR1 0x000003bb
342 #define MSR_P4_IS_ESCR0 0x000003b4
343 #define MSR_P4_IS_ESCR1 0x000003b5
344 #define MSR_P4_ITLB_ESCR0 0x000003b6
345 #define MSR_P4_ITLB_ESCR1 0x000003b7
346 #define MSR_P4_IX_ESCR0 0x000003c8
347 #define MSR_P4_IX_ESCR1 0x000003c9
348 #define MSR_P4_MOB_ESCR0 0x000003aa
349 #define MSR_P4_MOB_ESCR1 0x000003ab
350 #define MSR_P4_MS_ESCR0 0x000003c0
351 #define MSR_P4_MS_ESCR1 0x000003c1
352 #define MSR_P4_PMH_ESCR0 0x000003ac
353 #define MSR_P4_PMH_ESCR1 0x000003ad
354 #define MSR_P4_RAT_ESCR0 0x000003bc
355 #define MSR_P4_RAT_ESCR1 0x000003bd
356 #define MSR_P4_SAAT_ESCR0 0x000003ae
357 #define MSR_P4_SAAT_ESCR1 0x000003af
358 #define MSR_P4_SSU_ESCR0 0x000003be
359 #define MSR_P4_SSU_ESCR1 0x000003bf /* guess: not in manual */
361 #define MSR_P4_TBPU_ESCR0 0x000003c2
362 #define MSR_P4_TBPU_ESCR1 0x000003c3
363 #define MSR_P4_TC_ESCR0 0x000003c4
364 #define MSR_P4_TC_ESCR1 0x000003c5
365 #define MSR_P4_U2L_ESCR0 0x000003b0
366 #define MSR_P4_U2L_ESCR1 0x000003b1
368 /* Netburst (P4) last-branch recording */
369 #define MSR_P4_LER_FROM_LIP 0x000001d7
370 #define MSR_P4_LER_TO_LIP 0x000001d8
371 #define MSR_P4_LASTBRANCH_TOS 0x000001da
372 #define MSR_P4_LASTBRANCH_0 0x000001db
373 #define NUM_MSR_P4_LASTBRANCH 4
374 #define MSR_P4_LASTBRANCH_0_FROM_LIP 0x00000680
375 #define MSR_P4_LASTBRANCH_0_TO_LIP 0x000006c0
376 #define NUM_MSR_P4_LASTBRANCH_FROM_TO 16
378 /* Pentium M (and Core) last-branch recording */
379 #define MSR_PM_LASTBRANCH_TOS 0x000001c9
380 #define MSR_PM_LASTBRANCH_0 0x00000040
381 #define NUM_MSR_PM_LASTBRANCH 8
383 /* Core 2 last-branch recording */
384 #define MSR_C2_LASTBRANCH_TOS 0x000001c9
385 #define MSR_C2_LASTBRANCH_0_FROM_IP 0x00000040
386 #define MSR_C2_LASTBRANCH_0_TO_IP 0x00000060
387 #define NUM_MSR_C2_LASTBRANCH_FROM_TO 4
389 /* Intel Core-based CPU performance counters */
390 #define MSR_CORE_PERF_FIXED_CTR0 0x00000309
391 #define MSR_CORE_PERF_FIXED_CTR1 0x0000030a
392 #define MSR_CORE_PERF_FIXED_CTR2 0x0000030b
393 #define MSR_CORE_PERF_FIXED_CTR_CTRL 0x0000038d
394 #define MSR_CORE_PERF_GLOBAL_STATUS 0x0000038e
395 #define MSR_CORE_PERF_GLOBAL_CTRL 0x0000038f
396 #define MSR_CORE_PERF_GLOBAL_OVF_CTRL 0x00000390
398 /* Geode defined MSRs */
399 #define MSR_GEODE_BUSCONT_CONF0 0x00001900
401 #endif /* __ASM_MSR_INDEX_H */