Attention is currently required from: Felix Singer, Nico Huber, Paul Menzel, Sergii Dmytruk. Michał Żygowski has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/55715 )
Change subject: ite_ecfw: Implement support for flashing ITE ECs found on TUXEDO laptops ......................................................................
Patch Set 29:
(2 comments)
Patchset:
PS29:
I mean it should be fully included in `-p internal` eventually. The `internal` […]
Understood. It may be a good idea to merge it with internal programmer indeed.
File ite_ecfw.c:
https://review.coreboot.org/c/flashrom/+/55715/comment/ffb5fb1a_704ee98d PS29, Line 411: }
AFAICS, if we'd allow a partial erase, flashrom could decide to only write […]
When we think about flashrom as an application to simply replace flash content, these problems are only theoretical. But if we look at it hardware-wise, it is a different story. The main problem with this first kbyte is that it contains the code responsible for writing to the flash. This is a special scratch memory which is doublemapped to 8051 External Memory and ROM space. When the flashing process begins, the flash access routines are copied to the scratch ROM space 4KB where EC can safely execute them without worrying about the flash content (EC wouldn't be able to fetch code when the SPI flash is in WIP/busy state). The command that is sent when writing the first kilobyte probably indicates to the EC that: 1. The flash access is finished after it takes the first kilobyte to be flashed. 2. EC can switch back from scratch ROM to the flash ROM with the execution.
That is why it must be done at the end of flashing process.
I hope I didn't make any mistake here, Michael can confirm