Attention is currently required from: Julius Werner, Yu-Ping Wu.
Yidi Lin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/72711 )
Change subject: vboot: Add VBOOT_ARMV8_CE_SHA256_ACCELERATION config ......................................................................
vboot: Add VBOOT_ARMV8_CE_SHA256_ACCELERATION config
Add Kconfig option for VBOOT_ARMV8_CE_SHA256_ACCELERATION, which will use ARMv8 Crypto Extension for SHA256[1] instead of software implementatin.
This will speed up firmware verification in verstage.
[1] https://crrev.com/c/4170144
BUG=b:263514393 TEST='calculating body hash (SHA2)' get 13 msecs improvement on Tentacruel. Before: 509:finished calculating body hash (SHA2) 161,548 (14,490)
After: 509:finished calculating body hash (SHA2) 155,101 (1,187)
Change-Id: I02671338fd9e0deb5294dbb7c03528061edc18c4 Signed-off-by: Yidi Lin yidilin@chromium.org --- M src/security/vboot/Kconfig M src/security/vboot/Makefile.inc 2 files changed, 34 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/11/72711/1
diff --git a/src/security/vboot/Kconfig b/src/security/vboot/Kconfig index 9025979..af51083 100644 --- a/src/security/vboot/Kconfig +++ b/src/security/vboot/Kconfig @@ -291,6 +291,13 @@ Use sha256msg1, sha256msg2, sha256rnds2 instruction to accelerate SHA hash calculation in vboot.
+config VBOOT_ARMV8_CE_SHA256_ACCELERATION + bool "Use ARMv8 Crypto Extension for sha256 hash calculation" + default n + depends on ARCH_ARM64 + help + Use ARMv8 Crypto Extension to accelerate SHA hash calculation in vboot. + config VBOOT_DEFINE_WIDEVINE_COUNTERS bool default n diff --git a/src/security/vboot/Makefile.inc b/src/security/vboot/Makefile.inc index 8747e02..616e6c8 100644 --- a/src/security/vboot/Makefile.inc +++ b/src/security/vboot/Makefile.inc @@ -30,6 +30,7 @@ EC_EFS="$(CONFIG_VBOOT_EC_EFS)" \ X86_SHA_EXT="$(if $(CONFIG_ARCH_$(call toupper,$(1))_X86_32)$(CONFIG_ARCH_$(call toupper,$(1))_X86_64),$\ $(CONFIG_VBOOT_X86_SHA256_ACCELERATION))" \ + SHA_ARMV8_CE="$(if $(CONFIG_ARCH_$(call toupper,$(1))_ARMV8_64),$$(CONFIG_VBOOT_ARMV8_CE_SHA256_ACCELERATION))" \ $(MAKE) -C $(VBOOT_SOURCE) \ BUILD=$$(abspath $$(dir $$(VBOOT_LIB_$(1)))) \ V=$(V) \