diff options
author | Julius Werner <jwerner@chromium.org> | 2019-12-04 14:10:10 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-12-05 23:09:52 +0000 |
commit | 695c56dc50a59e5c9098c94f41b3d86b8f99baf1 (patch) | |
tree | 16bd144ce599fdd672de628789403e779de60fdc /Makefile | |
parent | fde6a3470cd92e623e6394abbe7e5830669555fc (diff) | |
download | vboot-695c56dc50a59e5c9098c94f41b3d86b8f99baf1.tar.gz |
Makefile: Make loop unrolling fully controllable by the caller
We recently reactivated the -DUNROLL_LOOPS code for x86 devices.
Unfortunatley, this seems to lead to code size problems for early
firmware stages on certain x86 boards (CB:37475). The biggest speedup
with unrolled loops was observed during kernel verification anyway
(which hashes orders of magnitude more data than firmware verification),
so let's make this fully configurable by the calling firmware and only
enable it from depthcharge. Pre-RAM coreboot changes are probably better
served with the smaller implementation anyway (and this will only become
more important as we move to CBFS per-file hashing and need hash
algorithms in every stage).
BRANCH=None
BUG=None
TEST=None
Cq-Depend: chromium:1951413
Change-Id: I87eaa14299cae0ee0d0b4a098d638b6bccdaf75b
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1951782
Reviewed-by: Aaron Durbin <adurbin@google.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -863,12 +863,14 @@ ${TLCL_OBJS}: CFLAGS += -DTPM_BLOCKING_CONTINUESELFTEST # CFLAGS += -DTPM_MANUAL_SELFTEST -ifneq ($(filter $(FIRMWARE_ARCH),x86 x86_64),) -# Unrolling loops in cryptolib makes it faster +ifneq ($(filter-out 0,$(UNROLL_LOOPS)),) +$(info vboot hash algos built with unrolled loops (faster, larger code size)) ${FWLIB_OBJS}: CFLAGS += -DUNROLL_LOOPS ${FWLIB2X_OBJS}: CFLAGS += -DUNROLL_LOOPS ${FWLIB20_OBJS}: CFLAGS += -DUNROLL_LOOPS ${FWLIB21_OBJS}: CFLAGS += -DUNROLL_LOOPS +else +$(info vboot hash algos built with tight loops (slower, smaller code size)) endif ${FWLIB21_OBJS}: INCLUDES += -Ifirmware/lib21/include |