| 1578 | } |
| 1579 | |
| 1580 | void |
| 1581 | identify_cpu2(void) |
| 1582 | { |
| 1583 | u_int regs[4], cpu_stdext_disable; |
| 1584 | |
| 1585 | if (cpu_high >= 6) { |
| 1586 | cpuid_count(6, 0, regs); |
| 1587 | cpu_power_eax = regs[0]; |
| 1588 | cpu_power_ebx = regs[1]; |
| 1589 | cpu_power_ecx = regs[2]; |
| 1590 | cpu_power_edx = regs[3]; |
| 1591 | } |
| 1592 | |
| 1593 | if (cpu_high >= 7) { |
| 1594 | cpuid_count(7, 0, regs); |
| 1595 | cpu_stdext_feature = regs[1]; |
| 1596 | |
| 1597 | /* |
| 1598 | * Some hypervisors failed to filter out unsupported |
| 1599 | * extended features. Allow to disable the |
| 1600 | * extensions, activation of which requires setting a |
| 1601 | * bit in CR4, and which VM monitors do not support. |
| 1602 | */ |
| 1603 | cpu_stdext_disable = 0; |
| 1604 | TUNABLE_INT_FETCH("hw.cpu_stdext_disable", &cpu_stdext_disable); |
| 1605 | cpu_stdext_feature &= ~cpu_stdext_disable; |
| 1606 | |
| 1607 | cpu_stdext_feature2 = regs[2]; |
| 1608 | cpu_stdext_feature3 = regs[3]; |
| 1609 | |
| 1610 | if ((cpu_stdext_feature3 & CPUID_STDEXT3_ARCH_CAP) != 0) |
| 1611 | cpu_ia32_arch_caps = rdmsr(MSR_IA32_ARCH_CAP); |
| 1612 | } |
| 1613 | } |
| 1614 | |
| 1615 | void |
| 1616 | identify_cpu_fixup_bsp(void) |
no test coverage detected