summaryrefslogtreecommitdiff
path: root/extra/usb_updater/verify_ro.h
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2018-02-22 17:07:27 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-02-23 23:12:58 -0800
commitd57e5eb3128774732e3b3fe40c0f939d9aaeff1a (patch)
tree8d0ef7e582227d66faa958de61aa967b05eefaa4 /extra/usb_updater/verify_ro.h
parent52b93ce19d00c9a6507c630501904b845a1b6486 (diff)
downloadchrome-ec-d57e5eb3128774732e3b3fe40c0f939d9aaeff1a.tar.gz
gsctool: add open box RMA option
This patch enhances the gsctool utility to allow to verify RO sections of the target AP and EC flash memory. The only command line parameter required for the new option ('O') is the file name of the target descriptors database, containing memory description sections for one or more Chrome OS devices. Memory description sections are of two types (both types could be referring AP or EC memory): - hash descriptor, this section includes the address range of the memory and one or more hash values for the contents of that address range. Multiple hashes are needed in case when the same device has mnore than one RO firmware releases in circulation. - dump descriptor, this is a request for this utility to display on the console the contents of the certain area of flash memory on the target. When this utility starts the process, the target might request that the operator confirms physical presence, in this case the utility keeps prompting the operator to press the physical presence button until DUT is satisfied, BRANCH=none BUG=b:73668125 TEST=created a descriptor database for a Robo device feeding it with values retrieved on the device by locally running spihash command on the device. Then ran this utility to verify successful hash and dump retrievals, comparing dump values with values obtained through Cr50 console directly. Created additional dummy hash variants and verified that the utility succeeds only if all matches happen at the same variant index in different hash sections. Change-Id: Ib43cf4eb642d141b7cd7f129ef412e14bd59f30b Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/933545 Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'extra/usb_updater/verify_ro.h')
-rw-r--r--extra/usb_updater/verify_ro.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/extra/usb_updater/verify_ro.h b/extra/usb_updater/verify_ro.h
new file mode 100644
index 0000000000..c37ba3a337
--- /dev/null
+++ b/extra/usb_updater/verify_ro.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2018 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef __EXTRA_USB_UPDATER_VERIFY_RO_H
+#define __EXTRA_USB_UPDATER_VERIFY_RO_H
+
+#include "gsctool.h"
+
+int verify_ro(struct transfer_descriptor *td,
+ const char *desc_file_name);
+
+#endif // __EXTRA_USB_UPDATER_VERIFY_RO_H