Contribute
Register

[Guide] Using Clover to "hotpatch" ACPI

Joined
Apr 14, 2019
Messages
72
Motherboard
Dell Inspiron 7586
CPU
i7-8565U
Graphics
UHD 620
Mobile Phone
  1. Android
Hey everyone,

To get my touchpad/touchscreen working, I need to patch my DSDT. It involves changing an if statement that checks a variable called USTP to always run.

Looking at the assembled ASL files, I need to change this line:
Code:
000318AA:  A0 4C 48 55 53 54 50 ...    ".LHUSTP"

To this one:
Code:
000318AA:  A0 49 48 01 ............    ".IH."

I know ACPI hotpatches are supposed to be of the same length, but a patch like the following in Clover seems to work:
Code:
Comment: Change USTP to One (to fix I2C)
   Find: <A04C4855 535450>
Replace: <A0494801>

Unfortunately, OpenCore doesn't like the different lengths, and complains when loading.

Is there anything I can do to fix this? Does ASL have a whitespace byte?
 
Joined
May 8, 2017
Messages
61
Motherboard
HP 827E - F.51
CPU
i7-7500U
Graphics
HD 620
Mobile Phone
  1. iOS
Hello, after following your guide on how to patch the DSDT to have a working battery status, I've followed the post #2 of this guide to get an SSDT.aml to hot patch the battery status on the fly. However, it's not working... When turning on my laptop, the Battery Status doesn't appear at all. However, I've found that by plugging or removing the AC adapter, it starts to displays 0% (chagrin or not charging, depending on wether if the AC adapter is connected or not).

So far, I've concluded that ONLY the following blocks need to be addressed (and that's what I've attempted on the SSDT file):

SMD0, 256, //found in methods: SMWR, _CRS, _STA
BADC, 16, //No methods (or results) found, no patch needed
BFCC, 16, //found in methods: UPBI, GBIF
MCUR, 16, //found in methods: UPBS, GBCO
MBRM, 16, //found in method: UPBS
MBCV, 16, //found in method: UPBS

Attach you'll find the Patch I've created for my HP Spectre, the SSDT.dsl file I'm attempting to create, and finally, the original DSDT.dsl file. Hopefully, somebody can point me towards what I'm doing wrong? Thank you very much!
 

Attachments

  • HP Spectre Battery Patch.txt
    6.3 KB · Views: 41
  • SSDT-HP-Spectre-Battery.dsl
    29 KB · Views: 30
  • DSDT.dsl
    1.6 MB · Views: 35
Joined
Mar 29, 2017
Messages
42
Motherboard
1. Lenovo X230 2. HP Folio 9470m
CPU
1. i5 3320M 2.i5- i5-3337U
Graphics
both HD4000
Mac
  1. MacBook Air
Mobile Phone
  1. Android
Since yours is an HP notebook, why don't you follow this guide?
 
Joined
May 8, 2017
Messages
61
Motherboard
HP 827E - F.51
CPU
i7-7500U
Graphics
HD 620
Mobile Phone
  1. iOS
Since yours is an HP notebook, why don't you follow this guide?
Thank you, not what I’m looking for! I already have almost everything working (except Thunderbolt Hot Plug), but was really looking to “finish” with some post install things my HP Spectre with the ability to hotpatch the battery on the fly... with no need to modify the DSDT.aml for this purpose. Hence the question :)
 
Joined
Jan 21, 2012
Messages
117
Motherboard
Acer Swift SF314-57
CPU
I5-1035G1
Graphics
UHD 630, 1920x1080
Mac
  1. MacBook Pro
I understand you means to rename and replace 'Method (_CRS' in TPD1 device (like your ETPD), but how to find that code about "_SB.PCI0.I2C0.TPD1", I only find "14 33 5F 43 52 53 00" to do with "_CRS" in DSDT.lst file.
Code:
   15550:              Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings

0000DBBB:  14 33 5F 43 52 53 00 ...    ".3_CRS."
Same difficult here. Tried to follow Feartech guidance but didn't succeed.

I know that my I2C device (trackpad) is TPD0, but can't understand the HEX code from Feartech to make my custom patch. Tried a patched DSDT before but BigSur / Opencore boot hangs near the middle of loading bar.

Thanks
 
Joined
Jul 16, 2010
Messages
445
Motherboard
Asus Pro WS x299 Sage II
CPU
i9-10980XE
Graphics
RX 5500 XT
Mac
  1. Mac Pro
Mobile Phone
  1. iOS
I believe there is an error here unless someone can explain why. I don't see B1C3 being accessed anywhere in the DSDT, its just located in the EmbeddedControl why is it being broken down into 8 bits each YC30 and YC31?
Offset (0xDE),
B1TM, 16,
B1C1, 16,
B1C2, 16,
B1C3, 16,
B1C4, 16,
 
Last edited:
Top