Index: sys/x86/x86/identcpu.c =================================================================== --- sys/x86/x86/identcpu.c +++ sys/x86/x86/identcpu.c @@ -1381,6 +1381,7 @@ #endif { u_int regs[4], cpu_stdext_disable; + uint64_t msr; #ifdef __i386__ u_char ccr3; #endif @@ -1458,6 +1459,23 @@ do_cpuid(0x80000001, regs); amd_feature = regs[3] & ~(cpu_feature & 0x0183f3ff); amd_feature2 = regs[2]; + if (cpu_vendor_id == CPU_VENDOR_AMD && + CPUID_TO_FAMILY(cpu_id) == 0x15 && + (amd_feature2 & AMDID2_TOPOLOGY) == 0) { + /* + * See BIOS and Kernel Developer’s Guide (BKDG) + * for AMD Family 15h Models 60h-6Fh Processors, + * Publication # 50742. + */ + msr = rdmsr(0xc0011005); + msr |= (uint64_t)1 << 54; + wrmsr(0xc0011005, msr); + + do_cpuid(0x80000001, regs); + amd_feature2 = regs[2]; + if ((amd_feature2 & AMDID2_TOPOLOGY) != 0) + printf("Re-enabled topology extension\n"); + } } if (cpu_exthigh >= 0x80000007) { do_cpuid(0x80000007, regs);