Help - Search - Members - Calendar
Full Version: DSDT disass+compile: newer IASL=less compile errors+more opti
InsanelyMac Forum > OSx86 Project > New Releases and Updates
mitch_de
DL link to newest iasl at end of this post.
LASTEST NOW: V2009_11_12
: November 2009 Version
Intel ACPI Component Architecture
ASL Optimizing Compiler version 20091112 [Nov 13 2009]
Copyright © 2000 - 2009 Intel Corporation
Supports ACPI Specification Revision 4.0


Also updated iASLme with that iasl version:
-- iASL Me v1.2 2009 by cVad --
- (De)Compiling ASL <-> AML files -
- ASL Optimizing Compiler version 20091112 [Nov 13 2009] inside -




SUMMARY of why using newer iasl:
Newer versions of iasl (and iaslMe with newer iasl) help to get dsdt.dsl source complied or getting much less compile errors.
It will NOT help to avoid os x specidic problems like sleep, usb, cpu=1 : therefore you need adding known dsdt source patching by changes of dsdt source and/or dsdt device injection code.

Hi,
i was a bit ??? as i see in an DSDT of an other users didnt have the well known _WAK compile error fix in his _WAK part of dsdt.
The fix adds some return values at the end to avoid the "has no return values error" on compiling the .dsl to .aml
My _WAK part can look now :
CODE
....
}
Notify (\_SB.PCI0.USB0, Zero)
Notify (\_SB.PCI0.USB1, Zero)
Notify (\_SB.PCI0.USB2, Zero)
Notify (\_SB.PCI0.USB3, Zero)
Notify (\_SB.PCI0.USB4, Zero)
Notify (\_SB.PCI0.USB5, Zero)
}


No more compile error (needed return .... after last notify..)
So i used an newer iasl version - and : really no more _WAK fix needed to avoid compile error = only warning (=you get an dsdt.aml)!
iasl itself gets updated often (by intel) so you may update yours also .
Lots of fixes between newer and older (2007/2008 versions most here will use!)
iaslme tool, which is really easy to use:
drag&drop your .dsl on iaslme = compiled .aml in an session subfolder with errorlog
drag&drop your .aml on iaslme = disassembled .dsl

If you want the iasl as commandline itself you can simple show packadge content / ressources and use that .

DL: (i update here the dl links if needed)

Showcase latest 20091013 run:
CODE

-- iASL Me v1.2 2009 by cVad --
- (De)Compiling ASL <-> AML files -
- ASL Optimizing Compiler version 20091013 [Oct 15 2009] inside -
www.applelife.ru
www.torrentmac.ru

ProductName: Mac OS X ProductVersion: 10.5.8 BuildVersion: 9L30
Kernel: Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009
Bootargs: rd=*uuid macmodel=iMac5,1 boot-uuid=2AE854F4-7DFC-387E-989F-79FA7232DB47
Model ID: iMac5,1
CPU TYPE: Intel® Core™2 Duo CPU E7300 @ 2.66GHz
Core: 3000(3000) MHz x 9.0(9.0) Bus: 333 MHz FSB: 1332 MHz
RAM: 4096 Mb
SwapUsage: total = 64.00M used = 0.00M free = 64.00M
HibernateMode: 0
User: ami on HSI-KBW-078-042-000-123.hsi3.kabel-badenwuerttemberg.de
Start working: Thu Oct 15 07:34:05 CEST 2009
MAC OS X "Leopard" detected ...
Task: Compile
"/Users/ami/Desktop/iASLMe.v1.2.20091013/DSDT.dsl"
to
"/Users/ami/Desktop/iASLMe.v1.2.20091013/Sessions/2009-10-15-073405/DSDT.aml"
Start working ...
Compiling ... Done.

