Lines Matching +full:0 +full:x86

37  * Refer to Fam15h Models 00-0fh BKDG - CPUID Fn8000_001E_ECX
44 u32 gprs[8] = { 0 }; in rdmsrl_amd_safe()
47 WARN_ONCE((boot_cpu_data.x86 != 0xf), in rdmsrl_amd_safe()
51 gprs[7] = 0x9c5a203a; in rdmsrl_amd_safe()
55 *p = gprs[0] | ((u64)gprs[2] << 32); in rdmsrl_amd_safe()
62 u32 gprs[8] = { 0 }; in wrmsrl_amd_safe()
64 WARN_ONCE((boot_cpu_data.x86 != 0xf), in wrmsrl_amd_safe()
67 gprs[0] = (u32)val; in wrmsrl_amd_safe()
70 gprs[7] = 0x9c5a203a; in wrmsrl_amd_safe()
103 * of the Elan at 0x000df000. Unfortunately, one of the Linux in init_amd_k5()
107 #define CBAR (0xfffc) /* Configuration Base Address (32-bit) */ in init_amd_k5()
108 #define CBAR_ENB (0x80000000) in init_amd_k5()
109 #define CBAR_KEY (0X000000CB) in init_amd_k5()
112 outl(0 | CBAR_KEY, CBAR); in init_amd_k5()
125 if (c->x86_model == 0) { in init_amd_k6()
168 if ((l&0x0000FFFF) == 0) { in init_amd_k6()
170 l = (1<<0)|((mbytes/4)<<1); in init_amd_k6()
189 if ((l&0xFFFF0000) == 0) { in init_amd_k6()
217 * Bit 15 of Athlon specific MSR 15, needs to be 0 in init_amd_k7()
236 if ((l & 0xfff00000) != 0x20000000) { in init_amd_k7()
238 l, ((l & 0x000fffff)|0x20000000)); in init_amd_k7()
239 wrmsr(MSR_K7_CLK_CTL, (l & 0x000fffff)|0x20000000, h); in init_amd_k7()
252 if ((c->x86_model == 6) && ((c->x86_stepping == 0) || in init_amd_k7()
257 if ((c->x86_model == 7) && (c->x86_stepping == 0)) in init_amd_k7()
294 for (i = apicid - 1; i >= 0; i--) { in nearby_node()
310 * [0 .. cores_per_node - 1] range. Not really needed but
317 if (c->x86 >= 0x17) in legacy_fixup_core_id()
339 cpuid(0x8000001e, &eax, &ebx, &ecx, &edx); in amd_get_topology()
341 c->cpu_die_id = ecx & 0xff; in amd_get_topology()
343 if (c->x86 == 0x15) in amd_get_topology()
344 c->cu_id = ebx & 0xff; in amd_get_topology()
346 if (c->x86 >= 0x17) { in amd_get_topology()
347 c->cpu_core_id = ebx & 0xff; in amd_get_topology()
489 if (c->extended_cpuid_level < 0x80000008) in early_init_amd_mc()
492 ecx = cpuid_ecx(0x80000008); in early_init_amd_mc()
494 c->x86_max_cores = (ecx & 0xff) + 1; in early_init_amd_mc()
497 bits = (ecx >> 12) & 0xF; in early_init_amd_mc()
500 if (bits == 0) { in early_init_amd_mc()
513 if (c->x86 > 0x10 || in bsp_init_amd()
514 (c->x86 == 0x10 && c->x86_model >= 0x2)) { in bsp_init_amd()
523 if (c->x86 == 0x15) { in bsp_init_amd()
527 cpuid = cpuid_edx(0x80000005); in bsp_init_amd()
528 assoc = cpuid >> 16 & 0xff; in bsp_init_amd()
544 ecx = cpuid_ecx(0x8000001e); in bsp_init_amd()
555 c->x86 >= 0x15 && c->x86 <= 0x17) { in bsp_init_amd()
558 switch (c->x86) { in bsp_init_amd()
559 case 0x15: bit = 54; break; in bsp_init_amd()
560 case 0x16: bit = 33; break; in bsp_init_amd()
561 case 0x17: bit = 10; break; in bsp_init_amd()
605 c->x86_phys_bits -= (cpuid_ebx(0x8000001f) >> 6) & 0x3f; in early_detect_mem_encrypt()
631 if (c->x86 >= 0xf) in early_init_amd()
657 if (c->x86 == 5) in early_init_amd()
665 * >= 0x10, but even old K8s came out of reset with version 0x10. So, we in early_init_amd()
670 if (c->x86 > 0x16) in early_init_amd()
672 else if (c->x86 >= 0xf) { in early_init_amd()
676 val = read_pci_config(0, 24, 0, 0x68); in early_init_amd()
677 if ((val >> 17 & 0x3) == 0x3) in early_init_amd()
691 if (c->x86 == 0x16 && c->x86_model <= 0xf) in early_init_amd()
706 if (c->x86 == 0x15 && in early_init_amd()
707 (c->x86_model >= 0x10 && c->x86_model <= 0x6f) && in early_init_amd()
710 if (msr_set_bit(0xc0011005, 54) > 0) { in early_init_amd()
711 rdmsrl(0xc0011005, value); in early_init_amd()
720 smp_num_siblings = ((cpuid_ebx(0x8000001e) >> 8) & 0xff) + 1; in early_init_amd()
730 if ((level >= 0x0f48 && level < 0x0f50) || level >= 0x0f58) in init_amd_k8()
735 * (model = 0x14) and later actually support it. in init_amd_k8()
738 if (c->x86_model < 0x14 && cpu_has(c, X86_FEATURE_LAHF_LM)) { in init_amd_k8()
740 if (!rdmsrl_amd_safe(0xc001100d, &value)) { in init_amd_k8()
742 wrmsrl_amd_safe(0xc001100d, value); in init_amd_k8()
746 if (!c->x86_model_id[0]) in init_amd_k8()
797 #define MSR_AMD64_DE_CFG 0xC0011029
820 return 0; in rdrand_cmdline()
828 * suspend/resume is done by arch/x86/power/cpu.c, which is in clear_rdrand_cpuid_bit()
874 if ((c->x86_model >= 0x02) && (c->x86_model < 0x20)) { in init_amd_bd()
875 if (!rdmsrl_safe(MSR_F15H_IC_CFG, &value) && !(value & 0x1E)) { in init_amd_bd()
876 value |= 0x1E; in init_amd_bd()
913 clear_cpu_cap(c, 0*32+31); in init_amd()
915 if (c->x86 >= 0x10) in init_amd()
922 if (c->x86 < 6) in init_amd()
925 switch (c->x86) { in init_amd()
929 case 0xf: init_amd_k8(c); break; in init_amd()
930 case 0x10: init_amd_gh(c); break; in init_amd()
931 case 0x12: init_amd_ln(c); break; in init_amd()
932 case 0x15: init_amd_bd(c); break; in init_amd()
933 case 0x16: init_amd_jg(c); break; in init_amd()
934 case 0x17: fallthrough; in init_amd()
935 case 0x19: init_amd_zn(c); break; in init_amd()
942 if ((c->x86 >= 6) && (!cpu_has(c, X86_FEATURE_XSAVEERPTR))) in init_amd()
969 * Family 0x12 and above processors have APIC timer in init_amd()
972 if (c->x86 > 0x11) in init_amd()
998 if (c->x86 == 6) { in amd_size_cache()
1000 if (c->x86_model == 3 && c->x86_stepping == 0) in amd_size_cache()
1004 (c->x86_stepping == 0 || c->x86_stepping == 1)) in amd_size_cache()
1014 u16 mask = 0xfff; in cpu_detect_tlb_amd()
1016 if (c->x86 < 0xf) in cpu_detect_tlb_amd()
1019 if (c->extended_cpuid_level < 0x80000006) in cpu_detect_tlb_amd()
1022 cpuid(0x80000006, &eax, &ebx, &ecx, &edx); in cpu_detect_tlb_amd()
1029 * characteristics from the CPUID function 0x80000005 instead. in cpu_detect_tlb_amd()
1031 if (c->x86 == 0xf) { in cpu_detect_tlb_amd()
1032 cpuid(0x80000005, &eax, &ebx, &ecx, &edx); in cpu_detect_tlb_amd()
1033 mask = 0xff; in cpu_detect_tlb_amd()
1038 tlb_lld_2m[ENTRIES] = (cpuid_eax(0x80000005) >> 16) & 0xff; in cpu_detect_tlb_amd()
1048 if (c->x86 == 0x15 && c->x86_model <= 0x1f) { in cpu_detect_tlb_amd()
1051 cpuid(0x80000005, &eax, &ebx, &ecx, &edx); in cpu_detect_tlb_amd()
1052 tlb_lli_2m[ENTRIES] = eax & 0xff; in cpu_detect_tlb_amd()
1099 * AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0x4, 0x2),
1100 * AMD_MODEL_RANGE(0x10, 0x8, 0x0, 0x8, 0x0),
1101 * AMD_MODEL_RANGE(0x10, 0x9, 0x0, 0x9, 0x0));
1104 #define AMD_LEGACY_ERRATUM(...) { -1, __VA_ARGS__, 0 }
1105 #define AMD_OSVW_ERRATUM(osvw_id, ...) { osvw_id, __VA_ARGS__, 0 }
1108 #define AMD_MODEL_RANGE_FAMILY(range) (((range) >> 24) & 0xff)
1109 #define AMD_MODEL_RANGE_START(range) (((range) >> 12) & 0xfff)
1110 #define AMD_MODEL_RANGE_END(range) ((range) & 0xfff)
1113 AMD_OSVW_ERRATUM(1, AMD_MODEL_RANGE(0xf, 0x41, 0x2, 0xff, 0xf),
1114 AMD_MODEL_RANGE(0x10, 0x2, 0x1, 0xff, 0xf));
1117 AMD_OSVW_ERRATUM(3, AMD_MODEL_RANGE(0x10, 0, 0, 0xff, 0xf));
1121 AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x17, 0, 0, 0x2f, 0xf));
1129 if (osvw_id >= 0 && osvw_id < 65536 && in cpu_has_amd_erratum()
1139 return osvw_bits & (1ULL << (osvw_id & 0x3f)); in cpu_has_amd_erratum()
1146 if ((cpu->x86 == AMD_MODEL_RANGE_FAMILY(range)) && in cpu_has_amd_erratum()
1160 case 0: in set_dr_addr_mask()
1161 wrmsr(MSR_F16H_DR0_ADDR_MASK, mask, 0); in set_dr_addr_mask()
1166 wrmsr(MSR_F16H_DR1_ADDR_MASK - 1 + dr, mask, 0); in set_dr_addr_mask()
1177 if (c->x86 == 0x17 && ((c->x86_model >= 0x30 && c->x86_model < 0x40) || in amd_get_highest_perf()
1178 (c->x86_model >= 0x70 && c->x86_model < 0x80))) in amd_get_highest_perf()
1181 if (c->x86 == 0x19 && ((c->x86_model >= 0x20 && c->x86_model < 0x30) || in amd_get_highest_perf()
1182 (c->x86_model >= 0x40 && c->x86_model < 0x70))) in amd_get_highest_perf()