Attention is currently required from: Felix Singer, Nico Huber, Michał Żygowski, Michael Niewöhner. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/55715 )
Change subject: tuxedo_ec: Implement support for flashing ECs on TUXEDO laptops ......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS4:
Well, Tuxedo sells Clevo notebooks. Clevo uses ITE EC with ITE EC firmware framework. […]
Oh, good to know. We don't need to perform any DMI checks, then: given that no probing is done (one has to explicitly choose this programmer), the drawbacks of safeguarding against using it on a "wrong" machine by accident outweigh the benefits.
With this in mind, one could add some sanity checks for ITE ECs: Have users specify the Super I/O port pair (e.g. 0x2e/0x2f or 0x4e/0x4f), retrieve the chip ID at indices 0x20/0x21 and find a match in a table of supported ECs. This could also be used to handle the ITE IT5570E differences.
Users could also specify the PMC (Power Management I/F Channel) to use to talk to the EC, have the code ensure the specified PMC LDN is enabled, and use the port pair values from the LDN IOBADx registers (indices 0x60 to 0x63) instead of having the user specify them.
TL;DR: I'm now convinced that the programmer-specific code shoved between reading and writing the flash chip should be removed completely.