summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Moragues <moragues@google.com>2018-10-25 18:00:17 -0700
committerBob Moragues <moragues@chromium.org>2018-11-05 19:33:29 +0000
commit498a4bde0b641199ee671faf459bc1ac19e32e7e (patch)
tree9bf46c7a09a7ae34642062bbdb0037577ea851a0
parent21f778e89ae989229a99f8ec3f4e35868a30a35a (diff)
downloadchrome-ec-stabilize-11151.100.B.tar.gz
This RLZ code is used by cr50-verify-ro.sh. The RLZ code selects the verify_ro db to use. BUG=b:90495590 BRANCH=none TEST=gsctool -i -M; gsctool -i -M -t CQ-DEPEND=CL:1309453 Unit Test Rewults: localhost ~ # gsctool -i -M open_device 18d1:5014 found interface 3 endpoint 4, chunk_len 64 READY ------- BID_TYPE=4e425153 BID_TYPE_INV=b1bdaeac BID_FLAGS=00007f7f BID_RLZ=NBQS <-- CORRECT DUT RLZ localhost ~ # gsctool -i -M -t BID_TYPE=58574a45 BID_TYPE_INV=a7a8b5ba BID_FLAGS=00007f7f BID_RLZ=XWJE <-- CORRECT Test Device RLZ localhost ~ # Change-Id: I12fbca6885e3a1453544a1d379ad12ef3f6fd290 Signed-off-by: Bob Moragues <moragues@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1309454
-rw-r--r--extra/usb_updater/gsctool.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/extra/usb_updater/gsctool.c b/extra/usb_updater/gsctool.c
index 0f8c9a46c6..394851c9e9 100644
--- a/extra/usb_updater/gsctool.c
+++ b/extra/usb_updater/gsctool.c
@@ -1813,11 +1813,27 @@ void process_bid(struct transfer_descriptor *td,
print_machine_output(
"BID_FLAGS", "%08x", be32toh(bid->flags));
+ for (int i = 0; i < 4; i++) {
+ if (!isupper(((const char *)bid)[i])) {
+ print_machine_output(
+ "BID_RLZ", "%s", "????");
+ return;
+ }
+ }
+
+ print_machine_output(
+ "BID_RLZ", "%c%c%c%c",
+ ((const char *)bid)[0],
+ ((const char *)bid)[1],
+ ((const char *)bid)[2],
+ ((const char *)bid)[3]);
} else {
- printf("Board ID space: %08x:%08x:%08x\n",
- be32toh(bid->type),
- be32toh(bid->type_inv),
- be32toh(bid->flags));
+ if (bid_action == bid_get) {
+ printf("Board ID space: %08x:%08x:%08x\n",
+ be32toh(bid->type),
+ be32toh(bid->type_inv),
+ be32toh(bid->flags));
+ }
}
return;