Contribute
Register

[Guide] Using Clover to "hotpatch" ACPI

Help, I have tried to disable my discrete card by follow this because my laptop is consume much power and almost 1~1.5% drop per min when idling.
I follow the guide:
I have a _OFF method ***same as the post #3

Code:
Method (_OFF, 0, Serialized)  // _OFF: Power Off
        {
            If (LEqual (CTXT, Zero))
            {
                If (LNotEqual (GPRF, One))
                {
                    Store (VGAR, VGAB)
                }

                Store (One, CTXT)
            }

            PGOF (Zero)
        }

As same as #3, mine also don't have a _INI method, so i patch this:
Code:
DefinitionBlock ("", "SSDT", 2, "hack", "DGPU", 0x00000000)
{
    External (_SB_.PCI0.PEG0.PEGP._PS3, MethodObj)    // 0 Arguments (from opcode)

    Method (_SB.PCI0.PEG0.PEGP._INI, 0, NotSerialized)  // _INI: Initialize
    {
        _PS3 ()
    }
}

BUT the PGOF is not as same as the #3, mine is:
Code:
Method (PGOF, 1, Serialized)
        {
            Store (Arg0, PIOF)
            If (LEqual (PIOF, Zero))
            {
                If (LEqual (SGGP, Zero))
                {
                    Return (Zero)
                }
            }
            ElseIf (LEqual (PIOF, One))
            {
                If (LEqual (P1GP, Zero))
                {
                    Return (Zero)
                }
            }
            ElseIf (LEqual (PIOF, 0x02))
            {
                If (LEqual (P2GP, Zero))
                {
                    Return (Zero)
                }
            }

            Store (\XBAS, PEBA)
            Store (GDEV (PIOF), PDEV)
            Store (GFUN (PIOF), PFUN)
            If (LEqual (CCHK (PIOF, Zero), Zero))
            {
                Return (Zero)
            }

            Acquire (\_SB.PCI0.LPCB.EC0.CMUT, 0xFFFF)
            Store (0xC9, \_SB.PCI0.LPCB.EC0.BRAH)
            If (LNotEqual (And (\_SB.PCI0.LPCB.EC0.CNTD, 0x07), Zero))
            {
                Notify (\_SB.PCI0.PEG0.PEGP, 0xD1)
            }

            Release (\_SB.PCI0.LPCB.EC0.CMUT)
            Store (\_SB.PCI0.PEG0.LREN, \_SB.PCI0.PEG0.PEGP.LTRE)
            If (LEqual (Arg0, Zero))
            {
                Store (LCT0, ELC0)
                Store (S0VI, H0VI)
                Store (S0DI, H0DI)
                Store (LCP0, ECP0)
            }
            ElseIf (LEqual (Arg0, One))
            {
                Store (LCT1, ELC1)
                Store (S1VI, H1VI)
                Store (S1DI, H1DI)
                Store (LCP1, ECP1)
            }
            ElseIf (LEqual (Arg0, 0x02))
            {
                Store (LCT2, ELC2)
                Store (S2VI, H2VI)
                Store (S2DI, H2DI)
                Store (LCP2, ECP2)
            }

            RTDS (PIOF)
            If (LNotEqual (PBGE, Zero))
            {
                If (SBDL (PIOF))
                {
                    Store (GMXB (PIOF), MBDL)
                    PDUB (PIOF, MBDL)
                }
            }

            If (CondRefOf (SCLK))
            {
                SPCO (SCLK, Zero)
            }

            If (LEqual (Arg0, Zero))
            {
                Divide (\_SB.PCI0.PEG0.LNRD, 0x03E8, Local0, Local1)
                Sleep (Local1)
            }
            ElseIf (LEqual (Arg0, One))
            {
                Divide (\_SB.PCI0.PEG1.LNRD, 0x03E8, Local0, Local1)
                Sleep (Local1)
            }
            ElseIf (LEqual (Arg0, 0x02))
            {
                Divide (\_SB.PCI0.PEG2.LNRD, 0x03E8, Local0, Local1)
                Sleep (Local1)
            }

            GPPR (PIOF, Zero)
            DIWK (PIOF)
            Return (Zero)
        }

