takeawaydave Posted September 18, 2019 Share Posted September 18, 2019 (edited) I am trying to understand how SSDT hot patching works - done a lot of reading but the not quite there yet. Basically I have a patched DSDT which will load the following: I used the Rehabman patch replacing AC with ADP1 Device (ADP1) { Name (_HID, "ACPI0003") // _HID: Hardware ID Method (_PCL, 0, NotSerialized) // _PCL: Power Consumer List { Return (Package (0x03) { _SB, BAT0, BAT1 }) } Method (_PSR, 0, NotSerialized) // _PSR: Power Source { Store (ECG5 (), Local0) And (Local0, One, Local0) If (LNotEqual (Local0, PWRS)) { Store (Local0, PWRS) PNOT () } Return (Local0) } Method (_STA, 0, NotSerialized) // _STA: Status { Return (0x0F) } Name (_PRW, Package (0x02) // _PRW: Power Resources for Wake { 0x18, 0x03 }) } How do I create a SSDT Hotpatch for the same ? Example of SSDT-ADP1 hot patches such as shown below do not load on my system (EDIT: Ok, it loads but doesn't create the ADP1 Ioreg object) so I'd like understand what I currently don't. DefinitionBlock ("", "SSDT", 2, "hack", "ADP1", 0x00000000) { External (_SB_.ADP1, DeviceObj) // (from opcode) Scope (\_SB.ADP1) { Name (_PRW, Package (0x02) // _PRW: Power Resources for Wake { 0x18, 0x03 }) } } Anyone able to explain how I would hot patch rather than load complete DSDT ? DSDT.aml.zip Edited September 18, 2019 by takeawaydave Link to comment https://www.insanelymac.com/forum/topic/340356-trying-to-load-adp1-ioreg-object/ Share on other sites More sharing options...
whatnameisit Posted September 19, 2019 Share Posted September 19, 2019 Look up hex and Rename AC__ to ADP1 in your config and add the SSDT. Post the original DSDT if it doesn't work. 1 Link to comment https://www.insanelymac.com/forum/topic/340356-trying-to-load-adp1-ioreg-object/#findComment-2690623 Share on other sites More sharing options...
takeawaydave Posted September 19, 2019 Author Share Posted September 19, 2019 DSDT.dsl.zip Thanks @displhehynehym here an unpatched DSDT with just a few corrections made so it compiles with Error. Link to comment https://www.insanelymac.com/forum/topic/340356-trying-to-load-adp1-ioreg-object/#findComment-2690646 Share on other sites More sharing options...
whatnameisit Posted September 19, 2019 Share Posted September 19, 2019 @takeawaydave Looks like the patch should work, and you haven't done what I've said. 1) Rename AC__ to ADP1 in your config.plist, and 2) use SSDT-ADP1.aml. 1) will get you to have ADP1 instead of AC in your IOReg. 2) will make ACPIACAdapter attach to ADP1. Here's how it works. 1) You have AC__ device in your DSDT, not ADP1. So you rename it either statically aka patch DSDT or via config.plist ACPI Rename. 2) Besides the name patch, there's also a content (Name (_PRW) to be added inside Device ADP1 (previously AC__). You add it statically by simply adding the content inside the device. With hotpatch, you add it via SSDT by declaring the scope and adding the patch content inside it. Here, scope means that the object ADP1 is at \_SB. With that alone, the SSDT does not know what kind of object it is. It is a device in the DSDT, so you declare it as a device object, or External(_SB.ADP1,DeviceObj). Look up the hex of AC__ and ADP1 and apply the patch in your config file. Use Clover Configurator, Hackintool, iasl decompile method (with iasl -l DSDT.aml), or any other methods you can find, but please do it yourself as I've said in the previous reply. 1 Link to comment https://www.insanelymac.com/forum/topic/340356-trying-to-load-adp1-ioreg-object/#findComment-2690672 Share on other sites More sharing options...
takeawaydave Posted September 19, 2019 Author Share Posted September 19, 2019 (edited) @displhehynehym Thanks for bearing with me and spelling out what I needed to do. All working as I wanted and I'm closer to understand this thing a bit more. Edited September 19, 2019 by takeawaydave 1 Link to comment https://www.insanelymac.com/forum/topic/340356-trying-to-load-adp1-ioreg-object/#findComment-2690678 Share on other sites More sharing options...
Recommended Posts