Help - Search - Members - Calendar
Full Version: Intel Asl Compiler Iasl: Compiling From Scratch
Project OS X Forums > Snow Leopard Guides & Tutorials > Tools
Pages: 1, 2
zhell
Compiling Intel's ASL Compiler iasl

ACPI is the Advanced Configuration and Power management Interface. ASL is the language used to compile the tables describing the computer's hardware. In some cases it may be helpful to edit some of those tables, most notably the DSDT.

There are several methods to dump the ACPI tables. Given the dump of an ACPI table, one typically wants to decompile the ".aml" file, modify the resulting ASL code (often with the ending ".dsl") and finally recompile it. These two feats are accomplished by Intel's ASL compiler "iasl". You may just want to download the binary at the end of the post and put it in /usr/local/bin or you can compile it yourself as outlined below.

Update: As reported by Slice, the latest version ("acpica-unix-20110623") compiles with a simple "make", at least on Lion 10.7.1 with Xcode 4.1.

1. You need xCode installed (from the App Store, free download for Lion)
2. Get the current source from http://www.acpica.org/downloads/unix_source_code.php
3. Open Terminal, change dir to where you want to have your source code.
4. Extract the source tarball by running
CODE
tar xf ~/Downloads/acpica-unix-20110623.tar

5. Change directory to "compiler"
CODE
cd compiler

6. Run the following command:
CODE
make

8. You get a file called "iasl" the current directory... this is your ASL compiler biggrin.gif . To install you can just issue:
CODE
sudo cp iasl /usr/bin/

(there is no need to set the permissions, the linker does that for you)


CODE
Intel ACPI Component Architecture
ASL Optimizing Compiler version 20110623-64 [Sep  7 2011]
Copyright (c) 2000 - 2011 Intel Corporation

Supports ACPI Specification Revision 4.0a


Download just the "iasl" binary file version 20110623-64:Click to view attachment

Latest vesion
pater
What exactly is this for?
realityiswhere
QUOTE (pater @ Jun 18 2009, 09:28 PM) *
What exactly is this for?


de/re-compiling of dsdt files.

Great post zhell!
pater
It was more of a rhetorical question since this post in no way explains what iasl compiler does.
zhell
QUOTE (pater @ Jun 28 2009, 08:17 PM) *
It was more of a rhetorical question since this post in no way explains what iasl compiler does.

Thanks pater. For next time, please note that stating the above instead of asking a rhetorical question may lead to a more prompt response from my side.
pater
It wasn't an urgent issue.
Slice
Thank you for the trick. Before I can't make iasl. Now Yes! rolleyes.gif
New iasl works without problems.
zhell
Thanks for the feedback, Slice. I also was not able to compile iasl until Kabyl told me how to do it, so all credit goes to him.
Slice
I also made acpiexec -ACPI Execution and Debugging.
QUOTE
sergey:acpiexec sergey$ /acpiexec

Intel ACPI Component Architecture
AML Execution/Debug Utility version 20090521 [Aug 26 2009]

Usage: acpiexec [Options] [InputFile]

Where:
-? Display this message
-a Do not abort methods on error
-b <CommandLine> Batch mode command execution
-e [Method] Batch mode method execution
-i Do not run STA/INI methods during init
-m Display final memory use statistics
-o <OutputFile> Send output to this file
-r Disable OpRegion address simulation
-s Enable Interpreter Slack Mode
-t Enable Interpreter Serialized Mode
-v Verbose init output
-x <DebugLevel> Specify debug output level
-z Enable debug semaphore timeout

Same trick
1. cd project/tools/acpiexec
2. Edit makefile
replace
CODE
acpiexec : $(patsubst %.c,%.o, $(SRCS))
    $(CC) $(LDFLAGS) $(patsubst %.c,%.o, $(SRCS)) -lpthread -lrt -o $(PROG)
by
CODE
LDLIBS = -lpthread -lrt

acpiexec : $(patsubst %.c,%.o, $(SRCS))
    $(CC) $(LDFLAGS) $(patsubst %.c,%.o, $(SRCS)) $(LDLIBS) -o $(PROG)

