Yidi Lin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/72710 )
Change subject: libpayload: Add VBOOT_SHA_ARMV8_CE config ......................................................................
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 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)
Change-Id: If92830830a0658dfad2a066e9efa624783865cf2 Signed-off-by: Yidi Lin yidilin@chromium.org --- M payloads/libpayload/vboot/Kconfig M payloads/libpayload/vboot/Makefile.inc 2 files changed, 32 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/72710/1
diff --git a/payloads/libpayload/vboot/Kconfig b/payloads/libpayload/vboot/Kconfig index e712fbb..3b02155 100644 --- a/payloads/libpayload/vboot/Kconfig +++ b/payloads/libpayload/vboot/Kconfig @@ -24,4 +24,12 @@ 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 3ec3278..38bad4d 100644 --- a/payloads/libpayload/vboot/Makefile.inc +++ b/payloads/libpayload/vboot/Makefile.inc @@ -37,6 +37,7 @@ $(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)) \ + SHA_ARMV8_CE=$(call kconfig-to-binary, $(CONFIG_LP_VBOOT_SHA_ARMV8_CE)) \ UNROLL_LOOPS=1 \ BUILD="$(VBOOT_BUILD_DIR)" \ V=$(V) \