diff options
author | Nicolas Boichat <drinkcat@google.com> | 2017-07-31 12:35:32 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-08-10 01:14:59 -0700 |
commit | 23b0d417f564619779dfb7c20ec4502d3ca132fe (patch) | |
tree | 877bc068a5c3b205a188b8ad403f50017e611443 /common/usb_update.c | |
parent | 7947687f12b2e802b2ef8cb13f9688ee7c10b746 (diff) | |
download | chrome-ec-23b0d417f564619779dfb7c20ec4502d3ca132fe.tar.gz |
update_fw: Add support for touchpad update over virtual address
In the field, we want to update touchpad FW using the same USB
update protocol as the main EC FW.
To distinguish between EC FW update and touchpad FW update, we
use a virtual address, defined by CONFIG_TOUCHPAD_VIRTUAL_OFF,
that does not map to anything on the EC chip.
Also, this will allow us to verify hashes of each block of the
flashed touchpad firmware, so that we can ensure its integrity
before flashing it into the touchpad. A stub is implemented in
update_fw.c:contents_allowed.
BRANCH=none
BUG=b:63993173
TEST=With follow-up CLs, ./usb_updater2 -p 144.0_2.0.bin
Change-Id: I4de1d7d138fc01fe1552a4173c8ef208ecb834a7
Signed-off-by: Nicolas Boichat <drinkcat@google.com>
Reviewed-on: https://chromium-review.googlesource.com/593373
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Chun-ta Lin <itspeter@chromium.org>
Diffstat (limited to 'common/usb_update.c')
-rw-r--r-- | common/usb_update.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/usb_update.c b/common/usb_update.c index 235c94640a..cfbcca9246 100644 --- a/common/usb_update.c +++ b/common/usb_update.c @@ -313,6 +313,11 @@ static int try_vendor_command(struct consumer const *consumer, size_t count) break; } +#ifdef CONFIG_TOUCHPAD_VIRTUAL_OFF + tp.fw_address = CONFIG_TOUCHPAD_VIRTUAL_OFF; + tp.fw_size = CONFIG_TOUCHPAD_VIRTUAL_SIZE; +#endif + QUEUE_ADD_UNITS(&update_to_usb, &tp, response_size); return 1; |