You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

166 lines
5.0 KiB

  1. [//]: # (Use md2man to generate the man page from this Markdown)
  2. [//]: # (https://github.com/sunaku/md2man)
  3. me_cleaner 1 "MARCH 2018"
  4. =======================================
  5. me\_cleaner
  6. ----
  7. me\_cleaner - Tool for partial deblobbing of Intel ME/TXE firmware images
  8. SYNOPSIS
  9. --------
  10. `me_cleaner.py` [-h] [-v] [-O output\_file] [-S | -s] [-r] [-k]
  11. [-w whitelist | -b blacklist] [-d] [-t] [-c] [-D output\_descriptor]
  12. [-M output\_me\_image] *file*
  13. DESCRIPTION
  14. -----------
  15. `me_cleaner` is a tool able to disable parts of Intel ME/TXE by:
  16. * removing most of the code from its firmware
  17. * setting a special bit to force it to disable itself after the hardware
  18. initialization
  19. Using both the modes seems to be the most reliable way on many platforms.
  20. The resulting modified firmware needs to be flashed (in most of the cases) with
  21. an external programmer, often a dedicated SPI programmer or a Linux board with
  22. a SPI master interface.
  23. `me_cleaner` works at least from Nehalem to Coffee Lake (for Intel ME) and on
  24. Braswell/Cherry Trail (for Intel TXE), but may work as well on newer or
  25. different architectures.
  26. While `me_cleaner` have been tested on a great number of platforms, fiddling
  27. with the Intel ME/TXE firmware is *very dangerous* and can easily lead to a
  28. dead PC.
  29. *YOU HAVE BEEN WARNED.*
  30. POSITIONAL ARGUMENTS
  31. --------------------
  32. `file`
  33. ME/TXE image or full dump.
  34. OPTIONAL ARGUMENTS
  35. ------------------
  36. `-h`, `--help`
  37. Show the help message and exit.
  38. `-v`, `--version`
  39. Show program's version number and exit.
  40. `-O`, `--output`
  41. Save the modified image in a separate file, instead of modifying the
  42. original file.
  43. `-S`, `--soft-disable`
  44. In addition to the usual operations on the ME/TXE firmware, set the
  45. MeAltDisable bit or the HAP bit to ask Intel ME/TXE to disable itself after
  46. the hardware initialization (requires a full dump).
  47. `-s`, `--soft-disable-only`
  48. Instead of the usual operations on the ME/TXE firmware, just set the
  49. MeAltDisable bit or the HAP bit to ask Intel ME/TXE to disable itself after
  50. the hardware initialization (requires a full dump).
  51. `-r`, `--relocate`
  52. Relocate the FTPR partition to the top of the ME region to save even more
  53. space.
  54. `-t`, `--truncate`
  55. Truncate the empty part of the firmware (requires a separated ME/TXE image or
  56. `--extract-me`).
  57. `-k`, `--keep-modules`
  58. Don't remove the FTPR modules, even when possible.
  59. `-w`, `--whitelist`
  60. Comma separated list of additional partitions to keep in the final image.
  61. This can be used to specify the MFS partition for example, which stores PCIe
  62. and clock settings.
  63. `-b`, `--blacklist`
  64. Comma separated list of partitions to remove from the image. This option
  65. overrides the default removal list.
  66. `-d`, `--descriptor`
  67. Remove the ME/TXE Read/Write permissions to the other regions on the flash
  68. from the Intel Flash Descriptor (requires a full dump).
  69. `-D`, `--extract-descriptor`
  70. Extract the flash descriptor from a full dump; when used with `--truncate`
  71. save a descriptor with adjusted regions start and end.
  72. `-M`, `--extract-me`
  73. Extract the ME firmware from a full dump; when used with `--truncate` save a
  74. truncated ME/TXE image.
  75. `-c`, `--check`
  76. Verify the integrity of the fundamental parts of the firmware and exit.
  77. SUPPORTED PLATFORMS
  78. -------------------
  79. Currently `me_cleaner` has been tested on the following platforms:
  80. | PCH | CPU | ME | SKU |
  81. |:-----------------:|:-----------------:|:----:|:--------:|
  82. | Ibex Peak * | Nehalem/Westmere | 6.0 | Ignition |
  83. | Ibex Peak * | Nehalem/Westmere | 6.x | 1.5/5 MB |
  84. | Cougar Point | Sandy Bridge | 7.x | 1.5/5 MB |
  85. | Panther Point | Ivy Bridge | 8.x | 1.5/5 MB |
  86. | Lynx/Wildcat Point| Haswell/Broadwell | 9.x | 1.5/5 MB |
  87. | Wildcat Point LP | Broadwell Mobile | 10.0 | 1.5/5 MB |
  88. | Sunrise Point | Skylake/Kabylake | 11.x | CON/COR |
  89. | Union Point | Kabylake | 11.x | CON/COR |
  90. | SoC | TXE | SKU |
  91. |:---------------------:|:---:|:--------:|
  92. | Braswell/Cherry Trail | 2.x | 1.375 MB |
  93. \* Not working on coreboot
  94. All the reports are available on the [project's GitHub page](
  95. https://github.com/corna/me_cleaner/issues/3).
  96. EXAMPLES
  97. --------
  98. Check whether the provided image has a valid structure and signature:
  99. `me_cleaner.py -c dumped_firmware.bin`
  100. Remove most of the Intel ME firmware modules but don't set the HAP/AltMeDisable
  101. bit:
  102. `me_cleaner.py -S -O modified_me_firmware.bin dumped_firmware.bin`
  103. Remove most of the Intel ME firmware modules and set the HAP/AltMeDisable bit,
  104. disable the Read/Write access of Intel ME to the other flash region, then
  105. relocate the code to the top of the image and truncate it, extracting a modified
  106. descriptor and ME image:
  107. `me_cleaner.py -S -r -t -d -D ifd_shrinked.bin -M me_shrinked.bin -O modified_firmware.bin full_dumped_firmware.bin`
  108. BUGS
  109. ----
  110. Bugs should be reported on the [project's GitHub page](
  111. https://github.com/corna/me_cleaner).
  112. AUTHOR
  113. ------
  114. Nicola Corna <nicola@corna.info>
  115. SEE ALSO
  116. --------
  117. flashrom(8), [me\_cleaner's Wiki](https://github.com/corna/me_cleaner/wiki)