3. Edit osunixxf.c - this is a file from 2008 project but I need to correct according 2009
Line 144
CODE
/* Upcalls to AcpiExec */
//Slice
void
AeTableOverride (
                 ACPI_TABLE_HEADER       *ExistingTable,
                 ACPI_TABLE_HEADER       **NewTable);

Line ~260
CODE
#ifdef ACPI_EXEC_APP

    /* This code exercises the table override mechanism in the core */

    if (ACPI_COMPARE_NAME (ExistingTable->Signature, ACPI_SIG_DSDT))
    {
        /* override DSDT with itself */
//Slice
        // *NewTable = AcpiGbl_DbTablePtr;
        
        AeTableOverride (ExistingTable, NewTable);
//
    }
    return (AE_OK);
#else
    return AE_NO_ACPI_TABLES;
#endif

4. make LDLIBS=' '
Enjoy!
Click to view attachment
5. Usage
acpiexec -s dsdt.aml
to stop press Ctrl-C
zhell
QUOTE (Slice @ Aug 26 2009, 09:16 AM) *
I also made acpiexec -ACPI Execution and Debugging.
[...]
Enjoy!
Click to view attachment
5. Usage
acpiexec -s dsdt.aml
to stop press Ctrl-C

Awesome, thanks a lot, Slice! I'll certainly give this a try.
Slice
One useful trick
In DSDT you can encounter infinite loop waiting for hardware bits
QUOTE
**** Exception AE_AML_INFINITE_LOOP during execution of method [\SMI_] (Node 0x101ca8)

So it is better to make debug version of dsdt.aml
This is my SMI
CODE
    Method (SMI, 2, NotSerialized)
    {
        Acquire (SMIX, 0xFFFF)
        While (Zero) {}
        Store (Arg1, \_SB.SMIA)
        Store (Arg0, \_SB.SMIC)
        Store (\_SB.SMIC, Local0)
        While (Zero) //LNotEqual (Local0, Zero)) -- for Debug only I replaced condition to Zero
        {
            Store (\_SB.SMIC, Local0)  //-- waiting for hardware
        }

        Store (\_SB.SMIA, Local1)
        Release (SMIX)
        Return (Local1)
    }

The same in method SXX6().
Find your own problem!

Another problem
QUOTE
Executed 3 _INI methods requiring 0 _STA executions (examined 97 objects)

So you can start with option -i ( Do not run STA/INI methods during init)
acpiexec -i dsdt.debug.aml
Gringo Vermelho
I downloaded the two source archives and tried to compile iasl. osunix.c is not present in any of them.

There's a file named osunixxf.c but using that instead doesn't work:

