Slice Posted November 25, 2017 Share Posted November 25, 2017 It is probably easiest to just import my AcpiPatcher.c into the svn repo: https://github.com/RehabMan/Clover/raw/master/rEFIt_UEFI/Platform/AcpiPatcher.c As I did. Link to comment Share on other sites More sharing options...
Slice Posted November 25, 2017 Share Posted November 25, 2017 Something new here. boot6 compiled with XCODE8 toolset works fine but not with XCODE5 toolset. Just 6_ blinking. But why? boot-bad.zip The problem again in EDK2 revision. 25729 not work. 25679 works. Link to comment Share on other sites More sharing options...
RehabMan Posted November 25, 2017 Share Posted November 25, 2017 As I did. Thanks! Link to comment Share on other sites More sharing options...
Sherlocks Posted November 25, 2017 Share Posted November 25, 2017 i found case that osversion null in 10.7/10.8. restore Base System method is no problem directly restore InstallESD by using diskutility or DiskMaker X or InstallDiskCreator. then 1st stage, recognized osversion, copy files to install mac(ex,/Volumes/MAC/OS X Install Data), reboot and 2nd stage, osversion is null, because there is no SystemVersion.plist file. only can check os version in ia.log. in this case, if user don't have fakesmc.kext in Other folder, will fail boot in 2nd stage. there is no plist file to recognize os version. only ia.log. clover need to find this pattern "Running OS Build: Mac OS X 10.8.5 (12F45)" in ia.log txt file. then read os version. ia.log location 10.7 \\Mac OS X Install Data\\ia.log 10.8 \\OS X Install Data\\ia.log thanks fixed it. now, Clover is no problem for installation of old OS if use has only fakesmc in 10.x folder. also support all method like this directly restore InstallESD by using diskutility or DiskMaker X or InstallDiskCreator. EDIT1. 10.7.x is good. need to think 10.7. i will check again. EDIT2. 10.7 case was fixed. all done Link to comment Share on other sites More sharing options...
Pavo Posted November 26, 2017 Share Posted November 26, 2017 Anyone know away to parse Clover to see what config.plist options are available? Something like parse Clover 4293 has these config.plist options and Clover 4319 has these config.plist options. 1 Link to comment Share on other sites More sharing options...
Slice Posted November 26, 2017 Share Posted November 26, 2017 $ strings CLOVERX64.EFI >strings.txt Link to comment Share on other sites More sharing options...
Sherlocks Posted November 26, 2017 Share Posted November 26, 2017 @Slice I have seen a discussion about the reset nvram feature in applelife. user curious to know exactly how this works. I do not know Russian and understood the contents roughly through translation. First, when I first applied Reset NVRAM, pressing f11 removes that value and nvram.plist, if any, and reboots it right away. However, when considering hibernate mode with hibernatefixup, nvram.plist file is created in root and it can not be deleted as you mentioned. So rebooting did not make sense because the clover continued to read the root's nvram.plist. So I removed the reboot part from the 4303 commit. In summary: 1. EmulNVRAM(EmuVariableUefi+rc script) 1.1 General It is recommended that you press F11 and restart(R key) the boot loader. That's because clover does not read any nvram.plist in ESP after reboot. This completes the initialization. 1.2 hibernationfixup problem If get an instant boot, press F11 and boot the partition without restart bootloader. This process is recorded in the clover log. 2. Native NVRAM/Legacy(MBR+rc script) Currently only certain values are to be deleted. The ndrv and bootarg keys. This process is recorded in the clover log. if need some keys like realmac, will consider. example CLOVER keys(theme or any) 3. Legacy(GPT+rc script) It is recommended that you press F11 and restart(R key) the boot loader. That's because clover does not read any nvram.plist in ESP after reboot. This completes the initialization. http://www.insanelymac.com/forum/topic/304530-clover-change-explanations/?p=2533580 My English is not good enough. If you understand, I would appreciate it. thanks Link to comment Share on other sites More sharing options...
Slice Posted November 26, 2017 Share Posted November 26, 2017 I think F11 is bad idea in the case of hibernation. You will lose variables for wake. Link to comment Share on other sites More sharing options...
Sherlocks Posted November 26, 2017 Share Posted November 26, 2017 I think F11 is bad idea in the case of hibernation. You will lose variables for wake. yes. but At first I thought of course that I could use hibernation mode with a combination of hibernationfixup + OsxAptioFix2Drv in my system. However, the test shows only the instant reboot phenomenon. i don't know why. There was no way to boot into Recovery, Mac partition, or USB installer. If it is 100% successful on all systems without this phenomenon, maybe it is not necessary. But I tested it on several systems that I have, but it did not succeed. Previously in Sierra I only succeeded in terminal hibernatemode 29 without hibernationfixup. Except for this case, if an ordinary user reboots by using hibernationfixup and hibernation mode and wakes up the system and accesses the partition, if the instant reboot occurs, it accesses the window and updates the date of the nvram file of the ESP partition to the latest . Or you should remove nvram from the root with a program such as transmac. Currently the high sierra apfs system is not accessible from Windows and can not be modified. In the worst case, without any windows, any usb boot loader can not access the Mac partition. Because usb clover also scans nvram.plist. In this case, you will need to boot to Windows usb, delete the partition completely and reinstall it with usb clover. If valuable data is on the partition, it is lost. I have devised a way to solve this cumbersome process at once. how can you use hibernationfixup? EDIT1. or remove EmuVariableUefi to avoid load nvram.plist in root. but in my case, without EmuVariableUefi, i never boot macOS with EFINVRAM timeout error. Link to comment Share on other sites More sharing options...
Slice Posted November 26, 2017 Share Posted November 26, 2017 Yes, hibernation will not work for all. And HibernationFixup will not help for all. If you encounter reboot instead of hibernation wake then you have to choose "Cancel hibernation". Thats all for all users for all years existing Clover. Why delete NVRAM? Link to comment Share on other sites More sharing options...
Sherlocks Posted November 26, 2017 Share Posted November 26, 2017 Yes, hibernation will not work for all. And HibernationFixup will not help for all. If you encounter reboot instead of hibernation wake then you have to choose "Cancel hibernation". Thats all for all users for all years existing Clover. Why delete NVRAM? http://www.insanelymac.com/forum/topic/306156-clover-bugissue-report-and-patch/?p=2535488 in High Sierra 1. Macintosh HD(hibernated) <------ can't see this after hibernate mode in GUI. 2. so, can't see "Cancel hibernation" option. because Macintosh HD doesn't have "hibernated"tag. you can see this true above link 3. if enable "Cancel hibernation" feature for test, still instant reboot. this feature is not working. because of this reason, to resolve this problem, i considered reset NVRAM. i remember hibernationfixup test in sierra. in that time 1. i can see Macintosh HD(hibernated) and "Cancel hibernation". also can use it. 2. if fail hibernationfixup method, after hibernate mode, in gui, enter Macintosh HD(hibernated) partition. there is no instant reboot. only shown black screen. then shutdown system, then power on system, then enter Macintosh HD(hibernated) partition, and use "Cancel hibernation". i can boot. <----- this is right. Link to comment Share on other sites More sharing options...
Slice Posted November 26, 2017 Share Posted November 26, 2017 http://www.insanelymac.com/forum/topic/306156-clover-bugissue-report-and-patch/?p=2535488 in High Sierra 1. Macintosh HD(hibernated) 2. so, can't see "Cancel hibernation" option. because Macintosh HD doesn't have "hibernated"tag. you can see this true above link 3. if enable "Cancel hibernation" feature for test, still instant reboot. this feature is not working. What hibernate mode was used? StrictHibernate? Did you find any "boot*" variables in nvram.plist? What boot.log said about " Macintosh HD doesn't have "hibernated"tag"? 1 Link to comment Share on other sites More sharing options...
Sherlocks Posted November 26, 2017 Share Posted November 26, 2017 What hibernate mode was used? StrictHibernate? Did you find any "boot*" variables in nvram.plist? What boot.log said about " Macintosh HD doesn't have "hibernated"tag"? 1.What hibernate mode was used? StrictHibernate? - i used only fn+sleep(hibernation mode). i don't have any keys for hibernation(stricthibernate, hibernationfixup, signaturefixup) in config.plist 2. Did you find any "boot*" variables in nvram.plist? - attached nvram.plist 3. What boot.log said about " Macintosh HD doesn't have "hibernated"tag"? - there is no "cancel hibernation" option 1:012 0:000 === [ ScanLoader ] ======================================== 1:012 0:000 - [01]: 'EFI' 1:015 0:002 AddLoaderEntry for Volume Name=EFI 1:018 0:003 - [04]: 'Mac Data' 1:018 0:000 - [06]: 'Preboot', hidden 1:018 0:000 - [07]: 'Macintosh HD' 1:054 0:035 AddLoaderEntry for Volume Name=Macintosh HD 1:073 0:019 Check if volume Is Hibernated: 1:073 0:000 Check sleep image 'by signature': 1:100 0:027 read prefs \Library\Preferences\com.apple.PowerManagement.plist status=Success 1:100 0:000 using default sleep image name = \private\var\vm\sleepimage 1:117 0:016 sleepimage not found -> Not Found 1:117 0:000 hibernated: no - sign 1:124 0:007 - [08]: 'Recovery' 1:135 0:010 AddLoaderEntry for Volume Name=Recovery 1:148 0:013 - [09]: 'VM' 1:149 0:000 === [ AddCustomTool ] ===================================== after used f11, nvram variables in macOS SherlocksuiMBP2:~ sherlocks$ nvram -p fakesmc-key-MSWr-ui8 %00 fakesmc-key-RPlt-ch8* j130%00%00%00%00 EFILoginHiDPI %00%00%00%00 fakesmc-key-RBr -ch8* 2016mb%00%00 fakesmc-key-#KEY-ui32 %00%00%00%11 SystemAudioVolumeDB %dd fakesmc-key-BATP-flag %00 EmuVariableUefiPresent Yes fakesmc-key-MSTc-ui8 %00 prev-lang:kbd ko:0 fakesmc-key-BNum-ui8 %01 security-mode none csr-active-config w%00%00%00 fakesmc-key-$Num-ui8 %01 fakesmc-key-MSFW-ui8 %01%00 fakesmc-key-MSPS-ui16 %00%03 fakesmc-key-REV -ch8* %026%0f%00%00%97 fmm-computer-name Sherlocks%ec%9d%98 MacBook Pro (2) backlight-level i%05 bootercfg (%00 fakesmc-key-$Adr-ui32 %00%00%03%00 fakesmc-key-EPCI-ui32 %09 %f0%00 bluetoothActiveControllerInfo z%e0%89%04%00%00%00%00P%14%ac%d1%b8%e2%a4%d0 fakesmc-key-MSAc-ui16 %00%00 SystemAudioVolume ' fakesmc-key-RMde-char A fakesmc-key-BBIN-ui8 %01 flagstate %00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00 specialbootdevice %02%01%0c%00%d0A%03%0a%00%00%00%00%01%01%06%00%00%17%03%12%0a%00%01%00%00%00%00%00%04%01*%00%02%00%00%00%00H%06%00%00%00%00%00%00(*%08%00%00%00%00%8f%0a5%8c%c6P%e6C%ad%a6^%16p%d2e%d9%02%02%04%03$%00%f7%fct%be|%0b%f3I%91G%01%f4%04.hB%bd%d2_[%80%18%0e6%8a%cd%f1%f1_%b8%9c%b7%7f%ff%04%00 fakesmc-key-BEMB-flag %01 nvram.plist.zip Link to comment Share on other sites More sharing options...
Slice Posted November 27, 2017 Share Posted November 27, 2017 1. What is hibernatemode? 1, 3, 25 or 29? 2. I found boot-image, Boot0082, and BootNext. First two may influence only on Hibernation wake. BootNext may cause the trouble. Delete it. The logic should be as follow: - Check if the entry is hibernated - if not then Delete variables "boot-image, Boot0082, IOHibernateRTCVariables". - BootOrder and BootNext should be rewritten to not point to Boot0082 entry. Link to comment Share on other sites More sharing options...
Sherlocks Posted November 27, 2017 Share Posted November 27, 2017 1. What is hibernatemode? 1, 3, 25 or 29? 2. I found boot-image, Boot0082, and BootNext. First two may influence only on Hibernation wake. BootNext may cause the trouble. Delete it. The logic should be as follow: - Check if the entry is hibernated - if not then Delete variables "boot-image, Boot0082, IOHibernateRTCVariables". - BootOrder and BootNext should be rewritten to not point to Boot0082 entry. 1. What is hibernatemode? 1, 3, 25 or 29? default in high sierra, i didn't touch pmset SherlocksuiMBP2:~ sherlocks$ pmset -g System-wide power settings: Currently in use: standbydelay 10800 standby 1 womp 1 halfdim 1 hibernatefile /var/vm/sleepimage powernap 0 gpuswitch 2 networkoversleep 0 disksleep 10 sleep 1 (sleep prevented by cloudphotosd, iTunes, coreaudiod, softwareupdate_notify_agent) autopoweroffdelay 28800 hibernatemode 3 autopoweroff 1 ttyskeepawake 1 displaysleep 10 tcpkeepalive 1 lidwake 1 2. I found boot-image, Boot0082, and BootNext. First two may influence only on Hibernation wake. i didn't check hibernation logic in detail. now seems problems 1. clover can't detect hibernated tag in high sierra. i can't find \private\var\vm\sleepimage. maybe moved in vm partition? can't use "cancel hibernation" option 2. i can't found point to use"- if not then Delete variables "boot-image, Boot0082, IOHibernateRTCVariables"." except f11 of reset nvram. if user faced with this problem, how can resolve this problem except reset nvram? i can test it if there is tip or test code. Link to comment Share on other sites More sharing options...
Slice Posted November 27, 2017 Share Posted November 27, 2017 If it is one user then we can help him to enter Shell.efi and delete all he want.But I see no this is common problem. hibernatemode=3 is not good choice. We want to use 29 in no Lilu and mode 25 if Lilu+HibernationFixup. can't use "cancel hibernation" option Because the entry is not marked as Hibernated. i can't found point to use"- if not then Delete variables " Ordinary entry start. We must add a check if there was hibernation variables from previous wrong start. Link to comment Share on other sites More sharing options...
Sherlocks Posted November 27, 2017 Share Posted November 27, 2017 If it is one user then we can help him to enter Shell.efi and delete all he want. But I see no this is common problem. hibernatemode=3 is not good choice. We want to use 29 in no Lilu and mode 25 if Lilu+HibernationFixup. Because the entry is not marked as Hibernated. Ordinary entry start. We must add a check if there was hibernation variables from previous wrong start. If it is one user then we can help him to enter Shell.efi and delete all he want. But I see no this is common problem. -- yes. it's not common problem. but i found example 1/100 case. i and user had this problem. user reported it A few weeks ago in general thread. hibernatemode=3 is not good choice. We want to use 29 in no Lilu and mode 25 if Lilu+HibernationFixup. -- i just followed hibernation features "Enables hibernation modes 25 & 3 on 10.10.5 and later" https://sourceforge.net/projects/hibernationfixup/ i will try 25 Because the entry is not marked as Hibernated. Ordinary entry start. We must add a check if there was hibernation variables from previous wrong start. -- i have a idea for "cancel hibernation" with marked as hibernated for high sierra. i have a question. if hibernated marked as mac disk with high sierra, is clover's current logic no problem? EDIT1. user also asked solution here a day ago https://sourceforge.net/p/hibernationfixup/discussion/general/thread/93f601f6/ Link to comment Share on other sites More sharing options...
Sherlocks Posted November 27, 2017 Share Posted November 27, 2017 today i checked hibernation all parts. i think clover can use hibernation mode 100%. hibernate 3/25 are no problem. can choose one. my process 1. enabled hibernationfixup and stricthibernate in config.plist Currently in use: standbydelay 10800 standby 1 womp 1 halfdim 1 hibernatefile /var/vm/sleepimage powernap 0 gpuswitch 2 networkoversleep 0 disksleep 10 sleep 1 autopoweroffdelay 28800 hibernatemode 3 autopoweroff 1 ttyskeepawake 1 displaysleep 10 tcpkeepalive 1 lidwake 1 2. lilu+hibernationfixup after this, go hardware key(fn+sleep), power on, get gui, enter partition. got macOS 1:121 0:000 === [ ScanLoader ] ======================================== 1:121 0:000 - [01]: 'EFI' 1:124 0:002 AddLoaderEntry for Volume Name=EFI 1:127 0:003 - [04]: 'Mac Data' 1:128 0:000 - [06]: 'Preboot', hidden 1:128 0:000 - [07]: 'Macintosh HD' 1:163 0:035 AddLoaderEntry for Volume Name=Macintosh HD 1:183 0:019 Check if volume Is Hibernated: 1:183 0:000 UEFI with NVRAM? yes 1:183 0:000 APFS Boot0082 points to UUID:<null guid> 1:183 0:000 Volume has PartUUID=5B5FD2BD-1880-360E-8ACD-F1F15FB89CB7 1:183 0:000 Boot0082 points to Volume with UUID:<null guid> 1:183 0:000 boot-image before: PciRoot(0x0)\Pci(0x17,0x0)\Sata(0x1,0x0,0x0)\cc900000 1:183 0:000 02 01 0C 00 D0 41 03 0A 00 00 00 00 01 01 06 00 | .....A.......... 1:183 0:000 00 17 03 12 0A 00 01 00 00 00 00 00 04 04 16 00 | ................ 1:183 0:000 63 00 63 00 39 00 30 00 30 00 30 00 30 00 30 00 | c.c.9.0.0.0.0.0. 1:183 0:000 00 00 7F FF 04 00 | ...... 1:183 0:000 boot-image after: PciRoot(0x0)\Pci(0x17,0x0)\Sata(0x1,0x0,0x0)\cc900000 1:183 0:000 =>set entry as hibernated 1:190 0:007 - [08]: 'Recovery' 1:201 0:010 AddLoaderEntry for Volume Name=Recovery 1:215 0:013 - [09]: 'VM' 1:223 0:008 === [ AddCustomTool ] ===================================== now, seems some part is wrong if there is no stricthibernate in config.plist, happen instant reboot. boot-image key help that we can use hibernate mode i will debug in detail for some wrong parts. EDIT1. i removed stricthibernate key in config. and i added some debug code to check point. 1:113 0:000 === [ ScanLoader ] ======================================== 1:113 0:000 - [01]: 'EFI' 1:116 0:002 AddLoaderEntry for Volume Name=EFI 1:119 0:003 - [04]: 'Mac Data' 1:119 0:000 - [06]: 'Preboot', hidden 1:119 0:000 - [07]: 'Macintosh HD' 1:155 0:035 AddLoaderEntry for Volume Name=Macintosh HD 1:174 0:019 Check if volume Is Hibernated: 1:174 0:000 Check sleep image 'by signature': 1:200 0:025 read prefs \Library\Preferences\com.apple.PowerManagement.plist status=Success 1:200 0:000 using default sleep image name = \private\var\vm\sleepimage 1:216 0:016 sleepimage not found -> Not Found 1:216 0:000 Check if nvram.plist in root 1:218 0:001 found nvram.plist in root 1:221 0:002 Check if Boot0082 in nvram.plist 1:221 0:000 found Boot0082 in nvram.plist 1:221 0:000 hibernated: yes 1:221 0:000 UEFI with NVRAM? yes 1:221 0:000 APFS Boot0082 points to UUID:<null guid> 1:221 0:000 Volume has PartUUID=5B5FD2BD-1880-360E-8ACD-F1F15FB89CB7 1:221 0:000 Boot0082 points to Volume with UUID:<null guid> 1:221 0:000 =>set entry as hibernated 1:228 0:007 - [08]: 'Recovery' 1:239 0:010 AddLoaderEntry for Volume Name=Recovery 1:252 0:013 - [09]: 'VM' 1:252 0:000 === [ AddCustomTool ] ===================================== now boot0082 is not properly working. boot0082 causes instant reboot. this case i have to reset nvram with f11. both normal boot and cancel hibernation cause instant reboot. what is defference between boot0082 and boot-image? seems better boot-image. long time ago, i tested hibernationfixup + lilu in sierra. but always keep black screen after enter partition. in that time, i don't use stricthibernate option. maybe old code also use boot0082. is it right? Link to comment Share on other sites More sharing options...
Slice Posted November 27, 2017 Share Posted November 27, 2017 Check 4322. I think it is enough for your problem. 1 Link to comment Share on other sites More sharing options...
Sherlocks Posted November 28, 2017 Share Posted November 28, 2017 Check 4322. I think it is enough for your problem. it's good. i checked all of hibernation option and save/result of nvram after hibernation or restart. nvram is correctly working just consider if want to use hiberantion in high sierra, user enable stricthibernate option in config. in high sierra, clover now boot0082+sleepimage combination is not working. because sleepimage located in VM partition. anyways it's shown best result.. thank you so much. EDIT1. lilu+hibernationfixup+config(stricthibernate+hibernationfixup)+OsxAptioFix2Drv-free2000.efi. i'm successed hibernation mode if use stricthibernate option, seems to not relate osxapitiofix driver. Link to comment Share on other sites More sharing options...
RehabMan Posted November 29, 2017 Share Posted November 29, 2017 If there is no part SSDT in config.plist, APSN/APLF part not operate in Stategenerator. Some user has not SSDT in config.plist. I tested all keys according to true/false and without SSDT key for all cases on my Skylake/Sandy laptop. There is no problem. And you can check it from log. Ivy+, default enabled P/C states. But sandy- is no. Also APSN/APLF keys according to C states in setting if there is C states. EDIT1 C states in setting if there is C states. -> P states 나의 LG-F800S 의 Tapatalk에서 보냄 I knew proof of this bug would come up eventually (because I already had fixed it earlier, and then your change broke it). The files here demonstrate the bug quite clearly: https://www.tonymacx86.com/threads/guide-disabling-discrete-graphics-in-dual-gpu-laptops.163772/page-163#post-1637568 The user has config.plist/ACPI/SSDT/Generate/PStates=false, and config.plist/ACPI/SSDT/Generate/PluginType is not specified. The user also has an SSDT.aml generated from ssdtPRgen.sh. This is a valid configuration, but the latest release of Clover is injecting the PluginType=1 SSDT even though one is not asked for (eg. Generate/PluginType=true not specified). In the files at the link, you will notice the patchmatic -extract output cannot be disassemlbed with 'iasl -da -dl *.aml' due to duplicate _DSM in _PR.CPU0 scope. Like I wrote before, it is important for Generate/PluginType to follow Generate/PStates when Generate/PluginType is not specified. It is the way it must be for backward compatibility. I will be restoring my github code to what I wrote originally. 5 Link to comment Share on other sites More sharing options...
Sherlocks Posted November 29, 2017 Share Posted November 29, 2017 I knew proof of this bug would come up eventually (because I already had fixed it earlier, and then your change broke it). The files here demonstrate the bug quite clearly: https://www.tonymacx86.com/threads/guide-disabling-discrete-graphics-in-dual-gpu-laptops.163772/page-163#post-1637568 The user has config.plist/ACPI/SSDT/Generate/PStates=false, and config.plist/ACPI/SSDT/Generate/PluginType is not specified. The user also has an SSDT.aml generated from ssdtPRgen.sh. This is a valid configuration, but the latest release of Clover is injecting the PluginType=1 SSDT even though one is not asked for (eg. Generate/PluginType=true not specified). In the files at the link, you will notice the patchmatic -extract output cannot be disassemlbed with 'iasl -da -dl *.aml' due to duplicate _DSM in _PR.CPU0 scope. Like I wrote before, it is important for Generate/PluginType to follow Generate/PStates when Generate/PluginType is not specified. It is the way it must be for backward compatibility. I will be restoring my github code to what I wrote originally. i saw config.plist without SSDT key of some user. i considered if there is no SSDT part in config.plist, there is no APFS, APLF parts. you added it on only SSDT key blow. there is no other part. now default enabled P/C states since ivy+. https://sourceforge.net/p/cloverefiboot/code/4307/tree//rEFIt_UEFI/Platform/platformdata.c?diff=504c3833fd48f873331ebd05:4306 https://sourceforge.net/p/cloverefiboot/code/4307/tree//rEFIt_UEFI/Platform/Settings.c?diff=504c3833fd48f873331ebd05:4306 APLF https://sourceforge.net/p/cloverefiboot/code/4307/tree/rEFIt_UEFI/Platform/StateGenerator.c#l394 It did not make a big difference in r4307. It only takes into account the unusual case. so, can I just return this part? how can we consider if user's config.plist doesn't have SSDT key? https://sourceforge.net/p/cloverefiboot/code/4307/tree//rEFIt_UEFI/Platform/Settings.c?diff=504c3833fd48f873331ebd05:4306 EDIT1 If do not have an SSDT key in your previous code, the APFS, APLF, and PluginType parts do not work by default since ivy+. https://sourceforge.net/p/cloverefiboot/code/4275/tree//rEFIt_UEFI/Platform/StateGenerator.c?diff=504c3833fd48f873331ebd05:4274 https://sourceforge.net/p/cloverefiboot/code/4275/tree//rEFIt_UEFI/Platform/Settings.c?diff=504c3833fd48f873331ebd05:4274 EDIT2 he disabled clover P/C states generator option(disabled clover default option. he has kabylake). also he has custom pm ssdt from script. SSDT-12(custom pm ssdt) and SSDT-13(only plugintype 1). i saw his config. false CStates/PStates/PluginType. completely disabled option. also PStates is false https://sourceforge.net/p/cloverefiboot/code/4324/tree/rEFIt_UEFI/Platform/Settings.c#l5302 gSettings.GeneratePluginType = gSettings.GeneratePStates; false and if PStates work, not work this https://sourceforge.net/p/cloverefiboot/code/4324/tree/rEFIt_UEFI/Platform/StateGenerator.c#l415 1 Link to comment Share on other sites More sharing options...
RehabMan Posted November 29, 2017 Share Posted November 29, 2017 i saw config.plist without SSDT key of some user. i considered if there is no SSDT part in config.plist, there is no APFS, APLF parts. you added it on only SSDT key blow. there is no other part. now default enabled P/C states since ivy+. https://sourceforge.net/p/cloverefiboot/code/4307/tree//rEFIt_UEFI/Platform/platformdata.c?diff=504c3833fd48f873331ebd05:4306 https://sourceforge.net/p/cloverefiboot/code/4307/tree//rEFIt_UEFI/Platform/Settings.c?diff=504c3833fd48f873331ebd05:4306 APLF https://sourceforge.net/p/cloverefiboot/code/4307/tree/rEFIt_UEFI/Platform/StateGenerator.c#l394 It did not make a big difference in r4307. It only takes into account the unusual case. so, can I just return this part? how can we consider if user's config.plist doesn't have SSDT key? https://sourceforge.net/p/cloverefiboot/code/4307/tree//rEFIt_UEFI/Platform/Settings.c?diff=504c3833fd48f873331ebd05:4306 EDIT1 If do not have an SSDT key in your previous code, the APFS, APLF, and PluginType parts do not work by default since ivy+. https://sourceforge.net/p/cloverefiboot/code/4275/tree//rEFIt_UEFI/Platform/StateGenerator.c?diff=504c3833fd48f873331ebd05:4274 https://sourceforge.net/p/cloverefiboot/code/4275/tree//rEFIt_UEFI/Platform/Settings.c?diff=504c3833fd48f873331ebd05:4274 EDIT2 he disabled clover P/C states generator option(disabled clover default option. he has kabylake). also he has custom pm ssdt from script. SSDT-12(custom pm ssdt) and SSDT-13(only plugintype 1). i saw his config. false CStates/PStates/PluginType. completely disabled option. also PStates is false https://sourceforge.net/p/cloverefiboot/code/4324/tree/rEFIt_UEFI/Platform/Settings.c#l5302 gSettings[/size].[/size]GeneratePluginType[/size] [/size] =[/size] [/size]gSettings[/size].[/size]GeneratePStates[/size];[/size] false and if PStates work, not work this[/size] https://sourceforge.net/p/cloverefiboot/code/4324/tree/rEFIt_UEFI/Platform/StateGenerator.c#l415 I'm not sure what is going on ... I will have to reproduce the problem here, add logs to the code and discover what the issue is. All I know is the original code I had there was working for this specific scenario (Generate/PStates=false, Generate/PluginType unspecified --> no Clover gen of PluginType=1 CpuPm SSDT) And yes, the "without SSDT key" is not a scenario I thought of (I think that would be very rare), and I think in the case of no SSDT or even no SSDT/Generate, the original default was to *generate* PStates/CStates/PluginType as required by the CPU. Currently working on an update to AcpiPatcher.c... I eventually want a feature that will dump an entire directory of ACPI files that "would be injected", but without booting. That is, I want a feature that would dump all ACPI just like ACPI/origin, but to ACPI/to_inject which is the result of all patching. Very useful in the hotpatch scenario, as you can disassemble each acpi/origin and acpi/to_inject then diff them with a tool like diffmerge. In cases where you can't boot due to mistakes in hotpatch, it would be a useful way to see the actual effects of the patching. So, once I get that feature done, I'll look at this backward compatibility issue regarding CpuPm and unspecified Generate/PluginType. 1 Link to comment Share on other sites More sharing options...
Sherlocks Posted November 29, 2017 Share Posted November 29, 2017 I'm not sure what is going on ... I will have to reproduce the problem here, add logs to the code and discover what the issue is. All I know is the original code I had there was working for this specific scenario (Generate/PStates=false, Generate/PluginType unspecified --> no Clover gen of PluginType=1 CpuPm SSDT) And yes, the "without SSDT key" is not a scenario I thought of (I think that would be very rare), and I think in the case of no SSDT or even no SSDT/Generate, the original default was to *generate* PStates/CStates/PluginType as required by the CPU. i wrote this in that site he has hwp enable option in config 15:485 0:000 Xsdt has tables count=32 15:485 0:000 CPUBase=0 and ApicCPUBase=1 ApicCPUNum=8 15:485 0:000 Maximum control=0x1B 15:485 0:000 Turbo control=0x1F 15:485 0:000 P-States: min 0x4, max 0x1F 15:485 0:000 SSDT with plugin-type and HWP without P-States is generated you added this line in your code in r4275 https://sourceforge.net/p/cloverefiboot/code/4275/tree/rEFIt_UEFI/Platform/Settings.c#l5829 then works this line https://sourceforge.net/p/cloverefiboot/code/4275/tree/rEFIt_UEFI/Platform/AcpiPatcher.c#l2162 i don't know why you added enable ssdt generate option if user enable hwp option in your code before. i think better remove this line to avoid confusion https://sourceforge.net/p/cloverefiboot/code/4275/tree/rEFIt_UEFI/Platform/Settings.c#l5829 now, he has to disable hwp option in his config. Link to comment Share on other sites More sharing options...
RehabMan Posted November 29, 2017 Share Posted November 29, 2017 i wrote this in that site he has hwp enable option in config 15:485 0:000 Xsdt has tables count=32 15:485 0:000 CPUBase=0 and ApicCPUBase=1 ApicCPUNum=8 15:485 0:000 Maximum control=0x1B 15:485 0:000 Turbo control=0x1F 15:485 0:000 P-States: min 0x4, max 0x1F 15:485 0:000 SSDT with plugin-type and HWP without P-States is generated you added this line in your code in r4275 https://sourceforge.net/p/cloverefiboot/code/4275/tree/rEFIt_UEFI/Platform/Settings.c#l5829 then works this line https://sourceforge.net/p/cloverefiboot/code/4275/tree/rEFIt_UEFI/Platform/AcpiPatcher.c#l2162 i don't know why you added enable ssdt generate option if user enable hwp option in your code before. i think better remove this line to avoid confusion https://sourceforge.net/p/cloverefiboot/code/4275/tree/rEFIt_UEFI/Platform/Settings.c#l5829 now, he has to disable hwp option in his config. And just to complete the circle here, I wrote: Good find. OK... so maybe no bug here. I missed seeing the HWPEnable option. The HWP option has always enabled CpuPm/PluginType inject. In that case, we are seeing the correct behavior. Because Generate/PluginType is unspecified, but HWPEnable is specified, we should expect CpuPm/PluginType SSDT inject. But if setting Generate/PluginType=false does not avoid the CpuPm/PluginType=1 inject, then we have another bug that should be fixed (because then you'd be able to use HWPEnable and avoid CpuPM table with Generate/PluginType=false). Personally, I don't use HWPEnable as it is never needed.... HWP is enabled by simply using an HWP enabled SMBIOS. No Clover features needed for that. Backward compatibility sucks. And looking at the current code (I really haven't reviewed this since I made the original report, due to working on other things), looks like some of the changes I objected to originally were reverted... So that much is good. I will look into the interactions between HWPEnable and Generate/PluginType=true to make sure they make sense. (Generate/PluginType=false should override any CpuPm/PluginType=1 inject forced by HWPEnable). 1 Link to comment Share on other sites More sharing options...
Recommended Posts