diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2014-10-03 15:17:25 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-10-07 03:37:48 +0000 |
commit | c817472c07cd99ec37886bd2ff7eddcc4d3e7568 (patch) | |
tree | 65400e76e61f7168ef59955dda068273ad5302fa /board/zinger | |
parent | 01c331fd3376b5dd5dabeb658fbd17a901e6b91f (diff) | |
download | chrome-ec-c817472c07cd99ec37886bd2ff7eddcc4d3e7568.tar.gz |
Update Zinger flashing process
Convert the Zinger flash update commands to the new RSA signature
mechanism.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=samus
BUG=chrome-os-partner:28336
TEST=from the workstation:
./util/flash_pd.py -m 1 build/zinger/ec.RW.bin
from Samus command-line :
ectool --name=cros_pd flashpd 0 1 ec.RW.bin
Change-Id: Ie8cd7f644ec94e461c5775a4dbbcd408782c72e1
Reviewed-on: https://chromium-review.googlesource.com/221560
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/zinger')
-rw-r--r-- | board/zinger/usb_pd_policy.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/board/zinger/usb_pd_policy.c b/board/zinger/usb_pd_policy.c index 6c4110a289..c15e79169e 100644 --- a/board/zinger/usb_pd_policy.c +++ b/board/zinger/usb_pd_policy.c @@ -418,10 +418,16 @@ int pd_custom_vdm(int port, int cnt, uint32_t *payload, uint32_t **rpayload) (const char *)(payload+1)); flash_offset += 4*(cnt - 1); break; - case VDO_CMD_FLASH_HASH: + case VDO_CMD_ERASE_SIG: /* this is not touching the code area */ - flash_write_rw(CONFIG_FW_RW_SIZE - 32, 4*cnt, - (const char *)(payload+1)); + { + uint32_t zero = 0; + int offset; + /* zeroes the area containing the RSA signature */ + for (offset = CONFIG_FW_RW_SIZE - 256; + offset < CONFIG_FW_RW_SIZE; offset += 4) + flash_write_rw(offset, 4, (const char *)&zero); + } break; case VDO_CMD_PING_ENABLE: pd_ping_enable(0, payload[1]); |