CODE
../osunixxf.c: In function 'AcpiOsWaitSemaphore':
../osunixxf.c:664: warning: implicit declaration of function 'sem_timedwait'
cc  aslcompilerparse.o aslcompilerlex.o aslanalyze.o aslcodegen.o aslcompile.o aslerror.o aslfiles.o asllength.o asllisting.o aslload.o asllookup.o aslmain.o aslmap.o aslopcodes.o asloperands.o aslresource.o aslrestype1.o aslrestype2.o aslstartup.o asltree.o aslutils.o asltransform.o aslfold.o aslstubs.o aslopt.o ../common/getopt.o ../utilities/utalloc.o ../utilities/utcache.o ../utilities/utcopy.o ../utilities/utdebug.o ../utilities/utdelete.o ../utilities/utglobal.o ../utilities/utinit.o ../utilities/utlock.o ../utilities/utobject.o ../utilities/utmisc.o ../utilities/utmath.o ../utilities/utmutex.o ../utilities/utresrc.o ../utilities/utstate.o ../utilities/utxface.o ../namespace/nsaccess.o ../namespace/nsalloc.o ../namespace/nsdump.o ../namespace/nsnames.o ../namespace/nsobject.o ../namespace/nsparse.o ../namespace/nssearch.o ../namespace/nsutils.o ../namespace/nswalk.o ../namespace/nsxfobj.o ../parser/psargs.o ../parser/psloop.o ../parser/psopcode.o ../parser/psparse.o ../parser/psscope.o ../parser/pstree.o ../parser/psutils.o ../parser/pswalk.o ../dispatcher/dswscope.o ../dispatcher/dswstate.o ../dispatcher/dsfield.o ../dispatcher/dsobject.o ../dispatcher/dsopcode.o ../dispatcher/dsutils.o ../dispatcher/dswexec.o ../dispatcher/dswload.o ../executer/exconvrt.o ../executer/excreate.o ../executer/exdump.o ../executer/exmisc.o ../executer/exmutex.o ../executer/exnames.o ../executer/exoparg1.o ../executer/exoparg2.o ../executer/exoparg3.o ../executer/exoparg6.o ../executer/exprep.o ../executer/exregion.o ../executer/exresnte.o ../executer/exresolv.o ../executer/exresop.o ../executer/exstore.o ../executer/exstoren.o ../executer/exstorob.o ../executer/exsystem.o ../executer/exutils.o ../common/adfile.o ../common/adisasm.o ../common/adwalk.o ../common/dmrestag.o ../common/dmtable.o ../common/dmtbinfo.o ../common/dmtbdump.o ../debugger/dbfileio.o ../disassembler/dmbuffer.o ../disassembler/dmnames.o ../disassembler/dmopcode.o ../disassembler/dmobject.o ../disassembler/dmresrc.o ../disassembler/dmresrcl.o ../disassembler/dmresrcs.o ../disassembler/dmutils.o ../disassembler/dmwalk.o ../tables/tbfadt.o ../tables/tbinstal.o ../tables/tbutils.o ../tables/tbxface.o ../osunixxf.o \
          -o iasl
Undefined symbols:
  "_sem_timedwait", referenced from:
      _AcpiOsWaitSemaphore in osunixxf.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [aslmain] Error 1
Slice
Did you use new sources 2009 with replaced file osunixxf.c from project 2008? Look also my correction in step 3.
Signal64
QUOTE (Slice @ Aug 26 2009, 01:23 PM) *
Did you use new sources 2009 with replaced file osunixxf.c from project 2008? Look also my correction in step 3.


Think they are talking about step 7 in zhell's first post for iasl.
That needs to be osunixxf.c instead of osunix.c tongue.gif

And yes, replacing osunixxf.c from 2008 to 2009 sources still works.

Here's iasl Sept-03-2009.

Click to view attachment
drmash
great news Signal64, thanks!
Kabyl
To make it even easier, follow this:

Grab the sources from http://www.acpica.org/downloads/unix_source_code.php, open a Terminal window and after having extracted the tarball;
CODE
       cd compiler
       export CFLAGS='-DACPI_USE_ALTERNATE_TIMEOUT -include pthread.h'
       make LDLIBS=

You get the iasl tool in the current dir. To install you can just do:
CODE
       sudo cp iasl /usr/bin/

(there is no need to set the permissions, the linker does that for you)

Thanks to np_ for the #include <pthread.h>
Kabyl
Apparently the resulted tool doesn't work, anyone had any success with that? or to be more precise, anyone "spent time" with this and has a fix?

EDIT:
Attached is a patch against acpica-unix-20091013, until someone cares enough to provide something better.

Click to view attachment
THe KiNG
QUOTE (Kabyl @ Oct 26 2009, 08:44 PM) *
Apparently the resulted tool doesn't work, anyone had any success with that? or to be more precise, anyone "spent time" with this and has a fix?

EDIT:
Attached is a patch against acpica-unix-20091013, until someone cares enough to provide something better.

Click to view attachment

Thanks Kabyl, the patch worked.
Attached is compiled one.

attachment fixed by realityiswhere smile.gif Click to view attachment
Slice
Thanks! It works.
Some new feature
CODE
Global:
  -@<file>       Specify command file
  -I<dir>        Specify additional include directory

Compile/decompile seems to be same.

