gsctool: enforce order of Cr50 section updates
gsctool: enforce order of Cr50 section updates

When both RO and RW updates are required, and the RO includes a new RW
signing key, to ensure recovery from failed updates, the RW section of
the image needs to be updated before the RO section,

In this case interrupted RO or RW update will result in the H1
rebooting still using the original RO and original RW.

If the RO was updated first and the RW update was interrupted, the
chip could end up with the newer RO with no RW to verify with the new
key.

BRANCH=none
BUG=b:74100307
TEST=created an image with fake RO_B version number of 0.0.106, and
     then tried to update to this image. Observed that RW_B was
     transferred before RO_B

  [1067.694175 FW update: starting...]
  at 0x84000
  at 0x84400
  at 0x84800
  ...
  at 0xbb400
  at 0x80000
  at 0x80400
  at 0x80800
  at 0x80c00
  at 0x81000
  at 0x81400
  at 0x81800
  at 0x81c00
  at 0x82000
  at 0x82400

Change-Id: Ie5240c14c6b7d73c00baac693be724fab4636992
Signed-off-by: Vadim Bendebury <5515d6d2d0829cbe0dd0dcf2094aaded06d58514@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1586590
Reviewed-by: Mary Ruthven <81380f3403fed74252e92df3ed012a1819ec6296@chromium.org>

coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec