1 /* SPDX-License-Identifier: GPL-2.0-only */
5 int k8_probe(const struct targetdef
*target
, const struct cpuid_t
*id
) {
6 return (VENDOR_AMD
== id
->vendor
) && (0xF == id
->family
);
10 * AMD BKDG Publication # 32559 Revision: 3.08 Issue Date: July 2007
12 const struct msrdef k8_msrs
[] = {
13 { 0xC0000080, MSRTYPE_RDWR
, MSR2(0, 0), "EFER Register", "Extended Feature Enable Register", {
16 { 14, 1, "FFXSR:", "Fast FXSAVE/FRSTOR Enable", PRESENT_DEC
, {
17 { MSR1(0), "FXSAVE/FRSTOR disabled" },
18 { MSR1(1), "FXSAVE/FRSTOR enabled" },
21 { 13, 1, "LMSLE:", "Long Mode Segment Limit Enable", PRESENT_DEC
, {
22 { MSR1(0), "Long mode segment limit check disabled" },
23 { MSR1(1), "Long mode segment limit check enabled" },
26 { 12, 1, "SVME:", "SVM Enable", PRESENT_DEC
, {
27 { MSR1(0), "SVM features disabled" },
28 { MSR1(1), "SVM features enabled" },
31 { 11, 1, "NXE:", "No-Execute Page Enable", PRESENT_DEC
, {
32 { MSR1(0), "NXE features disabled" },
33 { MSR1(1), "NXE features enabled" },
36 { 10, 1, "LMA:", "Long Mode Active", PRESENT_DEC
, {
37 { MSR1(0), "Long Mode feature not active" },
38 { MSR1(1), "Long Mode feature active" },
42 { 8, 1, "LME:", "Long Mode Enable", PRESENT_DEC
, {
43 { MSR1(0), "Long Mode feature disabled" },
44 { MSR1(1), "Long Mode feature enabled" },
48 { 0, 1, "SYSCALL:", "System Call Extension Enable", PRESENT_DEC
, {
49 { MSR1(0), "System Call feature disabled" },
50 { MSR1(1), "System Call feature enabled" },
56 { 0xC0010010, MSRTYPE_RDWR
, MSR2(0, 0), "SYSCFG Register", "This register controls the system configuration", {
59 { 22, 1, "Tom2ForceMemTypeWB:", "Top of Memory 2 Memory Type Write Back", PRESENT_DEC
, {
60 { MSR1(0), "Tom2ForceMemTypeWB disabled" },
61 { MSR1(1), "Tom2ForceMemTypeWB enabled" },
64 { 21, 1, "MtrrTom2En:", "Top of Memory Address Register 2 Enable", PRESENT_DEC
, {
65 { MSR1(0), "MtrrTom2En disabled" },
66 { MSR1(1), "MtrrTom2En enabled" },
69 { 20, 1, "MtrrVarDramEn:", "Top of Memory Address Register and I/O Range Register Enable", PRESENT_DEC
, {
70 { MSR1(0), "MtrrVarDramEn disabled" },
71 { MSR1(1), "MtrrVarDramEn enabled" },
74 { 19, 1, "MtrrFixDramModEn:", "RdDram and WrDram Bits Modification Enable", PRESENT_DEC
, {
75 { MSR1(0), "MtrrFixDramModEn disabled" },
76 { MSR1(1), "MtrrFixDramModEn enabled" },
79 { 18, 1, "MtrrFixDramEn:", "Fixed RdDram and WrDram Attributes Enable", PRESENT_DEC
, {
80 { MSR1(0), "MtrrFixDramEn disabled" },
81 { MSR1(1), "MtrrFixDramEn enabled" },
84 { 17, 1, "SysUcLockEn:", "System Interface Lock Command Enable", PRESENT_DEC
, {
85 { MSR1(0), "SysUcLockEn disabled" },
86 { MSR1(1), "SysUcLockEn enabled" },
89 { 16, 1, "ChxToDirtyDis:", "Change to Dirty Command Disable", PRESENT_DEC
, {
90 { MSR1(0), "ChxToDirtyDis disabled" },
91 { MSR1(1), "ChxToDirtyDis enabled" },
95 { 10, 1, "SetDirtyEnO:", "SharedToDirty Command for O->M State Transition Enable", PRESENT_DEC
, {
96 { MSR1(0), "SetDirtyEnO disabled" },
97 { MSR1(1), "SetDirtyEnO enabled" },
100 { 9, 1, "SetDirtyEnS:", "SharedToDirty Command for S->M State Transition Enable", PRESENT_DEC
, {
101 { MSR1(0), "SetDirtyEnS disabled" },
102 { MSR1(1), "SetDirtyEnS enabled" },
105 { 8, 1, "SetDirtyEnE:", "CleanToDirty Command for E->M State Transition Enable", PRESENT_DEC
, {
106 { MSR1(0), "SetDirtyEnE disabled" },
107 { MSR1(1), "SetDirtyEnE enabled" },
110 { 7, 3, "SysVicLimit:", "Outstanding Victim Bus Command Limit", PRESENT_HEX
, {
113 { 4, 5, "SysAckLimit:", "Outstanding Bus Command Limit", PRESENT_HEX
, {
119 { 0xC0010015, MSRTYPE_RDWR
, MSR2(0, 0), "HWCR Register", "This register controls the hardware configuration", {
120 { 63, 32, RESERVED
},
122 { 29, 6, "START_FID:", "Status of the startup FID", PRESENT_HEX
, {
126 { 18, 1, "MCi_STATUS_WREN:", "MCi Status Write Enable", PRESENT_DEC
, {
127 { MSR1(0), "MCi_STATUS_WREN disabled" },
128 { MSR1(1), "MCi_STATUS_WREN enabled" },
131 { 17, 1, "WRAP32DIS:", "32-bit Address Wrap Disable", PRESENT_DEC
, {
132 { MSR1(0), "WRAP32DIS clear" },
133 { MSR1(1), "WRAP32DIS set" },
137 { 15, 1, "SSEDIS:", "SSE Instructions Disable", PRESENT_DEC
, {
138 { MSR1(0), "SSEDIS clear" },
139 { MSR1(1), "SSEDIS set" },
142 { 14, 1, "RSMSPCYCDIS:", "Special Bus Cycle On RSM Disable", PRESENT_DEC
, {
143 { MSR1(0), "RSMSPCYCDIS clear" },
144 { MSR1(1), "RSMSPCYCDIS set" },
147 { 13, 1, "SMISPCYCDIS:", "Special Bus Cycle On SMI Disable", PRESENT_DEC
, {
148 { MSR1(0), "SMISPCYCDIS clear" },
149 { MSR1(1), "SMISPCYCDIS set" },
152 { 12, 1, "HLTXSPCYCEN:", "Enable Special Bus Cycle On Exit From HLT", PRESENT_DEC
, {
153 { MSR1(0), "HLTXSPCYCEN disabled" },
154 { MSR1(1), "HLTXSPCYCEN enabled" },
158 { 8, 1, "IGNNE_EM:", "IGNNE Port Emulation Enable", PRESENT_DEC
, {
159 { MSR1(0), "IGNNE_EM disabled" },
160 { MSR1(1), "IGNNE_EM enabled" },
163 { 7, 1, "DISLOCK:", "Disable x86 LOCK prefix functionality", PRESENT_DEC
, {
164 { MSR1(0), "DISLOCK clear" },
165 { MSR1(1), "DISLOCK set" },
168 { 6, 1, "FFDIS:", "TLB Flush Filter Disable", PRESENT_DEC
, {
169 { MSR1(0), "FFDIS clear" },
170 { MSR1(1), "FFDIS set" },
174 { 4, 1, "INVD_WBINVD:", "INVD to WBINVD Conversion", PRESENT_DEC
, {
175 { MSR1(0), "INVD_WBINVD disabled" },
176 { MSR1(1), "INVD_WBINVD enabled" },
179 { 3, 1, "TLBCACHEDIS:", "TLB Cacheable Memory Disable", PRESENT_DEC
, {
180 { MSR1(0), "TLBCACHEDIS clear" },
181 { MSR1(1), "TLBCACHEDIS set" },
185 { 1, 1, "SLOWFENCE:", "Slow SFENCE Enable", PRESENT_DEC
, {
186 { MSR1(0), "SLOWFENCE disabled" },
187 { MSR1(1), "SLOWFENCE enabled" },
190 { 0, 1, "SMMLOCK:", "SMM Configuration Lock", PRESENT_DEC
, {
191 { MSR1(0), "SMMLOCK disabled" },
192 { MSR1(1), "SMMLOCK enabled" },
198 { 0xC001001F, MSRTYPE_RDWR
, MSR2(0, 0), "NB_CFG Register", "", {
200 { 54, 1, "InitApicIdCpuIdLo:", "CpuId and NodeId[2:0] bit field positions are swapped in the APICID", PRESENT_DEC
, {
201 { MSR1(0), "CpuId and NodeId not swapped" },
202 { MSR1(1), "CpuId and NodeId swapped" },
206 { 45, 1, "DisUsSysMgtRqToNLdt:", "Disable Upstream System Management Rebroadcast", PRESENT_DEC
, {
207 { MSR1(0), "Upstream Rebroadcast disabled" },
208 { MSR1(1), "Upstream Rebroadcast enabled" },
212 { 43, 1, "DisThmlPfMonSmiInt:", "Disable Performance Monitor SMI", PRESENT_DEC
, {
213 { MSR1(0), "Performance Monitor SMI enabled" },
214 { MSR1(1), "Performance Monitor SMI disabled" },
218 { 36, 1, "DisDatMsk:", "Disables DRAM data masking function", PRESENT_DEC
, {
219 { MSR1(0), "DRAM data masking enabled" },
220 { MSR1(1), "DRAM data masking disabled" },
224 { 31, 1, "DisCohLdtCfg:", "Disable Coherent HyperTransport Configuration Accesses", PRESENT_DEC
, {
225 { MSR1(0), "Coherent HyperTransport Configuration enabled" },
226 { MSR1(1), "Coherent HyperTransport Configuration disabled" },
229 { 30, 21, RESERVED
},
230 { 9, 1, "DisRefUseFreeBuf:", "Disable Display Refresh from Using Free List Buffers", PRESENT_DEC
, {
231 { MSR1(0), "Display refresh requests enabled" },
232 { MSR1(1), "Display refresh requests disabled" },
238 { 0xC001001A, MSRTYPE_RDWR
, MSR2(0, 0), "TOP_MEM Register", "This register indicates the first byte of I/O above DRAM", {
239 { 63, 24, RESERVED
},
240 { 39, 8, "TOM 39-32", "", PRESENT_HEX
, {
243 { 31, 9, "TOM 31-23", "", PRESENT_HEX
, {
246 { 22, 23, RESERVED
},
250 { 0xC001001D, MSRTYPE_RDWR
, MSR2(0, 0), "TOP_MEM2 Register", "This register indicates the Top of Memory above 4GB", {
251 { 63, 24, RESERVED
},
252 { 39, 8, "TOM2 39-32", "", PRESENT_HEX
, {
255 { 31, 9, "TOM2 31-23", "", PRESENT_HEX
, {
258 { 22, 23, RESERVED
},
262 { 0xC0010016, MSRTYPE_RDWR
, MSR2(0, 0), "IORRBase0", "This register holds the base of the variable I/O range", {
263 { 63, 24, RESERVED
},
264 { 39, 8, "BASE 27-20", "", PRESENT_HEX
, {
267 { 31, 20, "BASE 20-0", "", PRESENT_HEX
, {
271 { 5, 1, "RdDram:", "Read from DRAM", PRESENT_DEC
, {
272 { MSR1(0), "RdDram disabled" },
273 { MSR1(1), "RdDram enabled" },
276 { 4, 1, "WrDram:", "Write to DRAM", PRESENT_DEC
, {
277 { MSR1(0), "WrDram disabled" },
278 { MSR1(1), "WrDram enabled" },
284 { 0xC0010017, MSRTYPE_RDWR
, MSR2(0, 0), "IORRMask0", "This register holds the mask of the variable I/O range", {
285 { 63, 24, RESERVED
},
286 { 39, 8, "MASK 27-20", "", PRESENT_HEX
, {
289 { 31, 20, "MASK 20-0", "", PRESENT_HEX
, {
292 { 11, 1, "V:", "Enables variable I/O range registers", PRESENT_DEC
, {
293 { MSR1(0), "V I/O range disabled" },
294 { MSR1(1), "V I/O range enabled" },
297 { 10, 11, RESERVED
},
301 { 0xC0010018, MSRTYPE_RDWR
, MSR2(0, 0), "IORRBase1", "This register holds the base of the variable I/O range", {
302 { 63, 24, RESERVED
},
303 { 39, 8, "BASE 27-20", "", PRESENT_HEX
, {
306 { 31, 20, "BASE 20-0", "", PRESENT_HEX
, {
310 { 5, 1, "RdDram:", "Read from DRAM", PRESENT_DEC
, {
311 { MSR1(0), "RdDram disabled" },
312 { MSR1(1), "RdDram enabled" },
315 { 4, 1, "WrDram:", "Write to DRAM", PRESENT_DEC
, {
316 { MSR1(0), "WrDram disabled" },
317 { MSR1(1), "WrDram enabled" },
323 { 0xC0010019, MSRTYPE_RDWR
, MSR2(0, 0), "IORRMask1", "This register holds the mask of the variable I/O range", {
324 { 63, 24, RESERVED
},
325 { 39, 8, "MASK 27-20", "", PRESENT_HEX
, {
328 { 31, 20, "MASK 20-0", "", PRESENT_HEX
, {
331 { 11, 1, "V:", "Enables variable I/O range registers", PRESENT_DEC
, {
332 { MSR1(0), "V I/O range disabled" },
333 { MSR1(1), "V I/O range enabled" },
336 { 10, 11, RESERVED
},