Also new debugger
Click to view attachment
Gringo Vermelho
Latest IASL binary here:

http://www.insanelymac.com/forum/index.php?showtopic=189272
Slice
QUOTE (Gringo Vermelho @ Mar 28 2010, 03:08 AM) *

Thanks!
And now I want to repeat kabyl patch to make my own compilation.
1. Get latest sources from acpica.org and unpack.
2. Folders structure is changed so I need to copy all /source/components/subfolder into /source/subfolder. It is easy then correct #include in all sources. Copy headers from /include to /compiler forlder sad.gif
3. Correct osunixxf.c according to kabyl patch and place it into /source
4. Place corrected makefile into /source/compiler
5. cd /compiler
6. make
CODE
HacBook:DSDT-test slice$ ./iasl

Intel ACPI Component Architecture
ASL Optimizing Compiler version 20100331 [Apr  3 2010]
Copyright (c) 2000 - 2010 Intel Corporation
Supports ACPI Specification Revision 4.0

Usage:    iasl [Options] [Files]

The attachment contains binary, makefile, pthread.h (from SDK10.5) and kabyl patch (already applied to osunixxf.c file included)
Click to view attachment

My aim is to make iasl compatible with Tiger. OK!
Click to view attachment
Kabyl
New acpica-unix-20100702:
http://git.moblin.org/cgit.cgi/acpica/comm...a08ea532de47bb4
QUOTE
Add support for OS X in the Unix OSL.
OS X needs to use named semaphores. Conditional on __APPLE__


Build instructions:

CODE
cd compiler
export CFLAGS='-D__APPLE__ -DACPI_USE_ALTERNATE_TIMEOUT -include pthread.h'
make ACPICA_CORE=.. LDFLAGS=-lpthread
sudo cp iasl /usr/bin/

THe KiNG
Thanks! smile.gif
iFabio
QUOTE (Kabyl @ Jul 3 2010, 08:30 PM) *
New acpica-unix-20100702:
http://git.moblin.org/cgit.cgi/acpica/comm...a08ea532de47bb4


Build instructions:

CODE
cd compiler
export CFLAGS='-D__APPLE__ -DACPI_USE_ALTERNATE_TIMEOUT -include pthread.h'
make ACPICA_CORE=.. LDFLAGS=-lpthread
sudo cp iasl /usr/bin/


THX!

Fabio
Slice
QUOTE (Kabyl @ Jul 3 2010, 11:30 PM) *
New acpica-unix-20100702:
http://git.moblin.org/cgit.cgi/acpica/comm...a08ea532de47bb4


Build instructions:

CODE
cd compiler
export CFLAGS='-D__APPLE__ -DACPI_USE_ALTERNATE_TIMEOUT -include pthread.h'
make ACPICA_CORE=.. LDFLAGS=-lpthread
sudo cp iasl /usr/bin/

CODE
sergey:~ slice$ cd /Volumes/LeoHD/Projects/DSDT/acpica-654c1f0ad2d1e1802856eafeaa08ea532de47bb4/source/compiler
sergey:compiler slice$ export CFLAGS='-D__APPLE__ -DACPI_USE_ALTERNATE_TIMEOUT -include pthread.h'
sergey:compiler slice$ make ACPICA_CORE=.. LDFLAGS=-lpthread
make: *** No targets specified and no makefile found.  Stop.
sergey:compiler slice$


OK.
I made all necessary changes and create latest compiler
Click to view attachment
CODE
Intel ACPI Component Architecture
ASL Optimizing Compiler version 20100528 [Jul 12 2010]
Copyright (c) 2000 - 2010 Intel Corporation
Supports ACPI Specification Revision 4.0a

Usage:    iasl [Options] [Files]

Kabyl
QUOTE (Slice @ Jul 12 2010, 07:51 AM) *
CODE
sergey:~ slice$ cd /Volumes/LeoHD/Projects/DSDT/acpica-654c1f0ad2d1e1802856eafeaa08ea532de47bb4/source/compiler
sergey:compiler slice$ export CFLAGS='-D__APPLE__ -DACPI_USE_ALTERNATE_TIMEOUT -include pthread.h'
sergey:compiler slice$ make ACPICA_CORE=.. LDFLAGS=-lpthread
make: *** No targets specified and no makefile found.  Stop.
sergey:compiler slice$


