trunks_send: make sure update addresses increase monotonously
A recent Cr50 firmware change rejects attempts to write into the flash
at addresses which are below any address which was written in the last
This presents a problem on devices which run RO_A and RW_B: the
updater sends the RO first (which is RW_B), and then tries to send
RW_A, but the base address of RW_A is below the address range of RO_B,
so the RW portion of the update is rejected.
The solution is to send the section with the lower addresses first,
which is accomplished by this patch.
TEST=verified successful updates with various combinations of
currently active RO and RW sections.
Signed-off-by: Vadim Bendebury <firstname.lastname@example.org>
Reviewed-by: Nicolas Boichat <email@example.com>
1 file changed