Contribute
Register

[solved] Compiling in MacASL: spits out 6 errors

Status
Not open for further replies.
Here you go: link

Looks fine as far as the _PRW methods, but each does call GPRW, which might be doing something funny...
Code:
        Method (GPRW, 2, NotSerialized)
        {
            Store (Arg0, Index (PRWP, Zero))
            Store (ShiftLeft (SS1, One), Local0)
            Or (Local0, ShiftLeft (SS2, 0x02), Local0)
            Or (Local0, ShiftLeft (SS3, 0x03), Local0)
            Or (Local0, ShiftLeft (SS4, 0x04), Local0)
            If (And (ShiftLeft (One, Arg1), Local0))
            {
                Store (Arg1, Index (PRWP, One))
            }
            Else
            {
                ShiftRight (Local0, One, Local0)
                FindSetLeftBit (Local0, Index (PRWP, One))
            }

            Return (PRWP)
        }

Suggest you use ACPIDebug to see what GRPRW is returning in each case of 0x6d use.

I use a brute-force technique where I rename GPRW to XPRW so I can override in an SSDT. See the hotpatch files here for example: https://github.com/RehabMan/OS-X-Clover-Laptop-Config
 
Looks fine as far as the _PRW methods, but each does call GPRW, which might be doing something funny...
Code:
        Method (GPRW, 2, NotSerialized)
        {
            Store (Arg0, Index (PRWP, Zero))
            Store (ShiftLeft (SS1, One), Local0)
            Or (Local0, ShiftLeft (SS2, 0x02), Local0)
            Or (Local0, ShiftLeft (SS3, 0x03), Local0)
            Or (Local0, ShiftLeft (SS4, 0x04), Local0)
            If (And (ShiftLeft (One, Arg1), Local0))
            {
                Store (Arg1, Index (PRWP, One))
            }
            Else
            {
                ShiftRight (Local0, One, Local0)
                FindSetLeftBit (Local0, Index (PRWP, One))
            }

            Return (PRWP)
        }

Suggest you use ACPIDebug to see what GRPRW is returning in each case of 0x6d use.

I use a brute-force technique where I rename GPRW to XPRW so I can override in an SSDT. See the hotpatch files here for example: https://github.com/RehabMan/OS-X-Clover-Laptop-Config

Applied debug.txt to my DSDT.aml
Installed ACPIDebug.kext using Kext Utility 2.6.5.

I don't understand how to rename GPRW to XPRW from the last part of what you said. Is it as straight forward as searching for "(GPRW," in MaciASL and renaming it to "(XPRW,"?

Edit: Nope, renaming "(GPRW," in MaciASL to "(XPRW," results in errors on compilation. Should I use a hotpatch? If so, which one from the repo?
 
Last edited:
Applied debug.txt to my DSDT.aml
Installed ACPIDebug.kext using Kext Utility 2.6.5.

I don't understand how to rename GPRW to XPRW from the last part of what you said. Is it as straight forward as searching for "(GPRW," in MaciASL and renaming it to "(XPRW,"?

Edit: Nope, renaming "(GPRW," in MaciASL to "(XPRW," results in errors on compilation. Should I use a hotpatch? If so, which one from the repo?

I do it with hotpatch (see files already referenced). Trying to do it with static patching would be different (you would have to use External to allow the compiler to resolve GPRW calls).
 
I do it with hotpatch (see files already referenced). Trying to do it with static patching would be different (you would have to use External to allow the compiler to resolve GPRW calls).

I looked a the files you referenced (https://github.com/RehabMan/OS-X-Clover-Laptop-Config), searched this forum for "hotpatch" and googled "hotpatch". But the process is still a big question mark for me so far.

What is a hotpatch? How do I use/apply a hotpatch? Do I use a premade hotpatch from the files you referenced (if so, which one?) or do I need to create my own? If I need to create my own, how can I do that?

If there's somewhere I can read up on hotpatches that I didn't manage to find, I'm more than happy to.

Apologies for the abundance of questions. I'm trying to learn how to do this.
 
I looked a the files you referenced (https://github.com/RehabMan/OS-X-Clover-Laptop-Config), searched this forum for "hotpatch" and googled "hotpatch". But the process is still a big question mark for me so far.

Look at the config.plist in the hotpatch directory. Look for the patches that have to do with GPRW. They are clearly commented.

And then look at the SSDT related to GPRW (named, unsurprisingly, SSDT-GPRW.dsl).
 
Look at the config.plist in the hotpatch directory. Look for the patches that have to do with GPRW. They are clearly commented.

And then look at the SSDT related to GPRW (named, unsurprisingly, SSDT-GPRW.dsl).

There is no SSDT-GPRW.dsl in https://github.com/RehabMan/OS-X-Clover-Laptop-Config. There is, however, a .dsl called SSDT-PRW.dsl (which seems to do what you were talking about "// In DSDT, native GPRW is renamed to XPRW with Clover binpatch."

How can I configure SSDT-Config.dsl. The referenced file states it's on a laptop.

Do I need to save SSDT-PRW.dsl and SSDT-Config.dsl to .aml and then put them in "EFI > CLOVER > ACPI > patched"?

Edit: Nope, can't be saved to .aml (error on compiling).
 
Last edited:
There is no SSDT-GPRW.dsl in https://github.com/RehabMan/OS-X-Clover-Laptop-Config. There is, however, a .dsl called SSDT-PRW.dsl (which seems to do what you were talking about "// In DSDT, native GPRW is renamed to XPRW with Clover binpatch."

Yes.

How can I configure SSDT-Config.dsl. The referenced file states it's on a laptop.

The comments in the file are clear. But there is no need for it as SSDT-PRW.dsl makes no reference to the items there.

Do I need to save SSDT-PRW.dsl and SSDT-Config.dsl to .aml and then put them in "EFI > CLOVER > ACPI > patched"?

No need for SSDT-Config.dsl in your case.

But to use SSDT-PRW.dsl:
- compile as AML
- place in ACPI/patched
- if you're using SortedOrder, make sure the file SSDT-PRW.aml is named there
- copy the appropriate PRW patch from hotpatch/config.plist/ACPI/DSDT/Patches to your own config.plist
- make sure the patch is enabled
- make sure the patch matches your DSDT (you should verify with a hex editor)
- test

Edit: Nope, can't be saved to .aml (error on compiling).

Indicates you're using the wrong tools. All my code uses ACPI 6.1.
 
Yes.



The comments in the file are clear. But there is no need for it as SSDT-PRW.dsl makes no reference to the items there.



No need for SSDT-Config.dsl in your case.

But to use SSDT-PRW.dsl:
- compile as AML
- place in ACPI/patched
- if you're using SortedOrder, make sure the file SSDT-PRW.aml is named there
- copy the appropriate PRW patch from hotpatch/config.plist/ACPI/DSDT/Patches to your own config.plist
- make sure the patch is enabled
- make sure the patch matches your DSDT (you should verify with a hex editor)
- test



Indicates you're using the wrong tools. All my code uses ACPI 6.1.

Trying to compile SSDT-PRW.dsl as AML. Error: "1 6126 Input file does not appear to be an ASL or data table source file".

Using MaciASL RM-1.31. ACPI 6.1 is active (preferences > compiler options). Used the same version previously to successfully compile DSDT.dsl. How can it be the wrong tool this time around?
 
Trying to compile SSDT-PRW.dsl as AML. Error: "1 6126 Input file does not appear to be an ASL or data table source file".

You must have downloaded it incorrectly. Perhaps you downloaded HTML...

No idea when you don't provide the file you're trying to compile.
 
Status
Not open for further replies.
Back
Top