Jump to content

Clover General discussion


ErmaC
30,171 posts in this topic

Recommended Posts

On 3/22/2022 at 6:56 AM, MifJpnAlphaPlus said:

 

Hello.

I didn't know there was such a great option. Amazing!

Windows tends to set up its own deep folders in the UEFI order.

 In contrast, creating UEFI items is quite a tedious process.
 As such, if it is not that amazing option, I work in UBUNTU's live mode, such as
 This was a nice experience to see how UEFI boot items work.

https://mifmif-mydns-jp.translate.goog/pcpc/index.php?PC3-180909&_x_tr_sl=ja&_x_tr_tl=en&_x_tr_hl=ja&_x_tr_pto=wapp

(Pardon the automatic translation.)

 

 

Yes!
This option just blew me away!

 

My gfxutil.sh script for macOS can list and set boot#### items. It requires macOS to be able to correctly create the UEFI device path of the partition which usually works fine but there may be some cases where it doesn't work.

https://gist.github.com/joevt/477fe842d16095c2bfd839e2ab4794ff

  • Like 1
Link to comment
Share on other sites

On 3/23/2022 at 11:07 PM, tluck said:

this is not the only issue...

/opt/Source/Clover/rEFIt_UEFI/cpp_foundation/XStringAbstract.h:553:85: note: in instantiation of function template specialization '__String<wchar_t, XStringW>::strcmp<wchar_t>' requested here

        bool operator == (const __String<O, OtherXStringClass>& s2) const { return (*this).strcmp(s2.s()) == 0; }

                                                                                           ^

/opt/Source/Clover/rEFIt_UEFI/refit/../libeg/libeg.h:132:19: note: in instantiation of function template specialization '__String<wchar_t, XStringW>::operator==<wchar_t, XStringW>' requested here

    if ( !(SValue == other.SValue ) ) return false;

                  ^

 

/opt/Source/Clover/rEFIt_UEFI/Settings/ConfigPlist/Config_GUI.h:86:131: note: in instantiation of function template specialization '__String<char, XString8>::startWithIC<char>' requested here

          XBool dgetLegacyFirst() const { return Legacy.isDefined() && Legacy.xmlString8.isDefined() && Legacy.xmlString8.value().startWithIC("F"); };

                                                                                                                                  ^

It is induced issue.

Link to comment
Share on other sites

Guest 5T33Z0

r5146 feels super snappy. Boot times are super fast as well on my desktop and Firefox also feels faster when booting through Clover rather than OC. I don't know why since I configured both configs the same, basically. But that's my experience with the last couple of releases. Great work.

Link to comment
Share on other sites

On 3/27/2022 at 6:47 PM, 5T33Z0 said:

r5146 feels super snappy.

It seems that a few macos updates ago my hackintosh turned off trim support, which I had enabled. Turned it on again and after some time it seems to be faster again, but it could also be my imagination, lol.

  • Like 2
Link to comment
Share on other sites

Guest 5T33Z0

I think there's a bug in r5146. It seems that it does not drop the DMAR table. I have Clover set up up to drop the original DMAR table:

 

614164790_Bildschirmfoto2022-03-30um19_43_04.png.ad603bfac15532d0a2f82b508e418827.png

 