Slice, if you prefer using the git repo. try generating a source release.
Slice
QUOTE (Kabyl @ Jul 12 2010, 12:18 PM) *
Slice, if you prefer using the git repo. try generating a source release.

I am not famous with git. I follow my guide @post#21 and create Makefile for the new sources.
Click to view attachment

And now osunixxf.c doesn't need to be changed. Thanks!
Kabyl
You can get the snapshot without using git.

Run this script Click to view attachment to get the source release in unixtemp (the script is a modification of generate/release/build.sh)

CODE
cd unixtemp

And continue with the rest of the steps.
madmac
laugh.gif

latest UNIVERSAL BINARY iasl as of today...

ASL Optimizing Compiler version 20101209-UB

please check:

@ projectosx

@ insanelymac

laugh.gif

THe KiNG
QUOTE (Slice @ Jul 12 2010, 10:30 AM) *
I am not famous with git. I follow my guide @post#21 and create Makefile for the new sources.

A very simple way to install git is HERE
Then with Kabyl Release.sh and instructions is piece of cake to build it smile.gif
Slice
QUOTE (THe KiNG @ Jan 26 2011, 05:43 PM) *
A very simple way to install git is HERE
Then with Kabyl Release.sh and instructions is piece of cake to build it smile.gif

It is not a problem download and double click on git. It is a problem to use it for source control.
rednous
Guys, a problem occurred while trying to compile the latest iASL (version February, 11th 2011) with the below commands (kindly posted by Kabyl):
CODE
cd compiler
export CFLAGS='-D__APPLE__ -DACPI_USE_ALTERNATE_TIMEOUT -include pthread.h'
make ACPICA_CORE=.. LDFLAGS=-lpthread


I got the following errors when issued 'make ACPICA_CORE=.. LDFLAGS=-lpthread':
CODE
ld: duplicate symbol _AnMapArgTypeToBtype in aslbtypes.o and aslbtypes.o
collect2: ld returned 1 exit status
make: *** [iasl] Error 1


and the iASL binary isn't compiled.
There were no compilation errors prior to iASL version January 12, 2011. Any help will be helpful smile.gif
Slice
QUOTE (rednous @ Feb 12 2011, 02:36 PM) *
Guys, a problem occurred while trying to compile the latest iASL (version February, 11th 2011) with the below commands (kindly posted by Kabyl):
CODE
cd compiler
export CFLAGS='-D__APPLE__ -DACPI_USE_ALTERNATE_TIMEOUT -include pthread.h'
make ACPICA_CORE=.. LDFLAGS=-lpthread


I got the following errors when issued 'make ACPICA_CORE=.. LDFLAGS=-lpthread':
CODE
ld: duplicate symbol _AnMapArgTypeToBtype in aslbtypes.o and aslbtypes.o
collect2: ld returned 1 exit status
make: *** [iasl] Error 1


and the iASL binary isn't compiled.
There were no compilation errors prior to iASL version January 12, 2011. Any help will be helpful smile.gif

Just perform manually link final stage without duplicating objects.
All other instruction still the same. Kabyl's script no more needed.
CODE
MacDell:compiler slice$ ./iasl -ta dsdt.dsl

Intel ACPI Component Architecture
ASL Optimizing Compiler version 20110211-32 [Feb 12 2011]
Copyright (c) 2000 - 2011 Intel Corporation

ASL Input:  dsdt.dsl - 6012 lines, 211634 bytes, 1841 keywords
AML Output: DSDT.aml - 18322 bytes, 621 named objects, 1220 executable opcodes

Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 3 Optimizations
MacDell:compiler slice$

Click to view attachment
rednous
QUOTE (Slice @ Feb 12 2011, 11:03 AM) *
Just perform manually link final stage without duplicating objects.
All other instruction still the same. Kabyl's script no more needed.


