Jump to content
30960 posts in this topic

Recommended Posts

I found that in IOReg, HDEF has as property Model, which is ok with previous clover, but now it's the hex version of that string.

I don't see where this Model is set.

I've compare DSDT and they are the same.

 

When I click PCI in system report, I have "This computer doesn’t contain any PCI cards or devices. If you installed or connected a PCI card or device, make sure it is properly installed."

 

Graphics card name is ok in about (HD3000). @Slice what card brand do you have ?

 

@iCanaro Could you send me the same screenshot you've sent, but when it's working ?
I can see that tipo is also an hex string that convert to "USB controller". But there is a 06 at the end. That is probably not right.

15 minutes ago, Jief_Machak said:

Could you send me the same screenshot you've sent, but when it's working ?

with Clover 5119

Z370

Catalina

but same thing with the Z170 on high sierra

1263442025_Schermata2020-08-17alle10_56_30.thumb.png.afa85959b615d44009c4ab8907bf883c.png

Edited by iCanaro
  • Like 1
On 8/13/2020 at 2:17 PM, Jief_Machak said:

Ok. I wrote the serialize method for SETTINGS_DATA, which should make the Clover.app config generation working again. The only thing I didn't include is KernelAndKextPatches. I wrote 0 instead. I guessed it's not used in Clover.app. Could someone confirm that ?

 

That said, if people who maintains the Clover.app could work on a deserialize method (instead of mapping a big structure), it would have 3 advantages :

  - member not used can be remove from serialization/deserialization.

  - fixed string length can be removed. Strings could be included as a pair length + data and be deserialize as a swift string.

  - member in SETTINGS_DATA can be reordered, added or removed without breaking Clover.app each time.

 

Sorry, I don't know swift at all, can't do it myself. Is there anyone up to help me ?

Hi, and sorry for the late I was out of home. Every things inside KernelAndKextPatches was there but KextsToPatch 

 

// MARK: KernelAndKextPatches

      var KernelAndKextPatches = [String : Any]()

     

      KernelAndKextPatches["#Debug"] =                      s.kpValue(for: "KPDebug", type: .BOOLEAN)

      if AppSD.CloverRevision <= 5016 {

        /*

         removed for 5017 (release 5016 still has it) commit:

         https://github.com/CloverHackyColor/CloverBootloader/commit/0b7eed38f14400c8501228a30dcc023e1132cec3

         */

        KernelAndKextPatches["KernelCpu"] =                   s.kpValue(for: "KPKernelCpu", type: .BOOLEAN)

      }

      KernelAndKextPatches["KernelLapic"] =                 s.kpValue(for: "KPKernelLapic", type: .BOOLEAN)

      if AppSD.CloverRevision >= 4250 {

        KernelAndKextPatches["KernelXCPM"] =                s.kpValue(for: "KPKernelXCPM", type: .BOOLEAN)

      } else {

        KernelAndKextPatches["KernelIvyXCPM"] =             s.kpValue(for: "KernelIvyXCPM", type: .BOOLEAN)

      }

      KernelAndKextPatches["KernelPm"] =                    s.kpValue(for: "KPKernelPm", type: .BOOLEAN)

      if AppSD.CloverRevision >= 4152 {

        KernelAndKextPatches["AppleIntelCPUPM"] =           s.kpValue(for: "KPAppleIntelCPUPM", type: .BOOLEAN)

      } else {

        KernelAndKextPatches["AsusAICPUPM"] =               s.kpValue(for: "KPAsusAICPUPM", type: .BOOLEAN)

      }

      

      KernelAndKextPatches["AppleRTC"] =                    s.kpValue(for: "KPAppleRTC", type: .BOOLEAN)

      KernelAndKextPatches["DellSMBIOSPatch"] =             s.kpValue(for: "KPDELLSMBIOS", type: .BOOLEAN)

      KernelAndKextPatches["#Number of KextsToPatch"] =     s.kpValue(for: "NrKexts", type: .INTEGER)

      KernelAndKextPatches["#Number of Patchs To Kernel"] = s.kpValue(for: "NrKernels", type: .INTEGER)

      KernelAndKextPatches["#FakeCPUID"] =                  s.kpValue(for: "FakeCPUID", type: .HexString)

      

      // MARK: KernelAndKextPatches->KextsToPatch

      var KextsToPatch = [Any]()

      var KextsToPatchDict1 = [String : Any]()

      KextsToPatchDict1["Comment"] = "this is a sample"

      KextsToPatchDict1["#Name"] = "AppleUSBXHCIPCI"

      KextsToPatchDict1["#Find"] = "_NOT_SHOWN_"

      KextsToPatchDict1["#Replace"] = "_NOT_SHOWN_"

      

      if AppSD.CloverRevision >= 3327 {

        KextsToPatchDict1["#Disabled"] = true

      }

      if AppSD.CloverRevision >= 3580 {

        KextsToPatchDict1["#MatchOS"] = "10.11.6,10.12.x"

      }

      if AppSD.CloverRevision >= 3920 {

        KextsToPatchDict1["#MatchBuild"] = "16D1111"

      }

      KextsToPatch.append(KextsToPatchDict1)

      KernelAndKextPatches["#KextsToPatch"] = KextsToPatch

      

      self.config["KernelAndKextPatches"] = KernelAndKextPatches

 

..KextsToPatch was only a sample..

Edited by vector sigma
8 hours ago, Jief_Machak said:

I know. And I didn't replaced any. They were already replaced quite some time ago.

 

