Slice Posted April 13, 2021 Share Posted April 13, 2021 6 hours ago, Jief_Machak said: We use memcpy only for the case where Rbr is 8 bytes long. But 9 bytes definition is probably the more intuitive... memset(RBr, 0, 8); if (ApplePlatformData[Model].smcBranch[0] != 'N') { snprintf(RBr, 8, "%s", ApplePlatformData[Model].smcBranch.c_str()); // memcpy(RBr, ApplePlatformData[Model].smcBranch.c_str(), 8); } else { Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755402 Share on other sites More sharing options...
Jief_Machak Posted April 13, 2021 Share Posted April 13, 2021 2 hours ago, Slice said: memset(RBr, 0, 8); if (ApplePlatformData[Model].smcBranch[0] != 'N') { snprintf(RBr, 8, "%s", ApplePlatformData[Model].smcBranch.c_str()); // memcpy(RBr, ApplePlatformData[Model].smcBranch.c_str(), 8); } else { Not sure what you mean... You added memcpy, but commented ? To be sure to not go past the end of the string : memcpy(RBr, ApplePlatformData[Model].smcBranch.c_str(), MAX(8, ApplePlatformData[Model].smcBranch.sizeInBytesIncludingTerminator())); Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755404 Share on other sites More sharing options...
Slice Posted April 13, 2021 Share Posted April 13, 2021 Yes, this is the way. Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755409 Share on other sites More sharing options...
Matgen84 Posted April 13, 2021 Share Posted April 13, 2021 @Jief_Machak I build latest commit r5133 66bbace (XCODE8) and boot successfully Big Sur 11.3 Beta 7 (Z390 config) Spoiler 2021-4-11_12-56_CLOVERX64_2021-04-13_66bbace.efi.log 3 Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755413 Share on other sites More sharing options...
phi777 Posted April 13, 2021 Share Posted April 13, 2021 (edited) [...] === [ Parse ] ==================== Warning: Unknown key '/Quirks/ProvideConsoleGopEnable:294'. Skipped. Warning: Unknown key '/Quirks/AppleCpuPmCfgLock:300'. Skipped. Warning: Unknown key '/Quirks/AppleXcpmCfgLock:303'. Skipped. Warning: Unknown key '/Quirks/CustomSMBIOSGuid:308'. Skipped. Warning: Unknown key '/Quirks/DisableRtcChecksum:314'. Skipped. Warning: Unknown key '/Quirks/LapicKernelPanic:322'. Skipped. Warning: Unknown key '/Quirks/PanicNoKextDump:325'. Skipped. === [ CompareOldNewSettings ] ==================== Comparison OK No parsing bug detected. Great. Let me know Looks good to me Edited April 13, 2021 by phi777 2 1 Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755414 Share on other sites More sharing options...
Slice Posted April 13, 2021 Share Posted April 13, 2021 9 hours ago, Jief_Machak said: Not sure what you mean... You added memcpy, but commented ? To be sure to not go past the end of the string : memcpy(RBr, ApplePlatformData[Model].smcBranch.c_str(), MAX(8, ApplePlatformData[Model].smcBranch.sizeInBytesIncludingTerminator())); But MIN() Ok, now i have good key RBr [ch8*] (bytes 6a 39 35 6a 39 35 61 6d) Committed. Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755432 Share on other sites More sharing options...
Jief_Machak Posted April 13, 2021 Share Posted April 13, 2021 16 minutes ago, Slice said: But MIN() Yes MAX would have been funny. There is also "j133_4_5". Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755433 Share on other sites More sharing options...
Slice Posted April 13, 2021 Share Posted April 13, 2021 23 minutes ago, Jief_Machak said: Yes MAX would have been funny. There is also "j133_4_5". Oh, thanks! Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755436 Share on other sites More sharing options...
eng_redaesm Posted April 13, 2021 Share Posted April 13, 2021 [mention=1176907]Jief_Machak[/mention] I build latest commit r5133 66bbace (XCODE8) and boot successfully Big Sur 11.3 Beta 7 (Z390 config) Spoiler 2021-4-11_12-56_CLOVERX64_2021-04-13_66bbace.efi.log@jief_makhac Unfortunately not booting with with me may be the. Version of xcode matters i have 12.4 verOSent from my iPhone using Tapatalk Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755453 Share on other sites More sharing options...
kushwavez Posted April 13, 2021 Share Posted April 13, 2021 (edited) commit ef68d4 can't build. ./buildme XCODE8 [...] [CPP] platformdata /Users/kushwavez/git/CloverBootloader/rEFIt_UEFI/Platform/platformdata.cpp:1027:23: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] snprintf(RPlt, 8, ApplePlatformData[Model].smcPlatform.c_str()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/kushwavez/git/CloverBootloader/rEFIt_UEFI/Platform/platformdata.cpp:1027:23: note: treat the string as an argument to avoid this snprintf(RPlt, 8, ApplePlatformData[Model].smcPlatform.c_str()); ^ "%s", 1 error generated. make: *** [/Users/kushwavez/git/CloverBootloader/Build/Clover/RELEASE_XCODE8/X64/rEFIt_UEFI/refit/OUTPUT/Platform/platformdata.obj] Error 1 build.py... : error 7000: Failed to execute command make tbuild [/Users/kushwavez/git/CloverBootloader/Build/Clover/RELEASE_XCODE8/X64/rEFIt_UEFI/refit] build.py... : error F002: Failed to build module /Users/kushwavez/git/CloverBootloader/rEFIt_UEFI/refit.inf [X64, XCODE8, RELEASE] - Failed - Build end time: 21:05:25, Apr.13 2021 Build total time: 00:01:59 same with fb9562496e8ab13fa5340d73b88ae17fc5980457 66bbace4f782f99d2381b04e0424d16f0fbbb8e0 is okay EDIT: also @Jief_Machak as @eng_redaesm mentioned too, it doesn't work for me neither. 66bbace4f built with XCODE8, nothing happens when booting, no log generated. Edited April 13, 2021 by kushwavez Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755455 Share on other sites More sharing options...
Slice Posted April 13, 2021 Share Posted April 13, 2021 18 minutes ago, kushwavez said: commit ef68d4 can't build. ./buildme XCODE8 [...] [CPP] platformdata /Users/kushwavez/git/CloverBootloader/rEFIt_UEFI/Platform/platformdata.cpp:1027:23: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] snprintf(RPlt, 8, ApplePlatformData[Model].smcPlatform.c_str()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/kushwavez/git/CloverBootloader/rEFIt_UEFI/Platform/platformdata.cpp:1027:23: note: treat the string as an argument to avoid this snprintf(RPlt, 8, ApplePlatformData[Model].smcPlatform.c_str()); ^ "%s", 1 error generated. make: *** [/Users/kushwavez/git/CloverBootloader/Build/Clover/RELEASE_XCODE8/X64/rEFIt_UEFI/refit/OUTPUT/Platform/platformdata.obj] Error 1 build.py... : error 7000: Failed to execute command make tbuild [/Users/kushwavez/git/CloverBootloader/Build/Clover/RELEASE_XCODE8/X64/rEFIt_UEFI/refit] build.py... : error F002: Failed to build module /Users/kushwavez/git/CloverBootloader/rEFIt_UEFI/refit.inf [X64, XCODE8, RELEASE] - Failed - Build end time: 21:05:25, Apr.13 2021 Build total time: 00:01:59 same with fb9562496e8ab13fa5340d73b88ae17fc5980457 66bbace4f782f99d2381b04e0424d16f0fbbb8e0 is okay No problem, committed the fix. 1 Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755458 Share on other sites More sharing options...
kushwavez Posted April 13, 2021 Share Posted April 13, 2021 Thanks @Slice, build is completed. @Jief_Machak latest commits unfortunately same as before, built with XCODE8 -> can't boot, no logs. Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755460 Share on other sites More sharing options...
Slice Posted April 14, 2021 Share Posted April 14, 2021 7 hours ago, kushwavez said: Thanks @Slice, build is completed. @Jief_Machak latest commits unfortunately same as before, built with XCODE8 -> can't boot, no logs. Test, please, my XCODE8 compilation CLOVERX64.efi-XCODE8.zip 1 1 Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755499 Share on other sites More sharing options...
eng_redaesm Posted April 14, 2021 Share Posted April 14, 2021 26 minutes ago, Slice said: Test, please, my XCODE8 compilation CLOVERX64.efi-XCODE8.zip 712.23 kB · 1 download working good Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755501 Share on other sites More sharing options...
kushwavez Posted April 14, 2021 Share Posted April 14, 2021 4 hours ago, Slice said: Test, please, my XCODE8 compilation CLOVERX64.efi-XCODE8.zip 712.23 kB · 6 downloads yeah this is okay. But what is the difference between our compilations and yours? Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755509 Share on other sites More sharing options...
Jief_Machak Posted April 14, 2021 Share Posted April 14, 2021 29 minutes ago, kushwavez said: But what is the difference between our compilations and yours? The same as the difference between theory and practice : in theory there is none ! 1 2 Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755511 Share on other sites More sharing options...
matxpa Posted April 14, 2021 Share Posted April 14, 2021 On 4/12/2021 at 8:27 PM, Jief_Machak said: We can define as 9 bytes long, or just do a memcpy instead of a snprintf. @matxpa All your plist are in the folder "/Users/meunier/Desktop/"EFI X75 MBP1x,x"/Clover" ? If you have old, almost forgotten archive, I'm interested toparse them too. You can do /CloverX64TestNewParser / ! (take a small break, it'll take some time). Version 12 pushed... Jief as you asked is joined a "zip" Clover EFI Backups.zip Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755523 Share on other sites More sharing options...
Slice Posted April 14, 2021 Share Posted April 14, 2021 23 hours ago, eng_redaesm said: @jief_makhac Unfortunately not booting with with me may be the. Version of xcode matters i have 12.4 ver O Sent from my iPhone using Tapatalk Clover compiled by Xcode12 is not working. @Jief_Machak attention. 1 Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755574 Share on other sites More sharing options...
Jief_Machak Posted April 14, 2021 Share Posted April 14, 2021 Version 13 of my test tool posted. There is counter, now 35 minutes ago, Slice said: Clover compiled by Xcode12 is not working. @Jief_Machak attention. I really down know. I still have 11.2. And I had the same problem. Adding a log line seems to fix. By experience, that is not "fixing" and the problem is elsewhere. Exactly the same as when putting the path in a temporary variable seems to avoid a crash. Knowing xcode was working fine until now, and nothing has changed, and that we had a problem with GCC, I'd say we reached a limit where the linker doesn't do the same as before. With Gcc, it was clear : always crash when trying to call the global constructors. So it was an easy fix. But with Xcode, it goes until the reading of settings arbitrary. And, on my VM, if I add a log line : no crash. Really strange... Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755588 Share on other sites More sharing options...
matxpa Posted April 14, 2021 Share Posted April 14, 2021 10 hours ago, matxpa said: Jief as you asked is joined a "zip" Clover EFI Backups.zip 95.57 kB · 2 downloads @Jief_Machak Older "config.plist" in the joined "zip" EFI-Backups.zip Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755590 Share on other sites More sharing options...
yapan4 Posted April 15, 2021 Share Posted April 15, 2021 @Jief_Machak Version 13 ... ... file:/Volumes/BackupHD/To Sort and Backup 2/WS Pro EFI joedm/453604_wspro/config.plist file:/Volumes/BackupHD/To Sort and Backup 2/WS Pro EFI joedm/EFI/OC/config.plist 374 file(s) read. No parsing bug detected. Great. Let me know Saving session... ...copying shared history... ...saving history...truncating history files... ...completed. Deleting expired sessions...none found. [Process completed] Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755615 Share on other sites More sharing options...
matxpa Posted April 15, 2021 Share Posted April 15, 2021 (edited) @Jief_Machak XCODE8 compilations with Xcode Version 12.4 (12D4e) with commit fd3b09cf1 (initial commit of r5133) XCODE8 build works fine with commit fe26ba9 XCODE8 build can't boot, nor with 4269083 and c07c154 On 4/12/2021 at 7:43 PM, matxpa said: ... I've made a r5133 Release (master commit fd3b09cf1) XCODE8 build. That r5133 XCODE8 Release work fine I can boot on a Laptop Asus X75VB (MBP11,3 IvyBridge I5-3340M) Big Sur 11.2.3 (20D91) ... Past 4 days i've built three XCODE8 r5133 Releases based on the three master commits (fe26ba9, 4269083 and the last c07c154) The three r5133 XCODE8 built Releases are OK but none of them can BOOT (black screen, no REFIT_MAINMENU_SCREEN displayed) I didn't try with others commits Those three r5133 GCC53 built Releases work fine ... so the commit that introduce failure is between fd3b09cf1 and fe26ba9, the only one is 7babc6f and the behavior is no displayed BootMenu Regards Edited April 15, 2021 by matxpa 1 Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755622 Share on other sites More sharing options...
Slice Posted April 15, 2021 Share Posted April 15, 2021 44 minutes ago, matxpa said: @Jief_Machak XCODE8 compilations with Xcode Version 12.4 (12D4e) with commit fd3b09cf1 (initial commit of r5133) XCODE8 build works fine with commit fe26ba9 XCODE8 build can't boot, nor with 4269083 and c07c154 so the commit that introduce failure is between fd3b09cf1 and fe26ba9, the only one is 7babc6f and the behavior is no displayed BootMenu Regards Hey, @Jief_Machak this commit introduced LogDataHub(&gEfiMiscSubClassGuid, L"EPCI", &ApplePlatformData[GlobalConfig.CurrentModel].smcConfig, 4); LogDataHub(&gEfiMiscSubClassGuid, L"REV", ApplePlatformData[GlobalConfig.CurrentModel].smcRevision, 6); "&" is absent in the second line. Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755626 Share on other sites More sharing options...
Jief_Machak Posted April 15, 2021 Share Posted April 15, 2021 In C, for a native array, called "ar", ar is equal to &ar is equal to &ar[0]. I double checked with a log : ApplePlatformData[GlobalConfig.CurrentModel].smcRevision = 233175768 &ApplePlatformData[GlobalConfig.CurrentModel].smcRevision = 233175768 &ApplePlatformData[GlobalConfig.CurrentModel].smcRevision[0] = 233175768 That couldn't not be that. A compiler bug on that is nearly impossible as it is the same as 35 years ago ! Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755637 Share on other sites More sharing options...
Jief_Machak Posted April 15, 2021 Share Posted April 15, 2021 4 hours ago, matxpa said: @Jief_Machak XCODE8 compilations with Xcode Version 12.4 (12D4e) with commit fd3b09cf1 (initial commit of r5133) XCODE8 build works fine with commit fe26ba9 XCODE8 build can't boot, nor with 4269083 and c07c154 so the commit that introduce failure is between fd3b09cf1 and fe26ba9, the only one is 7babc6f and the behavior is no displayed BootMenu Regards Thanks, that's helpful. I'm currently compiling these 2 commits and will see if I can reproduce here (I think I will as I did before). I'll let you know. 1 Link to comment https://www.insanelymac.com/forum/topic/284656-clover-general-discussion/page/1056/#findComment-2755638 Share on other sites More sharing options...
Recommended Posts