diff --git a/Library/OcAppleKernelLib/CommonPatches.c b/Library/OcAppleKernelLib/CommonPatches.c index aca8ba904bb..8aad7f6cfb6 100644 --- a/Library/OcAppleKernelLib/CommonPatches.c +++ b/Library/OcAppleKernelLib/CommonPatches.c @@ -448,16 +448,12 @@ PatchAppleXcpmExtraMsrs ( // Now patch writes to MSR_MISC_PWR_MGMT. // On macOS Monterey (12) and above, this no longer exists. // - if (OcMatchDarwinVersion (KernelVersion, KERNEL_VERSION_MONTEREY_MIN, 0)) { - DEBUG ((DEBUG_INFO, "OCAK: Skipping XcpmExtraMsrs MSR_MISC_PWR_MGMT patch on %u\n", KernelVersion)); - } else { - Status = PatcherApplyGenericPatch (Patcher, &mMiscPwrMgmtRelPatch); + Status = PatcherApplyGenericPatch (Patcher, &mMiscPwrMgmtRelPatch); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_INFO, "OCAK: Failed to patch writes to XcpmExtraMsrs MSR_MISC_PWR_MGMT - %r, trying dbg\n", Status)); + Status = PatcherApplyGenericPatch (Patcher, &mMiscPwrMgmtDbgPatch); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, "OCAK: Failed to patch writes to XcpmExtraMsrs MSR_MISC_PWR_MGMT - %r, trying dbg\n", Status)); - Status = PatcherApplyGenericPatch (Patcher, &mMiscPwrMgmtDbgPatch); - if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_WARN, "OCAK: Failed to patch writes to XcpmExtraMsrs MSR_MISC_PWR_MGMT - %r\n", Status)); - } + DEBUG ((DEBUG_WARN, "OCAK: Failed to patch writes to XcpmExtraMsrs MSR_MISC_PWR_MGMT - %r\n", Status)); } }