Skip to content
xenophon61 edited this page Dec 24, 2023 · 14 revisions

How to modify BIOS (to clear CFG-Lock)

First, obtain the latest BIOS image from Lenovo (note that ThinkCentre M700s come in many flavors, some are Skylake, some are Skylake-S). Mine (model 10HY002WMG) has the following support page

  • Lenovo support We'll work with the .rom file present in the ISO version of the FWKTBFA BIOS, from July, 2022.

Tools needed

  • LongSoft's UEFITool for Mac, which is a GUI app
  • ifrextractor from the same author
  • chmod +x the ifrextractor download

Steps to take

  • open the .rom file with UEFITool, and search for the Unicode string "CFG"
  • should look something like this:
  • right click on Setup and select "Save as is" (to a .ffs file)
  • then use this command

sudo ./ifrextractor /Users/<yourusername>/Downloads/File_DXE_driver_Setup_Setup.ffs

  • you should get a .txt file, can be opened with TextEdit

  • search for "CFG", and this will show up:

      		OneOf Prompt: "CFG lock", Help: "Configure MSR 0xE2[15], CFG lock bit.", QuestionFlags: 0x10, QuestionId: 0x87D, VarStoreId: 0x1, VarOffset: 0x197, Flags: 0x10, Size: 8, Min: 0x0, Max: 0x1, Step: 0x0
      			OneOfOption Option: "Disabled" Value: 0
      			OneOfOption Option: "Enabled" Value: 1, Default, MfgDefault
    
  • we are interested in the "VarOffset" value, 0x197

  • reboot, and press space to reveal the OpenCore Tools

  • run "modGRUBShell.efi"

  • enter the following in the shell prompt

setup_var 0x197

  • should return the current, locked value for CFG_Lock, which is 1
  • it can be changed simply by

setup_var 0x197 0x00

  • this should unlock the CFG in the BIOS, as required by Mac OS

P.S. I followed the same procedure to change the "XHCI Disable Compliance Mode" (offset 0x659), to "1", during my ―desperate― attempts to fix sleep; don't know if it helps, but here's the relevant section from the BIOS disassembly:

OneOf Prompt: "XHCI Disable Compliance Mode", Help: "Options to disable Compliance Mode. Default is FALSE to not disable Compliance Mode. Set TRUE to disable Compliance Mode. QuestionFlags: 0x10, QuestionId: 0x555, VarStoreId: 0x1, VarOffset: 0x659, Flags: 0$

Hope this information helps. BTW I've used the same procedure for a ThinkPad Yoga, with success. Credits belong to Dortania and the whole OSX86 community!

Source: Fixing CFG Lock