And use my modifier one instead (located under ACPI > patched:

 

323370026_Bildschirmfoto2022-03-30um19_44_08.png.42ba8064b9aaa30017dde55a62f54761.png

 

But, when I open maciASL can see, that it didn't drop the original. There' are 2 now, DMAR and DMAR-1:

 

94255431_Bildschirmfoto2022-03-30um19_46_48.png.8648329e3de0e8b403a84f4c6a9ed919.png

 

So I thought I just Select Drop DMAR and add a Table Length as well. Bit Clover Configurator won't allow me to use the Table Length/ID feature with preset tables from the dropdown menu.

 

Does someone know how to workaround it?

 

Link to comment
Share on other sites

I just tested.

Clover menu

screenshot1.png

Setting in config.plist

           <key>DropTables</key>
            <array>
                <dict>
                    <key>Signature</key>
                    <string>DMAR</string>
                </dict>
                <dict>
                    <key>TableId</key>
                    <string>Cpu0Ist</string>
                    <key>Signature</key>
                    <string>SSDT</string>
                </dict>
                <dict>
                    <key>TableId</key>
                    <string>CpuPm</string>
                    <key>Signature</key>
                    <string>SSDT</string>
                </dict>
                <dict>
                    <key>Length</key>
                    <integer>3806</integer>
                    <key>Signature</key>
                    <string>SSDT</string>
                </dict>
            </array>

Then look into boot-log

2:654  0:000   - [18]: VFCT  A M I len=60036
2:654  0:000   - [19]: DMAR  A M I len=112
2:654  0:000   - [00]: Drop table : DMAR,                0 :  yes
2:654  0:000   - [01]: Drop table : SSDT,   74734930757043 :  no
2:654  0:000   - [02]: Drop table : SSDT,       6d50757043 :  no
2:654  0:000   - [03]: Drop table : SSDT,                0 :  yes
2:654  0:000  Custom boot CUSTOM_BOOT_DISABLED (0x0)

...
53:315  0:000  === [ ACPIDropTables ] ==========================
53:315  0:000  Drop tables from XSDT, SIGN=DMAR TableID=A M I Length=112
53:315  0:000   Table[19]: DMAR  A M I  112 dropped
53:315  0:000  Drop tables from XSDT, SIGN=SSDT TableID=A M I Length=3806
53:315  0:000   Table[11]: SSDT  A M I  3806 dropped

Then start DarwinDumper and see all ACPI tables present in system

Screenshot 2022-03-31 at 19.40.12.png

The DMAR table is absent

 

See double FACS tables. It is possible because of double place. May be your hardware has double DMAR tables. Look carefully to drop both of them. Yes, by length.

 

  • Like 5
Link to comment
Share on other sites

Hi @Slice Clover r5146 can not boot Install macOS Catalina.app 10.15.7, but it can boot Install Big Sur and Install Monterey

Some thing change in kernel management I think because OC can boot Catalina and Lower without issue

This is the Pics boot screen from my Laptop and same issue from my 2 other Hackintosh PC

Spoiler

IMG_2482.thumb.jpeg.7f80eb9236858381f1ff55b0cf631e06.jpeg

Edited by chris1111
  • Sad 1
Link to comment
Share on other sites

2 hours ago, chris1111 said:

Hi @Slice Clover r5146 can not boot Install macOS Catalina.app 10.15.7, but it can boot Install Big Sur and Install Monterey

Some thing change in kernel management I think because OC can boot Catalina and Lower without issue

This is the Pics boot screen from my Laptop and same issue from my 2 other Hackintosh PC

 

 

See you but I see no reason for that. 

What about early Clover versions?

The crash on your screen corresponds to wrong ACPI (DSDT,SSDT etc)

Link to comment
Share on other sites

5 hours ago, Slice said:

See you but I see no reason for that. 

What about early Clover versions?

The crash on your screen corresponds to wrong ACPI (DSDT,SSDT etc)

Maybe the problem is latest Install Catalina.app or corruption of the app?

EDIT. ***

YES you are absolutly right its an SSDT causing the boot problem

Thanks for advice, Solved!

Edited by chris1111
  • Like 3
Link to comment
Share on other sites

Guest 5T33Z0

@Slice About DMAR. Thanks for checking. Here are my settings:

 

1441480143_Bildschirmfoto2022-04-10um16_18_36.png.c3555209018ff34632b9cebad4d6ce09.png

 

If I boot with Clover, the DMAR table remains in ACPI. I can grab it through maciASL:

1325515062_Bildschirmfoto2022-04-10um16_21_27.png.d459492535c45da231286d4b722d4d1c.png

 

If I use OpenCore to drop the DMAR table, it is not present:

 

1480480685_Bildschirmfoto2022-04-10um16_23_17.png.c29147827ae7343ddb793192d04a3acf.png

 

Results for extracting Tables with Darwin Dumper when running Clover:

 

207910042_Bildschirmfoto2022-04-10um16_34_53.png.49441f3ac80036d3d75b43652e249283.png

 

So, as you can see, it doesn't drop the table for my system.

 

Link to comment
Share on other sites

Guest 5T33Z0

@SliceI already deleted the whole key and created a new one. Nothing unusual when dumping the ACPI tables either. There are no hidden chars in the file:

 

1483743196_Bildschirmfoto2022-04-10um19_00_58.png.7ddd65697b8d69a7ecb35c1e9d5b6478.png

Edited by 5T33Z0
Link to comment
Share on other sites

Guest 5T33Z0

@Hervé

  1. I was asked to look for invisible characters in the config for this key in hex – so I did . There are none.
  2. The config is not corrupt. Otherwise it wouldn't be possible to boot nor open/edit it
  3. I can select to drop the table DMAR from the Clover GUI (it is pre-selected) -  it's just not dropped.

I've tried every option to dump the DMAR table with Clover now – including table length and table ID - It simple does not work in Clover r5146, latest release: https://github.com/CloverHackyColor/CloverBootloader/actions/runs/2143072306

 

I can't tell if it worked before because I've only noticed it recently. There are no issues with dropping other tables, though.

 

Link to comment
Share on other sites

  • 2 weeks later...
Guest 5T33Z0
On 4/10/2022 at 5:32 PM, 5T33Z0 said:

@SliceI already deleted the whole key and created a new one. Nothing unusual when dumping the ACPI tables either. There are no hidden chars in the file:

 

1483743196_Bildschirmfoto2022-04-10um19_00_58.png.7ddd65697b8d69a7ecb35c1e9d5b6478.png

 

Just an update: still can't drop DMAR on my desktop pc. The workaround I use now is enabling AutoMerge so my DMAR replacement table is merged with the original.

Link to comment
Share on other sites

19 minutes ago, 5T33Z0 said:

 

Just an update: still can't drop DMAR on my desktop pc. The workaround I use now is enabling AutoMerge so my DMAR replacement table is merged with the original.

C u

We may know more about the problem if create a special Clover version with more debug output in the ACPI patching.

  • Like 2
Link to comment
Share on other sites

Hi all.

For the first time since a loooong while, I got some time to commit a nice refactoring (Yes, I know, another one 😀). Does it change anything for users ? Of course not :hysterical: !

 

I replaced the basic struct EFI_GUID by a class of the same name. What for ? Make it nicer for developer, which means more obvious, which mean less bug.

 

* the object is 100% binary compatible with the previous one. So low level operation (CopyMem, CompareGuid, etc.) are still possible like before. It can also be passed to the libraries.

* no need anymore for (let's say you have a EFI_GUID guid object) :

   - StrToGuid : just call guid.toXString8() or guid.toXStringW() (you can chain guid.toXString8().c_str() or guid.toXStringW().wc_str() if low level char access is needed).

   - AsciiStrToGuid : just call guid.takeValueFrom(...)

   - CopyGuid : just assign. guid1 = guid2

   - CompareGuid : just compare. "if ( guid1 == guid2 )". (Honestly, return true when equal when all C compare function return 0 when equal ???. That's why more obvious is less bug)

* I replaced all CONST EFI_GUID* in librairies parameter by const EFI_GUID& through a preprocessor macro (CONST_EFI_GUID_PTR_T and JCONST_EFI_GUID_PTR_T). So when it's compiled without this new replacement, it compiles exactly like it was before.

 

Why replacing a pointer (CONST EFI_GUID*) by a reference (const EFI_GUID&) ? For the usual reason : if you call an EFI function that takes a pointer to a guid, you can (you should!) always wonder if the function will modify that parameter. EDK function are generally well made enough to identify IN and OUT parameter, but you have to go look at the documentation or the prototype. Now, because you can call a function that takes an EFI_GUID parameter as input without taking the address yourself, you know that it's an non modified input parameter.

Example : instead of

Status = gBS->LocateProtocol(&gAppleSMCProtocolGuid, NULL, (void**)&gAppleSmc);

use

Status = gBS->LocateProtocol(gAppleSMCProtocolGuid, NULL, (void**)&gAppleSmc);

The idea is : use a guid like you would use an int. Assign, compare, give as parameter.

Of course, if a function has an output EFI_GUID parameter, the need to take the address with & remains to remind you that it will be changed by the call.

 

Ok, now I'm going back to the refactor I've started more than 2 years ago 😇

 

 

 

  • Like 4
  • Thanks 1
  • Haha 1
Link to comment
Share on other sites

×
×
  • Create New...