Please confirm that when I start macIASL (should I use the rehabman version ?), macIASL download the patched DSDT currently used by the computer.

Yes, it is current DSDT.

6 hours ago, Jief_Machak said:

I found that in IOReg, HDEF has as property Model, which is ok with previous clover, but now it's the hex version of that string.

I don't see where this Model is set.

I've compare DSDT and they are the same.

 

When I click PCI in system report, I have "This computer doesn’t contain any PCI cards or devices. If you installed or connected a PCI card or device, make sure it is properly installed."

 

Graphics card name is ok in about (HD3000). @Slice what card brand do you have ?

 

@iCanaro Could you send me the same screenshot you've sent, but when it's working ?
I can see that tipo is also an hex string that convert to "USB controller". But there is a 06 at the end. That is probably not right.

My card is Intel HD4000.

Model set by Device Properties which uses AsciiSPrint  snprintf to generate a string.

Under Legacy, once reaching the GUI I press "U" (Exit) then it brings me to VBox alike Firmware. But when I press "Boot Maintenance Manager" I get Red Screen with Segmentation Fault immediately. I have replaced the "boot6 / boot7" from older revs as well but it produced a similar result.. Hmmmb

  • Confused 1
2 hours ago, Jief_Machak said:

I've identified the commit responsible. Seems to be in the plist refactoring. Still working on it.

Could you send me the DeviceProperties part from your config.plist ?

config-E6430.plist.zip

2 hours ago, Jief_Machak said:

I've identified the commit responsible. Seems to be in the plist refactoring. Still working on it.

Could you send me the DeviceProperties part from your config.plist ?

if it can be useful

z370_properties.plist.zip

The difference in DeviceProperties

 		<data>
 		sAQ=
 		</data>
-		<key>AAPL,current-extra</key>
+		<key>AAPL,current-extra­Ü­ÿÿptal8</key>
 		<data>
 		vAI=
 		</data>
-		<key>AAPL,current-in-sleep</key>
+		<key>AAPL,current-in-sleep­ÿÿptal8</key>
 		<data>
 		6AM=
 		</data>
-		<key>built-in</key>
+		<key>built-inptal(</key>

So ending zero is absent.

1 hour ago, Slice said:

Str.sizeInBytes() includes zero ending byte?

@Slice no, but sizeInBytesIncludingTerminator() does.

 

The main I saw different on my computer was the pci property page. I had no device instead of 2. Now it's back. @iCanaro Do you confirm you have that back ?

  • Like 1
20 minutes ago, Jief_Machak said:

he main I saw different on my computer was the pci property page. I had no device instead of 2. Now it's back. @iCanaro Do you confirm you have that back ?

perfect! :thumbsup_anim:

 

1586568971_Schermata2020-08-17alle22_04_50.thumb.png.c9b4fe1e21461f067ecde5e1e6d09eb9.png

this Clover 5120 with the latest commits, tested on Z68, Z97, Z170 and Z370 seems very good to me, at least I have not detected bugs; so I planted a flag for him to use as a stable. :thumbsup_anim: 

thanks Clover team 

  • Like 2
59 minutes ago, Jief_Machak said:

What kext should I use to get the battery indicator ? ACPIBatteryManager.kext ? I think sometimes it stops working. Is there any others ?

VoodooBattery from HWsensors3. The link in my signature.

I've committed a refactor of plist handling. I basically hardened the thing. Meaning, if an access to a string is made on a int property -> panic. I've check all access I found and now they are protected by a test like "if ( prop->isString)" do something with "prop->stringValue()". If I forgot some, it means it's possible to panic if you have a bad config.plist.

 

I've tested on my computer, and it boot normally. I checked smbios (with dmidecode), I checked the about panel, I checked pci page in system report. Oh I forgot to check DSDT. Doing it now. 

DSDT seems ok.

Edited by Jief_Machak
37 minutes ago, Jief_Machak said:

I've committed a refactor of plist handling. I basically hardened the thing. Meaning, if an access to a string is made on a int property -> panic. I've check all access I found and now they are protected by a test like "if ( prop->isString)" do something with "prop->stringValue()". If I forgot some, it means it's possible to panic if your have a bad config.plist.

 

I've tested on my computer, and it boot normally. I checked smbios (with dmidecode), I checked the about panel, I checked pci page in system report. Oh I forgot to check DSDT. Doing it now. 

5120-46-g8dcf25dc6

Снимок экрана 2020-08-18 в 20.29.29.png

 

I will see what is wrong.

27 minutes ago, Slice said:

Very bad. Good program should never crash on bad user input.

No, no. It's bug if it does. I agree. So I read and search for all string access on TagPtr, for example, and many of where not guarded. Like in this :

          if (Prop != NULL && Prop->string.notEmpty() ) {
            OSVersion = Prop->string;
          }

prop->string could be null if the property is the property is an int.

So I've added tests like :

          if ( Prop != NULL ) {
            if ( !Prop->isString() ) {
              MsgLog("ATTENTION : property not string in ProductVersion\n");
            }else{
              if( Prop->stringValue().notEmpty() ) {
                OSVersion = Prop->stringValue();
              }
            }
          }

But I can have forgotten some.

 

 

2 hours ago, Slice said:

The crash was happened reading nvram.plist which formed automatically by the command

nvram -x  -p> nvram.plist

Ok. Corrected.

2 hours ago, Slice said:

Debug.log loose line ending

What is the software you used to open the debug log?

 

 

Edited by Jief_Machak
×
×
  • Create New...