intel 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. #------------------------------------------------------------------------------
  2. # $File: intel,v 1.18 2020/04/18 16:19:03 christos Exp $
  3. # intel: file(1) magic for x86 Unix
  4. #
  5. # Various flavors of x86 UNIX executable/object (other than Xenix, which
  6. # is in "microsoft"). DOS is in "msdos"; the ambitious soul can do
  7. # Windows as well.
  8. #
  9. # Windows NT belongs elsewhere, as you need x86 and MIPS and Alpha and
  10. # whatever comes next (HP-PA Hummingbird?). OS/2 may also go elsewhere
  11. # as well, if, as, and when IBM makes it portable.
  12. #
  13. # The `versions' should be un-commented if they work for you.
  14. # (Was the problem just one of endianness?)
  15. #
  16. 0 leshort 0502 basic-16 executable
  17. >12 lelong >0 not stripped
  18. #>22 leshort >0 - version %d
  19. 0 leshort 0503 basic-16 executable (TV)
  20. >12 lelong >0 not stripped
  21. #>22 leshort >0 - version %d
  22. 0 leshort 0510 x86 executable
  23. >12 lelong >0 not stripped
  24. 0 leshort 0511 x86 executable (TV)
  25. >12 lelong >0 not stripped
  26. 0 leshort =0512 iAPX 286 executable small model (COFF)
  27. >12 lelong >0 not stripped
  28. #>22 leshort >0 - version %d
  29. 0 leshort =0522 iAPX 286 executable large model (COFF)
  30. >12 lelong >0 not stripped
  31. #>22 leshort >0 - version %d
  32. # updated by Joerg Jenderek at Oct 2015
  33. # https://de.wikipedia.org/wiki/Common_Object_File_Format
  34. # http://www.delorie.com/djgpp/doc/coff/filhdr.html
  35. # ./msdos (version 5.25) labeled the next entry as "MS Windows COFF Intel 80386 object file"
  36. # ./intel (version 5.25) label labeled the next entry as "80386 COFF executable"
  37. # SGI labeled the next entry as "iAPX 386 executable" --Dan Quinlan
  38. 0 leshort =0514
  39. # use subroutine to display name+flags+variables for common object formated files
  40. >0 use display-coff
  41. #>12 lelong >0 not stripped
  42. # no hint found, that at offset 22 is version
  43. #>22 leshort >0 - version %d
  44. 0 leshort 0x0200
  45. >0 use display-coff
  46. 0 leshort 0x8664
  47. >0 use display-coff
  48. # rom: file(1) magic for BIOS ROM Extensions found in intel machines
  49. # mapped into memory between 0xC0000 and 0xFFFFF
  50. # From: Alex Myczko <alex@aiei.ch>
  51. # updated by Joerg Jenderek
  52. # https://en.wikipedia.org/wiki/Option_ROM
  53. 0 beshort 0x55AA BIOS (ia32) ROM Ext.
  54. !:mime application/octet-stream
  55. !:ext rom/bin
  56. >5 string USB USB
  57. >7 string LDR UNDI image
  58. >30 string IBM IBM comp. Video
  59. >26 string Adaptec Adaptec
  60. >28 string Adaptec Adaptec
  61. >42 string PROMISE Promise
  62. >2 byte x (%d*512)
  63. # Flash descriptors for Intel SPI flash roms.
  64. # From Dr. Jesus <j@hug.gs>
  65. 0 lelong 0x0ff0a55a Intel serial flash for ICH/PCH ROM <= 5 or 3400 series A-step
  66. 16 lelong 0x0ff0a55a Intel serial flash for PCH ROM
  67. # From: Joerg Jenderek
  68. # URL: https://en.wikipedia.org/wiki/Advanced_Configuration_and_Power_Interface
  69. # Reference: https://uefi.org/sites/default/files/resources/ACPI_6_3_final_Jan30.pdf
  70. # Note: generated for example by `cat /sys/firmware/acpi/tables/DSDT MyDSDT.aml`
  71. 0 string DSDT
  72. >0 use acpi-table
  73. # not tested or other file format
  74. 0 string APIC
  75. >0 use acpi-table
  76. #0 string ASF!
  77. #>0 use acpi-table
  78. 0 string FACP
  79. >0 use acpi-table
  80. #0 string FACS
  81. #>0 use acpi-table
  82. 0 string MCFG
  83. >0 use acpi-table
  84. 0 string SLIC
  85. >0 use acpi-table
  86. 0 string SSDT
  87. >0 use acpi-table
  88. 0 name acpi-table
  89. # skip ASCII text starting with DSDT by looking for valid "low" revision
  90. >8 ubyte <17 ACPI Machine Language file
  91. # assume that ACPI tables size are lower than 16 MiB
  92. #>4 ulelong <0x01000000
  93. # DSDT for Differentiated System Description Table
  94. >>0 string x '%.4s'
  95. #!:mime application/octet-stream
  96. !:mime application/x-intel-aml
  97. !:ext aml
  98. # the manufacture model ID like: VBOXBIOS BXDSDT
  99. >>16 string >\0 %.8s
  100. # OEM revision of DSDT for supplied OEM Table ID like: 0 1 2 20090511
  101. >>>24 ulelong x %x
  102. # OEM ID like: INTEL VBOX (VirtualBox) BXDSDT (qemu) MEDION or \030\001\0\0 for s3pt.aml
  103. >>10 ubyte >040 by %c
  104. >>>11 ubyte >040 \b%c
  105. >>>>12 ubyte >040 \b%c
  106. >>>>>13 ubyte >040 \b%c
  107. >>>>>>14 ubyte >040 \b%c
  108. >>>>>>>15 ubyte >040 \b%c
  109. # This field also sets the global integer width for the AML interpreter.
  110. # Values less than two will cause the interpreter to use 32-bit.
  111. # Values of two and greater will cause the interpreter to use full 64-bit.
  112. # 16 for asf!.aml, 67 fo rsdp.aml
  113. >>8 ubyte x \b, revision %u
  114. # length, in bytes, of the entire DSDT (including the header)
  115. >>4 ulelong x \b, %u bytes
  116. # entire table must sum to zero
  117. #>>9 ubyte x \b, checksum 0x%x
  118. # vendor ID for the ASL Compiler like: INTL MSFT ...
  119. >>28 string >\0 \b, created by %.4s
  120. # revision number of the ASL Compiler like: 20051117 20140724 20190703 20200110 ...
  121. >>>32 ulelong x %x