summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Sukhomlinov <sukhomlinov@google.com>2023-04-14 08:03:33 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-04-20 00:23:50 +0000
commitec1d8afd51950d4724db47303ab940ea411cd99d (patch)
tree7404c0d677e12bb1d176b80a46bec686bbac647a
parentdeefb512d1bc870002173f5d8e707c48668b8368 (diff)
downloadchrome-ec-ec1d8afd51950d4724db47303ab940ea411cd99d.tar.gz
cr50: remove -fconserve-stack for cr50 excluding FIPSstabilize-15432.B-cr50_stabstabilize-15429.B-cr50_stab
1. -fconserve-stack costs 888 bytes (1.7K for CRYPTO_TEST=1) of code size with unclear benefits. This option exists since initial commit `e24fa592d` on 7 Dec 2011. Real stack usage after TCG tests is sligthly reduced for TPM2 and CONSOLE tasks, slightly increased for HOOKS task. 2. FIPS digest remains the same as FIPS module still compiles with this option set. This has a penalty of ~200 bytes, but maintaining stable digest is more important. Before: *** 3700 bytes in flash and 1100 bytes in RAM Task Ready Name Events Time (s) StkUsed 0 R << idle >> 80000000 2622.363199 104/512 1 HOOKS 00000000 83.747318 664/1024 2 TPM 00000000 34.779582 7600/8192 3 R CONSOLE 00000000 0.338724 424/1024 After: *** 4588 bytes in flash and 1100 bytes in RAM Task Ready Name Events Time (s) StkUsed 0 R << idle >> 80000000 747.794338 104/512 1 R HOOKS 80000000 9.372003 704/1024 2 TPM 00000000 36.982134 7588/8192 3 R CONSOLE 00000000 0.428505 408/1024 BUG=b:277777628 TEST=make BOARD=cr50; tpm_test.py; TCG tests Change-Id: I1ae1c8af6b0870b48f3f985476fa0a0d2b8f57d0 Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4426791 Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Code-Coverage: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Auto-Submit: Vadim Sukhomlinov <sukhomlinov@chromium.org>
-rw-r--r--core/cortex-m/build.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/cortex-m/build.mk b/core/cortex-m/build.mk
index cf2d851c77..9415b97487 100644
--- a/core/cortex-m/build.mk
+++ b/core/cortex-m/build.mk
@@ -37,7 +37,7 @@ export CFLAGS_LTO_PARTIAL_LINK := -flinker-output=nolto-rel
# -ffat-lto-objects is a workaround for b/134623681
# Disable assembler warnings
# TODO (b/238039591) Remove `-Wa,W` when binutils is fixed.
-CFLAGS_CPU += -Wa,-W -ffat-lto-objects -fconserve-stack
+CFLAGS_CPU += -Wa,-W -ffat-lto-objects
endif
core-y=cpu.o init.o ldivmod.o llsr.o uldivmod.o vecttable.o