chrome-ec/chip
Vadim Bendebury 450638411f g: add code to corrupt new header until further notice and move rw to 0.0.19
With the rest of support in place, this patch adds code which would
corrupt the headers received during firmware updates.

The VENDOR_CC_TURN_UPDATE_ON vendor command will be required to enable
the new images.

Care should be taken that other commands operating on the inactive
image header do not do anything with it before it was enabled, some
code is being added for that.

The minor RW version is being bumped up to 19 to clearly indicate that
the device is expecting the vendor command to enable the new image
(this is used by usb_updater when downloading the image without the -p
or -u command line options).

BRANCH=cr50
BUG=b:35580805
TEST=verified that the new image can be installed and started by the
     new usb_updater.

   - the inactive header after uploading with the -p option (the
     image_size field's offset is 0x32c):
    > md 0x84320 4
   00084320: 00000000 00000000 80033800 00084000

    rebooting the device does not start the new image.

   - the inactive header after uploading without the -p option:
   > md 0x84320 4
   00084320: 00000000 00000000 00033800 00084000

  the device running a DBG image reports the following in the end of
  the image update:

  [64.176780 FW update: done]
  turn_update_on: rebooting in 100 ms

Change-Id: I4d763eb89c8b1a43a13697033201066779826e85
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/457678
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
(cherry picked from commit 9e931878ca)
Reviewed-on: https://chromium-review.googlesource.com/459224
2017-03-24 16:45:13 +00:00
..
g g: add code to corrupt new header until further notice and move rw to 0.0.19 2017-03-24 16:45:13 +00:00
host fix memory size calculations in host/test mode 2016-12-28 21:49:39 -08:00
ish ISH: Added UART Rx/Tx interrupt mode 2017-01-11 14:46:29 -08:00
it83xx it83xx: lpc: do not clear masks in S0ix -> S0 transition 2017-01-25 02:02:58 -08:00
lm4 clock: Fix clock_wait_cycles() asm 2016-11-18 20:07:08 -08:00
mec1322 flash: Pass more precise parameter to flash_[physical_]protect_at_boot 2017-02-12 21:05:11 -08:00
npcx kevin / gru: Reduce SRAM footprint 2017-02-13 18:25:51 -08:00
nrf51 cleanup: DECLARE_CONSOLE_COMMAND only needs 4 args 2016-08-24 16:30:10 +00:00
stm32 stm32: add support for STM32L442 2017-02-17 01:47:29 -08:00