Jump to content
30960 posts in this topic

Recommended Posts

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 {

 

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()));

@Jief_Machak

 

I build latest commit r5133 66bbace (XCODE8) and boot successfully Big Sur 11.3 Beta 7 (Z390 config)

 

Spoiler

616265520_Capturedcran2021-04-1309_58_04.png.2fc699650ec5923cbcf4004e62a82ddb.png

 

 

2021-4-11_12-56_CLOVERX64_2021-04-13_66bbace.efi.log

  • Like 3
[...]
=== [ 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 by phi777
  • Like 2
  • Thanks 1
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.

[mention=1176907]Jief_Machak[/mention]
 
I build latest commit r5133 66bbace (XCODE8) and boot successfully Big Sur 11.3 Beta 7 (Z390 config)

 
Spoiler

616265520_Capturedcran2021-04-1309_58_04.png.2fc699650ec5923cbcf4004e62a82ddb.png

 
 
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 ver
O


Sent from my iPhone using Tapatalk

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 by kushwavez
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.

 

  • Thanks 1
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

  • Like 1
  • Thanks 1
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

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.

  • Like 1

Version 13 of my test tool posted. There is counter, now :lol:;)

 

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...

@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]

 

@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 by matxpa
  • Sad 1
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.

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 !
 

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.

  • Thanks 1
×
×
  • Create New...