diff options
author | Mary Ruthven <mruthven@chromium.org> | 2016-09-01 13:23:55 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-09-02 09:32:24 -0700 |
commit | 5ee00611d4a30fc8108a6c4ff3cfa2784457d36f (patch) | |
tree | e47a826fcdb7be11bff3aace47fd0b2970f68458 /chip/g/upgrade_fw.c | |
parent | 74e60906c4c2d4c3520d3ea221c232b5f29b7e0d (diff) | |
download | chrome-ec-5ee00611d4a30fc8108a6c4ff3cfa2784457d36f.tar.gz |
g: clear reset_counter after update
If the firmware was just updated clear the reset counter before
rebooting. This will ensure that the update can complete even if the TPM
isn't being used.
BUG=chrome-os-partner:56864
BRANCH=none
TEST=Set the reset counter to 7 by running 'rw 0x40000128 1' and
'rw 0x4000012c 7'. Then make sure cr50 can still be updated
Change-Id: Ic304fc7a20a4f2af7792f80e970d28e0eb10967e
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/380235
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'chip/g/upgrade_fw.c')
-rw-r--r-- | chip/g/upgrade_fw.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chip/g/upgrade_fw.c b/chip/g/upgrade_fw.c index a419e3a229..b1da99d7a7 100644 --- a/chip/g/upgrade_fw.c +++ b/chip/g/upgrade_fw.c @@ -32,6 +32,8 @@ struct { uint32_t rw_top_offset; } valid_sections; +static int upgrade_done; + /* Pick sections where updates can go to based on current code addresses. */ static void set_valid_sections(void) { @@ -263,3 +265,13 @@ void fw_upgrade_command_handler(void *body, *error_code = UPGRADE_SUCCESS; } + +void fw_upgrade_complete(void) +{ + upgrade_done = 1; +} + +int fw_upgraded(void) +{ + return upgrade_done; +} |