Slice Posted February 24, 2017 Share Posted February 24, 2017 ?!?! XHCI is obviously for USB 3.0... I know. Without this patch I had 14 porst of USB2.0 + 1 port of USB 3.0, working in one connector only. With this patch I have 14 ports of USB2.0 + 10 ports of USB 3.0, full working. 1 Link to comment Share on other sites More sharing options...
PMheart Posted February 24, 2017 Share Posted February 24, 2017 I know. Without this patch I had 14 porst of USB2.0 + 1 port of USB 3.0, working in one connector only. With this patch I have 14 ports of USB2.0 + 10 ports of USB 3.0, full working. I see. Yes. 14 + 1 == 15. Which matches the maximum port restrictions. This may because USB3 supports USB2 as well. Link to comment Share on other sites More sharing options...
ErmaC Posted February 28, 2017 Author Share Posted February 28, 2017 Added few HDA controllers to the list and "clear up". Broxton-T, Broxton-P, Lewisburg1, Lewisburg2, Kabylake, Kabylake-H diff -- > hda_update.diff.txt or edited files --> HDA_Controllers_IDs.zip ErmaC 2 Link to comment Share on other sites More sharing options...
TheRacerMaster Posted March 10, 2017 Share Posted March 10, 2017 Recently, I've been working to fix some minor issues/bugs in Clover. It would be nice if these patches could be upstreamed: Platform/device_inject: Do not inject Ethernet device_type Platform/Settings: Do not disable SIP by default Platform/Settings: Correct slot name typos Platform: Fix external clock calculation for quad-pumped FSBsThis should remove "Bus Speed: 400 MHz" from Hardware Overview in System Information; this commit should be tested on pre-Sandy Bridge CPUs Platform/AcpiPatcher: Set FADT PM Profile to 3 for Mac ProTypo introduced with this commit; fixed with Platform/AcpiPatcher: Fix typo Platform: Use SMBIOS RAM frequency when possible This should also be tested; works fine on a variety of 7 series Gigabyte motherboards, but haven't tested elsewhere 5 Link to comment Share on other sites More sharing options...
PMheart Posted March 10, 2017 Share Posted March 10, 2017 Hi. It seems that CsrActiveConfig = 0xFFFF is broken. It means that SIP fully disabled rather than not set this property... And. The "Family" can be also "Mac Pro". I think both "MacPro" and "Mac Pro" are okay. So change if (gSettings.smartUPS == TRUE || (AsciiStrnCmp (gSettings.FamilyName, "MacPro", 6) == 0) to if (gSettings.smartUPS == TRUE || (AsciiStrnCmp (gSettings.FamilyName, "MacPro", 6) == 0 || (AsciiStrnCmp (gSettings.FamilyName, "Mac Pro", 6) == 0) BTW. I saw Revoboot used the "Family" without "spaces" in certain models, but Clover did. (e.g. "MacBookPro" v.s. "MacBook Pro") Link to comment Share on other sites More sharing options...
TheRacerMaster Posted March 11, 2017 Share Posted March 11, 2017 If gSettings.CsrActiveConfig is set to 0xFFFF, Clover shouldn't set the NVRAM variable: //Hack for recovery by Asgorath if (gSettings.CsrActiveConfig != 0xFFFF) { SetNvramVariable(L"csr-active-config", &gAppleBootVariableGuid, Attributes, sizeof(gSettings.CsrActiveConfig), &gSettings.CsrActiveConfig); } As for the Mac Pro family check, we could just compare gSettings.ProductName. Link to comment Share on other sites More sharing options...
PMheart Posted March 11, 2017 Share Posted March 11, 2017 If gSettings.CsrActiveConfig is set to 0xFFFF, Clover shouldn't set the NVRAM variable: //Hack for recovery by Asgorath if (gSettings.CsrActiveConfig != 0xFFFF) { SetNvramVariable(L"csr-active-config", &gAppleBootVariableGuid, Attributes, sizeof(gSettings.CsrActiveConfig), &gSettings.CsrActiveConfig); } Yep but I dunno why, when I set CsrActiveConfig to 0xFFFF, it shows that SIP is fully disabled. (I didn't set any of this before.) So I think 0xFFFF for CsrActiveConfig in Clover may be broken. As for the Mac Pro family check, we could just compare gSettings.ProductName. Great! Good idea. Link to comment Share on other sites More sharing options...
mhaeuser Posted March 11, 2017 Share Posted March 11, 2017 if (gSettings.smartUPS == TRUE || (AsciiStrnCmp (gSettings.FamilyName, "MacPro", 6) == 0 || (AsciiStrnCmp (gSettings.FamilyName, "Mac Pro", 6) == 0) 1) Bools should not be compared to TRUE/FALSE. 2) "MacPro" should be compared to a maximum length of 7 and "Mac Pro" to 8, otherwise you cannot be sure that the name is terminated then. You did not increase the max length in the 2nd check anyway. 2 Link to comment Share on other sites More sharing options...
PMheart Posted March 11, 2017 Share Posted March 11, 2017 1) Bools should not be compared to TRUE/FALSE. 2) "MacPro" should be compared to a maximum length of 7 and "Mac Pro" to 8, otherwise you cannot be sure that the name is terminated then. You did not increase the max length in the 2nd check anyway. Thanks. That boolean was not done by me. Oops. I don't have a look at Clover source code ATM, but I'd like to know that what's that '6' mean in AsciiStrnCmp() $3? It means the maximum length? Link to comment Share on other sites More sharing options...
TheRacerMaster Posted March 11, 2017 Share Posted March 11, 2017 1) Bools should not be compared to TRUE/FALSE. 2) "MacPro" should be compared to a maximum length of 7 and "Mac Pro" to 8, otherwise you cannot be sure that the name is terminated then. You did not increase the max length in the 2nd check anyway. Good catch, the length shouldn't be 6. I didn't add the boolean comparison (it was already present in Clover's source) but it should be changed. Link to comment Share on other sites More sharing options...
PMheart Posted March 11, 2017 Share Posted March 11, 2017 Good catch, the length shouldn't be 6. I didn't add the boolean comparison (it was already present in Clover's source) but it should be changed. BTW could the value smartUPS be a string ('Yes' or 'No') instead of bool? If yes and then in this case we have to add this check as well... Link to comment Share on other sites More sharing options...
mhaeuser Posted March 11, 2017 Share Posted March 11, 2017 BTW could the value smartUPS be a string ('Yes' or 'No') instead of bool? If yes and then in this case we have to add this check as well... My 2 cents are to deprecate "Yes"/"No", that adds unnecessary parsing, storage and comparison time for no real benefit. IF you want to keep it, there should be some Clover func to check bools. 3 Link to comment Share on other sites More sharing options...
PMheart Posted March 11, 2017 Share Posted March 11, 2017 My 2 cents are to deprecate "Yes"/"No", that adds unnecessary parsing, storage and comparison time for no real benefit. IF you want to keep it, there should be some Clover func to check bools. .. It seems that almost all bools in config.plist are also supporting str <string>Yes/No</string> IMO the same as you. This will only make Clover source code more complicated (to check str besides bool)... Link to comment Share on other sites More sharing options...
cecekpawon Posted March 14, 2017 Share Posted March 14, 2017 What does the log tell, from this line? Do you install your nasm bin somewhere other than '/opt/local/bin' or '${TOOLCHAIN_DIR}/bin'? Maybe we can change this line to: export NASM_PREFIX="`dirname $(which nasm)`/" 1 Link to comment Share on other sites More sharing options...
droples Posted March 14, 2017 Share Posted March 14, 2017 "$TOOLCHAIN_DIR/bin" https://www.applelife.ru/threads/clover.42089/page-738#post-648585 The following line of code was deleted in the ebuild.sh Clover4034 # Add toolchain bin directory to the PATH if [[ "$SYSNAME" != Linux ]]; then pathmunge "$TOOLCHAIN_DIR/bin" fi 1 Link to comment Share on other sites More sharing options...
cecekpawon Posted March 14, 2017 Share Posted March 14, 2017 For me, I need to modify this line too: @$(NASM_PREFIX)nasm $(@F).s -o $@ Link to comment Share on other sites More sharing options...
Zenith432 Posted March 14, 2017 Share Posted March 14, 2017 Error of new compilation of clover4034 and above.My fault. Fixed in rev 4038. 2 Link to comment Share on other sites More sharing options...
smolderas Posted March 14, 2017 Share Posted March 14, 2017 Recently, I've been working to fix some minor issues/bugs in Clover. It would be nice if these patches could be upstreamed: Platform/device_inject: Do not inject Ethernet device_type Platform/Settings: Do not disable SIP by default Platform/Settings: Correct slot name typos Platform: Fix external clock calculation for quad-pumped FSBsThis should remove "Bus Speed: 400 MHz" from Hardware Overview in System Information; this commit should be tested on pre-Sandy Bridge CPUs Platform/AcpiPatcher: Set FADT PM Profile to 3 for Mac ProTypo introduced with this commit; fixed with Platform/AcpiPatcher: Fix typo Platform: Use SMBIOS RAM frequency when possible This should also be tested; works fine on a variety of 7 series Gigabyte motherboards, but haven't tested elsewhere Thanks for those patches. I'm testing them right now. However there is a problem with the patch "Platform/AcpiPatcher: Set FADT PM Profile to 3 for Mac Pro": error: too many arguments to function call, expected 2, have 3 if ((gSettings.smartUPS == TRUE) || (AsciiStrCmp (gSettings.FamilyName, "MacPro", 6) == 0)) { ~~~~~~~~~~~ ^ Fix for edk2 version 24109: if ((gSettings.smartUPS == TRUE) || (AsciiStrCmp(gSettings.FamilyName, "MacPro") == 0)) { Edit: About Platform: Fix external clock calculation for quad-pumped FSBs I now have Busspeed information gone in system information and in clover log I have: `FSB: 25 MHz` Is this correct? Shouldn't it be 100 MHz? Before that patch I had 400 MHz. I have sandy bridge i7 2600k @ 4.3 GHz Edit2: I just noticed your patch notes: AppleSMBIOS.kext reads the FSB frequency from SMBIOS table type 132. If this structure isn't present, it assumes that the processor uses a quad-pumped FSB (multiplied by four) and reads the external clock frequency from SMBIOS table type 4. Macs that lack SMBIOS table type 132 (Sandy Bridge/Ivy Bridge/Haswell/Broadwell/Skylake processors) set the external clock to 25 MHz (one fourth of the FSB frequency). Set the SMBIOS table type 4 external clock frequency to one fourth of the FSB frequency and do not inject SMBIOS table type 132 for these processors. According to that your patch works for me too. My question is: Is that information correct? Edit3: Apple open sourced the AppleSMBIOS, so I'm assuming you are correct. 1 Link to comment Share on other sites More sharing options...
Slice Posted March 17, 2017 Share Posted March 17, 2017 Edit: About Platform: Fix external clock calculation for quad-pumped FSBs I now have Busspeed information gone in system information and in clover log I have: `FSB: 25 MHz` Is this correct? Shouldn't it be 100 MHz? Before that patch I had 400 MHz. I have sandy bridge i7 2600k @ 4.3 GHz Edit2: I just noticed your patch notes: AppleSMBIOS.kext reads the FSB frequency from SMBIOS table type 132. If this structure isn't present, it assumes that the processor uses a quad-pumped FSB (multiplied by four) and reads the external clock frequency from SMBIOS table type 4. Macs that lack SMBIOS table type 132 (Sandy Bridge/Ivy Bridge/Haswell/Broadwell/Skylake processors) set the external clock to 25 MHz (one fourth of the FSB frequency). Set the SMBIOS table type 4 external clock frequency to one fourth of the FSB frequency and do not inject SMBIOS table type 132 for these processors. According to that your patch works for me too. My question is: Is that information correct? Edit3: Apple open sourced the AppleSMBIOS, so I'm assuming you are correct. Not sure. This is iMac12,2 with SandyBridge Handle 0x0000, DMI type 4, 35 bytes 0000: 04 23 00 00 03 03 01 02 a7 06 02 00 ff fb eb bf 0010: 01 80 00 00 48 0d 7b 0d 41 04 02 00 03 00 04 00 0020: 00 04 00 Processor Information Socket Designation: U2E1 Type: Central Processor Family: Other Manufacturer: Intel(R) Corporation ID: A7 06 02 00 FF FB EB BF Version: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz Voltage: 0.0 V External Clock: Unknown Max Speed: 3400 MHz Current Speed: 3451 MHz MacPro4,1, the dump I have PM Profile : 01 [Desktop] BTW could the value smartUPS be a string ('Yes' or 'No') instead of bool? If yes and then in this case we have to add this check as well... Clover uses procedure IsPropertyTrue BOOLEAN IsPropertyTrue ( TagPtr Prop ) { return Prop != NULL && ((Prop->type == kTagTypeTrue) || ((Prop->type == kTagTypeString) && Prop->string && ((Prop->string[0] == 'y') || (Prop->string[0] == 'Y')))); } 1 Link to comment Share on other sites More sharing options...
TheRacerMaster Posted March 18, 2017 Share Posted March 18, 2017 Hmm, PM Profile 3 might've been introduced with MacPro6,1. Xserve3,1 and MacPro6,1 both use it (checked them myself). BTW, thanks for merging the other patches. Link to comment Share on other sites More sharing options...
tluck Posted March 18, 2017 Share Posted March 18, 2017 @slice, sherlocks the nvram save scripts work good with EmuVariable now included with Clover. however, it was not properly screening out for systems that is does not need to save to a file. please update Clover with these updated scripts. nvram-logouthook_v1.16.2.zip Link to comment Share on other sites More sharing options...
Sherlocks Posted March 19, 2017 Share Posted March 19, 2017 @slice, sherlocks the nvram save scripts work good with EmuVariable now included with Clover. however, it was not properly screening out for systems that is does not need to save to a file. please update Clover with these updated scripts. tested it ------------------------------- DATE: 2017-03-19 TIME: 14:43:15 ------------------------------- >> Begin Script: /etc/rc.shutdown.d/80.save_nvram_plist.local v1.16.2 © 2017 syscl/lighting/Yating Zhou/tluck/Sherlocks 2017-03-19-14:43:16 disk0: ESP -- Target -- /Volumes/ESP-01/EFI/CLOVER 2017-03-19-14:43:16 NVRAM: No change since last update in /Volumes/ESP-01/nvram.plist >> End Script: /etc/rc.shutdown.d/80.save_nvram_plist.local Supreme-MBP:~ supreme$ sudo /etc/rc.shutdown.d/80.save_nvram_plist.local v1.16.2 © 2017 syscl/lighting/Yating Zhou/tluck/Sherlocks 2017-03-19-14:44:29 disk0: ESP -- Target -- /Volumes/ESP-01/EFI/CLOVER 2017-03-19-14:44:29 NVRAM: Updated new values in /Volumes/ESP-01/nvram.plist Supreme-MBP:~ supreme$ ------------------------------- DATE: 2017-03-19 TIME: 14:43:43 ------------------------------- >> Begin Script: /private/etc/rc.boot.d/10.save_and_rotate_boot_log.local Clover boot messages saved in /Library/Logs/CloverEFI/boot.log >> End Script: /private/etc/rc.boot.d/10.save_and_rotate_boot_log.local >> Begin Script: /private/etc/rc.boot.d/20.mount_ESP.local Not auto mounting EFI partition v1.16.2 © 2017 syscl/lighting/Yating Zhou/tluck/Sherlocks Registering LogoutHook as /Library/Application Support/Clover/CloverDaemon-stopservice >> End Script: /private/etc/rc.boot.d/20.mount_ESP.local good. no problem. added. i added Xserve1,1~3,1 information in platformdata. i tested build from clover r4044. added I changed the credit part that cecekpawon gave me. always thanks in advance Platformdata-added Xserve Series.zip nvram-logouthook_v1.16.2 edited credit.zip 2 Link to comment Share on other sites More sharing options...
Sherlocks Posted March 29, 2017 Share Posted March 29, 2017 @Slice report one If the patch is disabled, the disable log will not appear. Also, it does not move down and is displayed strangely. 4:491 0:358 Patching DSDT: 4:491 0:000 - [change APSS to APXX]: - [change _DSM to XDSM]: pattern 5F44534D, patched at: [ (2AAC) (13AA) (8B) (52) (C7B) (111) (64F) (468) (11) (51) (22) (21) (15) (14) (103) (379) (379) (379) (379) (379) (379) (379) (379) (379) (379) (379) (379) (379) (379) (379) (379) (379) (379) (379) (28A) (1418) (F1) (F1) (F1) (F1) (F1) (DA) (DA) (E8) (131) (131) (2C0) (4A4) (103F) (14A) (B8) (E1E) (4B7) (349F) ] 4:497 0:000 === [ PatchAllSSDT ] ====================================== 4:497 0:000 Patch table: SSDT Tpm2Tabl len=0x4C5 4:497 0:000 0. [change APSS to APXX]:1. [change _DSM to XDSM]: pattern 5F44534D, patched at: [ (427) ] 4:497 0:000 2. [change _OSI to XOSI, pair with SSDT-XOSI.aml]: pattern 5F4F5349, bin not found / already patched! here is result from fix 4:502 0:352 Patching DSDT: 4:502 0:000 - [change APSS to APXX]: disabled 4:502 0:000 - [change _DSM to XDSM]: pattern 5F44534D, patched at: [ (2AAC) (13AA) (8B) (52) (C7B) (111) (64F) (468) (11) (51) (22) (21) (15) (14) (103) (379) (379) (379) (379) (379) (379) (379) (379) (379) (379) (379) (379) (379) (379) (379) (379) (379) (379) (379) (28A) (1418) (F1) (F1) (F1) (F1) (F1) (DA) (DA) (E8) (131) (131) (2C0) (4A4) (103F) (14A) (B8) (E1E) (4B7) (349F) ] 4:502 0:000 - [change _OSI to XOSI, pair with SSDT-XOSI.aml]: pattern 5F4F5349, patched at: [ (1157E) (3) (11) (18) (1C) (1C) (1A) (18) (18) (18) (18) (DB9) ] 4:507 0:000 Patch table: SSDT Tpm2Tabl len=0x4C5 4:507 0:000 0. [change APSS to APXX]: disabled 4:507 0:000 1. [change _DSM to XDSM]: pattern 5F44534D, patched at: [ (427) ] 4:507 0:000 2. [change _OSI to XOSI, pair with SSDT-XOSI.aml]: pattern 5F4F5349, bin not found / already patched! i tested build r4046. thanks in advance log fix.zip Link to comment Share on other sites More sharing options...
syscl Posted April 3, 2017 Share Posted April 3, 2017 I wish I don't miss something here, if I have, please let me know. I've seen @Sherlock and @tluck's great work on the script 80.save_nvram_plist.local, nice! Now, lvs1974 pushed it step forward to add UTC patch for 80.save_nvram_plist.local to support hibernate mode = 3 or hibernate mode = 25 pairing with his hibernatefixup plugin. Here's the latest 80.save_nvram_plist.local @Slice 80.save_nvram_plist.local.zip All the best, syscl 2 Link to comment Share on other sites More sharing options...
tluck Posted April 3, 2017 Share Posted April 3, 2017 @syscl i dont understand why we need this change? it puts the file stamp into the future for me!? < gDmpTimeStamp=$(date -u +%Y-%m-%d-%H:%M:%S)---> gDmpTimeStamp=$(date +%Y-%m-%d-%H:%M:%S)343,344d342< gUtcTimeStamp=$(date -u +%Y%m%d%H%M.%S)< touch -t "${gUtcTimeStamp}" "${gTarPath}/${gNVRAMf}"350,351d347< gUtcTimeStamp=$(date -u +%Y%m%d%H%M.%S)< touch -t "${gUtcTimeStamp}" "${gTarPath}/${gNVRAMf}" Link to comment Share on other sites More sharing options...
Recommended Posts