| 1 | #include <sys/param.h> |
| 2 | #include <sys/bus.h> |
| 3 | #include <sys/kernel.h> |
| 4 | #include <sys/systm.h> |
| 5 | #include <sys/sysctl.h> |
| 6 | |
| 7 | #include <machine/cpufunc.h> |
| 8 | #include <machine/cputypes.h> |
| 9 | #include <machine/md_var.h> |
| 10 | #include <machine/specialreg.h> |
| 11 | |
| 12 | #include "acpi.h" |
| 13 | #include "acpivar.h" |
| 14 | #include "acpi_cpu.h" |
| 15 | |
| 16 | uint32_t |
| 17 | acpi_cpu_md_features(void) |
| 18 | { |
| 19 | if (cpu_vendor_id == CPU_VENDOR_INTEL) { |
| 20 | uint32_t regs[4]; |
| 21 | static int reported; |
| 22 | |
| 23 | if (!reported) { |
| 24 | do_cpuid(0x6, regs); |
| 25 | if (regs[0] & 0x2) |
| 26 | kprintf("Turbo mode enabled in BIOS\n"); |
| 27 | reported = 1; |
| 28 | } |
| 29 | |
| 30 | if (cpu_feature2 & CPUID2_EST) { |
| 31 | return (ACPI_PDC_PX_MSR | |
| 32 | ACPI_PDC_MP_PX_SWCOORD | |
| 33 | ACPI_PDC_PX_HWCOORD); |
| 34 | } |
| 35 | } |
| 36 | return 0; |
| 37 | } |