Intel ACPI Component Architecture
ASL Optimizing Compiler version 20091013 [Oct 15 2009]
Copyright © 2000 - 2009 Intel Corporation
Supports ACPI Specification Revision 4.0
.... (warnings)
Elapsed time for major events
Miscellaneous compile statistics
8817 : Parse nodes
1684 : Namespace searches
590 : Named objects
162 : Control methods
376 : Memory Allocations
1447130 : Total allocated memory
0 : Constant subtrees folded
ASL Input: /Users/ami/Desktop/iASLMe.v1.2.20091013/DSDT.dsl - 5305 lines, 170074 bytes, 2131 keywords
AML Output: /Users/ami/Desktop/iASLMe.v1.2.20091013/Sessions/2009-10-15-073405/DSDT.aml - 17230 bytes, 590 named objects, 1541 executable opcodes
Compilation complete. 0 Errors, 1 Warnings, 0 Remarks, 15 Optimizations
All done.
Enjoy ...



iasl , compiled end of september 2009 / iasl 2009 09 03
iaslme (newest with iasl 2009 09 03), from some kind dev: an really easy to to use that iasl commandline tool: drag&drop .dsl on it > .aml (or error wink.gif ), drag&drop an .aml > dsl
dubhead
Thanks mitch_de for the Heads up on the subject!!
cVaD
Click to view attachment

Now the version of included IASL is displayed in the header.
You can safely update the version of yourself.

Click to view attachment
blackosx
Thanks mitch and cVaD

Great smile.gif
Konami®
Thank you guys!
ZenGiga
QUOTE (mitch_de @ Sep 28 2009, 07:15 AM) *
No more compile error (needed return .... after last notify..)

Maybe no errors, but still a warning?

/Users/Admin/Hackintosh/DSDT tools and info/dsdt.dsl 255: Method (_WAK, 1, NotSerialized)
Warning 1080 - Reserved method must return a value ^ (_WAK)


Can I ignore that or am I doing something wrong?
dsdt.aml was generated with patcher02b5 and disassembled/compiled with cVaD's linked update.
ZenGiga
QUOTE (ZenGiga @ Sep 29 2009, 02:35 PM) *
Can I ignore that or am I doing something wrong?

So I ignored the warning, it works fine smile.gif Thanks.
thiagomorales
If you want iASL binary only, get here below, or compile it yourself.

1. You need xCode installed
2. Get the current source from http://www.acpica.org/downloads/unix_source_code.php
3. Get the 20081031 source from http://www.acpica.org/downloads/acpica-unix-20081031.php
4. Open Terminal, change dir to where you want to have your source code.
5. Extract the source tarballs into separate directories by running
CODE
tar xf ~/Downloads/iasl-20090521/acpica-unix-20090521.tar
    tar xf ~/Downloads/iasl-20090521/acpica-unix-20081031.tar

6. Define shorthands for later use:
CODE
export WORKING="`pwd`/acpica-unix-20081031"
    export CURRENT="`pwd`/acpica-unix-20090521"

7. Run
CODE
cp -p "$WORKING/osunixxf.c" "$CURRENT/osunixxf.c"

8. Edit "$CURRENT/include/platform/aclinux.h": Replace line 163, which reads

CODE
#define ACPI_THREAD_ID              pthread_t
by
CODE
#define ACPI_THREAD_ID              void *

9. Change directory to "$CURRENT/compiler" and run the following command.
CODE
make LDLIBS=''

10. Now you should have a file called "iasl" in "$CURRENT/compiler". This is your ASL compiler biggrin.gif .
CODE
Intel ACPI Component Architecture
   ASL Optimizing Compiler version 20090521 [Jun 16 2009]
   Copyright © 2000 - 2009 Intel Corporation
   Supports ACPI Specification Revision 3.0a


For iasl Sept-03-2009 version need replace osunixxf.c instead of osunix.c ..
lord_webi
and why is date of iasl after decrompressing 28.01.2009 ???
mitch_de
Someones birthday wink.gif smile.gif - I dont know.
FormerlyKnownAs
QUOTE (mitch_de @ Sep 29 2009, 05:46 PM) *
Someones birthday wink.gif smile.gif - I dont know.


