diff options
author | Stefan Reinauer <reinauer@chromium.org> | 2011-11-02 10:55:57 -0700 |
---|---|---|
committer | Stefan Reinauer <reinauer@chromium.org> | 2011-11-02 13:00:14 -0700 |
commit | b7d2f1efcab4356cabfdbe941cf9a35ac084eca4 (patch) | |
tree | 3221a4bf2333c6407835293f0d15db3ce975ecbc | |
parent | 66264b5d9778e7f3e99f4f72e170d2ef6a819a0e (diff) | |
download | vboot-b7d2f1efcab4356cabfdbe941cf9a35ac084eca4.tar.gz |
vboot_reference: clean up CFLAGS and enable unrolled loops
- loop unrolling has a positive effect on execution speed.
- This change also drops the -march=i386 and thus allows
the compiler to use SSE instructions.
- A few duplicate options are dropped from CFLAGS.
- drop -fno-toplevel-reordering. This sneaked in from
u-boot where it might be needed by some drivers.
With this change I just successfully booted my Stumpy in 833ms
BUG=chrome-os-partner:4675
TEST=boot tested on stumpy
Change-Id: I805cbcaec48b4f8d1d8fa7d7bed9241178f59a8e
Reviewed-on: https://gerrit.chromium.org/gerrit/11061
Tested-by: Stefan Reinauer <reinauer@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | firmware/Makefile | 8 |
2 files changed, 10 insertions, 6 deletions
@@ -33,11 +33,9 @@ endif ifeq ($(FIRMWARE_ARCH), i386) CC = i686-pc-linux-gnu-gcc CFLAGS = -g -Os -ffunction-sections -fvisibility=hidden -fno-builtin \ - -ffreestanding -nostdinc \ - -pipe -fno-strict-aliasing -Wstrict-prototypes -mregparm=3 \ - -fomit-frame-pointer -ffreestanding -fno-toplevel-reorder \ - -fno-stack-protector -mpreferred-stack-boundary=2 -fno-dwarf2-cfi-asm \ - -march=i386 -Werror -Wall -Wstrict-prototypes -fno-stack-protector + -ffreestanding -nostdinc -pipe -Wstrict-prototypes -mregparm=3 \ + -fomit-frame-pointer -fno-stack-protector \ + -mpreferred-stack-boundary=2 -fno-dwarf2-cfi-asm -Werror -Wall endif # Fix compiling directly on host (outside of emake) diff --git a/firmware/Makefile b/firmware/Makefile index 9c969bf8..34381119 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -31,7 +31,13 @@ CFLAGS += -DTPM_BLOCKING_CONTINUESELFTEST # We sincerely hope that TPM_BLOCKING_CONTINUESELFTEST and TPM_MANUAL_SELFTEST # are not both defined at the same time. (See comment in code.) -# CLAGS += -DTPM_MANUAL_SELFTEST +# CFLAGS += -DTPM_MANUAL_SELFTEST + +# +# Unrolling loops in cryptolib makes it faster +# + +CFLAGS += -DUNROLL_LOOPS INCLUDES = \ -I$(FWTOP)/include \ |