Apparently, there is EC code in my PGOF. I tried to patch myself with this code:
Code:
DefinitionBlock ("", "SSDT", 2, "hack", "DGPU", 0x00000000)
{
    External (_SB_.PCI0, DeviceObj)    // (from opcode)
    External (_SB_.PCI0.LPCB.EC0_, DeviceObj)    // (from opcode)
    External (_SB_.PCI0.LPCB.EC0_.CMUT, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.LPCB.EC0_.CNTD, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.LPCB.EC0_.XREG, MethodObj)    // 2 Arguments (from opcode)
    External (_SB_.PCI0.PEG0.LNRD, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PEG0.LREN, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PEG0.PEGP, UnknownObj)    // Warning: Unknown object
    External (_SB_.PCI0.PEG0.PEGP.LTRE, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PEG1.LNRD, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PEG2.LNRD, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.CCHK, MethodObj)    // 2 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.DIWK, MethodObj)    // 1 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.ECP0, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.ECP1, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.ECP2, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.ELC0, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.ELC1, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.ELC2, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.GDEV, MethodObj)    // 1 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.GFUN, MethodObj)    // 1 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.GMXB, MethodObj)    // 1 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.GPPR, MethodObj)    // 2 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.H0DI, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.H0VI, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.H1DI, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.H1VI, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.H2DI, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.H2VI, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.LCP0, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.LCP1, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.LCP2, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.LCT0, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.LCT1, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.LCT2, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.MBDL, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.P1GP, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.P2GP, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.PBGE, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.PDEV, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.PDUB, MethodObj)    // 2 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.PEBA, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.PFUN, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.PIOF, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.RTDS, MethodObj)    // 1 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.S0DI, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.S0VI, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.S1DI, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.S1VI, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.S2DI, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.S2VI, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.SBDL, MethodObj)    // 1 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.SCLK, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.SGGP, MethodObj)    // 0 Arguments (from opcode)
    External (_SB_.PCI0.PGOF.SPCO, MethodObj)    // 2 Arguments (from opcode)
    External (XBAS, MethodObj)    // 0 Arguments (from opcode)

    Scope (_SB.PCI0)
    {
        Method (PGOF, 1, Serialized)
        {
            Store (Arg0, PIOF ())
            If (LEqual (PIOF (), Zero))
            {
                If (LEqual (SGGP (), Zero))
                {
                    Return (Zero)
                }
            }
            ElseIf (LEqual (PIOF (), One))
            {
                If (LEqual (P1GP (), Zero))
                {
                    Return (Zero)
                }
            }
            ElseIf (LEqual (PIOF (), 0x02))
            {
                If (LEqual (P2GP (), Zero))
                {
                    Return (Zero)
                }
            }

            Store (\XBAS (), PEBA ())
            Store (GDEV (PIOF ()), PDEV ())
            Store (GFUN (PIOF ()), PFUN ())
            If (LEqual (CCHK (PIOF (), Zero), Zero))
            {
                Return (Zero)
            }

            Store (\_SB.PCI0.PEG0.LREN (), \_SB.PCI0.PEG0.PEGP.LTRE ())
            If (LEqual (Arg0, Zero))
            {
                Store (LCT0 (), ELC0 ())
                Store (S0VI (), H0VI ())
                Store (S0DI (), H0DI ())
                Store (LCP0 (), ECP0 ())
            }
            ElseIf (LEqual (Arg0, One))
            {
                Store (LCT1 (), ELC1 ())
                Store (S1VI (), H1VI ())
                Store (S1DI (), H1DI ())
                Store (LCP1 (), ECP1 ())
            }
            ElseIf (LEqual (Arg0, 0x02))
            {
                Store (LCT2 (), ELC2 ())
                Store (S2VI (), H2VI ())
                Store (S2DI (), H2DI ())
                Store (LCP2 (), ECP2 ())
            }

            RTDS (PIOF ())
            If (LNotEqual (PBGE (), Zero))
            {
                If (SBDL (PIOF ()))
                {
                    Store (GMXB (PIOF ()), MBDL ())
                    PDUB (PIOF (), MBDL ())
                }
            }

            If (CondRefOf (SCLK))
            {
                SPCO (SCLK (), Zero)
            }

            If (LEqual (Arg0, Zero))
            {
                Divide (\_SB.PCI0.PEG0.LNRD (), 0x03E8, Local0, Local1)
                Sleep (Local1)
            }
            ElseIf (LEqual (Arg0, One))
            {
                Divide (\_SB.PCI0.PEG1.LNRD (), 0x03E8, Local0, Local1)
                Sleep (Local1)
            }
            ElseIf (LEqual (Arg0, 0x02))
            {
                Divide (\_SB.PCI0.PEG2.LNRD (), 0x03E8, Local0, Local1)
                Sleep (Local1)
            }

            GPPR (PIOF (), Zero)
            DIWK (PIOF ())
            Return (Zero)
        }
    }

    Scope (_SB.PCI0.LPCB.EC0)
    {
        OperationRegion (RME3, EmbeddedControl, Zero, 0xFF)
        Method (_REG, 2, NotSerialized)  // _REG: Region Availability
        {
            XREG (Arg0, Arg1)
            If (LAnd (LEqual (0x03, Arg0), LEqual (One, Arg1)))
            {
                Acquire (\_SB.PCI0.LPCB.EC0.CMUT (), 0xFFFF)
                If (LNotEqual (And (\_SB.PCI0.LPCB.EC0.CNTD (), 0x07), Zero))
                {
                    Notify (\_SB.PCI0.PEG0.PEGP, 0xD1)
                }

                Release (\_SB.PCI0.LPCB.EC0.CMUT ())
            }
        }
    }
}
I save as SSDT.aml and put in EFI.
*But there is a compile error and i just "//" it below Acquire (\_SB.PCI0.LPCB.EC0.CMUT (), 0xFFFF) line.
Result: The discrete card doesn't turn off and the fan still running.
I am almost desperate because of worse battery life, Any fix or mistake?
 
