Skip to content

Instantly share code, notes, and snippets.

@interferenc
Created February 4, 2018 08:04
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save interferenc/d82357a13751bc24dcc5942f6af2374b to your computer and use it in GitHub Desktop.
Save interferenc/d82357a13751bc24dcc5942f6af2374b to your computer and use it in GitHub Desktop.
Skylake-X and X299 BIOS patches to disable MSR 0xE2 lock AND TSC Fix
# SiInit
299D6F8B-2EC9-4E40-9EC6-DDAA7EBF5FD9 12 P:81E10080000033C1:9090909090909090
# PpmInitialize Reset IA32_TSC_ADJUST to 0 instead of enforcing 0xE2 lock
3FFCAE95-23CF-4967-94F5-16352F68E43B 10 P:742CB9E20000000F3248C1E220480BC20FBAE00F488944240872130FBAE80F89442408488B54240848C1EA200F30:BA00000000B800000000B93B0000000F309090909090909090909090909090909090909090909090909090909090
# CpuInitPei Reset IA32_TSC_ADJUST to 0 instead of enforcing 0xE2 lock
01359D99-9446-456D-ADA4-50A711C03ADA 12 P:B9E20000000F328BC8BE0080000023CE0BCF75190BC6894424088954240C8B54240C8B442408B9E20000000F30:BA00000000B800000000B93B0000000F3090909090909090909090909090909090909090909090909090909090
# CpuMpDxe to disable TSC writes
40BEAB40-CECE-4909-B133-20A413AE19E9 10 P:488BD6B9100000008BC648C1EA200F30:90909090909090909090909090909090
@dr3nan
Copy link

dr3nan commented Dec 12, 2019

Hello Interferenc, do you think these patches would work on a GB X299 Designare EX? Or are they limited to Asus X299?

@StevenWJ
Copy link

StevenWJ commented Mar 22, 2020

Hi Faragó,

My Gigabyte GA-X79-UP4 doesn't seem to sync TSC right. So my Hackintosh installation got stuck at "Unsynchronized TSC for CPU...".
I googled through TSC-related bios patches. You seems to be the only one who have worked on it.
Could you please let me know if there is any reference material about how to trace down TSC-related module and modify the BIOS code?

Thank you.
Regards,
Steven

@interferenc
Copy link
Author

Hey,

I recommend using the TSCAdjustReset kext instead of a bios patch. I managed to create a bios patch for the Strix x299, but I doubt that would work with anything else. And more importantly, the kext is a much more lightweight solution to the same problem.

Good luck!

@StevenWJ
Copy link

Hi Faragó,

The installation got stuck before either TSCAdjustRest or VoodooTSCSync kick in. That's why I was trying to patch my BIOS.
I disassembled your patches and managed to find the point then applied the patch to my BIOS.
And you are right, that doesn't work since the machine won't boot if I write MSR 0x3B.
I finally figure out the issue is caused by my Ivy bridge CPU.
Though the CPU works well with my Z9PE-D8 WS, GAX79-UP4 somehow just doesn't install Mac OS with this CPU.
Once I switched to a Sandy bridge CPU, the motherboard booted correctly and finished the installation.
Due to the poor power management of Sandy bridge CPU, I ended up give up this project.
However, I still learned a lot through the process. Thank you for your work and inspiration on this issue.

Regards,
Steven

@wyhtc
Copy link

wyhtc commented Jun 10, 2021

Hello,

PpmInitialize Reset IA32_TSC_ADJUST to 0 instead of enforcing 0xE2 lock patch is invalid in ASUS X299 3000 series version BIOS,and TSCAdjustReset.kext also invalid in macOS 12 Monterey with OpenCore bootloader. I tried to find this patch,but it not find in GUID 01359D99-9446-456D-ADA4-50A711C03ADA PE32 images.
Could you help me how to do?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment