Contribute
Register

[Guide] Using Clover to "hotpatch" ACPI

Joined
Nov 10, 2011
Messages
1,340
Motherboard
GA-H77N-WIFI F4
CPU
i7-3770
Graphics
HD 4000
Mobile Phone
  1. Android
All such patches are not necessary.

With hotpatch, you're concerned only with functional patches. Patches to correct warnings/errors/etc are generally not needed (and were not really needed in the first place).
Good to know. Thanks!
Then it seems I'm ready. All other _DSM injections from the PJALM patches are already implemented as SSDTs, also several renames in config.plist (EHCx->EH0x, SAT0->SATA, USB 3.0 is "XHC" by design, so no rename is needed).

Oh, I've missed one: the _OSI patch. Currently, the normal patch adds the following code:
Code:
If (_OSI ("Darwin"))
   {
      Store (0x2710, OSYS)
   }
to \SB.PCI0._INI, but I presume it would be better to rename those calls to XOSI and use your method from the ProBook repo, right?
 
Last edited:

RehabMan

Moderator
Joined
May 2, 2012
Messages
183,805
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Good to know. Thanks!
Then it seems I'm ready. All other _DSM injections from the PJALM patches are already implemented as SSDTs, also several renames in config.plist (EHCx->EH0x, SAT0->SATA, USB 3.0 is "XHC" by design, so no rename is needed).

Oh, I've missed one: the _OSI patch. Currently, the normal patch adds the following code:
Code:
If (_OSI ("Darwin"))
   {
      Store (0x2710, OSYS)
   }
to \SB.PCI0._INI, but I presume it would be better to rename those calls to XOSI and use your method from the ProBook repo, right?

Use _OSI->XOSI and SSDT-XOSI.aml as per post #1.
 
Joined
Sep 5, 2016
Messages
19
Motherboard
XPS 15 9550 4825T
CPU
Intel(R) Core(TM) i7-6700HQ @ 2.60GHz
Graphics
Intel HD 530 & NVIDIA GTX 960M
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
  2. iOS
Hello Rehabman.

I got a mess with patch some same thing in DSDT such as RPXX.

I just want to change RP09::pXSX to RP09::SSD0 but i cant.

Here are the DSDT patch txt.
https://github.com/syscl/XPS9350-macOS/blob/master/DSDT/patches/syscl_SSD.txt.

I create an SSDT-SSD0.aml with RP09.SSD0 and with no wrong but when i want to change RP09.PXSX to RP09.XXXX,i am couriously.

If i want to load my SSDT-SSD0.aml the original RP09.PXSX must be disabled but i have found all the RPXX from RP09 to RP14 have same structure with no difference so if i simplily change PXSX to XXXX then all the RPXX devices are disabled and cant boot into the macOS.

So i want to change the RP09 to RPXX directly and create an SSDT-RP09.aml and with no error and changed all the RP09.PXSX to RP09.SSD0 but when i open the ioreg i found it still load RPXX not RP09 it means no matter i change RP09 to what it still load the original RP Device and i tried rename RP09 to XXXX it still load XXXX than SSDT-RP09 device.

I think it may be related with PXSX.If the device have PXSX device no matter what name the device named it still can be load by macOS but due to the same structure about RP devices so i cant have wany to change RP09.PXSX to RP09.SSD0.

If you have some idea to change the RP09.PXSX to RP09.SSD0 var hotpatch please teach me.

Thanks very much and forgive my poor english.
 

RehabMan

Moderator
Joined
May 2, 2012
Messages
183,805
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Hello Rehabman.

I got a mess with patch some same thing in DSDT such as RPXX.

I just want to change RP09::pXSX to RP09::SSD0 but i cant.

Here are the DSDT patch txt.
https://github.com/syscl/XPS9350-macOS/blob/master/DSDT/patches/syscl_SSD.txt.

I create an SSDT-SSD0.aml with RP09.SSD0 and with no wrong but when i want to change RP09.PXSX to RP09.XXXX,i am couriously.

If i want to load my SSDT-SSD0.aml the original RP09.PXSX must be disabled but i have found all the RPXX from RP09 to RP14 have same structure with no difference so if i simplily change PXSX to XXXX then all the RPXX devices are disabled and cant boot into the macOS.

So i want to change the RP09 to RPXX directly and create an SSDT-RP09.aml and with no error and changed all the RP09.PXSX to RP09.SSD0 but when i open the ioreg i found it still load RPXX not RP09 it means no matter i change RP09 to what it still load the original RP Device and i tried rename RP09 to XXXX it still load XXXX than SSDT-RP09 device.

