From 026e45300709faae9cc73d4f42f111fffab99120 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Wed, 21 Aug 2019 14:33:13 -0700 Subject: nvmem: reinitialize on catastrophic errors If there is an NVMEM corruption which causes a reboot, persisting corruption would cause rolling reboot of the device. It is a harsh remedy, but at least the device remains functional. Added a log entry to explicitly report NVMEM reinitialization. BRANCH=cr50, cr50-mp BUG=b:139326267 TEST=verified by erasing a flash page assigned to NVMEM and rebooting the device. Observed two new flash log entries. Change-Id: Id292d7c66b81c03bbe3cd343ae75acb62d06582d Signed-off-by: Vadim Bendebury Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1758805 Reviewed-by: Andrey Pronin --- include/flash_log.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/flash_log.h') diff --git a/include/flash_log.h b/include/flash_log.h index 64ee2703e3..e504df6ee7 100644 --- a/include/flash_log.h +++ b/include/flash_log.h @@ -65,7 +65,10 @@ enum nvmem_failure_type { NVMEMF_PRE_ERASE_MISMATCH = 10, NVMEMF_PAGE_LIST_OVERFLOW = 11, NVMEMF_CIPHER_ERROR = 12, - NVMEMF_CORRUPTED_INIT = 13 + NVMEMF_CORRUPTED_INIT = 13, + NVMEMF_CONTAINER_HASH_MISMATCH = 14, + NVMEMF_UNRECOVERABLE_INIT = 15, + NVMEMF_NVMEM_WIPE = 16, }; /* Not all nvmem failures require payload. */ -- cgit v1.2.1