From 3495069b4e13950728cd52291664a7e27f86bbda Mon Sep 17 00:00:00 2001 From: Jett Rink Date: Thu, 9 Feb 2023 18:09:44 +0000 Subject: gsctool: add two new AP RO verification status Add nice strings for two new AP RO verification status codes. Also make the unknown value match what is specified in ti50 (255) BUG=none TEST=make gsctool builds Change-Id: I26399640dd2cc73d7f463f38e49e5234024c24fb Signed-off-by: Jett Rink Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4237256 Tested-by: Jett Rink Commit-Queue: Jett Rink Reviewed-by: Mary Ruthven Auto-Submit: Jett Rink --- extra/usb_updater/gsctool.c | 6 ++++++ include/ap_ro_integrity_check.h | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/extra/usb_updater/gsctool.c b/extra/usb_updater/gsctool.c index 3d22f45725..8af5f0c550 100644 --- a/extra/usb_updater/gsctool.c +++ b/extra/usb_updater/gsctool.c @@ -2795,6 +2795,9 @@ static int process_get_apro_boot_status(struct transfer_descriptor *td) case AP_RO_PASS_UNVERIFIED_GBB: printf("pass - unverified gbb!\n"); break; + case AP_RO_V2_NON_ZERO_GBB_FLAGS: + printf("pass - except non-zero gbb flags!\n"); + break; case AP_RO_FAIL: case AP_RO_V2_FAILED_VERIFICATION: printf("FAIL\n"); @@ -2847,6 +2850,9 @@ static int process_get_apro_boot_status(struct transfer_descriptor *td) case AP_RO_V2_SETTING_NOT_PROVISIONED: printf("setting not provisioned\n"); break; + case AP_RO_V2_WRONG_ROOT_KEY: + printf("key is recognized but disallowed (e.g. preMP key)\n"); + break; default: printf("unknown\n"); fprintf(stderr, "unknown status\n"); diff --git a/include/ap_ro_integrity_check.h b/include/ap_ro_integrity_check.h index 0591742cc8..feb7c56b4e 100644 --- a/include/ap_ro_integrity_check.h +++ b/include/ap_ro_integrity_check.h @@ -33,7 +33,13 @@ enum ap_ro_status { AP_RO_V2_MISSING_GSCVD = 31, AP_RO_V2_BOARD_ID_MISMATCH = 32, AP_RO_V2_SETTING_NOT_PROVISIONED = 33, - AP_RO_V2_UNKNOWN = 34, + /* + * Do not use values 34 and 35. They are ambiguous depending on + * ti50 FW version. + */ + AP_RO_V2_NON_ZERO_GBB_FLAGS = 36, + AP_RO_V2_WRONG_ROOT_KEY = 37, + AP_RO_V2_UNKNOWN = 255, }; /* * validate_ap_ro: based on information saved in an H1 RO flash page verify -- cgit v1.2.1