diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2016-05-31 12:52:57 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-05-31 19:38:21 -0700 |
commit | 9d903a786727c62fb759dd837965d4891c86ff98 (patch) | |
tree | 5a0e1c31c441d6a0edcaa871ce943745c7139bb8 /chip | |
parent | d9f0c13447ebcf37bd2123edd1878c00975bb590 (diff) | |
download | chrome-ec-9d903a786727c62fb759dd837965d4891c86ff98.tar.gz |
g: upgrade: wipe out NVRAM on upgrades
This could be a pain, but we do no want to keep any state when cr50
firmware is upgraded.
BRANCH=none
BUG=chrome-os-partner:44745, chrome-os-partner:51977
TEST=not much yet, will be tested when debugging cr50 functionality
Change-Id: Ic26d3f9f20c6edb77c76c941d04c31948f02be20
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/348292
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/g/upgrade_fw.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chip/g/upgrade_fw.c b/chip/g/upgrade_fw.c index fc6ca50850..8cc2f2ceda 100644 --- a/chip/g/upgrade_fw.c +++ b/chip/g/upgrade_fw.c @@ -10,6 +10,7 @@ #include "flash.h" #include "hooks.h" #include "include/compile_time_macros.h" +#include "memory.h" #include "sha1.h" #include "uart.h" @@ -125,6 +126,9 @@ void fw_upgrade_command_handler(void *body, *rv = UPGRADE_ERASE_FAILURE; return; } + + wipe_nvram(); /* Do not keep any state around. */ + /* * Successful erase means that we need to return the base * address of the section to be programmed with the upgrade. |