summaryrefslogtreecommitdiff
path: root/UefiCpuPkg/Include/Register/Msr/XeonE7Msr.h
blob: b95f963b1ed13f56766f78449684229e35b84199 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
/** @file
  MSR Definitions for Intel(R) Xeon(R) Processor E7 Family.

  Provides defines for Machine Specific Registers(MSR) indexes. Data structures
  are provided for MSRs that contain one or more bit fields.  If the MSR value
  returned is a single 32-bit or 64-bit value, then a data structure is not
  provided for that MSR.

  Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
  This program and the accompanying materials
  are licensed and made available under the terms and conditions of the BSD License
  which accompanies this distribution.  The full text of the license may be found at
  http://opensource.org/licenses/bsd-license.php

  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

  @par Specification Reference:
  Intel(R) 64 and IA-32 Architectures Software Developer's Manual, Volume 3,
  December 2015, Chapter 35 Model-Specific-Registers (MSR), Section 35-7.

**/

#ifndef __XEON_E7_MSR_H__
#define __XEON_E7_MSR_H__

#include <Register/ArchitecturalMsr.h>

/**
  Package. Reserved Attempt to read/write will cause #UD.

  @param  ECX  MSR_XEON_E7_TURBO_RATIO_LIMIT (0x000001AD)
  @param  EAX  Lower 32-bits of MSR value.
  @param  EDX  Upper 32-bits of MSR value.

  <b>Example usage</b>
  @code
  UINT64  Msr;

  Msr = AsmReadMsr64 (MSR_XEON_E7_TURBO_RATIO_LIMIT);
  AsmWriteMsr64 (MSR_XEON_E7_TURBO_RATIO_LIMIT, Msr);
  @endcode
**/
#define MSR_XEON_E7_TURBO_RATIO_LIMIT            0x000001AD


/**
  Package. Uncore C-box 8 perfmon local box control MSR.

  @param  ECX  MSR_XEON_E7_C8_PMON_BOX_CTRL (0x00000F40)
  @param  EAX  Lower 32-bits of MSR value.
  @param  EDX  Upper 32-bits of MSR value.

  <b>Example usage</b>
  @code
  UINT64  Msr;

  Msr = AsmReadMsr64 (MSR_XEON_E7_C8_PMON_BOX_CTRL);
  AsmWriteMsr64 (MSR_XEON_E7_C8_PMON_BOX_CTRL, Msr);
  @endcode
**/
#define MSR_XEON_E7_C8_PMON_BOX_CTRL             0x00000F40


/**
  Package. Uncore C-box 8 perfmon local box status MSR.

  @param  ECX  MSR_XEON_E7_C8_PMON_BOX_STATUS (0x00000F41)
  @param  EAX  Lower 32-bits of MSR value.
  @param  EDX  Upper 32-bits of MSR value.

  <b>Example usage</b>
  @code
  UINT64  Msr;

  Msr = AsmReadMsr64 (MSR_XEON_E7_C8_PMON_BOX_STATUS);
  AsmWriteMsr64 (MSR_XEON_E7_C8_PMON_BOX_STATUS, Msr);
  @endcode
**/
#define MSR_XEON_E7_C8_PMON_BOX_STATUS           0x00000F41


/**
  Package. Uncore C-box 8 perfmon local box overflow control MSR.

  @param  ECX  MSR_XEON_E7_C8_PMON_BOX_OVF_CTRL (0x00000F42)
  @param  EAX  Lower 32-bits of MSR value.
  @param  EDX  Upper 32-bits of MSR value.

  <b>Example usage</b>
  @code
  UINT64  Msr;

  Msr = AsmReadMsr64 (MSR_XEON_E7_C8_PMON_BOX_OVF_CTRL);
  AsmWriteMsr64 (MSR_XEON_E7_C8_PMON_BOX_OVF_CTRL, Msr);
  @endcode
**/
#define MSR_XEON_E7_C8_PMON_BOX_OVF_CTRL         0x00000F42


/**
  Package. Uncore C-box 8 perfmon event select MSR.

  @param  ECX  MSR_XEON_E7_C8_PMON_EVNT_SELn
  @param  EAX  Lower 32-bits of MSR value.
  @param  EDX  Upper 32-bits of MSR value.

  <b>Example usage</b>
  @code
  UINT64  Msr;

  Msr = AsmReadMsr64 (MSR_XEON_E7_C8_PMON_EVNT_SEL0);
  AsmWriteMsr64 (MSR_XEON_E7_C8_PMON_EVNT_SEL0, Msr);
  @endcode
  @{
**/
#define MSR_XEON_E7_C8_PMON_EVNT_SEL0            0x00000F50
#define MSR_XEON_E7_C8_PMON_EVNT_SEL1            0x00000F52
#define MSR_XEON_E7_C8_PMON_EVNT_SEL2            0x00000F54
#define MSR_XEON_E7_C8_PMON_EVNT_SEL3            0x00000F56
#define MSR_XEON_E7_C8_PMON_EVNT_SEL4            0x00000F58
#define MSR_XEON_E7_C8_PMON_EVNT_SEL5            0x00000F5A
/// @}


