From 4cc7ac246d99ee3033a651cb7587ec39b6ad13b7 Mon Sep 17 00:00:00 2001 From: PMheart <17109513+PMheart@users.noreply.github.com> Date: Mon, 5 Jun 2023 22:32:13 +0200 Subject: [PATCH] OcAppleKernelLib: Fixed `AppleXcpmForceBoost` on macOS 14 --- Changelog.md | 1 + Library/OcAppleKernelLib/CommonPatches.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index f5d61629..0588e482 100644 --- a/Changelog.md +++ b/Changelog.md @@ -12,6 +12,7 @@ OpenCore Changelog - Added optional `--enable-mouse-click` argument to `CrScreenshotDxe` driver to additionally respond on mouse click - Added `--use-conn-none` option to `AudioDxe` driver to discover additional usable output channels on some systems - Added `PciIo` protocol override used to fix Aptio IV compatiblity with Above 4G BARs, thx @xCuri0 +- Fixed `AppleXcpmForceBoost` quirk on macOS 14 #### v0.9.2 - Added `DisableIoMapperMapping` quirk, thx @CaseySJ diff --git a/Library/OcAppleKernelLib/CommonPatches.c b/Library/OcAppleKernelLib/CommonPatches.c index 48eedbae..19850dc2 100644 --- a/Library/OcAppleKernelLib/CommonPatches.c +++ b/Library/OcAppleKernelLib/CommonPatches.c @@ -488,6 +488,14 @@ CONST UINT8 0x0F, 0x30 ///< wrmsr }; +STATIC +CONST UINT8 + mPerfCtrlFind4[] = { + 0xB9, 0x99, 0x01, 0x00, 0x00, ///< mov ecx, 0x199 + 0x48, 0x89, 0xD8, ///< mov rax, rbx + 0x0F, 0x30 ///< wrmsr +}; + STATIC CONST UINT8 mPerfCtrlMax[] = { @@ -538,7 +546,8 @@ PatchAppleXcpmForceBoost ( { if ( (CompareMem (&Current[4], &mPerfCtrlFind1[4], sizeof (mPerfCtrlFind1) - 4) == 0) || (CompareMem (&Current[4], &mPerfCtrlFind2[4], sizeof (mPerfCtrlFind2) - 4) == 0) - || (CompareMem (&Current[4], &mPerfCtrlFind3[4], sizeof (mPerfCtrlFind3) - 4) == 0)) + || (CompareMem (&Current[4], &mPerfCtrlFind3[4], sizeof (mPerfCtrlFind3) - 4) == 0) + || (CompareMem (&Current[4], &mPerfCtrlFind4[4], sizeof (mPerfCtrlFind4) - 4) == 0)) { break; } -- GitLab