lol - cheers mitch_de
asstastic
Thanks for making the latest binaries available. I should be able to compile a error-free DSDT now. The DSDT GUI tool comes with a pretty old version of iasl that throws up a lot of errors over pretty trivial coding laziness.
cVaD
QUOTE (asstastic @ Sep 29 2009, 10:25 PM) *
...
The DSDT GUI tool comes with a pretty old version of iasl that throws up a lot of errors over pretty trivial coding laziness.


Why not just update the iasl version in the tool?
digital_dreamer
Thanks for this update, guys!

regards,
MAJ
np_
QUOTE (thiagomorales @ Sep 29 2009, 01:21 PM) *
8. Edit "$CURRENT/include/platform/aclinux.h": Replace line 163, which reads


or correct way

add after line 158 (#include <unisdt.h>)
#include <pthread.h>

and edit "osunixxf.c" function "AcpiOsGetThreadID()

replace line 1110 "return getpid());" with "return (pthread_self());"


rest same

mitch_de
Thanks !
Hint point 6. export CURRENT="`pwd`/acpica-unix-20090521"

I did dump an export CURRENT="`pwd`/acpica-unix-20090521" - sure not working (Point 7 cp ... fails) , because that current source daily/weekly... changes - so change also that last 4 month+day numbers

"10. Now you should have a file called "iasl" in "$CURRENT/compiler". This is your ASL compiler smile.gif "
YEAH! (screenshoot = compiled result = ready to rubmle wink.gif
THANKS for that step by step how to dl + compile !

EDIT: I edited the second thread information line to : newest iasl here and also made an dl share for newest iasl (compiled) and that posted iaslme tool (within 0903 iasl) there.
So community must not search all postings for newest version.
Maybe useful to make that iasl (DSDT) thread sticky by someone of the mods.
MuppMan
A stupid question perhaps, but how do I check if the DSDT.aml is loaded or not ? Is there a terminal command ? 

Thanks!




Beerkex'd
Extract DSDT under OSX and compare it to your non-patched DSDT.
geekstinator
QUOTE (Beerkex'd @ Oct 5 2009, 10:40 AM) *
Extract DSDT under OSX and compare it to your non-patched DSDT.


How do you extract the DSDT under OSX? Noob question I know, but I don't know how.
Beerkex'd
You can use fassl's DSDT Patcher or DSDTSE.

There's also a script floating around that will work.
GoodWorld
Hey, I would like to get my rtl 8139 family dsdt.dsl.

What should I modify ?


CODE
==============================================================
credit to mitch_de, I got from mitch_de's patched DSDT.


            Device (LAN0)
                {
                    Name (_ADR, 0x00)
                    Name (_PRW, Package (0x02)
                    {
                        0x0B,
                        0x04
                    })
                    Method (_DSM, 4, NotSerialized)
                    {
                        Store (Package (0x04)
                            {
                                "built-in",
                                Buffer (0x01)
                                {
                                    0x01
                                },

                                "device_type",
                                Buffer (0x09)
                                {
                                    "ethernet"
                                }
                            }, Local0)
                        DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                        Return (Local0)
                    }
                }


========================================================

mitch_de
First you must know what name your LAN device has in the DSDT. You can look in the IORegistryExplorer and look where the lan drivers are listed.

Then you can use:
CODE
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x04)
{
"built-in",
Buffer (0x01)
{
0x01
},

"device_type",
Buffer (0x09)
{
"ethernet"
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}


In the Device (yours) part add that code above - thats all. There is no special code for exact lan chip device ID needed.
Also some PCI EFI bootloaders have on boot option to set lan to build in also (does same as that above).
If you already have that method DTGP in use (for other injextions) that all. If no DTGP you must first add this method into DSDT.
But for further Q&A please use one of the DSDT threads in the forum part Genuis (all how tos are there).
leclercqr
Guys,

Thanks for the updated 'iasl'. I'm pretty new to DSDT hacking so please excuse my ignorance.

I extracted a unpatched DSDT.dsl using 'Patcher02Beta' applied the RTC fix for Snow Leopard and changed 'AZAL' to 'HDEF' (two places) just to start off. With the version of 'iasl' I had it returned over 200 error and didn't list them but with the new on it returned only 2 (Local0) errors and the _WAK warning.

While this is great because it won't take long to get a compilable DSDT.dsl should I be concerned about where the other 198+ errors went or is the new 'iasl' just that much better?

Thanks
mitch_de
I would say (my opinion) that we must see two different things comparing newer iasl and older ones:
1. The fix of compiler errors, handling of "not good" dsdt source code = getting complied or not
and
2. The result in working / praktical way of an compiled dsdt
I think that if an dsdt source getting compiled (no errors by lots of workarounds: older iasl / less workarounds newer iasl) the result (woring) is the same.

So major benefit of newer iasl is getting dsdt compiled easier (less errors) and not getting an "better working" dsdt.aml. I dont think that problems with sleep,... getting fixed with newer iasl vs older one.

last but not least : UPDATED IASL + iaslME to 20091013 Version smile.gif
d00d
QUOTE (thiagomorales @ Sep 29 2009, 11:21 AM) *
9. Change directory to "$CURRENT/compiler" and run the following command.
CODE
make LDLIBS=''

This gives a 64 bit binary, to get a 32 bit one use;
make LDLIBS='' CC='cc -m32'
mitch_de
updated - DL at first post !!!
Intel ACPI Component Architecture
ASL Optimizing Compiler version 20091112 [Nov 13 2009]
Copyright © 2000 - 2009 Intel Corporation
Supports ACPI Specification Revision 4.0

Also updated iASLme with that iasl version:
-- iASL Me v1.2 2009 by cVad --
- (De)Compiling ASL <-> AML files -
- ASL Optimizing Compiler version 20091112 [Nov 13 2009] inside -
blackosx
QUOTE (mitch_de @ Nov 13 2009, 07:27 AM) *
updated - DL at first post !!!
Intel ACPI Component Architecture
ASL Optimizing Compiler version 20091112 [Nov 13 2009]
Copyright © 2000 - 2009 Intel Corporation
Supports ACPI Specification Revision 4.0

Also updated iASLme with that iasl version:
-- iASL Me v1.2 2009 by cVad --
- (De)Compiling ASL <-> AML files -
- ASL Optimizing Compiler version 20091112 [Nov 13 2009] inside -

Thanks mitch_de. Good to see you keeping this up to date smile.gif
mitch_de
biggrin.gif , Thanks.
But i cant garantie that i will be every time sooo fast : Only a few hours after orig. Source update , you got the OS X version too wink.gif
LS8
Can I use the old DSDT patcher version 1.0.1e and just replace the iasl binary in it? Or is therea better / newer / recommender DSDT maker front-end? Thank you!
mitch_de
QUOTE (LS8 @ Nov 18 2009, 02:10 PM) *
Can I use the old DSDT patcher version 1.0.1e and just replace the iasl binary in it? Or is therea better / newer / recommender DSDT maker front-end? Thank you!

Sure, it should work to use only the IASL commandline in all other GUI Apps.
But if possible i would NOT use such old GUIs anymore, because some DSDT patches are "old way" patches.
Better to use dsdt hints from DSDT forum or use the great , also user friendly but much, much complete + new DSDTSE:

http://www.osx86.es/?p=610
Thats all in one really good: very large+newest dsdt patchtes with explaining text/ tipp database, editor,....

I use that / beside iASLme (quick compile/disass) with IASL 12.11.2009. You can copy (as ti all GUIs) IASL into the DSDTSE ../ressources and overwrite the older IASL version there. I think its an version Juli/August there.


HAPPY PATCHING!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.