I think it may be related with PXSX.If the device have PXSX device no matter what name the device named it still can be load by macOS but due to the same structure about RP devices so i cant have wany to change RP09.PXSX to RP09.SSD0.

If you have some idea to change the RP09.PXSX to RP09.SSD0 var hotpatch please teach me.

Thanks very much and forgive my poor english.

It is not necessary to rename PXSX.
 
Joined
Jul 20, 2014
Messages
129
Motherboard
ThinkPad W550s
CPU
Intel Core i7-5600U @ 2.59 GHz
Graphics
k620m/hd5500
Mac
Classic Mac
Mobile Phone
Something wrong with my Clover folder, but I can't figure it out. When I boot macOS without DSDT.aml file, everything works fine, however, when I tried to boot with DSDT file, I got a panic "ACPI: PCI0.LPC.EC__ ....". The DSDT file only patched battery for W550s and insert D

I tried to remove DSDT patch for "EC0 to EC__" in config.plist but nothing changed

I uploaded my clover folder and DSDT file, hope you can help me check them.
 

Attachments

  • CLOVER.zip
    2.5 MB · Views: 76
  • DSDT.aml
    63.9 KB · Views: 121

RehabMan

Moderator
Joined
May 2, 2012
Messages
183,805
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Something wrong with my Clover folder, but I can't figure it out. When I boot macOS without DSDT.aml file, everything works fine, however, when I tried to boot with DSDT file, I got a panic "ACPI: PCI0.LPC.EC__ ....". The DSDT file only patched battery for W550s and insert D

I tried to remove DSDT patch for "EC0 to EC__" in config.plist but nothing changed

I uploaded my clover folder and DSDT file, hope you can help me check them.

You have a huge number of binary patches (config.plist/ACPI/DSDT/Patches).
It is likely recompilation of your DSDT will break the patches due to the differences (optimizations) in newer iasl.
You will need to check each one, or you could compile without optimizations (see iasl options).
 
Joined
Jul 20, 2014
Messages
129
Motherboard
ThinkPad W550s
CPU
Intel Core i7-5600U @ 2.59 GHz
Graphics
k620m/hd5500
Mac
Classic Mac
Mobile Phone
You have a huge number of binary patches (config.plist/ACPI/DSDT/Patches).
It is likely recompilation of your DSDT will break the patches due to the differences (optimizations) in newer iasl.
You will need to check each one, or you could compile without optimizations (see iasl options).
Thanks a lot. Removed useless/conflict patches and problem solved.
 
Joined
Jun 5, 2017
Messages
102
Motherboard
Asus Notebook Y583LD(Clover EFI)
CPU
i3-4030U/HM86
Graphics
HD4400,1366x768
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Introduction
Tips for complex Rename and Replace

This section will detail some of the techniques and procedures used for battery patching.[/code]
I try to test.dsl according to IASL -l, the test.lst method to find differences in the patch before and after fix_PARSEOP_ZERO_agressive.txt file but failed. Unable to get to hex! In addition to the direct use of MaciASL fix_PARSEOP_ZERO_agressive.txt to the patch, there are in the clover Find-Replace Zero to eliminate the mistake?
 

Attachments

  • origin.zip
    54.1 KB · Views: 53
  • 1.png
    1.png
    145.9 KB · Views: 116
  • Zero.png
    Zero.png
    137.3 KB · Views: 125

RehabMan

Moderator
Joined
May 2, 2012
Messages
183,805
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
I try to test.dsl according to IASL -l, the test.lst method to find differences in the patch before and after fix_PARSEOP_ZERO_agressive.txt file but failed. Unable to get to hex! In addition to the direct use of MaciASL fix_PARSEOP_ZERO_agressive.txt to the patch, there are in the clover Find-Replace Zero to eliminate the mistake?

No need to fix PARSEOP_ZERO problem or any other syntax related fix.
With hotpatch, you're concerned only with functional patching.
 
Joined
Jun 5, 2017
Messages
102
Motherboard
Asus Notebook Y583LD(Clover EFI)
CPU
i3-4030U/HM86
Graphics
HD4400,1366x768
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
I can understand: you can ignore the Zero error, you can not extract any DSDT and SSDTs files, borrow the hottatch SSDT file directly, and modify the rename in config to prevent naming repetition
 
Top