Jump to content

1 Screenshot

About This File

MaciASL 1.4 b270

 

Intel ACPI tools. The NEW version 20160108 compiled by me from original sources. Use iasl compiler with your MaciASL, DSDTSE or another editor (or Terminal).
To update your DSDTSE, simply right click on DSDTSE --> Show contents, drag'n'drop iasl into --> Contents --> Resources. Another editors have mostly the same way.
For MaciASL simply drag iasl to Contents --> MacOS and rename it to iasl5 (or iasl6 for MaciASL 1.4 b270+ builds)

 

For Terminal: simply copy all the utilities to /usr/local/bin or /usr/bin

Then type in Terminal iasl [space] [keys separated with spaces] [space] and then drag'n'drop needed files to the Terminal's window.
Or type cd [space] then drag'n'drop origin folder (press F4 in Clover's GUI) [Enter], then simply type needed command, like this:

iasl -da -dl SSDT*.aml DSDT.aml

// or if there are only DSDT and SSDTs in origin folder (w/o APIC, FADT, HPET, etc.), then type:

iasl -da -dl *.aml

 

Intel ACPI тулзы. Новая версия  20160108 скомпилирована мною из оригинальных сырцов. Для использования с ДСДТ редактором MaciASL, DSDTSE или другим (или Терминалом).
Инсталим сюда: Открываем правой кнопкой по "любимому" редактору --> показать ?одержимое пакета --> Contents --> Resources --> перетаскиваем драг-н-дропом на эту папку файл iasl, на замену соглашаемся. Имеем свежий компайлер.


Для MaciASL перетаскиваем в подпапку Contents --> MacOS и даем ему имя iasl5 (или iasl6 для современных билдов MaciASL 1.4 b270+ )


Для Терминала: копируем все утилиты в папку /usr/local/bin или  /usr/bin

Затем в терминале набираем iasl [пробел] [ключи через пробел] [пробел] и перетаскиваем на окно Терминала требуемые файлы.
Либо набираем cd [пробел] и перетаскиваем папку origin (снятую в ГУИ Кловера по F4) [Enter], затем набираем требуемую команду, например:

iasl -da -dl SSDT*.aml DSDT.aml

// или если в папке origin только таблицы DSDT и SSDTs (без остальных APIC, FADT HPET и т.д.), то:

iasl -da -dl *.aml

 

Major tools and utilities:

  • iASL - ACPI Source Language Compiler, ACPI Table Compiler, and AML Disassembler
  • AcpiExec - Load ACPI tables and execute control methods from user space
  • AcpiDump - Obtain system ACPI tables and save in ASCII hex format
  • AcpiXtract - Extract binary ACPI tables from an ASCII acpidump
  • AcpiHelp - Help utility for ASL operators, AML opcodes, and ACPI Predefined Names


Miscellaneous utilities:

  • AcpiNames - Example utility that loads and displays the ACPI namespace
  • AcpiSrc - Convert ACPICA code to Linux format
  • AcpiBin - Miscellaneous manipulation of binary ACPI tables

 

ACPISpec ver. 6.0 / ACPI Спецификации 6.0

ACPI Spec ver. 5.1 / ACPI cпецификации верcии 5.1

ACPISPec ver. 5.1 Errata A / ACPI cпецификации 5.1 Иcправления А

 

iASL HELP:

 

Spoiler

Intel ACPI Component Architecture
ASL+ Optimizing Compiler version 20160108-64
Copyright (c) 2000 - 2016 Intel Corporation

Supports ACPI Specification Revision 6.0

Usage: iasl [Options] [Files]
Options:

General:
  -@ <file>           Specify command file
  -I <dir>            Specify additional include directory
  -T <sig list>|ALL   Create ACPI table template/example files
  -T <count>          Emit DSDT and <count> SSDTs to same file
  -p <prefix>         Specify path/filename prefix for all output files
  -v                  Display compiler version
  -vo                 Enable optimization comments
  -vs                 Disable signon

Help:
  -h                  This message
  -hc                 Display operators allowed in constant expressions
  -hf                 Display help for output filename generation
  -hr                 Display ACPI reserved method names
  -ht                 Display currently supported ACPI table names

Preprocessor:
  -D <symbol>         Define symbol for preprocessor use
  -li                 Create preprocessed output file (*.i)
  -P                  Preprocess only and create preprocessor output file (*.i)
  -Pn                 Disable preprocessor

Errors, Warnings, and Remarks:
  -va                 Disable all errors/warnings/remarks
  -ve                 Report only errors (ignore warnings and remarks)
  -vi                 Less verbose errors and warnings for use with IDEs
  -vr                 Disable remarks
  -vw <messageid>     Disable specific warning or remark
  -w1 -w2 -w3         Set warning reporting level
  -we                 Report warnings as errors

AML Code Generation (*.aml):
  -oa                 Disable all optimizations (compatibility mode)
  -of                 Disable constant folding
  -oi                 Disable integer optimization to Zero/One/Ones
  -on                 Disable named reference string optimization
  -ot                 Disable typechecking
  -cr                 Disable Resource Descriptor error checking
  -in                 Ignore NoOp operators
  -r <revision>       Override table header Revision (1-255)

Optional Source Code Output Files:
  -sc -sa             Create source file in C or assembler (*.c or *.asm)
  -ic -ia             Create include file in C or assembler (*.h or *.inc)
  -tc -ta -ts         Create hex AML table in C, assembler, or ASL (*.hex)
  -so                 Create offset table in C (*.offset.h)

Optional Listing Files:
  -l                  Create mixed listing file (ASL source and AML) (*.lst)
  -lm                 Create hardware summary map file (*.map)
  -ln                 Create namespace file (*.nsp)
  -ls                 Create combined source file (expanded includes) (*.src)

Data Table Compiler:
  -G                  Compile custom table that contains generic operators
  -vt                 Create verbose template files (full disassembly)

AML Disassembler:
  -d  <f1 f2 ...>     Disassemble or decode binary ACPI tables to file (*.dsl)
                        (Optional, file type is automatically detected)
  -da <f1 f2 ...>     Disassemble multiple tables from single namespace
  -db                 Do not translate Buffers to Resource Templates
  -dc <f1 f2 ...>     Disassemble AML and immediately compile it
                        (Obtain DSDT from current system if no input file)
  -df                 Force disassembler to assume table contains valid AML
  -dl                 Emit legacy ASL code only (no C-style operators)
  -e  <f1 f2 ...>     Include ACPI table(s) for external symbol resolution
  -fe <file>          Specify external symbol declaration file
  -in                 Ignore NoOp opcodes
  -l                  Disassemble to mixed ASL and AML code
  -vt                 Dump binary table data in hex format within output file

Debug Options:
  -bf                 Create debug file (full output) (*.txt)
  -bs                 Create debug file (parse tree only) (*.txt)
  -bp <depth>         Prune ASL parse tree
  -bt <type>          Object type to be pruned from the parse tree
  -f                  Ignore errors, force creation of AML output file(s)
  -m <size>           Set internal line buffer size (in Kbytes)
  -n                  Parse only, no output generation
  -oc                 Display compile times and statistics
  -x <level>          Set debug level for trace output
  -z                  Do not insert new compiler ID for DataTables

 

 

New ASL+ decompile: / Декомпайл ASL+:

iasl -e SSDT*.aml -d DSDT.aml
iasl -e /@full_path@/SSDT*.aml -d /@full_path@/DSDT.aml

Legacy ASL decompile / Декомпайл ASL легаcи:

iasl -e SSDT*.aml -dl DSDT.aml
iasl -e /@full_path@/SSDT*.aml -dl /@full_path@/DSDT.aml

 

To decompile all DSDT & SSDTs use -da key   / Чтобы декомпилировать вcе DSDT и SSDT таблицы, иcпользуйте ключ -da:

iasl -da DSDT.aml SSDT*.aml
iasl -da -dl DSDT.aml SSDT*.aml
iasl -da /@full_path@/DSDT.aml /@full_path@/SSDT*.aml
iasl -da -dl /@full_path@/SSDT*.aml /@full_path@/DSDT.aml

 

Also add reference file ref.txt with unresolved External Methods and Argument count for each. Use -fe key:
Также можно добавить дополнительный реф.файл ref.txt c перечиcлением вcе еще нераcпознанных методов и количеcтво Аргументов для каждого. Используйте ключ -fe:

External (MDBG, MethodObj, 1) // <<<--- Unresolved Method with allocated Arguments count (text file ref.txt)
iasl -fe ref.txt -e SSDT*.aml -dl DSDT.aml
iasl -fe /@full_path@/ref.txt -e /@full_path@/SSDT*.aml -d /@full_path@/DSDT.aml
iasl -fe /@full_path@/ref.txt -e /@full_path@/SSDT*.aml -dl /@full_path@/DSDT.aml
iasl -fe /@full_path@/ref.txt -da -dl /@full_path@/SSDT*.aml /@full_path@/DSDT.aml

 

The command in the Terminal should be like this (with full paths of the files):
Команда в Терминале будет выглядеть так (с полными путями к файлам):

0:~ steve$ /Volumes/2\ UNIT\ 2T/MAC\ OS\ X\ \&\ HACK/ACPI/iASL_MAC/acpica-unix-20150619/iasl_20150619_64/iasl -fe /Volumes/Y/Users/stevebondaryan/Desktop/N551JM/origin/ref.txt -e /Volumes/Y/Users/stevebondaryan/Desktop/N551JM/origin/SSDT*.aml -dl /Volumes/Y/Users/stevebondaryan/Desktop/N551JM/origin/DSDT.aml

 

After pressing the Return key you should see something like this. It means that all of SSDTs were connected to parsing (but this example shows that not all Externals were resolved).После нажатия клавиши Return вы увидите что-то наподобие этого. Это означает, что все ССДТ таблицы были прикреплены к парсингу (но в этом примере не были распознаны все External методы).

 

Here is an example how disassembler parses the Externals. / Вот пример, как дизассемблер парсит External методы:

    External (_SB_.TPM_.CMOR, MethodObj)    // Warning: Unresolved method, guessing 0 arguments
    
    External (_PR_.ACRT, FieldUnitObj)
    External (_PR_.CPU0._PPC, IntObj)
    External (_PR_.CPU0._PSS, PkgObj)
    External (_SB_.IAOE.ECTM, FieldUnitObj)
    External (_SB_.IAOE.IBT1, IntObj)
    External (_SB_.IAOE.ITMR, FieldUnitObj)
    External (_SB_.IAOE.PTSL, IntObj)
    External (_SB_.IAOE.RCTM, FieldUnitObj)
    External (_SB_.IAOE.WKRS, FieldUnitObj)
    External (_SB_.PCCD, UnknownObj)
    External (_SB_.PCCD.PENB, UnknownObj)
    External (_SB_.PCI0.B0D3.ABAR, FieldUnitObj)
    External (_SB_.PCI0.B0D3.BARA, IntObj)
    External (_SB_.PCI0.GFX0.AINT, MethodObj)    // 2 Arguments
    External (_SB_.PCI0.GFX0.CLID, FieldUnitObj)
    External (_SB_.PCI0.GFX0.DD1F, UnknownObj)
    External (_SB_.PCI0.GFX0.DRDY, FieldUnitObj)
    External (_SB_.PCI0.GFX0.GSCI, MethodObj)    // 0 Arguments
    External (_SB_.PCI0.GFX0.GSSE, FieldUnitObj)
    External (_SB_.PCI0.GFX0.STAT, FieldUnitObj)
    External (_SB_.PCI0.GFX0.TCHE, FieldUnitObj)
    External (_SB_.PCI0.PEG0, UnknownObj)
    External (_SB_.PCI0.PEG0.HPME, MethodObj)    // 0 Arguments
    External (_SB_.PCI0.PEG0.PEGP, UnknownObj)
    External (_SB_.PCI0.PEG1, UnknownObj)
    External (_SB_.PCI0.PEG1.HPME, MethodObj)    // 0 Arguments
    External (_SB_.PCI0.PEG2, UnknownObj)
    External (_SB_.PCI0.PEG2.HPME, MethodObj)    // 0 Arguments
    External (D1F0, UnknownObj)
    External (D1F1, UnknownObj)
    External (D1F2, UnknownObj)
    External (DIDX, FieldUnitObj)
    External (GSMI, FieldUnitObj)
    External (PDC0, IntObj)
    External (PDC1, IntObj)
    External (PDC2, IntObj)
    External (PDC3, IntObj)
    External (PDC4, IntObj)
    External (PDC5, IntObj)
    External (PDC6, IntObj)
    External (PDC7, IntObj)
    External (SGMD, FieldUnitObj)

And here you are a correctly disassembled Method ADBG, which refering to External Method MDBG with 1 Arg countВот пример корректно дизассемблированного метода ADBG, который ссылается на External метод MDBG c 1 Аргументом.

External (MDBG, MethodObj)    
...
  Method (ADBG, 1, Serialized)
    {
        If (CondRefOf (MDBG))
        {
            Return (MDBG (Arg0))  // MDBG is an External reference Method, but there is no such method in ACPI tables.
        }

        Return (Zero)
    }

 

But without ref.txt parsing will be incorrect and compiler will return an error, like this:Но без подключенного ref.txt файла парсинг кода пройдет неправильно и компилятор вернет ошибку компиляции:

    External (MDBG, IntObj)  // Here is an ERROR
...
    Method (ADBG, 1, Serialized)
    {
        If (CondRefOf (MDBG))
        {
            Return (MDBG) /* External reference */  // Here is an ERROR
            Arg0    // Here is an ERROR
        }

        Return (Zero)
    }

 

Here is an original SSDT with MDBG method, which was lost. / Вот SSDT таблица c методом MDBG, которая была утеряна:

DefinitionBlock ("MDBG.aml", "SSDT", 1, "Intel_", "ADebTabl", 0x00001000)
{
    Scope (\)
    {
        Name (DPTR, 0x80000000)
        Name (EPTR, 0x80000000)
        Name (CPTR, 0x80000000)
        Mutex (MMUT, 0x00)
        Method (MDBG, 1, Serialized)
        {
            Store (Acquire (MMUT, 0x03E8), Local0)
            If (LEqual (Local0, Zero))
            {
                OperationRegion (ABLK, SystemMemory, CPTR, 0x10)
                Field (ABLK, ByteAcc, NoLock, Preserve)
                {
                    AAAA,   128
                }

                Store (Arg0, AAAA) /* \MDBG.AAAA */
                Add (CPTR, 0x10, CPTR) /* \CPTR */
                If (LGreaterEqual (CPTR, EPTR))
                {
                    Add (DPTR, 0x10, CPTR) /* \CPTR */
                }

                Release (MMUT)
            }

            Return (Local0)
        }
    }
}

 

===================
And more: if you need to decompile your custom DSDT with your patches and if it still has many External Methods, you need to use all of the SSDTs this time too. If you deleted all of the Externals and those dependencies in the code, then no need to decompile with SSDTs and refs.


В дополнение: если вы решили декомпилировать свою кастомную DSDT с примененными патчами и в таблице все еще имеются в большом количестве External методы, в этом случае также требуется использовать терминал и включить в декомпиляцию все SSDT таблицы. Если вы удалили все External методы со всеми зависимостями в коде, тогда не требуется использовать при декомпиляции SSDT таблицы и реф.файлы.
===================

 

Changelog:   https://github.com/acpica/acpica/blob/master/documents/changes.txt




User Feedback

Recommended Comments

There are no comments to display.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.