I found what I think is an inconsistency in Rehabman's USB Instant Wake patch described in Post #1 of this thread. At first, Rehabman describes the Instant Wake patch as replacing

Code:
            Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (GPRW (0x6D, 0x03))
            }

with

Code:
            Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (GPRW (0x6D, 0))
            }

which does NOT prevent USB wake on my TH55HD Socket 1156 motherboard.

Later in the same post, Rehabman describes the USB Instant Wake fix as a modification of Method (GPRW), inserting "If (0x6d == Arg0) { Return(Package() { 0x6d, 0, }) }" as follows:

Code:
Method(GPRW, 2)
{
    If (0x6d == Arg0) { Return(Package() { 0x6d, 0, }) }
    External(\XPRW, MethodObj)
    Return(XPRW(Arg0, Arg1))
}

which causes Method (GPRW) to exit prematurely with a simple return of "Package () {0x6d, 0}" when Arg0 is 0x6d. This fix DOES WORK on my TH55HD motherboard.

Since I will always doubt myself first before questioning Rehabman, what about Rehabman's USB Instant Wake fix am I reading incorrectly? Is he actually proposing two different possibilities, or is this in fact an inconsistency in his direction?

Note that if I manually patch my DSDT and perform the following replacement (which mimics Rehabman's modification of Method (GPRW), USB Wake is prevented on my TH55HD motherboard:

Replace

Code:
            Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (GPRW (0x0D, 0x04))
            }

with

Code:
            Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (Package () {0x0D, 0x00})
            }
 
I found what I think is an inconsistency in Rehabman's USB Instant Wake patch described in Post #1 of this thread. At first, Rehabman describes the Instant Wake patch as replacing

Code:
            Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (GPRW (0x6D, 0x03))
            }

with

Code:
            Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (GPRW (0x6D, 0))
            }

which does NOT prevent USB wake on my TH55HD Socket 1156 motherboard.

Later in the same post, Rehabman describes the USB Instant Wake fix as a modification of Method (GPRW), inserting "If (0x6d == Arg0) { Return(Package() { 0x6d, 0, }) }" as follows:

Code:
Method(GPRW, 2)
{
    If (0x6d == Arg0) { Return(Package() { 0x6d, 0, }) }
    External(\XPRW, MethodObj)
    Return(XPRW(Arg0, Arg1))
}

which causes Method (GPRW) to exit prematurely with a simple return of "Package () {0x6d, 0}" when Arg0 is 0x6d. This fix DOES WORK on my TH55HD motherboard.

