From 262ded1e01a374537e56160811bdad5763b311a5 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Mon, 29 Apr 2019 17:09:19 -0700 Subject: nvmem: add logging and restart on app_cipher failures Just in case there is a failure when encrypting or decrypting NVMEM objects, add code which detects problems, reports them in the flash log and reboots. BRANCH=cr50, cr50-mp BUG=b:69907320, b:129710256 TEST=none Change-Id: I22e55941f459b5b45bf4b23781b20601a56b40d8 Signed-off-by: Vadim Bendebury Reviewed-on: https://chromium-review.googlesource.com/1590042 Reviewed-by: Andrey Pronin --- include/flash_log.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/flash_log.h') diff --git a/include/flash_log.h b/include/flash_log.h index cfdaf46ce8..bbdd8bb0b3 100644 --- a/include/flash_log.h +++ b/include/flash_log.h @@ -61,7 +61,8 @@ enum nvmem_failure_type { NVMEMF_MISSING_OBJECT = 8, NVMEMF_SECTION_VERIFY = 9, NVMEMF_PRE_ERASE_MISMATCH = 10, - NVMEMF_PAGE_LIST_OVERFLOW = 11 + NVMEMF_PAGE_LIST_OVERFLOW = 11, + NVMEMF_CIPHER_ERROR = 12 }; /* Not all nvmem failures require payload. */ -- cgit v1.2.1