]> git.proxmox.com Git - mirror_edk2.git/blame - UefiCpuPkg/Include/Register/Msr/Xeon5600Msr.h
UefiCpuPkg/PiSmmCpuDxeSmm: Skip if AllocatedSize is 0
[mirror_edk2.git] / UefiCpuPkg / Include / Register / Msr / Xeon5600Msr.h
CommitLineData
c5d7b07a
MK
1/** @file\r
2 MSR Definitions for Intel(R) Xeon(R) Processor Series 5600.\r
3\r
4 Provides defines for Machine Specific Registers(MSR) indexes. Data structures\r
5 are provided for MSRs that contain one or more bit fields. If the MSR value\r
6 returned is a single 32-bit or 64-bit value, then a data structure is not\r
7 provided for that MSR.\r
8\r
9 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
10 This program and the accompanying materials\r
11 are licensed and made available under the terms and conditions of the BSD License\r
12 which accompanies this distribution. The full text of the license may be found at\r
13 http://opensource.org/licenses/bsd-license.php\r
14\r
15 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
16 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
17\r
18 @par Specification Reference:\r
19 Intel(R) 64 and IA-32 Architectures Software Developer's Manual, Volume 3,\r
0f16be6d 20 September 2016, Chapter 35 Model-Specific-Registers (MSR), Section 35.7.\r
c5d7b07a
MK
21\r
22**/\r
23\r
24#ifndef __XEON_5600_MSR_H__\r
25#define __XEON_5600_MSR_H__\r
26\r
27#include <Register/ArchitecturalMsr.h>\r
28\r
29/**\r
30 Core. AES Configuration (RW-L) Privileged post-BIOS agent must provide a #GP\r
31 handler to handle unsuccessful read of this MSR.\r
32\r
33 @param ECX MSR_XEON_5600_FEATURE_CONFIG (0x0000013C)\r
34 @param EAX Lower 32-bits of MSR value.\r
35 Described by the type MSR_XEON_5600_FEATURE_CONFIG_REGISTER.\r
36 @param EDX Upper 32-bits of MSR value.\r
37 Described by the type MSR_XEON_5600_FEATURE_CONFIG_REGISTER.\r
38\r
39 <b>Example usage</b>\r
40 @code\r
41 MSR_XEON_5600_FEATURE_CONFIG_REGISTER Msr;\r
42\r
43 Msr.Uint64 = AsmReadMsr64 (MSR_XEON_5600_FEATURE_CONFIG);\r
44 AsmWriteMsr64 (MSR_XEON_5600_FEATURE_CONFIG, Msr.Uint64);\r
45 @endcode\r
eed57645 46 @note MSR_XEON_5600_FEATURE_CONFIG is defined as MSR_FEATURE_CONFIG in SDM.\r
c5d7b07a
MK
47**/\r
48#define MSR_XEON_5600_FEATURE_CONFIG 0x0000013C\r
49\r
50/**\r
51 MSR information returned for MSR index #MSR_XEON_5600_FEATURE_CONFIG\r
52**/\r
53typedef union {\r
54 ///\r
55 /// Individual bit fields\r
56 ///\r
57 struct {\r
58 ///\r
59 /// [Bits 1:0] AES Configuration (RW-L) Upon a successful read of this\r
60 /// MSR, the configuration of AES instruction set availability is as\r
61 /// follows: 11b: AES instructions are not available until next RESET.\r
62 /// otherwise, AES instructions are available. Note, AES instruction set\r
63 /// is not available if read is unsuccessful. If the configuration is not\r
64 /// 01b, AES instruction can be mis-configured if a privileged agent\r
65 /// unintentionally writes 11b.\r
66 ///\r
67 UINT32 AESConfiguration:2;\r
68 UINT32 Reserved1:30;\r
69 UINT32 Reserved2:32;\r
70 } Bits;\r
71 ///\r
72 /// All bit fields as a 32-bit value\r
73 ///\r
74 UINT32 Uint32;\r
75 ///\r
76 /// All bit fields as a 64-bit value\r
77 ///\r
78 UINT64 Uint64;\r
79} MSR_XEON_5600_FEATURE_CONFIG_REGISTER;\r
80\r
81\r
82/**\r
83 Thread. Offcore Response Event Select Register (R/W).\r
84\r
85 @param ECX MSR_XEON_5600_OFFCORE_RSP_1 (0x000001A7)\r
86 @param EAX Lower 32-bits of MSR value.\r
87 @param EDX Upper 32-bits of MSR value.\r
88\r
89 <b>Example usage</b>\r
90 @code\r
91 UINT64 Msr;\r
92\r
93 Msr = AsmReadMsr64 (MSR_XEON_5600_OFFCORE_RSP_1);\r
94 AsmWriteMsr64 (MSR_XEON_5600_OFFCORE_RSP_1, Msr);\r
95 @endcode\r
eed57645 96 @note MSR_XEON_5600_OFFCORE_RSP_1 is defined as MSR_OFFCORE_RSP_1 in SDM.\r
c5d7b07a
MK
97**/\r
98#define MSR_XEON_5600_OFFCORE_RSP_1 0x000001A7\r
99\r
100\r
101/**\r
102 Package. Maximum Ratio Limit of Turbo Mode RO if MSR_PLATFORM_INFO.[28] = 0,\r
103 RW if MSR_PLATFORM_INFO.[28] = 1.\r
104\r
105 @param ECX MSR_XEON_5600_TURBO_RATIO_LIMIT (0x000001AD)\r
106 @param EAX Lower 32-bits of MSR value.\r
107 Described by the type MSR_XEON_5600_TURBO_RATIO_LIMIT_REGISTER.\r
108 @param EDX Upper 32-bits of MSR value.\r
109 Described by the type MSR_XEON_5600_TURBO_RATIO_LIMIT_REGISTER.\r
110\r
111 <b>Example usage</b>\r
112 @code\r
113 MSR_XEON_5600_TURBO_RATIO_LIMIT_REGISTER Msr;\r
114\r
115 Msr.Uint64 = AsmReadMsr64 (MSR_XEON_5600_TURBO_RATIO_LIMIT);\r
116 @endcode\r
eed57645 117 @note MSR_XEON_5600_TURBO_RATIO_LIMIT is defined as MSR_TURBO_RATIO_LIMIT in SDM.\r
c5d7b07a
MK
118**/\r
119#define MSR_XEON_5600_TURBO_RATIO_LIMIT 0x000001AD\r
120\r
121/**\r
122 MSR information returned for MSR index #MSR_XEON_5600_TURBO_RATIO_LIMIT_REGISTER\r
123**/\r
124typedef union {\r
125 ///\r
126 /// Individual bit fields\r
127 ///\r
128 struct {\r
129 ///\r
130 /// [Bits 7:0] Package. Maximum Ratio Limit for 1C Maximum turbo ratio\r
131 /// limit of 1 core active.\r
132 ///\r
133 UINT32 Maximum1C:8;\r
134 ///\r
135 /// [Bits 15:8] Package. Maximum Ratio Limit for 2C Maximum turbo ratio\r
136 /// limit of 2 core active.\r
137 ///\r
138 UINT32 Maximum2C:8;\r
139 ///\r
140 /// [Bits 23:16] Package. Maximum Ratio Limit for 3C Maximum turbo ratio\r
141 /// limit of 3 core active.\r
142 ///\r
143 UINT32 Maximum3C:8;\r
144 ///\r
145 /// [Bits 31:24] Package. Maximum Ratio Limit for 4C Maximum turbo ratio\r
146 /// limit of 4 core active.\r
147 ///\r
148 UINT32 Maximum4C:8;\r
149 ///\r
150 /// [Bits 39:32] Package. Maximum Ratio Limit for 5C Maximum turbo ratio\r
151 /// limit of 5 core active.\r
152 ///\r
153 UINT32 Maximum5C:8;\r
154 ///\r
155 /// [Bits 47:40] Package. Maximum Ratio Limit for 6C Maximum turbo ratio\r
156 /// limit of 6 core active.\r
157 ///\r
158 UINT32 Maximum6C:8;\r
159 UINT32 Reserved:16;\r
160 } Bits;\r
161 ///\r
162 /// All bit fields as a 64-bit value\r
163 ///\r
164 UINT64 Uint64;\r
165} MSR_XEON_5600_TURBO_RATIO_LIMIT_REGISTER;\r
166\r
167\r
168/**\r
169 Package. See Table 35-2.\r
170\r
171 @param ECX MSR_XEON_5600_IA32_ENERGY_PERF_BIAS (0x000001B0)\r
172 @param EAX Lower 32-bits of MSR value.\r
173 @param EDX Upper 32-bits of MSR value.\r
174\r
175 <b>Example usage</b>\r
176 @code\r
177 UINT64 Msr;\r
178\r
179 Msr = AsmReadMsr64 (MSR_XEON_5600_IA32_ENERGY_PERF_BIAS);\r
180 AsmWriteMsr64 (MSR_XEON_5600_IA32_ENERGY_PERF_BIAS, Msr);\r
181 @endcode\r
eed57645 182 @note MSR_XEON_5600_IA32_ENERGY_PERF_BIAS is defined as IA32_ENERGY_PERF_BIAS in SDM.\r
c5d7b07a
MK
183**/\r
184#define MSR_XEON_5600_IA32_ENERGY_PERF_BIAS 0x000001B0\r
185\r
186#endif\r