From afa982f68705d35522e19133650d3985677a2d36 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Tue, 28 Dec 2021 17:45:18 -0800 Subject: ap ro verification: add log entry for the 'unsupported' case Let's have different log entries for the case when AP RO verification is provisioned but failed, and when it is supported. BUG=b:211762871 TEST=none Signed-off-by: Vadim Bendebury Change-Id: If99c89e6c6c0d10eec2d9e9c97d13e85bb3f1f23 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3360091 Tested-by: Vadim Bendebury Reviewed-by: Andrey Pronin --- common/ap_ro_integrity_check.c | 3 ++- include/flash_log.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common/ap_ro_integrity_check.c b/common/ap_ro_integrity_check.c index 939a618c64..59ce15a25b 100644 --- a/common/ap_ro_integrity_check.c +++ b/common/ap_ro_integrity_check.c @@ -1447,10 +1447,10 @@ static uint8_t do_ap_ro_check(void) if (rv != ROV_SUCCEEDED) { /* Failure reason has already been reported. */ - ap_ro_add_flash_event(APROF_CHECK_FAILED); if ((rv == ROV_FAILED) || check_is_required()) { apro_result = AP_RO_FAIL; + ap_ro_add_flash_event(APROF_CHECK_FAILED); keep_ec_in_reset(); /* * Map failures into EC_ERROR_CRC, this will make sure @@ -1465,6 +1465,7 @@ static uint8_t do_ap_ro_check(void) } apro_result = AP_RO_UNSUPPORTED_TRIGGERED; + ap_ro_add_flash_event(APROF_CHECK_UNSUPPORTED); return EC_ERROR_UNIMPLEMENTED; } diff --git a/include/flash_log.h b/include/flash_log.h index 14d65953b6..cc6c292d49 100644 --- a/include/flash_log.h +++ b/include/flash_log.h @@ -99,6 +99,7 @@ enum ap_ro_verification_ev { APROF_SPACE_INVALID = 5, APROF_CHECK_FAILED = 6, APROF_CHECK_SUCCEEDED = 7, + APROF_CHECK_UNSUPPORTED = 8, }; struct ap_ro_entry_payload { -- cgit v1.2.1