Jief_Machak Posted August 17, 2020 Share Posted August 17, 2020 4 hours ago, Slice said: . Again AsciiSPrint() != snprintf() 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. Link to comment Share on other sites More sharing options...
blackosx Posted August 17, 2020 Share Posted August 17, 2020 I would suggest the version from acidanthera https://github.com/acidanthera/MaciASL/releases 1 Link to comment Share on other sites More sharing options...
Jief_Machak Posted August 17, 2020 Share Posted August 17, 2020 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. Link to comment Share on other sites More sharing options...
iCanaro Posted August 17, 2020 Share Posted August 17, 2020 (edited) 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 Edited August 17, 2020 by iCanaro 1 Link to comment Share on other sites More sharing options...
vector sigma Posted August 17, 2020 Share Posted August 17, 2020 (edited) 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 August 17, 2020 by vector sigma Link to comment Share on other sites More sharing options...
Slice Posted August 17, 2020 Share Posted August 17, 2020 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. Link to comment Share on other sites More sharing options...
Jief_Machak Posted August 17, 2020 Share Posted August 17, 2020 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 ? Link to comment Share on other sites More sharing options...
Badruzeus Posted August 17, 2020 Share Posted August 17, 2020 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 1 Link to comment Share on other sites More sharing options...
Slice Posted August 17, 2020 Share Posted August 17, 2020 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 Link to comment Share on other sites More sharing options...
iCanaro Posted August 17, 2020 Share Posted August 17, 2020 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 Link to comment Share on other sites More sharing options...
Slice Posted August 17, 2020 Share Posted August 17, 2020 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. Link to comment Share on other sites More sharing options...
Slice Posted August 17, 2020 Share Posted August 17, 2020 @Jief_Machak Str.sizeInBytes() includes zero ending byte? Link to comment Share on other sites More sharing options...
Slice Posted August 17, 2020 Share Posted August 17, 2020 Now it works. I committed the change. 1 Link to comment Share on other sites More sharing options...
Jief_Machak Posted August 17, 2020 Share Posted August 17, 2020 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 ? 1 Link to comment Share on other sites More sharing options...
iCanaro Posted August 17, 2020 Share Posted August 17, 2020 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! Link to comment Share on other sites More sharing options...
Jief_Machak Posted August 17, 2020 Share Posted August 17, 2020 1 hour ago, Slice said: Now it works. I committed the change. @Slice With your correction, you got back the graphic card name ? 1 Link to comment Share on other sites More sharing options...
iCanaro Posted August 17, 2020 Share Posted August 17, 2020 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. thanks Clover team 2 Link to comment Share on other sites More sharing options...
Slice Posted August 18, 2020 Share Posted August 18, 2020 9 hours ago, Jief_Machak said: @Slice With your correction, you got back the graphic card name ? Sure Link to comment Share on other sites More sharing options...
Jief_Machak Posted August 18, 2020 Share Posted August 18, 2020 3 minutes ago, Slice said: Sure Good. Thanks for helping. Link to comment Share on other sites More sharing options...
Jief_Machak Posted August 18, 2020 Share Posted August 18, 2020 What kext should I use to get the battery indicator ? ACPIBatteryManager.kext ? I think sometimes it stops working. Is there any others ? Link to comment Share on other sites More sharing options...
Slice Posted August 18, 2020 Share Posted August 18, 2020 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. Link to comment Share on other sites More sharing options...
Jief_Machak Posted August 18, 2020 Share Posted August 18, 2020 (edited) 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 August 18, 2020 by Jief_Machak Link to comment Share on other sites More sharing options...
Slice Posted August 18, 2020 Share Posted August 18, 2020 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 I will see what is wrong. Link to comment Share on other sites More sharing options...
Slice Posted August 18, 2020 Share Posted August 18, 2020 Debug.log loose line ending The crash was happened reading nvram.plist which formed automatically by the command nvram -x -p> nvram.plist nvram.plist.zip Link to comment Share on other sites More sharing options...
Slice Posted August 18, 2020 Share Posted August 18, 2020 1 hour ago, Jief_Machak said: If I forgot some, it means it's possible to panic if you have a bad config.plist. Very bad. Good program should never crash on bad user input. Link to comment Share on other sites More sharing options...
Recommended Posts