Jump to content

PMheart

Coders
  • Content Count

    997
  • Joined

  • Last visited

  • Days Won

    26

PMheart last won the day on June 4

PMheart had the most liked content!

About PMheart

  • Rank
    InsanelyMac Legend

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. PMheart

    Clover General discussion

    Hi, Sorry, I was too hurried yesterday, better to polish logging as follows: Index: rEFIt_UEFI/Platform/kernel_patcher.c =================================================================== --- rEFIt_UEFI/Platform/kernel_patcher.c (revision 4974) +++ rEFIt_UEFI/Platform/kernel_patcher.c (working copy) @@ -1048,7 +1048,7 @@ // check OS version suit for patches if (!IsXCPMOSVersionCompat(os_version)) { - DBG("Unsupported macOS.\n"); + DBG("HaswellLowEndXCPM(): Unsupported macOS.\n"); DBG("HaswellLowEndXCPM() <===FALSE\n"); return FALSE; } @@ -1121,7 +1121,7 @@ // check whether Ivy Bridge if (gCPUStructure.Model != CPU_MODEL_IVY_BRIDGE) { - DBG("Unsupported platform.\nRequires Ivy Bridge, aborted\n"); + DBG("KernelIvyBridgeXCPM(): Unsupported platform.\nRequires Ivy Bridge, aborted\n"); DBG("KernelIvyBridgeXCPM() <===FALSE\n"); return FALSE; } @@ -1129,7 +1129,7 @@ // check OS version suit for patches // PMheart: attempt to add 10.14 compatibility if (!IsXCPMOSVersionCompat(os_version)) { - DBG("Unsupported macOS.\n"); + DBG("KernelIvyBridgeXCPM(): Unsupported macOS.\n"); DBG("KernelIvyBridgeXCPM() <===FALSE\n"); return FALSE; } else if (os_version >= AsciiOSVersionToUint64("10.8.5") && os_version < AsciiOSVersionToUint64("10.12")) { @@ -1205,7 +1205,7 @@ // check whether Ivy Bridge-E5 if (gCPUStructure.Model != CPU_MODEL_IVY_BRIDGE_E5) { - DBG("Unsupported platform.\nRequires Ivy Bridge-E, aborted\n"); + DBG("KernelIvyE5XCPM(): Unsupported platform.\nRequires Ivy Bridge-E, aborted\n"); DBG("KernelIvyE5XCPM() <===FALSE\n"); return FALSE; } @@ -1213,7 +1213,7 @@ // check OS version suit for patches // PMheart: attempt to add 10.15 compatibility if (!IsXCPMOSVersionCompat(os_version)) { - DBG("Unsupported macOS.\n"); + DBG("KernelIvyE5XCPM(): Unsupported macOS.\n"); DBG("KernelIvyE5XCPM() <===FALSE\n"); return FALSE; } Thanks a lot!
  2. PMheart

    Clover General discussion

    Nope. It's not like the bytes are stable, so better to leave as is. Yet I came up with a tiny function for compatibility check, see the diff please: (@vector sigma) Index: rEFIt_UEFI/Platform/kernel_patcher.c =================================================================== --- rEFIt_UEFI/Platform/kernel_patcher.c (revision 4973) +++ rEFIt_UEFI/Platform/kernel_patcher.c (working copy) @@ -822,6 +822,15 @@ } // +// Global XCPM patches compatibility +// Currently 10.8.5 - 10.15 +// +static inline BOOLEAN IsXCPMOSVersionCompat(UINT64 os_version) +{ + return (os_version >= AsciiOSVersionToUint64("10.8.5")) && (os_version < AsciiOSVersionToUint64("10.16")); +} + +// // Enable Unsupported CPU PowerManagement // // syscl - SandyBridgeEPM(): enable PowerManagement on SandyBridge-E @@ -846,8 +855,8 @@ UINT64 os_version = AsciiOSVersionToUint64(Entry->OSVersion); // check OS version suit for patches - if (os_version < AsciiOSVersionToUint64("10.8.5") || os_version >= AsciiOSVersionToUint64("10.14")) { - DBG("Unsupported macOS.\nHaswell-E requires macOS 10.8.5 - 10.13.x, aborted\n"); + if (!IsXCPMOSVersionCompat(os_version)) { + DBG("HaswellEXCPM(): Unsupported macOS.\n"); DBG("HaswellEXCPM() <===FALSE\n"); return FALSE; } @@ -988,8 +997,8 @@ UINT64 os_version = AsciiOSVersionToUint64(Entry->OSVersion); // check OS version suit for patches - if (os_version < AsciiOSVersionToUint64("10.8.5")) { - DBG("Unsupported macOS.\nBroadwell-E/EP requires macOS at least 10.8.5, aborted\n"); + if (!IsXCPMOSVersionCompat(os_version)) { + DBG("BroadwellEPM(): Unsupported macOS.\n"); DBG("BroadwellEPM() <===FALSE\n"); return FALSE; } @@ -1038,8 +1047,8 @@ CHAR8 *comment; // check OS version suit for patches - if (os_version < AsciiOSVersionToUint64("10.8.5") || os_version >= AsciiOSVersionToUint64("10.14")) { - DBG("Unsupported macOS.\nHaswell Celeron/Pentium requires macOS 10.8.5 - 10.13.x, aborted\n"); + if (!IsXCPMOSVersionCompat(os_version)) { + DBG("Unsupported macOS.\n"); DBG("HaswellLowEndXCPM() <===FALSE\n"); return FALSE; } @@ -1118,9 +1127,8 @@ } // check OS version suit for patches - // PMheart: attempt to add 10.14 compatibility - if (os_version < AsciiOSVersionToUint64("10.8.5") || os_version >= AsciiOSVersionToUint64("10.15")) { - DBG("Unsupported macOS.\nIvy Bridge XCPM requires macOS 10.8.5 - 10.13.x, aborted\n"); + if (!IsXCPMOSVersionCompat(os_version)) { + DBG("Unsupported macOS.\n"); DBG("KernelIvyBridgeXCPM() <===FALSE\n"); return FALSE; } else if (os_version >= AsciiOSVersionToUint64("10.8.5") && os_version < AsciiOSVersionToUint64("10.12")) { @@ -1203,8 +1211,8 @@ // check OS version suit for patches // PMheart: attempt to add 10.14 compatibility - if (os_version < AsciiOSVersionToUint64("10.8.5") || os_version >= AsciiOSVersionToUint64("10.15")) { - DBG("Unsupported macOS.\nIvy Bridge-E XCPM requires macOS 10.8.5 - 10.13.x, aborted\n"); + if (!IsXCPMOSVersionCompat(os_version)) { + DBG("Unsupported macOS.\n"); DBG("KernelIvyE5XCPM() <===FALSE\n"); return FALSE; } Thanks!
  3. PMheart

    Clover General discussion

    @vector sigma I think I have figured it out: https://sourceforge.net/p/cloverefiboot/code/4973/tree/rEFIt_UEFI/Platform/kernel_patcher.c#l1122 which should be os_version >= AsciiOSVersionToUint64("10.16") now. (Meaning that 10.15 is still "unsupported" despite I added necessary patches) Please also change the comment right above, thanks!
  4. PMheart

    Clover General discussion

    @joevt is correct, and I hope we have a workaround to this: (Apply the patch via Clover KernelToPatch) https://github.com/acidanthera/OcSupportPkg/blob/3223115d876632f13408f64c182046dc1badd785/Library/OcAppleKernelLib/CommonPatches.c#L948-L958 Credit to @vit9696.
  5. PMheart

    [pre-release] macOS Catalina

    Hi, I hope this one works under Beta 2: Clover-4964-lapic-1015dp2-fix.zip And this is the diff for devs to review: (ONLY if it does work) Index: rEFIt_UEFI/Platform/Settings.c =================================================================== --- rEFIt_UEFI/Platform/Settings.c (revision 4964) +++ rEFIt_UEFI/Platform/Settings.c (working copy) @@ -6374,7 +6374,7 @@ if (Prop != NULL && Prop->string != NULL && Prop->string[0] != '\0') { if (AsciiStrStr (Prop->string, "Install%20OS%20X%20Mavericks.app")) { OSVersion = AllocateCopyPool (5, "10.9"); - } else if (AsciiStrStr (Prop->string, "Install%20macOS%20Catalina") || AsciiStrStr (Prop->string, "Install%20macOS%2010.15%20Beta")) { // FIXME: Remove Beta after final release + } else if (AsciiStrStr (Prop->string, "Install%20macOS%20Catalina") || AsciiStrStr (Prop->string, "Install%20macOS%20Catalina%20Beta")) { // FIXME: Remove Beta after final release OSVersion = AllocateCopyPool (6, "10.15"); } else if (AsciiStrStr (Prop->string, "Install%20macOS%20Mojave") || AsciiStrStr (Prop->string, "Install%20macOS%2010.14")) { OSVersion = AllocateCopyPool (6, "10.14"); Index: rEFIt_UEFI/Platform/kernel_patcher.c =================================================================== --- rEFIt_UEFI/Platform/kernel_patcher.c (revision 4964) +++ rEFIt_UEFI/Platform/kernel_patcher.c (working copy) @@ -709,10 +709,11 @@ patchLocation = i+1394; DBG("Found Mojave (10.14.4 - 10.14.6) Lapic panic at 0x%08x\n", patchLocation); break; - // PMheart: 10.15.DP1 - } else if (bytes[i+0] == 0x9E && bytes[i+1] == 0x00 && bytes[i+2] == 0x00 && bytes[i+3] == 0x74 && - bytes[i+4] == 0x0E && bytes[i+5] == 0x8B) { - patchLocation = i; + // PMheart: 10.15.DP2 + } else if (bytes[i+0] == 0x83 && bytes[i+1] == 0x3D && bytes[i+5] == 0x00 && bytes[i+6] == 0x00 && + bytes[i+7] == 0x74 && bytes[i+8] == 0x0E && bytes[i+9] == 0x8B && bytes[i+14] == 0x00 && + bytes[i+15] == 0x85 && bytes[i+16] == 0xC0 && bytes[i+17] == 0x0F && bytes[i+18] == 0x84) { + patchLocation = i+7; DBG("Found Catalina Lapic panic at 0x%08x\n", patchLocation); break; } @@ -724,9 +725,7 @@ } // Already patched? May be running a non-vanilla kernel already? - if (bytes[patchLocation + 0] == 0x9E && bytes[patchLocation + 1] == 0x00 && - bytes[patchLocation + 2] == 0x00 && bytes[patchLocation + 3] == 0xEB && - bytes[patchLocation + 4] == 0x22 && bytes[patchLocation + 5] == 0x8B) { + if (bytes[patchLocation + 0] == 0xEB && bytes[patchLocation + 1] == 0x22) { DBG("Lapic panic already patched, kernel file (10.15) manually patched?\n"); return FALSE; } else if (bytes[patchLocation + 0] == 0x90 && bytes[patchLocation + 1] == 0x90 && @@ -735,9 +734,9 @@ DBG("Lapic panic already patched, kernel file (10.6 - 10.14) manually patched?\n"); return FALSE; } else { - if (bytes[patchLocation + 0] == 0x9E && bytes[patchLocation + 1] == 0x00) { - bytes[patchLocation + 3] = 0xEB; - bytes[patchLocation + 4] = 0x22; + if (bytes[patchLocation + 0] == 0x74 && bytes[patchLocation + 1] == 0x0E) { + bytes[patchLocation + 0] = 0xEB; + bytes[patchLocation + 1] = 0x22; } else { bytes[patchLocation + 0] = 0x90; bytes[patchLocation + 1] = 0x90; EDIT: Do NOT forget to enable KernelLapic patch in config.plist!!!
  6. PMheart

    OpenCore Discussion

    Fixed at https://github.com/acidanthera/OpenCorePkg/commit/7045dbaaa978a7045dcf2561514304b14bd76d2a, thanks!
  7. PMheart

    OpenCore Discussion

    One difference is that Clover handles ACPI modifications to macOS *ONLY*, while OC applies to all OS. You have to ensure the compatibility with every OS booted.
  8. PMheart

    Clover General discussion

    Sorry for the inconvenience! Please revert it then.
  9. PMheart

    OpenCore Discussion

    Mostly it can be found at my previous post: And Identifier = kernel MatchKernel = 19. (don't forget the dot) Please also disable LapicKernelPanic for now. Sorry. Sleep time. 3:55 AM hereā€¦
  10. PMheart

    Clover General discussion

    Hi, I propose this new patch for kext injection of 10.15: Index: rEFIt_UEFI/Platform/kext_inject.c =================================================================== --- rEFIt_UEFI/Platform/kext_inject.c (revision 4959) +++ rEFIt_UEFI/Platform/kext_inject.c (working copy) @@ -681,8 +681,8 @@ // Catalina (SIP) // PMheart: checked // Need to pair with KBEMojaCata*EXT -UINT8 KBECataSearchSIP[] = { 0x00, 0x85, 0xC0, 0x0F, 0x84, 0x87, 0x00, 0x00, 0x00, 0x49 }; -UINT8 KBECataReplaceSIP[] = { 0x00, 0x85, 0xC0, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x49 }; +UINT8 KBECataSearchSIP[] = { 0xE8, 0xB0, 0xEE, 0x0C, 0x00, 0x85, 0xC0, 0x0F, 0x84 }; +UINT8 KBECataReplaceSIP[] = { 0xE8, 0xB0, 0xEE, 0x0C, 0x00, 0x31, 0xC0, 0x0F, 0x84 }; // Mojave 10.14 - 10.14.3 // Avoid race condition in OSKext::removeKextBootstrap when using booter kexts without keepsyms=1. Don't ask me if it works, of course it does - just read the asm code. PMheart
  11. PMheart

    OpenCore Discussion

    Hi, Looks like lapic_dont_panic=1 is kind of problematic. Don't use it for now. As for you patch shown in the screenshot (00 74 0E 8B -> 00 EB 22 8B) - No! It bricks the kernel as I could found *a lot of* occurrences instead of just one where we want to patch. Please grab mine instead: https://www.insanelymac.com/forum/topic/339035-pre-release-macos-catalina/?do=findComment&amp;comment=2676207 Or at least go specify: Base = _lapic_interrupt Count = 1 (By the way, you can also use bitmask to match 9E and 8B as shown in my post above.)
  12. PMheart

    [pre-release] macOS Catalina

    It's expected as I haven't updated the source code yet, I have claimed the reason at Let's wait for several new releases, and see how it goes. For now please just apply this manually patch.
  13. PMheart

    [pre-release] macOS Catalina

    Unfortunately I don't know what goes wrong. But in another word, does my patch work?
  14. PMheart

    [pre-release] macOS Catalina

    Hi, If I remembered correctly, the binary patch stopped working as of certain release of 10.14, I guess the best way is to inject properties, details can be found at Pike's blog.
  15. PMheart

    [pre-release] macOS Catalina

    Hi, yes! I am extremely wondering if it works, thanks!
×