[File] Magdir for ACPI Machine Language file; *.aml

Christos Zoulas christos at zoulas.com
Sat Apr 18 16:19:24 UTC 2020


Committed, thanks!

christos

> On Apr 16, 2020, at 6:27 PM, Jörg Jenderek <joerg.jen.der.ek at gmx.net> wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello,
> 
> some days ago i looked inside my qemu directory. There i found a file
> with name extension aml which is not recognized by file command. So i
> look for more such files on my systems. When running file command
> version 5.38 on such documents these examples are described as "data".
> 
> According to websites file-extensions.org and fileinfo.com such files
> are ACPI Machine Language files. So i use that description in
> definition. Some information is found on ACPI page on Wikipedia. That
> is expressed by URL line like:
> # en.wikipedia.org/wiki/Advanced_Configuration_and_Power_Interface
> According to the mentioned Advanced Configuration and Power Interface
> Specification Revision 6.3 the file format is described. So i add a
> reference URL comment line like
> # uefi.org/sites/default/files/resources/ACPI_6_3_final_Jan30.pdf
> 
> My few real examples are Differentiated System Description Tables,
> which are characterized at the beginning by characteristic upcased
> text DSDT. That is used as first test line like
> 0	string		DSDT
>> 0	use		acpi-table
> 0	name		acpi-table
> 
> Because the described file format is also used for other ACPI tables
> like SLIC and SSDT i encapsulate displaying part inside sub routine
> acpi-table.
> Unfortunately this is still not unique enough. To skip ASCII text
> starting with phrase DSDT look for valid "low" revision like by test
> line like
>> 8	ubyte		<17	ACPI Machine Language file
> 
> The size of such ACPI tables is stored as 4 byte integer at offset
> 4. So in theory the upper limit limit is 4 GiB, but in reality only
> lower sizes like 21469 appear. Because ACPI tables are part of PC
> BIOS it can be assumed that ACPI tables size are lower than 16 MiB
> limit for example. That maybe can used as alternative or second test
> by line like
>> 4	ulelong		<0x01000000
> Afterwards show 4 byte table signature like DSDT, a user defined
> mime type and file name extension by lines
>>> 0	string		x	'%.4s'
> !:mime	application/x-intel-aml
> !:ext	aml
> 
> The stored size or length of the entire AML files including the
> header is also shown by line like:
>>> 4	ulelong		x	\b, %u bytes
> 
> According to specification revision byte at offset 8 has a meaning
> for the AML interpreter. Values less than two will cause the
> interpreter to use 32-bit integers and math. Values of two and
> greater will cause the interpreter to use full 64-bit integers and
> math. For my DSDT examples i only found value 1 and 2, but for
> example asf!.aml found in test suite acpitests-unix-20200326 value
> is 16. So show that information by line
>>> 8	ubyte		x	\b, revision %u
> 
> My examples were created by iasl(1) ACPI tool found on acpica.org web
> site. On Linux systems such tables from BIOS can be generated by
> command	like:
> 	cat /sys/firmware/acpi/tables/DSDT MyDSDT.aml
> This tool use the Vendor ID INTL and the revision number of the ASL
> Compiler is here also used as timestamp like 20100528 in example
> DSDT-suse15-vb.aml. That information if available is shown by lines
> like
>>> 28	string		>\0	\b, created by %.4s
>>>> 32	ulelong		x	%x
> But for similar files like SLIC.bin i also found vendor ID MSFT
> with non time-stamped revision number and sometimes there is no
> creator id like in facs.aml.
> 
> If available show manufacture model ID like VBOXBIOS (VirtualBox),
> BXDSDT (qemu), the revision of table (some times interpreted as
> time stamp like 20090511 in example grammar.aml) and OEM ID like
> INTEL, VBOX (VirtualBox), BXDSDT (qemu), MEDION, etc. by lines like:
>>> 16	string		>\0	%.8s
>>>> 24	ulelong		x	%x
>>> 10	ubyte		>040	by %c
>>>> 11		ubyte	>040	\b%c
>>>>> 12		ubyte	>040	\b%c
>>>>>> 13	ubyte	>040	\b%c
>>>>>>> 14	ubyte	>040	\b%c
>>>>>>>> 15	ubyte	>040	\b%c
> 
> After applying the above mentioned modifications by appended DSDT.txt
> then all inspected ACPI Machine Language file examples are now
> described correctly and i get an output like:
> 
> asf!.aml:              ACPI Machine Language file 'ASF!'
> 		       TEMPLATE 1 by INTEL, revision 16,
> 		       114 bytes, created by INTL 20190703
> DSDT-suse15-vb.aml:    ACPI Machine Language file 'DSDT'
> 		       VBOXBIOS 2 by VBOX, revision 2,
> 		       8997 bytes, created by INTL 20100528
> DSDT-tables-acpi.aml:  ACPI Machine Language file 'DSDT'
> 		       MEDIONAG 0 by MEDION, revision 1,
> 		       21469 bytes, created by INTL 20051117
> grammar.aml:           ACPI Machine Language file 'DSDT'
> 		       GRMTEST 20090511 by Intel, revision 1,
> 		       43758 bytes, created by INTL 20200110
> q35-acpi-dsdt.aml:     ACPI Machine Language file 'DSDT'
> 		       BXDSDT 2 by BXPC, revision 1,
> 		       7344 bytes, created by INTL 20100528
> DSDT.text:             ASCII text, with CRLF line terminators
> SLIC.bin:              ACPI Machine Language file 'SLIC'
> 		       MEDIONAG 6222004 by MEDION, revision 1,
> 		       374 bytes, created by MSFT 97
> SSDT3.bin:             ACPI Machine Language file 'SSDT'
> 		       Cpu1Tst 3000 by PmRef, revision 2,
> 		       160 bytes, created by INTL 20051117
> facs.aml:              ACPI Machine Language file 'FACS'
> 		       revision 0,
> 		       64 bytes
> 
> Because file format is used mainly inside BIOS of PC it can go to
> Magdir/intel. Or because by such tables the Computer abilities are
> described magic lines maybe belong to Magdir/hardware.
> 
> I hope my lines for Magdir can be applied in future version of file
> utility.
> 
> With best wishes
> Jörg Jenderek
> - --
> Jörg Jenderek
> 
> 
> 
> 
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
> 
> iF0EARECAB0WIQS5/qNWKD4ASGOJGL+v8rHJQhrU1gUCXpjbowAKCRCv8rHJQhrU
> 1s0mAJ4unlLbaKxWVr5nQRxrSAtvZ8wWTQCeNr5z60tBBBXUfx+2GtQbYhEr8s8=
> =NfP0
> -----END PGP SIGNATURE-----
> <DSDT.txt><DSDT_txt_sig.DEFANGED-273>--
> File mailing list
> File at astron.com
> https://mailman.astron.com/mailman/listinfo/file
> <sanitizer.log>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <https://mailman.astron.com/pipermail/file/attachments/20200418/d1f474a8/attachment.asc>


More information about the File mailing list