Slice, sorry for my stupid question (i'm not a programmer smile.gif ), but could you please tell me how to perform manually link final stage without duplicating objects.

EDIT: Slice, I looked at the compilation output, made some more attempts to compile the iASL, but with no success. Finally, saw the cc command is doing the linking of the final objects and decided to exclude aslbtypes.o in the final link list (manual linking). The iASL compiled error free and works error free. Thank you again for this invaluable tip smile.gif. I guess they'll polish the code in the next release smile.gif
Slice
CODE
Intel ACPI Component Architecture
ASL Optimizing Compiler version 20110316-64 [Apr 12 2011]
Copyright (c) 2000 - 2011 Intel Corporation

Supports ACPI Specification Revision 4.0a
Usage:    iasl [Options] [Files]

Click to view attachment
THe KiNG
The use of latest ACPI source is very wrong!
It may spot additional warnings/errors but final compile must be done with 2005 version.

All BIOS manufacturers including Apple use 2005 source version(ACPI Specification Revision 3.0).
Click to view attachment

If someone can find the windows binaries from exact same version would be great.
Slice
You want to say that old compiler generates OTHER aml codes?
rednous
Slice, i would like to ask you if you tried to compile the latest iASL from 13 april 2011.
The compilation stops with the following error:

CODE
could not find file or directory dtparser.y.h

and then listing 15-20 lines of undeclared types or variables (guess they are declared in the missing header file)

Unfortunately there's no such file in the latest iASL tarball package. Do you have any idea how to fix this?
THe KiNG
QUOTE (Slice @ Apr 15 2011, 10:56 AM) *
You want to say that old compiler generates OTHER aml codes?

No.

What I'm saying is that latest iasl/asl are designed for ACPI v4.0a or greater, so they will check and spot errors/warnings based on that specification.
Apple OS as Micrsoft ones does not have support for that with some small diff, since usual they don't respect the ACPI specs...

So, this code example:

CODE
    If (LGreaterEqual (OSYS, 0x07D9))
    {
        Scope (_SB.PCI0.OHC1)
        {
            Device (RHUB)
            {
                Name (_ADR, Zero)
..................................


Is very good for latest iasl or asl, but when you try 2005 version it will break with a parse error.
Same thing may happen with OS, and you will get a nice panic w/o to know what is wrong, all depends on how permissive is the OS ASL interpreter...
Slice
QUOTE (rednous @ Apr 15 2011, 05:30 PM) *
Slice, i would like to ask you if you tried to compile the latest iASL from 13 april 2011.
The compilation stops with the following error:

CODE
could not find file or directory dtparser.y.h

and then listing 15-20 lines of undeclared types or variables (guess they are declared in the missing header file)

Unfortunately there's no such file in the latest iASL tarball package. Do you have any idea how to fix this?

Yes, I have an idea. Just wait while authors correct sources.

QUOTE (THe KiNG @ Apr 15 2011, 06:31 PM) *
No.

What I'm saying is that latest iasl/asl are designed for ACPI v4.0a or greater, so they will check and spot errors/warnings based on that specification.
Apple OS as Micrsoft ones does not have support for that with some small diff, since usual they don't respect the ACPI specs...

So, this code example:

CODE
    If (LGreaterEqual (OSYS, 0x07D9))
    {
        Scope (_SB.PCI0.OHC1)
        {
            Device (RHUB)
            {
                Name (_ADR, Zero)
..................................


Is very good for latest iasl or asl, but when you try 2005 version it will break with a parse error.
Same thing may happen with OS, and you will get a nice panic w/o to know what is wrong, all depends on how permissive is the OS ASL interpreter...

It's terrible.
I think there must be a way to compile for ACPI 3.0 compatibility. Or even 2.0.
There is also a problem that other ACPI tables, like APIC and MCFG in recent computers may be ACPI 4.0a. And what?
rednous
Thank you, Slice smile.gif
Slice
Ok, take it.
CODE
sergey:test slice$ iasl -ta DSDT2.dsl

Intel ACPI Component Architecture
ASL Optimizing Compiler version 20110413-32 [Apr 20 2011]
Copyright (c) 2000 - 2011 Intel Corporation

Click to view attachment
Click to view attachment
rednous
QUOTE (Slice @ Apr 20 2011, 12:23 PM) *
Ok, take it.
CODE
sergey:test slice$ iasl -ta DSDT2.dsl

Intel ACPI Component Architecture
ASL Optimizing Compiler version 20110413-32 [Apr 20 2011]
Copyright (c) 2000 - 2011 Intel Corporation

Click to view attachment
Click to view attachment



WOW! smile.gif Im speechless! Thank you
THe KiNG
QUOTE (Slice @ Apr 15 2011, 08:24 PM) *
It's terrible.
I think there must be a way to compile for ACPI 3.0 compatibility. Or even 2.0.


Found them in AMIBIOS Rom Utilities Core V8.00.11 V15Rc2

QUOTE
IASL.EXE Intel Intel ASL to AML processor; ACPI 2.0 compatible.
IASL3.EXE Intel Intel ASL to AML processor; ACPI 3.0 compatible.


Click to view attachment
Click to view attachment

They are used(IASL3) on latest AMI APTIO UEFI BIOS too, enjoy! smile.gif
Azimutz
Gracias, THe KING smile.gif
STLVNUB
Latest acpiexec
Click to view attachment
Slice
Now the original sources are perfect to compile without any tricks. Just "make".
CODE
MacDell:compiler slice$ ./iasl

Intel ACPI Component Architecture
ASL Optimizing Compiler version 20110623-32 [Jul 17 2011]
Copyright (c) 2000 - 2011 Intel Corporation

Supports ACPI Specification Revision 4.0a
Usage:    iasl [Options] [Files]

  -w<1|2|3>      Set warning reporting level
  -2             Emit ACPI 2.0 compatible ASL code

New warnings
CODE
MacDell:newIasl slice$ ./iasl -w3 -2 -ta DSDT.dsl

Intel ACPI Component Architecture
ASL Optimizing Compiler version 20110623-32 [Jul 17 2011]
Copyright (c) 2000 - 2011 Intel Corporation

DSDT.dsl     22:     Name (VERS, Package (0x03)
Warning  2107 -               ^ Namespace object is not referenced
,,,,,,,,,,,,,,

ASL Input:  DSDT.dsl - 5951 lines, 194117 bytes, 1874 keywords
AML Output: DSDT.aml - 19823 bytes, 652 named objects, 1222 executable opcodes

Compilation complete. 0 Errors, 28 Warnings, 0 Remarks, 4 Optimizations

These warning mostly related to unuseful codes
CODE
WMI – Windows Management Instrumentation
WMI is a Microsoft specific service. A small part of it describes possible ACPI
WMI implementations provided by the BIOS. This is not part of the official
ACPI specification and BIOS developers should avoid using it. The Linux kernel
driver supports basic WMI ACPI functionality (since 2.6.25), but it is marked
experimental. ACPI functionality should not depend on the WMI interface.

We can safely reduce DSDT size.


And now AML is quaranted to be ACPI2.0 compatible.
32-bit version
Click to view attachment

PS. I seems to be wrong. The key -2 should be at decompile stage.
Azimutz
Thanks for the news, Slice smile.gif
THe KiNG
QUOTE (Slice @ Jul 17 2011, 12:46 PM) *
These warning mostly related to unuseful codes
...
We can safely reduce DSDT size.

Well we are not the only one who use ACPI for stuff wink.gif , so removing all warnings might not be a good idea, unless DSDT is designed only for OS X, but I will not bet on that ...
Slice
QUOTE (THe KiNG @ Jul 19 2011, 02:11 AM) *
Well we are not the only one who use ACPI for stuff wink.gif , so removing all warnings might not be a good idea, unless DSDT is designed only for OS X, but I will not bet on that ...

Yes, I do not want to flash DSDT into BIOS. I just load DSDT.aml during boot into MacOSX.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.