CloverBootloader: Clover r5122 breaks patching when target bridge data exists (works on r5119)

Hi everyone, this bug seems to exist (or crawl back) in Clover r5122 unfortunately, preventing me to boot Catalina. Can you please have a look? Here are my parameters.

In my config.plist I replace a Method in a Device:

                <dict>
                    <key>Comment</key>
                    <string>Rename _STA to XSTA in H_EC</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    X1NUQQ==
                    </data>
                    <key>Replace</key>
                    <data>
                    WFNUQQ==
                    </data>
                    <key>TgtBridge</key>
                    <data>
                    SF9FQw==
                    </data>
                </dict>

…so I can inject SSDT-EC-USBX.aml and disable (via _STA) the original device H_EC and add a fake EC device needed for Catalina. But in my IORegistryExplorer I see this didn’t work. Here is Clover log via Hackintool:

1:472  0:000   - [11]: (Rename _STA to XSTA in H_EC) lenToFind: 4, lenToReplace: 4, Target Bridge: H_ECtptalÉt0
1:472  0:000   - [12]: (Fix NUC BIOS RTC Device) lenToFind: 8, lenToReplace: 8, Target Bridge: 
1:472  0:000    patch disabled at config
...
5:438  0:000   - [Rename XHC_ to XHC1]: disabled
5:438  0:000   - [Rename _STA to XSTA in H_EC]:ATTENTION : CmpDev called with a H_ECt���ptal�Ét�0 with length() != 4 6
5:438  0:000  ATTENTION : CmpDev called with a H_ECt���ptal�Ét�0 with length() != 4 6
5:438  0:000  ATTENTION : CmpDev called with a H_ECt���ptal�Ét�0 with length() != 4 6
5:438  0:000  ATTENTION : CmpDev called with a H_ECt���ptal�Ét�0 with length() != 4 6
5:438  0:000  ATTENTION : CmpDev called with a H_ECt���ptal�Ét�0 with length() != 4 6

As @SergeySlice said in the InsanelyMac thread, this results in endless lines. I was under the impression this was fixed by @SergeySlice commit earlier on, can someone please confirm and assist?

Bug seems to be when parsing the data of the target bridge 😦

I just found out when trying to get Catalina on my Mojave after updating everything (Clover, Acidanthera’s kexts etc.). This seems to have broken in r5122 as I was able to boot with some USB key with r5119 and it works fine.

Many thanks!

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (13 by maintainers)

Most upvoted comments

Yes, exactly. I’ve corrected it 8 hours ago and send you a Clover efi to test in this post : https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/?do=findComment&comment=2739566

I believe it’s e9f0f8c#diff-759fbc4d1498d5ceee8eb9a5eced3907 causing this issue. TgtBridge should be handled in the same way as Find and Replace as an XBuffer<UINT8>, instead of XString8&.

You are exactly right.

I’m not taking care of revision. My understanding is that everything committed will be present is the next release. So my guess is yes, it’ll be in 5124.