Contribute
Register

[solved] Compiling in MacASL: spits out 6 errors

Status
Not open for further replies.
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.

  • Compiled as ASL
  • Placed in ACPI > patched
  • Not sure if I'm using SortedOrder, renamed the file SSDT-1.aml
  • Copied the appropriate patch in my config.plist
Now for the last 2 steps before testing can commence: How do I enable the patch (is it by using a "boot arg")? And what should I look for in the DSDT with a hex editor (Hex Fiend)?
 
Now for the last 2 steps before testing can commence: How do I enable the patch (is it by using a "boot arg")?

No boot arg. If you look at the patch carefully in hotpatch/config.plist, you will see it is disabled by default... Need to change Disable=true to Disable=false.

And what should I look for in the DSDT with a hex editor (Hex Fiend)?

Look for the hex "Find" data. If your GPRW is marked NotSerialized, it should match.
 
No boot arg. If you look at the patch carefully in hotpatch/config.plist, you will see it is disabled by default... Need to change Disable=true to Disable=false.



Look for the hex "Find" data. If your GPRW is marked NotSerialized, it should match.

Great. Patch is enabled.

Hex Fiend allows for searching Hex and Text. If I need to search for a hex value, how can I determine the value I should look for (by opening DSDT in MaciASL?)? Or should I search for text? If I search for "GPRW" Hex Fiend finds many Hex values.

Edit: when searching for "Method (GPRW, 2, NotSerialized)" in Hex Fiend, the program says in cannot be found.

Edit2: 1 sec, let me try searching for the "data" in the patch.

Edit3: Nope, Hex Fiend can't find anything for "WFBSVwI=" or "R1BSVwI=".
 
Last edited:
Hex Fiend allows for searching Hex and Text. If I need to search for a hex value, how can I determine the value I should look for (by opening DSDT in MaciASL?)? Or should I search for text? If I search for "GPRW" Hex Fiend finds many Hex values.

You search for the hex string identified by "Find" in the patch, of course.

Edit: when searching for "Method (GPRW, 2, NotSerialized)" in Hex Fiend, the program says in cannot be found.

As should be expected. AML is ASL source compiled into byte code. You should not expect to find the source code in the binary. If you're curious about the AML binary format, read the ACPI spec.
Edit2: 1 sec, let me try searching for the "data" in the patch.

Edit3: Nope, Hex Fiend can't find anything for "WFBSVwI=" or "R1BSVwI=".

As expected. You should not expect to find the base64 encoded data in the binary. Use a plist editor to look at your config.plist (you should never edit your config.plist with a text editor) and you'll see the hex "Find" data quite clearly.
 
You search for the hex string identified by "Find" in the patch, of course.



As should be expected. AML is ASL source compiled into byte code. You should not expect to find the source code in the binary. If you're curious about the AML binary format, read the ACPI spec.


As expected. You should not expect to find the base64 encoded data in the binary. Use a plist editor to look at your config.plist (you should never edit your config.plist with a text editor) and you'll see the hex "Find" data quite clearly.

Downloading Xcode right now as using that seems to allow for poper .plist editing. The download is quite big and the speed from Apple's servers isn't the best right now. I will let it download and then resume and report back tomorrow.
 
Downloading Xcode right now as using that seems to allow for poper .plist editing. The download is quite big and the speed from Apple's servers isn't the best right now. I will let it download and then resume and report back tomorrow.

Yes... I use Xcode because I need it for other things. You could also use PlistEdit Pro.

Note also that you can convert base64 to hex with Terminal:
Code:
echo -n WFBSVwI=|base64 --decode|xxd
echo -n R1BSVwI=|base64 --decode|xxd

Result:
Code:
SPEEDY-OSX:~ RehabMan$ echo -n WFBSVwI=|base64 --decode|xxd
0000000: 5850 5257 02                             XPRW.
SPEEDY-OSX:~ RehabMan$ echo -n R1BSVwI=|base64 --decode|xxd
0000000: 4750 5257 02                             GPRW.

Note: No sense in searching for the "Replace" string...
 
Yes... I use Xcode because I need it for other things. You could also use PlistEdit Pro.

Note also that you can convert base64 to hex with Terminal:
Code:
echo -n WFBSVwI=|base64 --decode|xxd
echo -n R1BSVwI=|base64 --decode|xxd

Result:
Code:
SPEEDY-OSX:~ RehabMan$ echo -n WFBSVwI=|base64 --decode|xxd
0000000: 5850 5257 02                             XPRW.
SPEEDY-OSX:~ RehabMan$ echo -n R1BSVwI=|base64 --decode|xxd
0000000: 4750 5257 02                             GPRW.

Note: No sense in searching for the "Replace" string...

Thanks for the tip. I didn't know that.

I used Xcode to properly place the patch in my config.plist. For "Find" Data it says "47505257 02". When I search for that in my DSDT with Hex Fiend it just says "GPRW". I don't see "NotSerialized" (image down below). Can I - based on that fact - make the conclusion the patch is not suitable for my DSDT?

View media item 187002
 
Last edited:
Thanks for the tip. I didn't know that.

I used Xcode to properly place the patch in my config.plist. For "Find" Data it says "47505257 02". When I search for that in my DSDT with Hex Fiend it just says "GPRW". I don't see "NotSerialized" (image down below). Can I - based on that fact - make the conclusion the patch is not suitable for my DSDT?

View media item 187002

4750525702 is the AML encoding for a method named GPRW, 2 parameteters, NotSerialized. You can read about it in the ACPI spec.

If you find only one instance of it in your DSDT.aml, you know the patch will successfully change the name to XPRW, which is what we want...
 
Status
Not open for further replies.
Back
Top