/**
  Package. Uncore C-box 8 perfmon counter MSR.

  @param  ECX  MSR_XEON_E7_C8_PMON_CTRn
  @param  EAX  Lower 32-bits of MSR value.
  @param  EDX  Upper 32-bits of MSR value.

  <b>Example usage</b>
  @code
  UINT64  Msr;

  Msr = AsmReadMsr64 (MSR_XEON_E7_C8_PMON_CTR0);
  AsmWriteMsr64 (MSR_XEON_E7_C8_PMON_CTR0, Msr);
  @endcode
  @{
**/
#define MSR_XEON_E7_C8_PMON_CTR0                 0x00000F51
#define MSR_XEON_E7_C8_PMON_CTR1                 0x00000F53
#define MSR_XEON_E7_C8_PMON_CTR2                 0x00000F55
#define MSR_XEON_E7_C8_PMON_CTR3                 0x00000F57
#define MSR_XEON_E7_C8_PMON_CTR4                 0x00000F59
#define MSR_XEON_E7_C8_PMON_CTR5                 0x00000F5B
/// @}


/**
  Package. Uncore C-box 9 perfmon local box control MSR.

  @param  ECX  MSR_XEON_E7_C9_PMON_BOX_CTRL (0x00000FC0)
  @param  EAX  Lower 32-bits of MSR value.
  @param  EDX  Upper 32-bits of MSR value.

  <b>Example usage</b>
  @code
  UINT64  Msr;

  Msr = AsmReadMsr64 (MSR_XEON_E7_C9_PMON_BOX_CTRL);
  AsmWriteMsr64 (MSR_XEON_E7_C9_PMON_BOX_CTRL, Msr);
  @endcode
**/
#define MSR_XEON_E7_C9_PMON_BOX_CTRL             0x00000FC0


/**
  Package. Uncore C-box 9 perfmon local box status MSR.

  @param  ECX  MSR_XEON_E7_C9_PMON_BOX_STATUS (0x00000FC1)
  @param  EAX  Lower 32-bits of MSR value.
  @param  EDX  Upper 32-bits of MSR value.

  <b>Example usage</b>
  @code
  UINT64  Msr;

  Msr = AsmReadMsr64 (MSR_XEON_E7_C9_PMON_BOX_STATUS);
  AsmWriteMsr64 (MSR_XEON_E7_C9_PMON_BOX_STATUS, Msr);
  @endcode
**/
#define MSR_XEON_E7_C9_PMON_BOX_STATUS           0x00000FC1


/**
  Package. Uncore C-box 9 perfmon local box overflow control MSR.

  @param  ECX  MSR_XEON_E7_C9_PMON_BOX_OVF_CTRL (0x00000FC2)
  @param  EAX  Lower 32-bits of MSR value.
  @param  EDX  Upper 32-bits of MSR value.

  <b>Example usage</b>
  @code
  UINT64  Msr;

  Msr = AsmReadMsr64 (MSR_XEON_E7_C9_PMON_BOX_OVF_CTRL);
  AsmWriteMsr64 (MSR_XEON_E7_C9_PMON_BOX_OVF_CTRL, Msr);
  @endcode
**/
#define MSR_XEON_E7_C9_PMON_BOX_OVF_CTRL         0x00000FC2


/**
  Package. Uncore C-box 9 perfmon event select MSR.

  @param  ECX  MSR_XEON_E7_C9_PMON_EVNT_SELn
  @param  EAX  Lower 32-bits of MSR value.
  @param  EDX  Upper 32-bits of MSR value.

  <b>Example usage</b>
  @code
  UINT64  Msr;

  Msr = AsmReadMsr64 (MSR_XEON_E7_C9_PMON_EVNT_SEL0);
  AsmWriteMsr64 (MSR_XEON_E7_C9_PMON_EVNT_SEL0, Msr);
  @endcode
  @{
**/
#define MSR_XEON_E7_C9_PMON_EVNT_SEL0            0x00000FD0
#define MSR_XEON_E7_C9_PMON_EVNT_SEL1            0x00000FD2
#define MSR_XEON_E7_C9_PMON_EVNT_SEL2            0x00000FD4
#define MSR_XEON_E7_C9_PMON_EVNT_SEL3            0x00000FD6
#define MSR_XEON_E7_C9_PMON_EVNT_SEL4            0x00000FD8
#define MSR_XEON_E7_C9_PMON_EVNT_SEL5            0x00000FDA
/// @}


/**
  Package. Uncore C-box 9 perfmon counter MSR.

  @param  ECX  MSR_XEON_E7_C9_PMON_CTRn
  @param  EAX  Lower 32-bits of MSR value.
  @param  EDX  Upper 32-bits of MSR value.

  <b>Example usage</b>
  @code
  UINT64  Msr;

  Msr = AsmReadMsr64 (MSR_XEON_E7_C9_PMON_CTR0);
  AsmWriteMsr64 (MSR_XEON_E7_C9_PMON_CTR0, Msr);
  @endcode
  @{
**/
#define MSR_XEON_E7_C9_PMON_CTR0                 0x00000FD1
#define MSR_XEON_E7_C9_PMON_CTR1                 0x00000FD3
#define MSR_XEON_E7_C9_PMON_CTR2                 0x00000FD5
#define MSR_XEON_E7_C9_PMON_CTR3                 0x00000FD7
#define MSR_XEON_E7_C9_PMON_CTR4                 0x00000FD9
#define MSR_XEON_E7_C9_PMON_CTR5                 0x00000FDB
/// @}

#endif