File tree Expand file tree Collapse file tree 1 file changed +18
-9
lines changed
arch/x86/kernel/cpu/microcode Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -122,9 +122,6 @@ static bool __init check_loader_disabled_bsp(void)
122
122
bool * res = & dis_ucode_ldr ;
123
123
#endif
124
124
125
- if (!have_cpuid_p ())
126
- return * res ;
127
-
128
125
/*
129
126
* CPUID(1).ECX[31]: reserved for hypervisor use. This is still not
130
127
* completely accurate as xen pv guests don't see that CPUID bit set but
@@ -166,24 +163,36 @@ bool get_builtin_firmware(struct cpio_data *cd, const char *name)
166
163
void __init load_ucode_bsp (void )
167
164
{
168
165
unsigned int cpuid_1_eax ;
166
+ bool intel = true;
169
167
170
- if (check_loader_disabled_bsp ())
168
+ if (! have_cpuid_p ())
171
169
return ;
172
170
173
171
cpuid_1_eax = native_cpuid_eax (1 );
174
172
175
173
switch (x86_cpuid_vendor ()) {
176
174
case X86_VENDOR_INTEL :
177
- if (x86_family (cpuid_1_eax ) >= 6 )
178
- load_ucode_intel_bsp () ;
175
+ if (x86_family (cpuid_1_eax ) < 6 )
176
+ return ;
179
177
break ;
178
+
180
179
case X86_VENDOR_AMD :
181
- if (x86_family (cpuid_1_eax ) >= 0x10 )
182
- load_ucode_amd_bsp (cpuid_1_eax );
180
+ if (x86_family (cpuid_1_eax ) < 0x10 )
181
+ return ;
182
+ intel = false;
183
183
break ;
184
+
184
185
default :
185
- break ;
186
+ return ;
186
187
}
188
+
189
+ if (check_loader_disabled_bsp ())
190
+ return ;
191
+
192
+ if (intel )
193
+ load_ucode_intel_bsp ();
194
+ else
195
+ load_ucode_amd_bsp (cpuid_1_eax );
187
196
}
188
197
189
198
static bool check_loader_disabled_ap (void )
You can’t perform that action at this time.
0 commit comments