diff options
author | Yidi Lin <yidilin@chromium.org> | 2023-01-31 15:09:24 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-02-16 15:04:24 +0000 |
commit | 70409217e7a747d8d0113583648b6ac28f256ae9 (patch) | |
tree | cc29d311f94a8cdc6e4134ad7bc6d35f5521df46 /payloads/libpayload | |
parent | 458f1720f1a6b4a67111f4c2398f5ec5f6e5c1c5 (diff) |
libpayload: Add VBOOT_SHA_ARMV8_CE config
Add Kconfig option for VBOOT_SHA_ARMV8_CE, which will use ARMv8 Crypto
Extension for SHA256[1] instead of software implementation.
[1] https://crrev.com/c/4170144
BUG=b:263514393
BRANCH=corsola
TEST='vboot kernel verification' gets 111 msecs improvement on
Tentacruel.
Before:
1100:finished vboot kernel verification 905,150 (123,518)
After:
1100:finished vboot kernel verification 787,277 (12,254)
Cq-Depend: chromium:4170144, chromium:4242678
Change-Id: If92830830a0658dfad2a066e9efa624783865cf2
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72710
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'payloads/libpayload')
-rw-r--r-- | payloads/libpayload/vboot/Kconfig | 8 | ||||
-rw-r--r-- | payloads/libpayload/vboot/Makefile.inc | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/payloads/libpayload/vboot/Kconfig b/payloads/libpayload/vboot/Kconfig index e712fbbb66..3b02155fc3 100644 --- a/payloads/libpayload/vboot/Kconfig +++ b/payloads/libpayload/vboot/Kconfig @@ -24,4 +24,12 @@ config VBOOT_X86_SHA_EXT This option enables SHA256 implementation using x86 SHA processor extension instructions: sha256msg1, sha256msg2, sha256rnds2. +config VBOOT_SHA_ARMV8_CE + bool "SHA256 implementation using ARMv8 Crypto Extension" + default y if CHROMEOS + default n + depends on ARCH_ARM64 + help + This option enables SHA256 implementation using ARMv8 Crypto Extension. + endif diff --git a/payloads/libpayload/vboot/Makefile.inc b/payloads/libpayload/vboot/Makefile.inc index 3ec3278be2..5677df9e8c 100644 --- a/payloads/libpayload/vboot/Makefile.inc +++ b/payloads/libpayload/vboot/Makefile.inc @@ -37,6 +37,7 @@ $(VBOOT_FW_LIB): $(obj)/libpayload-config.h $(MAKE) -C "$(VBOOT_SOURCE)" \ TPM2_MODE=$(call kconfig-to-binary, $(CONFIG_LP_VBOOT_TPM2_MODE)) \ X86_SHA_EXT=$(call kconfig-to-binary, $(CONFIG_LP_VBOOT_X86_SHA_EXT)) \ + ARMV8_CRYPTO_EXT=$(call kconfig-to-binary, $(CONFIG_LP_VBOOT_SHA_ARMV8_CE)) \ UNROLL_LOOPS=1 \ BUILD="$(VBOOT_BUILD_DIR)" \ V=$(V) \ |