Since I will always doubt myself first before questioning Rehabman, what about Rehabman's USB Instant Wake fix am I reading incorrectly? Is he actually proposing two different possibilities, or is this in fact an inconsistency in his direction?

Note that if I manually patch my DSDT and perform the following replacement (which mimics Rehabman's modification of Method (GPRW), USB Wake is prevented on my TH55HD motherboard:

Replace

Code:
            Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (GPRW (0x0D, 0x04))
            }

with

Code:
            Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake
            {
                Return (Package () {0x0D, 0x00})
            }

Here, in his guide, he is actually renaming the GPRW to make it unreachable as XPRW and then setting it up a new one.

Your H55 chipset is from 2010 and may have an EHCI controller (Device ID - 8086:3b3c) or it may be one of the earlier types. I'm not certain.

He states that _PRW method might read "0x03". There's no problem with it actually being "0x04" instead :thumbup:
 
@UtterDisbelief I simplified my paraphrasing to keep it short and left out details; however, do you agree that regardless of whether the pair is (0x6d, 0x03) or (0x0d, 0x04), the replacement of 0x03 or 0x04 with 0x00 is not the same as changing Method (GPRW) to return Package () {0x6d, 0x00}?

EDIT: The reason that Rehabman's first fix (simple replacement of "Return (GPRW(0x6d, 0x03)" with "Return (GPRW(0x6d, 0x00))" does NOT work on my motherboard, is that the Method (GPRW) still does stuff when called with Arg1 = 0x00). With Rehabman's second fix (changing Method (GPRW)), Method (GPRW) is not executed when Arg0 is 0x6d (and Package () {0x6d, 0x00} is returned instead).
 
Last edited:
@UtterDisbelief I simplified my paraphrasing to keep it short and left out details; however, do you agree that regardless of whether the pair is (0x6d, 0x03) or (0x0d, 0x04), the replacement of 0x03 or 0x04 with 0x00 is not the same as changing Method (GPRW) to return Package () {0x6d, 0x00}?

EDIT: The reason that Rehabman's first fix (simple replacement of "Return (GPRW(0x6d, 0x03)" with "Return (GPRW(0x6d, 0x00))" does NOT work on my motherboard, is that the Method (GPRW) still does stuff when called with Arg1 = 0x00). With Rehabman's second fix (changing Method (GPRW)), Method (GPRW) is not executed when Arg0 is 0x6d (and Package () {0x6d, 0x00} is returned instead).

It may not work for your motherboard, I understand that because, as I mention above, it isn't a well-studied one. By changing the method rather than each individual call site, the suggestion is to send other calls to the non-existent XPRW which also returns "0". I don't think it is the same because you need 0x6d to have an initial value for the Return to be changed to 0 by the function. By doing this wake should not occur. In theory ...

Sorry I don't have experience of your particular motherboard.
 
Sorry I don't have experience of your particular motherboard.

I don't yet have experience with newer systems, so no apology necessary - I'm the limitation here, not you. Thank you for your reply! If the simple replacement of "Return (GPRW(0x0D, 0x04))" with "Return (GPRW(0x0D, 0x00))" works on newer systems, it's because Method (GPRW) doesn't do a bunch of stuff like my THD55HD GPRW(). I have a newer HP EliteDesk 800 G4 (I7-8700T, 32GB RAM, UHD630, 3 DP) that I'm going to be tinkering with, so that will be my first attempt at hacking something newer than Intel Series 5.

My Post #538 in this thread is likely to be helpful only to those with old systems like me.
 
Hi,RehabMan
I get some trouble on create hotpatch for my I2C touchpad. Problem report files attached bellow. Could you have a look, Many thanks!
Here's my Hardware info:
Mac OS X version: 10.15.4 (19E266)
Clover version: 5108
CPU : Intel i5-6300HQ Skylake
I2C device name in ACPI: TPD1

I Have got touchpad worked with VoodooI2C by patched in DSDT.aml, GPIO pin using 0x001B, the IORegistryExplorer files is DSDT_I2C-worked in zip file.
After successes DSDT patched, I try to create my customed hotpatch:
I'm try to rename the origin TPD1 device to XPD1、 rename I2C0 to I2X0, then create new I2C0 an TPD1 device in modify SSDT-I2C.aml. As the result, rename I2C0 to I2X0 successed, but faile to create the new I2C0 device.

