I have updated my freqVectorsEdit.sh script and version 2.0 of it now also dumps the HWP and EPP settings:
HWP is short for HardWare-controlled Performance states (like legacy ACPI P-States) and EPP is short for Energy Performance Preference. The latter will replace read/writes from/to the perf-bias (IA32_ENERGY_PERF_BIAS MSR 0x1b0) on compatible hardware. HWP is supported on Intel® Broadwell and Skylake processors, though Intel® Speed Shift Technology is only supported by Skylake processors and El Capitan (OS X 10.11). Sure. Windows 10 also supports Intel® Speed Shift Technology, and even earlier than OS X, but I usually only blog about Mac’s and OS X.
The above screen dump shows us that the MacBook9,1 will have HWP enabled (set to 1) and that EPP is set to 146. The default setting is 128 (0x80) and it can go up to 255 (0xff). The higher the value, the more power friendly it will run. A lower value (0 to 128) will give more performance, at the cost of battery life.
In short. The yet to be released MacBook9,1 will be the first Mac ever to support Intel® HWP and that is good news, as it should run longer without AC power, and feels snappier with up to 45% improved responsiveness on a Intel® i5-6200U processor.
You can read more about HWP in the Intel® 64 and IA-32 Architectures Software Developer’s Manual.
Edit: Intel® Hardware Duty Cycling (HDC) may also be used, on certain (low power) processors, but I did not check the kernel code to see if that will be used. Will check that shortly.
Edit-2: I also found a reference in the kernel of El Capitan to HWP:
ffffff8000af7d44 S _xcpm_hwp_enabled
ffffff8000af7d48 S _xcpm_hwp_idle_epp
ffffff80003f5fd0 T _xcpm_is_hwp_enabled
ffffff80003f5100 T _xcpm_hwp_enable
Like I said I before. I checked the kernel of 10.11.4 but now I also checked the kernel of the 10.11.5 beta and found this:
ffffff80003f52f0 pushq %rbp
ffffff80003f52f1 movq %rsp, %rbp
ffffff80003f52f4 movl $0x1aa, %ecx
ffffff80003f52fb movl %edx, %edx
ffffff80003f52fd movl %eax, %eax
ffffff80003f52ff orq $0x40, %rax
ffffff80003f5303 movl $0x1aa, %ecx
ffffff80003f530a movl $0x770, %ecx // IA32_PM_ENABLE
ffffff80003f530f movl $0x1, %eax
ffffff80003f5314 xorl %edx, %edx
ffffff80003f5318 popq %rbp
ffffff80003f531a nopw (%rax,%rax)
The above piece of code enables HWP, but it isn’t called anywhere. Not yet. There is also code that reads a variable, to see if HWP is enabled:
ffffff80003f61c0 pushq %rbp
ffffff80003f61c1 movq %rsp, %rbp
ffffff80003f61c4 movl 0x701b7a(%rip), %eax
ffffff80003f61ca popq %rbp
ffffff80003f61cc nopl (%rax)
Next to the warning that once HWP is enabled, that you cannot disable it. Duh!
I also found four wrmsr() calls to IA32_HWP_REQUEST and that conveys OSPM’s control hints – Min, Max, Activity Window, Energy Performance Preference, Desired – for a single logical processor.
And after I enable it myself, from AppleIntelInfo.kext, then I see that power management is working. Even with EIST fully disabled in the BIOS. Even when I use -xcpm_ignore_fv to ignore the FrequencyVectors (see also Xnu CPU Power Management). Oh and I did add the hwp and eep settings to the FrequencyVectors myself.
Edit: With Turbo disabled in the BIOS it still reaches all turbo frequencies.