-
Notifications
You must be signed in to change notification settings - Fork 291
Adding soft-disable support for IFWI/ME12 #282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Based on the work of @davidmartinzeus
|
On Intel Cannonlake H (300) Series chipsets such as QM370, Q370, B360, H370, H310, Z390, C242, C246, HM370, CM246 and QMS380 with Intel ME 12, the High Assurance Platform bit has been moved to PCHSTRP32. My testing board is an ASROCK H370M-ITX/ac. With this patch, I get the usual good signs of ME disablement. ME disappeared from the PCI bus and the OEM bios shows ME version 0.0.0.0. This patch is the very definition of bare minimum. A proper implementation would consist of parsing the CSE Partition Layout Table to locate the Boot Partition Descriptor Table and then finding a type 2 entry (FTPR). (Like how @platomav 's wonderful MEAnalyzer does) Other than that, we would probably benefit from a cleaner way of tracking the HAP bit and matching that to specific chipsets. I think the best option there involves parsing the MFS and checking the "008"/"Home Directory" partition's "bup/bup_sku/plat_n_sku", which holds an SKU identifier inside the BIOS image. My current understanding is that any SKU identifier corresponds to a set PCH strap layout and hence a HAP bit position in the rom. |
|
I can confirm that this works on Clevo/Sager P95XER series notebooks (Tested with a P955ER) with ME12. Original BIOS backup (using Intel FPT) Applying me_cleaner with this pull request #282 Backup after flashing me_cleaner patched BIOS (patched BIOS flashed using Intel FPT, backup using Intel FPT) Output of Intel CSME MEInfo after flashing me_cleaner patched BIOS |
|
Per #3 (comment), this PR was required and works fine for me on a Coffee Lake system. |
|
Hi! I have a brand new Lenovo E490 with ME 12.0.1427.35
The bios chip is very easy to access. So i have created a dump with flashrom. After flashing the patched image.
Intelmetool say on the first device 0x9de0: |
|
Hi @roema ! :) |
|
Hi @dt-zero !! Thanks for you message! Thanks for your work!! |
|
@roema Okay, I see what happened here :) This is the Cannonlake LP variant with a different PCH strap layout. Fixing this in the general case will take some more work, but for now, we can work around this. Try this version. |
|
@beaker23 Glad to hear it works for you as well! For future reference, there is Cannonlake-H series ( QM370, Q370, B360, H370, H310, Z390, C242, C246, HM370, CM246, QMS380) and Cannonlake-LP. I'm not sure which chipsets are in LP, but generally, if you have ME 12 and its not one of the H series I listed, it is probably LP. The script from the commit is for H series, the one I attached is for LP. Making one script that is compatible with both would involve (like the original message mentions) parsing the ME file system to identify the SKU or something similar. I'm not sure to what extent @corna would like to see me_cleaner modified to accommodate this so I tried to make my changes as small as possible. (Which has its ups and downs as you can see) |
|
Commit from PR works on Z390M-ITX/AC. |
|
Hello @dt-zero, the me_cleaner.py for LP variant of cannonlake you posted is identical to the one from the commit, is there some kind of mix-up there ? The commit variant did nothing for me, I have the LP variant. On another note since you seem pretty knowledgeable, what can you say about the "Temporarily disable" mode of ME ? It's an hidden option in my BIOS that I can enable and makes ME totally disappear from the PCI bus and no tool can interact with it afterwards , it's doing more than HAP/AltMeDisable on my desktop computer it seems. |
|
Hi @suut , there is a difference between the two, its the offset in the PCH strap region. LP is offset 0x70, while Cannonlake-H is 0x80. If you have an LP board, use the python script I attached. (Not the one from the commit) Functionality wise, the HAP bit does the same. If you successfully enable the HAP bit, the ME disappears from the PCI bus and no tool will be able to interact with it. |
I meant the two files were byte-for-byte equal but I guess I mixed up downloads, thank you for your feedback, I will try again now. On another note, how did you find the offset ? Using Intel FIT, toggling the "Reserved" setting and looking at which offset in the image the bit was toggled ? So like at byte 371 for Cannonlake-LP |
They are definitely not equal byte-for-byte or otherwise. My understanding is that Intel (CS)ME System Tools (which include FIT) are not publicly released to end-users but only to OEMs, so naturally I would not try obtain them in any way. However, purely theoretically, had someone done that, they could extract the platform descriptor XMLs from FIT and use grep to find a sequence of entries that had the same distribution of bits between fields as with Intel ME 11. That way, they could find out that the old entry that used to be called "reserve_hap" is now "PCH_Strap_CSME_CSE_CSME_Reserved". The same xml node would specify the offset and which bit of that entry controls the HAP mode. |
Oh I see, thanks for the information ! So for other people interested by some googling we can find cnp_h_rvp.xml and cnp_lp_rvp.xml which contain the PCH straps for Cannonlake H and Cannonlake LP respectively. (I don't know if these documents are too touchy to link in here, feel free to tell me if I need to edit) |
|
@dt-zero Success! This worked on my Dell 7060 MFF (Intel Q370 / Cannon Lake). Dumped the bios via FPT, cleaned it with your me_cleaner patch using the -s for HAP bit enable, flashed it back and it works. There's no ME device on lspci, and me_cleaner -c says: |
|
I tried deactivating the hap bit on the asus ws z390 pro but no luck. I get an infinite boot loop. I also tried differently recreating the bios using others tools with hap bit on, same result. |
|
Tried this on my machine - sound doesn't work and it takes over a minute to boot ... is this the intended outcome? EDIT: Is it possible that ME 12 could be supported by whitelisting some more of the modules? |
|
@MattBJ I fixed it for your version, attached below. Run it with |
|
@MattBJ the PCH strap configuration is different for all these platforms, that's what I'm changing most of the time, however in your case I also added the ME14 public key to the list, just to clear the associated warning. Let me know if you achieve the desired results, cheers! 😃 |
Awesome, good luck!
Changing the layout of the rom, such as shrinking or deleting partitions is not supported since the IFWI format (starting from ME12) was introduced. The original script here only allowed you to do that, because it didn't recognize ME 14, since I only hardcoded that check for ME12. (Which was the latest version when I wrote that code)
As far as I'm aware, the purpose of shrinking, would probably be to gain more usable space on the BIOS chip, which would come handy in case of using a custom BIOS like Coreboot. I wouldn't worry about that with the OEM bios.
BIOS updates will restore the flash's content, so you will have to do this procedure every time you update your BIOS.
You're welcome, I'm glad people are showing interest in this, so at least on paper Intel has some incentives to fix their crap. |
|
@dt-zero Confirmed working on a Lenovo Yoga X390 20NN00F8GE with ME 12.0.35.1427 (Cannonlake-LP). Attached a CH341A programmer to the BIOS chip next to the PCIe SSD (a 256MBit MXIC MX25l25673G that flashrom recognized as MX25L25635F/MX25L25645G, though it handled the IC without a hitch). Binary diff shows that me_cleaner set the bit 0 at address 0x173 (from 0x18 to 0x19), otherwise the dumps before and after are equal. ME Version in BIOS setup is gone, as well as /dev/mei0. Great success! I noticed two things though.
Anyway, I would like to thank you for the time that you invested into me_cleaner for handling ME12. Do you think the recent Intel leaks could advance this project further? Is there even still interest in this? The last commit dates back to 2018... |
|
@MattBJ and @dt-zero are you or anyone else able to confirm whether setting the High Assurance Platform bit and soft-disabling the ME still works on platforms with ME versions above version 12? |
|
Hi, can you tell me if it is still possible to enable HAP on 11th gen? |
|
I tired to enable it with |
|
Okay, so since this pull request got a lot of traffic since I opened it, let me say something now. At the same time, my expectation when I opened this pull request was that it may or may not be merged but that it's going to be a reference point for @corna to help with the maintenance of the project. Since then, this grew to the size that it's taking up significant chunks of my time to keep supporting each and every one of you who reaches out on github or via email. I did this research on my own time but otherwise I'm full time working for a company (Zero IT Lab) that requires me to do a ton of other stuff during the daytime. It's becoming hard to balance that and it's unsustainable for me to dedicate significant free time to keep up with this. I'll try to answer this set of questions that piled up until now (in my next comment), but please don't "expect" my support. Realistically speaking, since the project seems abandoned by corna, it's probably time for a fork/rewrite. It could be a company project for us, if there was financial backing to do it at reasonable market rates; but that kind of interest does not seem to be there. From my experience, most of the people who reach out to me are private individuals who do this for the enthusiastic/educational aspect. (and therefore don't want to/can't afford that kind of backing) |
|
@joex2021 The HAP offset for your rom is 0x196. 0x0 = Hap disabled; 0x1 = Hap enabled.
It will edit the file ("z590_copied.bin") in place and enable the HAP bit. Flash and you should be good. (No guarantees) @helios-chad Yes, it is possible. As I showed above, we are still enabling the HAP bit on ME 15 which is more up to date. I haven't had any issues as long as you are on a consumer (CSME) platform and not TXE like @DodoDude700. |
|
@dt-zero thank you for trying help us here, I understand all what you wrote and I totally agree with you. Thank you for your help and patience. |
|
@joex2021 You are welcome. What I wrote is a command you can execute under a linux terminal environment to edit the BIOS rom, no special tool needed. (just paste into a terminal) |
|
@dt-zero Thanks again for the help. Unfortunately I couldn't test your method, I had to return that motherboard due to VRM heating problem, I ordred an Asus Z590-P instead. I will try the suggested solution when it arrives and I will report the result here. |
just dropping in to say this modified me_cleaner.py script also worked like a charm on my z490 board (once I built flashrom from the latest dev build to be able to recognize the chip) thankyou @dt-zero ! |
|
Pull #282 works flawless on a Clevo N350TW (Schenker Dock 15 L2018). BIOS Menu shows IME FW version 0.0.0.0. No more HECI present on the PCI bus. No problems so far with Linux. Even suspend and the docking station works fine. |
|
@dt-zero the modified me_cleaner.py doesn't work for me. my pc just bootloops with the py file in this PR, and that py file boots but doesn't disable ME: NOTE: UEFI also correctly gives the ME firmware version. Here's my firmware bins (orig.bin and cleaned.bin) Board: MSI-Z390-A Pro |
|
@Absolucy quick diff check shows I set it for you using dd anyway (didnt bother with anything else) also has anyone tried setting it on an alder lake board? im considering buying a new pc soon and id like to know if it still works. i'm assuming it does (in one way or another) given its original intended purpose, although with every new platform it could always change. if anyone would be willing to test or upload a dump of their rom id be interested to take a look edit: |
|
@ritalinaddict Original script just bootloops... |
|
@Absolucy well try using the rom I posted, it should work fine |
|
@ritalinaddict thanks for your Alder Lake suggestion. I tried it on an MSI PRO Z690-A DDR4 motherboard, using version 120 but unfortunately it boot loops. I might be doing something stupid, so I'll list the steps I took:
|
|
Greetings to all chat participants concerned about cleaning Intel ME. Details and Details… It has been working fine for 2 weeks. There is an assumption that it is necessary to reset the newly stitched BIOS to the standard settings before updating Intel ME, while it may not faint so deeply when flashing Intel ME. Anyone who wishes can try and unsubscribe.RUS Приветствую всех участников чата, озабоченных очисткой Intel ME. Детали и подробности… Уже 2 недели работает нормально. Существует предположение, что нужно перед обновлением Intel ME сбросить только что прошитый БИОС к стандартным настройкам, при этом может не упадёт в обморок настолько глубоко при прошивке Intel ME. Кто желает, может попробовать и отписаться. |
Sources: corna/me_cleaner#282 (comment) and https://github.com/corna/me_cleaner
|
Many thanks to @dt-zero for the modified version, I tried it on my 8th gen NUC and it worked great. I wrote a guide explaining how to do this: How to Disable IME on Intel NUCs. If you don't mind, I also forked your modified version in my guide. |
|
Szia @dt-zero, I tried to use me_cleaner.py and flashed the cleaned ROM in my MSI Godlike Z390 motherboard to use with i9-9900K but BIOS still shows ME version. Guess, I couldn't do it properly. I would be grateful if you could look into my BIOS dump and provide a ME disabled version. |
I'm also getting bootloop continuously even with correct HAP bit set manually using The way I get my board back working is to switch to another BIOS using the hardware BIOS switch and flash the OEM version to the other chip. Any help from someone would be awesome. |
Unfortunately we won't get any more help, this project is simply dead. but there is still hope ;-). There is another method that worked for me on my Z590 and 11 gen CPU. Just read the research made by Positive Technologies and you will be able to disable it permanently and it will stay disabled even after performing BIOS updates . Good luck. |
|
Greetings to all free IT specialists, participants of this branch. I respect people trying to get rid of corporate bookmarks. I myself 3 months ago with the help of your branch got rid of Intel.me , I wrote about it above and I want to share my impressions of it. What has clearly changed is that the reaction to cookies has become somewhat different. Before removing the ME for the computer, there were no problems determining my location for websites and stores, now 50% does not guess. Gaivoronsky B.Yu. RUS… Я уважаю людей старающихся избавится от закладок корпораций. Я сам 3 месяца назад с помощью вашей ветки избавился от Intel.me, я писал об этом выше и хочу поделиться впечатлениями от этого. Явно изменилось то, что реакция на куки стала несколько иной. До удаления МЕ для компьютера не было проблем определить моё местоположение для сайтов и магазинов, сейчас в 50% не угадывает. Гайворонский Б.Ю. |
When CSME is 'cleaned' (whether with the HAP bit or by removing components), the HECI interface is disabled. This measurably increases the boot time, as the FSP retries the requests. Therefore, disable these retries (which cannot succeed) to decrease the boot time. Note that while this may be applicable to Cannonlake as well (see corna/me_cleaner#282), me_cleaner is not supported in coreboot beyond Kabylake. Tested on an out-of-tree Acer Aspire VN7-572G, boot time does not measurably increase when CSME is disabled by setting the HAP bit. Change-Id: Ibaf0cfb5e1ed7438f9b8f7e348e314a667ecbcc5 Signed-off-by: Benjamin Doron <[email protected]>
|
Приветствую всех свободных айтишников, участников этой работы. Я уважаю людей старающихся избавится от закладок корпораций. Я сам 3 месяца назад с помощью этой ветки #282 избавился от Intel.me, я писал об этом там выше и хочу поделиться впечатлениями от этого. Явно изменилось то, что реакция на куки стала несколько иной. До удаления МЕ для компьютера не было проблем определить моё местоположение для сайтов и магазинов, сейчас в 50% не угадывает. Немного изменилось поведение ОС в отношении электропитания. При каждом выходе в спящий режим в системный журнал записывается ошибка с кодом 137 «Встроенное ПО системы изменило регистры диапазона типа памяти процессора (MTRR) при переходе в спящий режим (S4). Это может замедлить возобновление работы.» – эта ошибка описана не очень хорошо, поэтому не уверен на 100% что она именно из-за удаления МЕ. |
|
Привет! Я имею компьютер на базе ASUS Z490 – 2 года назад я по вашей инструкции уменьшал функциональность intel ME, тогда всё прошло хорошо за исключением того, что в BIOS пропала поддержка SATA... Я прошил следующую версию BIOS и всё исправилось. Сейчас сайт поддержки предлагает очередную версию BIOS, и вопрос – могу ли я сейчас прошивать эту версию BIOS, без прошивки ME? Version 3201 “Before BIOS update, please download Intel ME update tool from ASUS support site, and update ME firmware to Version 14.1.75.2420 to ensure optimized system settings.” И ещё вопрос - чем лучше прошивать картинку которая грузится перед BIOS? Гайворонский Борис |
| if ftpr_header == b"": | ||
| sys.exit("FTPR header not found, this image doesn't seem to be " | ||
| "valid") | ||
| # We might be dealing with IFWI firmware, look for $CPD with FPTR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: FTPR
|
Lots of interesting stuff to ingest, thank you! -- Note: |
Based on the work of @davidmartinzeus
IMPORTANT: If you are new here, please read my comment at #282 (comment)