Here's the output in terminal:
Bash:
$ kextstat|grep -y acpiplat
   16    2 0xffffff7f838bf000 0x9b000    0x9b000    com.apple.driver.AppleACPIPlatform (6.1) 06B0C2E0-18E0-3E3B-8A46-17BF2A713C34 <15 13 12 8 7 6 5 3 1>
$ kextstat|grep -y appleintelcpu

$ kextstat|grep -y applelpc

$ sudo touch /System/Library/Extensions && sudo kextcache -u /
Warning: /AppleInternal/Library/Extensions: No such file or directory
Kext with invalid signature (-67062) allowed: <OSKext 0x7fb701c2e4b0 [0x7fff8d2f28c0]> { URL = "file:///Library/Extensions/BrcmPatchRAM2.kext/", ID = "com.no-one.BrcmPatchRAM2" }
Kext with invalid signature (-67062) allowed: <OSKext 0x7fb701c2a690 [0x7fff8d2f28c0]> { URL = "file:///Library/Extensions/BrcmFirmwareRepo.kext/", ID = "com.no-one.BrcmFirmwareStore" }
Kext with invalid signature (-67062) allowed: <OSKext 0x7fb701c26ad0 [0x7fff8d2f28c0]> { URL = "file:///Library/Extensions/BrcmBluetoothInjector.kext/", ID = "org.rehabman.injector.BrcmBluetoothInjector" }
Kext with invalid signature (-67062) allowed: <OSKext 0x7fb701c13100 [0x7fff8d2f28c0]> { URL = "file:///Library/Extensions/CodecCommander.kext/", ID = "org.tw.CodecCommander" }
Kext with invalid signature (-67062) allowed: <OSKext 0x7fb701c0ff30 [0x7fff8d2f28c0]> { URL = "file:///Library/Extensions/BrcmFirmwareData.kext/", ID = "com.no-one.BrcmFirmwareStore" }
KernelCache ID: 17371114075852C873BA747E235649C7
 

Attachments

  • RehabMan.zip
    59.4 KB · Views: 138
  • I2C_worked_DSDT_CLOVER.zip
    2.5 MB · Views: 125
  • IORegistryExplorer.zip
    1.4 MB · Views: 107
  • Hotpatch_CLOVER.zip
    2.4 MB · Views: 126
Hi,RehabMan
I get some trouble on create hotpatch for my I2C touchpad. Problem report files attached bellow. Could you have a look, Many thanks!
Here's my Hardware info:
Mac OS X version: 10.15.4 (19E266)
Clover version: 5108
CPU : Intel i5-6300HQ Skylake
I2C device name in ACPI: TPD1

I Have got touchpad worked with VoodooI2C by patched in DSDT.aml, GPIO pin using 0x001B, the IORegistryExplorer files is DSDT_I2C-worked in zip file.
After successes DSDT patched, I try to create my customed hotpatch:
I'm try to rename the origin TPD1 device to XPD1、 rename I2C0 to I2X0, then create new I2C0 an TPD1 device in modify SSDT-I2C.aml. As the result, rename I2C0 to I2X0 successed, but faile to create the new I2C0 device.

Here's the output in terminal:
Bash:
$ kextstat|grep -y acpiplat
   16    2 0xffffff7f838bf000 0x9b000    0x9b000    com.apple.driver.AppleACPIPlatform (6.1) 06B0C2E0-18E0-3E3B-8A46-17BF2A713C34 <15 13 12 8 7 6 5 3 1>
$ kextstat|grep -y appleintelcpu

$ kextstat|grep -y applelpc

