diff options
author | Subrata Banik <subrata.banik@intel.com> | 2021-06-17 19:27:12 +0530 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-07-01 09:38:19 +0000 |
commit | 9479037f38b74ca26819366d6573e0e548f79cf3 (patch) | |
tree | 27df40cb9b2a5b5711dd89f8c0addb5ff4a8e16a /src/security/vboot | |
parent | bf487e46d7b4777e42aa5096bf450e5c723c65b5 (diff) |
vboot: add VBOOT_X86_SHA256_ACCELERATION config
Add Kconfig option for VBOOT_X86_SHA256_ACCELERATION, which will
use x86-sha extension for SHA256 instead of software implementation.
TEST=Able to call vb2ex_hwcrypto_digest_init() and perform SHA
using HW crypto engine.
Change-Id: Idc8be8711c69f4ebc489cd37cc3749c0b257c610
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55611
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/security/vboot')
-rw-r--r-- | src/security/vboot/Kconfig | 8 | ||||
-rw-r--r-- | src/security/vboot/Makefile.inc | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/security/vboot/Kconfig b/src/security/vboot/Kconfig index 036875884b..7cbeea3e39 100644 --- a/src/security/vboot/Kconfig +++ b/src/security/vboot/Kconfig @@ -274,6 +274,14 @@ config VBOOT_EC_EFS software sync needs to also support it. This setting tells vboot to perform EFS software sync. +config VBOOT_X86_SHA256_ACCELERATION + bool "Use sha extension for sha256 hash calculation" + default n + depends on ARCH_X86 + help + Use sha256msg1, sha256msg2, sha256rnds2 instruction to accelerate + SHA hash calculation in vboot. + menu "GBB configuration" config GBB_HWID diff --git a/src/security/vboot/Makefile.inc b/src/security/vboot/Makefile.inc index 47830f3c62..d604d1c862 100644 --- a/src/security/vboot/Makefile.inc +++ b/src/security/vboot/Makefile.inc @@ -28,6 +28,7 @@ $$(VBOOT_LIB_$(1)): $(obj)/config.h CC="$$(CC_$(1))" \ CFLAGS="$$(VBOOT_CFLAGS_$(1))" VBOOT2="y" \ EC_EFS="$(CONFIG_VBOOT_EC_EFS)" \ + X86_SHA_EXT="$(CONFIG_VBOOT_X86_SHA256_ACCELERATION)" \ $(MAKE) -C $(VBOOT_SOURCE) \ BUILD=$$(abspath $$(dir $$(VBOOT_LIB_$(1)))) \ V=$(V) \ |