diff options
author | Mary Ruthven <mruthven@chromium.org> | 2021-10-07 11:32:43 -0500 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-10-15 18:29:38 +0000 |
commit | 484f31b694f04a3b027e3129f5153044a296ee5c (patch) | |
tree | 309009ec322d7fa477d3eaf756ac7ec0c82e9788 /extra | |
parent | 27d99037218b794324d5731591dafa8ab5209c92 (diff) | |
download | chrome-ec-484f31b694f04a3b027e3129f5153044a296ee5c.tar.gz |
ap_ro_status: report the button status if verification is unsupported
Shimless RMA needs to know if the button combo triggered AP RO
verification even if AP RO verification isn't supported. This change
adds two new responses AP_RO_UNSUPPORTED_TRIGGERED(5) and
AP_RO_UNSUPPORTED_NOT_TRIGGERED(4) to tell if the button combo was
pressed on a board that doesn't support AP RO verification.
The old AP_RO_UNSUPPORTED value, 3, isn't returned by cr50 anymore.
AP_RO_PASS(1) and AP_RO_FAIL(2) are still used. They both mean the combo
was triggered.
AP_RO_NOT_RUN(0) is still used. It still means the combo wasn't
triggered.
Summary of the states
- pressed - AP_RO_PASS(1), AP_RO_FAIL(2), AP_RO_UNSUPPORTED_TRIGGERED(5)
- not pressed - AP_RO_NOT_RUN(0) and AP_RO_UNSUPPORTED_NOT_TRIGGERED(4)
- unknown - AP_RO_UNSUPPORTED_UNKNOWN(3)
BUG=b:181000999
TEST=use gsctool to get the AP RO verification status on cr50 images
with the new and old version of the get AP RO status vendor command.
Change-Id: Ib2b33e69a4d4165fc2c13437a919b8f2a83c1bba
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3213112
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'extra')
-rw-r--r-- | extra/usb_updater/gsctool.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/extra/usb_updater/gsctool.c b/extra/usb_updater/gsctool.c index fed12126df..cf28976755 100644 --- a/extra/usb_updater/gsctool.c +++ b/extra/usb_updater/gsctool.c @@ -2306,7 +2306,7 @@ static int process_get_apro_boot_status(struct transfer_descriptor *td) } /* Print the response and meaning, as in 'enum ap_ro_status'. */ - printf("AP RO status = %d: ", response); + printf("apro result (%d) : ", response); switch (response) { case AP_RO_NOT_RUN: printf("not run\n"); @@ -2317,8 +2317,14 @@ static int process_get_apro_boot_status(struct transfer_descriptor *td) case AP_RO_FAIL: printf("FAIL\n"); break; - case AP_RO_UNSUPPORTED: - printf("unsupported\n"); + case AP_RO_UNSUPPORTED_TRIGGERED: + printf("not supported\ntriggered: yes\n"); + break; + case AP_RO_UNSUPPORTED_UNKNOWN: + printf("not supported\ntriggered: unknown\n"); + break; + case AP_RO_UNSUPPORTED_NOT_TRIGGERED: + printf("not supported\ntriggered: no\n"); break; default: fprintf(stderr, "unknown status\n"); |