Lines Matching +full:4 +full:c

70 static void check_memory_type_self_snoop_errata(struct cpuinfo_x86 *c)  in check_memory_type_self_snoop_errata()  argument
72 switch (c->x86_model) { in check_memory_type_self_snoop_errata()
98 static void probe_xeon_phi_r3mwait(struct cpuinfo_x86 *c) in probe_xeon_phi_r3mwait() argument
104 if (c->x86 != 6) in probe_xeon_phi_r3mwait()
106 switch (c->x86_model) { in probe_xeon_phi_r3mwait()
117 set_cpu_cap(c, X86_FEATURE_RING3MWAIT); in probe_xeon_phi_r3mwait()
121 if (c == &boot_cpu_data) in probe_xeon_phi_r3mwait()
162 static bool bad_spectre_microcode(struct cpuinfo_x86 *c) in bad_spectre_microcode() argument
170 if (cpu_has(c, X86_FEATURE_HYPERVISOR)) in bad_spectre_microcode()
173 if (c->x86 != 6) in bad_spectre_microcode()
177 if (c->x86_model == spectre_bad_microcodes[i].model && in bad_spectre_microcode()
178 c->x86_stepping == spectre_bad_microcodes[i].stepping) in bad_spectre_microcode()
179 return (c->microcode <= spectre_bad_microcodes[i].microcode); in bad_spectre_microcode()
184 static void early_init_intel(struct cpuinfo_x86 *c) in early_init_intel() argument
189 if (c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xd)) { in early_init_intel()
192 c->cpuid_level = cpuid_eax(0); in early_init_intel()
193 get_cpu_cap(c); in early_init_intel()
197 if ((c->x86 == 0xf && c->x86_model >= 0x03) || in early_init_intel()
198 (c->x86 == 0x6 && c->x86_model >= 0x0e)) in early_init_intel()
199 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); in early_init_intel()
201 if (c->x86 >= 6 && !cpu_has(c, X86_FEATURE_IA64)) in early_init_intel()
202 c->microcode = intel_get_microcode_revision(); in early_init_intel()
205 if ((cpu_has(c, X86_FEATURE_SPEC_CTRL) || in early_init_intel()
206 cpu_has(c, X86_FEATURE_INTEL_STIBP) || in early_init_intel()
207 cpu_has(c, X86_FEATURE_IBRS) || cpu_has(c, X86_FEATURE_IBPB) || in early_init_intel()
208 cpu_has(c, X86_FEATURE_STIBP)) && bad_spectre_microcode(c)) { in early_init_intel()
228 if (c->x86 == 6 && c->x86_model == 0x1c && c->x86_stepping <= 2 && in early_init_intel()
229 c->microcode < 0x20e) { in early_init_intel()
231 clear_cpu_cap(c, X86_FEATURE_PSE); in early_init_intel()
235 set_cpu_cap(c, X86_FEATURE_SYSENTER32); in early_init_intel()
238 if (c->x86 == 15 && c->x86_cache_alignment == 64) in early_init_intel()
239 c->x86_cache_alignment = 128; in early_init_intel()
243 if (c->x86 == 0xF && c->x86_model == 0x3 in early_init_intel()
244 && (c->x86_stepping == 0x3 || c->x86_stepping == 0x4)) in early_init_intel()
245 c->x86_phys_bits = 36; in early_init_intel()
248 * c->x86_power is 8000_0007 edx. Bit 8 is TSC runs at constant rate in early_init_intel()
249 * with P/T states and does not stop in deep C-states. in early_init_intel()
254 if (c->x86_power & (1 << 8)) { in early_init_intel()
255 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); in early_init_intel()
256 set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC); in early_init_intel()
260 if (c->x86 == 6) { in early_init_intel()
261 switch (c->x86_model) { in early_init_intel()
266 set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC_S3); in early_init_intel()
283 if (c->x86 == 6 && c->x86_model < 15) in early_init_intel()
284 clear_cpu_cap(c, X86_FEATURE_PAT); in early_init_intel()
290 if (c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xd)) { in early_init_intel()
309 if (c->x86 == 5 && c->x86_model == 9) { in early_init_intel()
314 if (c->cpuid_level >= 0x00000001) { in early_init_intel()
324 c->x86_coreid_bits = get_count_order((ebx >> 16) & 0xff); in early_init_intel()
327 check_memory_type_self_snoop_errata(c); in early_init_intel()
333 if (detect_extended_topology_early(c) < 0) in early_init_intel()
334 detect_ht_early(c); in early_init_intel()
337 static void bsp_init_intel(struct cpuinfo_x86 *c) in bsp_init_intel() argument
339 resctrl_cpu_detect(c); in bsp_init_intel()
362 static void intel_smp_check(struct cpuinfo_x86 *c) in intel_smp_check() argument
365 if (!c->cpu_index) in intel_smp_check()
371 if (c->x86 == 5 && in intel_smp_check()
372 c->x86_stepping >= 1 && c->x86_stepping <= 4 && in intel_smp_check()
373 c->x86_model <= 3) { in intel_smp_check()
390 static void intel_workarounds(struct cpuinfo_x86 *c) in intel_workarounds() argument
399 clear_cpu_bug(c, X86_BUG_F00F); in intel_workarounds()
400 if (c->x86 == 5 && c->x86_model < 9) { in intel_workarounds()
403 set_cpu_bug(c, X86_BUG_F00F); in intel_workarounds()
415 if ((c->x86<<8 | c->x86_model<<4 | c->x86_stepping) < 0x633) in intel_workarounds()
416 clear_cpu_cap(c, X86_FEATURE_SEP); in intel_workarounds()
425 set_cpu_cap(c, X86_FEATURE_PAE); in intel_workarounds()
433 if ((c->x86 == 15) && (c->x86_model == 1) && (c->x86_stepping == 1)) { in intel_workarounds()
447 if (boot_cpu_has(X86_FEATURE_APIC) && (c->x86<<8 | c->x86_model<<4) == 0x520 && in intel_workarounds()
448 (c->x86_stepping < 0x6 || c->x86_stepping == 0xb)) in intel_workarounds()
449 set_cpu_bug(c, X86_BUG_11AP); in intel_workarounds()
456 switch (c->x86) { in intel_workarounds()
457 case 4: /* 486: untested */ in intel_workarounds()
470 intel_smp_check(c); in intel_workarounds()
473 static void intel_workarounds(struct cpuinfo_x86 *c) in intel_workarounds() argument
478 static void srat_detect_node(struct cpuinfo_x86 *c) in srat_detect_node() argument
501 #define TME_ACTIVATE_POLICY(x) ((x >> 4) & 0xf) /* Bits 7:4 */
515 static void detect_tme(struct cpuinfo_x86 *c) in detect_tme() argument
576 c->x86_phys_bits -= keyid_bits; in detect_tme()
579 static void init_cpuid_fault(struct cpuinfo_x86 *c) in init_cpuid_fault() argument
585 set_cpu_cap(c, X86_FEATURE_CPUID_FAULT); in init_cpuid_fault()
589 static void init_intel_misc_features(struct cpuinfo_x86 *c) in init_intel_misc_features() argument
600 init_cpuid_fault(c); in init_intel_misc_features()
601 probe_xeon_phi_r3mwait(c); in init_intel_misc_features()
610 static void init_intel(struct cpuinfo_x86 *c) in init_intel() argument
612 early_init_intel(c); in init_intel()
614 intel_workarounds(c); in init_intel()
621 detect_extended_topology(c); in init_intel()
623 if (!cpu_has(c, X86_FEATURE_XTOPOLOGY)) { in init_intel()
628 detect_num_cpu_cores(c); in init_intel()
630 detect_ht(c); in init_intel()
634 init_intel_cacheinfo(c); in init_intel()
636 if (c->cpuid_level > 9) { in init_intel()
640 set_cpu_cap(c, X86_FEATURE_ARCH_PERFMON); in init_intel()
643 if (cpu_has(c, X86_FEATURE_XMM2)) in init_intel()
644 set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC); in init_intel()
651 set_cpu_cap(c, X86_FEATURE_BTS); in init_intel()
653 set_cpu_cap(c, X86_FEATURE_PEBS); in init_intel()
656 if (c->x86 == 6 && boot_cpu_has(X86_FEATURE_CLFLUSH) && in init_intel()
657 (c->x86_model == 29 || c->x86_model == 46 || c->x86_model == 47)) in init_intel()
658 set_cpu_bug(c, X86_BUG_CLFLUSH_MONITOR); in init_intel()
660 if (c->x86 == 6 && boot_cpu_has(X86_FEATURE_MWAIT) && in init_intel()
661 ((c->x86_model == INTEL_FAM6_ATOM_GOLDMONT))) in init_intel()
662 set_cpu_bug(c, X86_BUG_MONITOR); in init_intel()
665 if (c->x86 == 15) in init_intel()
666 c->x86_cache_alignment = c->x86_clflush_size * 2; in init_intel()
667 if (c->x86 == 6) in init_intel()
668 set_cpu_cap(c, X86_FEATURE_REP_GOOD); in init_intel()
675 if (c->x86 == 6) { in init_intel()
676 unsigned int l2 = c->x86_cache_size; in init_intel()
679 switch (c->x86_model) { in init_intel()
690 else if (c->x86_stepping == 0 || c->x86_stepping == 5) in init_intel()
701 strcpy(c->x86_model_id, p); in init_intel()
704 if (c->x86 == 15) in init_intel()
705 set_cpu_cap(c, X86_FEATURE_P4); in init_intel()
706 if (c->x86 == 6) in init_intel()
707 set_cpu_cap(c, X86_FEATURE_P3); in init_intel()
711 srat_detect_node(c); in init_intel()
713 init_ia32_feat_ctl(c); in init_intel()
715 if (cpu_has(c, X86_FEATURE_TME)) in init_intel()
716 detect_tme(c); in init_intel()
718 init_intel_misc_features(c); in init_intel()
730 intel_init_thermal(c); in init_intel()
734 static unsigned int intel_size_cache(struct cpuinfo_x86 *c, unsigned int size) in intel_size_cache() argument
742 if ((c->x86 == 6) && (c->x86_model == 11) && (size == 0)) in intel_size_cache()
746 * Intel Quark SoC X1000 contains a 4-way set associative in intel_size_cache()
749 if ((c->x86 == 5) && (c->x86_model == 9)) in intel_size_cache()
777 { 0x01, TLB_INST_4K, 32, " TLB_INST 4 KByte pages, 4-way set associative" },
778 { 0x02, TLB_INST_4M, 2, " TLB_INST 4 MByte pages, full associative" },
779 { 0x03, TLB_DATA_4K, 64, " TLB_DATA 4 KByte pages, 4-way set associative" },
780 { 0x04, TLB_DATA_4M, 8, " TLB_DATA 4 MByte pages, 4-way set associative" },
781 { 0x05, TLB_DATA_4M, 32, " TLB_DATA 4 MByte pages, 4-way set associative" },
782 { 0x0b, TLB_INST_4M, 4, " TLB_INST 4 MByte pages, 4-way set associative" },
783 { 0x4f, TLB_INST_4K, 32, " TLB_INST 4 KByte pages" },
784 { 0x50, TLB_INST_ALL, 64, " TLB_INST 4 KByte and 2-MByte or 4-MByte pages" },
785 { 0x51, TLB_INST_ALL, 128, " TLB_INST 4 KByte and 2-MByte or 4-MByte pages" },
786 { 0x52, TLB_INST_ALL, 256, " TLB_INST 4 KByte and 2-MByte or 4-MByte pages" },
787 { 0x55, TLB_INST_2M_4M, 7, " TLB_INST 2-MByte or 4-MByte pages, fully associative" },
788 { 0x56, TLB_DATA0_4M, 16, " TLB_DATA0 4 MByte pages, 4-way set associative" },
789 { 0x57, TLB_DATA0_4K, 16, " TLB_DATA0 4 KByte pages, 4-way associative" },
790 { 0x59, TLB_DATA0_4K, 16, " TLB_DATA0 4 KByte pages, fully associative" },
791 { 0x5a, TLB_DATA0_2M_4M, 32, " TLB_DATA0 2-MByte or 4 MByte pages, 4-way set associative" },
792 { 0x5b, TLB_DATA_4K_4M, 64, " TLB_DATA 4 KByte and 4 MByte pages" },
793 { 0x5c, TLB_DATA_4K_4M, 128, " TLB_DATA 4 KByte and 4 MByte pages" },
794 { 0x5d, TLB_DATA_4K_4M, 256, " TLB_DATA 4 KByte and 4 MByte pages" },
795 { 0x61, TLB_INST_4K, 48, " TLB_INST 4 KByte pages, full associative" },
796 { 0x63, TLB_DATA_1G, 4, " TLB_DATA 1 GByte pages, 4-way set associative" },
797 { 0x6b, TLB_DATA_4K, 256, " TLB_DATA 4 KByte pages, 8-way associative" },
798 { 0x6c, TLB_DATA_2M_4M, 128, " TLB_DATA 2 MByte or 4 MByte pages, 8-way associative" },
800 { 0x76, TLB_INST_2M_4M, 8, " TLB_INST 2-MByte or 4-MByte pages, fully associative" },
801 { 0xb0, TLB_INST_4K, 128, " TLB_INST 4 KByte pages, 4-way set associative" },
802 { 0xb1, TLB_INST_2M_4M, 4, " TLB_INST 2M pages, 4-way, 8 entries or 4M pages, 4-way entries" },
803 { 0xb2, TLB_INST_4K, 64, " TLB_INST 4KByte pages, 4-way set associative" },
804 { 0xb3, TLB_DATA_4K, 128, " TLB_DATA 4 KByte pages, 4-way set associative" },
805 { 0xb4, TLB_DATA_4K, 256, " TLB_DATA 4 KByte pages, 4-way associative" },
806 { 0xb5, TLB_INST_4K, 64, " TLB_INST 4 KByte pages, 8-way set associative" },
807 { 0xb6, TLB_INST_4K, 128, " TLB_INST 4 KByte pages, 8-way set associative" },
808 { 0xba, TLB_DATA_4K, 64, " TLB_DATA 4 KByte pages, 4-way associative" },
809 { 0xc0, TLB_DATA_4K_4M, 8, " TLB_DATA 4 KByte and 4 MByte pages, 4-way associative" },
810 { 0xc1, STLB_4K_2M, 1024, " STLB 4 KByte and 2 MByte pages, 8-way associative" },
811 { 0xc2, TLB_DATA_2M_4M, 16, " TLB_DATA 2 MByte/4MByte pages, 4-way associative" },
812 { 0xca, STLB_4K, 512, " STLB 4 KByte pages, 4-way associative" },
903 static void intel_detect_tlb(struct cpuinfo_x86 *c) in intel_detect_tlb() argument
906 unsigned int regs[4]; in intel_detect_tlb()
909 if (c->cpuid_level < 2) in intel_detect_tlb()
934 { .family = 4, .model_names =
940 [4] = "486 SL",
943 [8] = "486 DX/4",
944 [9] = "486 DX/4-WB"
953 [4] = "Pentium MMX",
964 [4] = "Pentium II (Deschutes)",
975 [0] = "Pentium 4 (Unknown)",
976 [1] = "Pentium 4 (Willamette)",
977 [2] = "Pentium 4 (Northwood)",
978 [4] = "Pentium 4 (Foster)",
979 [5] = "Pentium 4 (Foster)",
1243 static void __init split_lock_setup(struct cpuinfo_x86 *c) in split_lock_setup() argument
1259 if (!cpu_has(c, X86_FEATURE_CORE_CAPABILITIES)) in split_lock_setup()
1305 void __init sld_setup(struct cpuinfo_x86 *c) in sld_setup() argument
1307 split_lock_setup(c); in sld_setup()