$ sudo touch /System/Library/Extensions && sudo kextcache -u /
Warning: /AppleInternal/Library/Extensions: No such file or directory
Kext with invalid signature (-67062) allowed: <OSKext 0x7fb701c2e4b0 [0x7fff8d2f28c0]> { URL = "file:///Library/Extensions/BrcmPatchRAM2.kext/", ID = "com.no-one.BrcmPatchRAM2" }
Kext with invalid signature (-67062) allowed: <OSKext 0x7fb701c2a690 [0x7fff8d2f28c0]> { URL = "file:///Library/Extensions/BrcmFirmwareRepo.kext/", ID = "com.no-one.BrcmFirmwareStore" }
Kext with invalid signature (-67062) allowed: <OSKext 0x7fb701c26ad0 [0x7fff8d2f28c0]> { URL = "file:///Library/Extensions/BrcmBluetoothInjector.kext/", ID = "org.rehabman.injector.BrcmBluetoothInjector" }
Kext with invalid signature (-67062) allowed: <OSKext 0x7fb701c13100 [0x7fff8d2f28c0]> { URL = "file:///Library/Extensions/CodecCommander.kext/", ID = "org.tw.CodecCommander" }
Kext with invalid signature (-67062) allowed: <OSKext 0x7fb701c0ff30 [0x7fff8d2f28c0]> { URL = "file:///Library/Extensions/BrcmFirmwareData.kext/", ID = "com.no-one.BrcmFirmwareStore" }
KernelCache ID: 17371114075852C873BA747E235649C7
I used the attached to hotpatch my I2C device and the following renames in config.plist
Code:
<dict>
                    <key>Comment</key>
                    <string>_SB.PCI0.I2C1.ETPD._CRS to _SB.PCI0.I2C1.ETPD.XCRS</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    oAp7RFNZTgEApACkCg8UEV9DUlMApIRTQkZC
                    U0JGSQA=
                    </data>
                    <key>Replace</key>
                    <data>
                    oAp7RFNZTgEApACkCg8UEVhDUlMApIRTQkZC
                    U0JGSQA=
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>GPIO._STA to GPIO.XSTA</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    X1NUQQCgCZNTQlJHAA==
                    </data>
                    <key>Replace</key>
                    <data>
                    WFNUQQCgCZNTQlJHAA==
                    </data>
                </dict>

you my need to play around with the code to your needs
 

Attachments

  • SSDT-ETPD.aml
    239 bytes · Views: 158
I used the attached to hotpatch my I2C device and the following renames in config.plist
Code:
<dict>
                    <key>Comment</key>
                    <string>_SB.PCI0.I2C1.ETPD._CRS to _SB.PCI0.I2C1.ETPD.XCRS</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    oAp7RFNZTgEApACkCg8UEV9DUlMApIRTQkZC
                    U0JGSQA=
                    </data>
                    <key>Replace</key>
                    <data>
                    oAp7RFNZTgEApACkCg8UEVhDUlMApIRTQkZC
                    U0JGSQA=
                    </data>
                </dict>
                <dict>
                    <key>Comment</key>
                    <string>GPIO._STA to GPIO.XSTA</string>
                    <key>Disabled</key>
                    <false/>
                    <key>Find</key>
                    <data>
                    X1NUQQCgCZNTQlJHAA==
                    </data>
                    <key>Replace</key>
                    <data>
                    WFNUQQCgCZNTQlJHAA==
                    </data>
                </dict>

you my need to play around with the code to your needs
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."
 

Attachments

  • DSDT.dsl
    799 KB · Views: 117
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."
you can also search for TPD1 for example:

Code:
Device (TPD1)
        {
            Name (HID2, Zero)
            Name (SBFB, ResourceTemplate ()
            {
                I2cSerialBusV2 (0x0015, ControllerInitiated, 0x00061A80,
                    AddressingMode7Bit, "\\_SB.PCI0.I2C0",
                    0x00, ResourceConsumer, , Exclusive,
                    )
            })
            Name (SBFI, ResourceTemplate ()
            {
                Interrupt (ResourceConsumer, Level, ActiveLow, ExclusiveAndWake, ,, _Y25)
                {
                    0x00000000,
                }
            })
            Name (SBFG, ResourceTemplate ()
            {
                GpioInt (Level, ActiveLow, ExclusiveAndWake, PullDefault, 0x0000,
                    "\\_SB.PCI0.GPI0", 0x00, ResourceConsumer, ,
                    )
                    {   // Pin list
                        0x0000
                    }
            })
            CreateWordField (SBFG, 0x17, INT1)
            CreateDWordField (SBFI, \_SB.PCI0.I2C0.TPD1._Y25._INT, INT2)  // _INT: Interrupts
 
Back
Top