summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarthikeyan Ramasubramanian <kramasub@google.com>2022-10-27 22:49:40 -0600
committerFelix Held <felix-coreboot@felixheld.de>2022-11-07 14:57:01 +0000
commit4f9853a9a58d8d13fd3585f1ce7fe39945f86d81 (patch)
treee48a56f7798c7659027c6d7c6a3f8b5de1a0f342
parent2f548e597b637d6a66eb45ffca77e2ce2a776ae6 (diff)
security/vboot: Update build rules using x86 SHA extension
Currently build rules allow using x86 SHA extensions for all coreboot stages when enabled. On some SoCs where verstage can run in non-x86 environment, x86 SHA extension cannot be used. Update build rules accordingly such that x86 SHA extensions can be used in AMD SoCs. This is particularly useful when CBFS verificiation is enabled which verifies the hash of the CBFS file being loaded. BUG=b:227809919 TEST=Build and boot to OS in Skyrim. Observe that hardware acceleration is used when a CBFS file is loaded and observe an overall improvement of 10 ms. Change-Id: I4f388e963eb82990cda41d3880e66ad937334908 Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68953 Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kangheui Won <khwon@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
-rw-r--r--src/security/vboot/Makefile.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/security/vboot/Makefile.inc b/src/security/vboot/Makefile.inc
index d38fbace49..bd738711c3 100644
--- a/src/security/vboot/Makefile.inc
+++ b/src/security/vboot/Makefile.inc
@@ -28,7 +28,8 @@ $$(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)" \
+ X86_SHA_EXT="$(if $(CONFIG_ARCH_$(call toupper,$(1))_X86_32)$(CONFIG_ARCH_$(call toupper,$(1))_X86_64),$\
+ $(CONFIG_VBOOT_X86_SHA256_ACCELERATION))" \
$(MAKE) -C $(VBOOT_SOURCE) \
BUILD=$$(abspath $$(dir $$(VBOOT_LIB_$(1)))) \
V=$(V) \