Recently Browsing 0 members
No registered users viewing this page.
What is CFG Lock and MSR 0xE2?
CFG Lock is a BIOS setting that allows writing to a specific register, in this case MSR E2 (MSR = Model Specific Register). An MSR consists of one or more registers in blocks of instructions used to do certain tasks on a CPU. MTRs are also used to control CPU's access to memory ranges. Commands capable of reading and writing to MSR work with elevated privileges (the operating system, primarily).
Many motherboards come from factory with MSR E2 region locked (read but not write) and quite a few of them even hide this option in BIOS user interface. In those that do show the option to block or unblock this variable, it is usually called CFG Lock. CFG Lock is a bit with 2 values, 0x1 or 0x0. When it is 0x1, macOS cannot write into this region and kernel patches are required.
macOS wants to write this registry, both the Kernel and AppleIntelPowerManagement. It defines the C-states of the CPU, which is why it is essential for macOS. Without the ability to write to MSR E2, all or most of the CPU power management is lost and the system does not boot.
In Clover 2 patches have been used: KernelPM (for AppleIntelPowerManagement.kext) and KernelXCPM (for the kernel). In OpenCore 2 others have been used: AppleCpuPmCfgLock (for AppleIntelPowerManagement.kext) and AppleXcpmCfgLock (for the kernel). These patches fix the problem but the registry is still read-only. To ensure native CPU power management, CFG Lock bit must be set to 0x0.
To achieve this, the firmware must be modified to support writing to MSR E2. This method is preferred over Clover and OC patches, it generates greater system stability and the CPU power management more closely resembles that of a real Mac. The methods that are usually proposed for this task are too complex for most users who do not have a high level of knowledge, requiring specialized tools and even modified Grub.
Below I comment on an alternative method that is much simpler and that, at least in my case, seems to have been successful. Like any of the methods that modify this bit, it has the risk of not working or even damaging the BIOS, so if you try it it is under your entire responsibility.
User @Brumbaer has a tool called CFGLock.efi (see post). It is an EFI application, it has to be installed in OC Tools folder (Misc - Tools in config.plist) and in this way it is available in the OC menu next to Reset NVRAM. It should be accompanied by another tool included in the OC package called VerifyMsrE2.efi that reports current status of CFG Lock (locked / unlocked).
When CFGLock.efi runs, it displays information (CFG variable found, varstore in which it resides, current reading and requests user intervention to make the change from 0x1 to 0x0 or vice versa). Then you have to restart. With VerifyMsrE2.efi we can check if the change has been successful.
Both EFI applications can be run by selecting them directly in the OC menu but it is also possible, by installing OpenShell.efi tool, to run this shell and running them from there. Information for handling OpenShell.efi is available in OC and elsewhere.
I have tried CFGLock.efi and apparently it has worked well.
macOS boots up and works fine with the OC patches AppleCpuPmCfgLock and AppleXcpmCfgLock disabled.
VerifyMsrE2.efi reports "This firmware has UNLOCKED MSR 0XE2 register!".
Hackintool in Utilities - Get AppleIntelInfo displays this text: AppleIntelInfo.kext v3.0 Copyright © 2012-2017 Pike R. Alpha. All rights reserved. IA32_MISC_ENABLES................(0x1A0) : 0x850089 ------------------------------------------ - CFG Lock............................. : 0 (MSR not locked) Note: Hackintool current version (3.4.6) doesn't show text after Get AppleIntelInfo in Big Sur beta 10. It's got from Catalina.
Intel Power Gadget - Frequency graph shows variations between maximum and minimum suggestive of CPUPM.
After using my old Dell Clover convert for a few years, I recently built a new Catalina box using OpenCore. Everything works perfectly and has been very stable. The only thing that is not working is unlocking with my Apple Watch. The screen says "Unlocking with Apple Watch" with the spinning graphic and then just prompts for my password. It does not shake or anything as if the password is incorrect. My 2014 MBP unlocks without issue and they both use the same iCloud account. I purchased the Fenvi FV-T919 pci-e adapter and BT, WIFI, Handoff, and Airdrop are all working without issue. I confirmed in system preferences that unlock is supported and made sure that automatic login is disabled in my profile. I have cleared keys out of the keystore, restarted a number of times, logged out and back into iCloud all to no avail. Anyone else having this issue? Thanks in advance!!
More info my build:
Asus PRIME z370-A II
Core i7 9700K
32 GB PC3200 Crucial Ballistix RAM
Sapphire Pulse RX380
Samsung 970 Evo Plus
2x Seagate Barracuda 4TB
CoolerMaster MasterLiquid ML240L V2
I'm member of this community for 10 years and now I feel I can finally somehow help to other beginners like me, who has the same or similar hardware like me.
Here is my EFI partition with OpenCore 0.6.1 configured for
Asus Maximus VI Formula (chipset Z87)
Intel Core i5-4670K @ 4GHz
32GB DDR3 1600MHz
Sapphire Radeon RX480 4GB
I removed SN, UUID and others unique values from config.plist so don't forget to fill yours own or generate new. For beginners like me is very useful OpenCore Configurator
Its compatible with macOS Catalina. I'm not sure, but I think that Mojave works also.
I spent a lot of time by resolving problem with integrated sound card (Realtek ALC1150). If you have problems with sound, try another layout number via alcid=XX in boot-args. For Maximums VI Formula value 5 match the best I think. For more info how to fix soundcard read here: https://dortania.github.io/OpenCore-Post-Install/universal/audio.html
I apologies for the broadcast message but i have decided to reinstall my Hackintosh machine using Catalina 10.15.6 and .... I'm stuck at "PCI configuration begin"..
My configuration is:
Asus X99 Deluxe Core i7 5960x 32 Gb memory GTX 980
Knowing that my graphic card would not be fully recognised in Catalina i have also tried to install High Sierra but I managed to get exactly to the same point and i have therefore decided to give another try to Catalina and .... I'm still stuck.
(FYI I had managed to install 10.8 on my machine a while ago but a few things have changed since then and I may be missing a trick).
In a nutshell I believe my issue is linked to this message that i'm getting:
Waiting on <dict ID="0"><key>IOProviderClass</key><string ID="1">IOResources</string><key>IOResourcesMatch</key><string ID="2">boot-uuid-media</string></dict>
I tried all options (with/without flags and with/without kext) but i think that my issue is between my DSDT, SSDT and config.plist files.
Any help would be much appreciated!
I have attached my EFI folder and the print screen with the error message.
Let me know if you need any further information.
Thanks a lot