diff options
author | Yi Chou <yich@google.com> | 2022-10-19 12:23:34 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-04-26 06:40:45 +0000 |
commit | cb0eaa47f7a195340a0ef8ea427c3cf050774562 (patch) | |
tree | ec975f1eab716eac35b3f38dc57078f99a3076d9 | |
parent | 29e0ad96a7692ecbf8b08e13166821437f5690fb (diff) | |
download | chrome-ec-cb0eaa47f7a195340a0ef8ea427c3cf050774562.tar.gz |
fpsensor: Boost the CPU when needed
We should boost the CPU for faster crypto operations.
BUG=b:248508087
TEST=make V=1 BOARD=bloonchipper -j
BRANCH=none
Signed-off-by: Yi Chou <yich@google.com>
Change-Id: I533f8c487a5f7485c0f775b8228073623d563d4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3965870
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
-rw-r--r-- | common/fpsensor/fpsensor.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/fpsensor/fpsensor.cc b/common/fpsensor/fpsensor.cc index c824f5c11a..7af7082420 100644 --- a/common/fpsensor/fpsensor.cc +++ b/common/fpsensor/fpsensor.cc @@ -455,6 +455,8 @@ static enum ec_status fp_command_frame(struct host_cmd_handler_args *args) return EC_RES_INVALID_PARAM; if (!offset) { + ScopedFastCpu fast_cpu; + /* Host has requested the first chunk, do the encryption. */ timestamp_t now = get_time(); /* Encrypted template is after the metadata. */ @@ -599,6 +601,8 @@ static enum ec_status fp_command_template(struct host_cmd_handler_args *args) memcpy(&fp_enc_buffer[offset], params->data, size); if (xfer_complete) { + ScopedFastCpu fast_cpu; + /* Encrypted template is after the metadata. */ uint8_t *encrypted_template = fp_enc_buffer + sizeof(*enc_info); /* Positive match salt is after the template. */ |