diff options
author | CHLin <CHLIN56@nuvoton.com> | 2019-02-15 17:37:03 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-03-21 08:07:22 -0700 |
commit | c272044163c0ca42f4b6649178a015b93ac4307d (patch) | |
tree | 3f65a87bae948c2d999d691450c51aeda93dc4e7 /common/vboot/vboot.c | |
parent | b72ca9b34df5f171da90059fd5cad0a66e84c07a (diff) | |
download | chrome-ec-c272044163c0ca42f4b6649178a015b93ac4307d.tar.gz |
vboot: increase the CPU clock during security computation
It was observed that the security verification is the bottleneck for the
EC boot time. In this CL, we reduce this bottleneck by accelerating the
CPU clock during the computation and set it back to normal after.
BRANCH=none
BUG=b:77608104
TEST=pass "make buildall"
TEST =on npcx7_evb, with related CL, we got ~4x improvement of
security verification time.
Change-Id: I679ca10639aa2978b048e1f23285130f6653649b
Signed-off-by: CHLin <CHLIN56@nuvoton.com>
Reviewed-on: https://chromium-review.googlesource.com/1475098
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: CH Lin <chlin56@nuvoton.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'common/vboot/vboot.c')
-rw-r--r-- | common/vboot/vboot.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/vboot/vboot.c b/common/vboot/vboot.c index 38d57ed45a..8a0e039aa2 100644 --- a/common/vboot/vboot.c +++ b/common/vboot/vboot.c @@ -10,6 +10,7 @@ #include "battery.h" #include "charge_manager.h" #include "chipset.h" +#include "clock.h" #include "console.h" #include "flash.h" #include "hooks.h" @@ -243,8 +244,10 @@ void vboot_main(void) return; } + clock_enable_module(MODULE_FAST_CPU, 1); /* If successful, this won't return. */ verify_and_jump(); + clock_enable_module(MODULE_FAST_CPU, 0); /* Failed to jump. Need recovery. */ request_recovery(); |