diff options
author | Simon Glass <sjg@chromium.org> | 2017-04-02 09:50:28 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-04-04 20:01:57 -0600 |
commit | ab4458bdb5074ababe09f2538cb9f25901121ebb (patch) | |
tree | a995262be8e740ca6964852434e81c599e753be7 /lib/Kconfig | |
parent | 3c00a2c8b5e22e3eff9afb291e555b4bcba17d77 (diff) | |
download | u-boot-ab4458bdb5074ababe09f2538cb9f25901121ebb.tar.gz u-boot-ab4458bdb5074ababe09f2538cb9f25901121ebb.tar.bz2 u-boot-ab4458bdb5074ababe09f2538cb9f25901121ebb.zip |
string: Provide a slimmed-down memset()
Most of the time the optimised memset() is what we want. For extreme
situations such as TPL it may be too large. For example on the 'rock'
board, using a simple loop saves a useful 48 bytes. With gcc 4.9 and
the rodata bug, this patch is enough to reduce the TPL image below the
limit.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Diffstat (limited to 'lib/Kconfig')
-rw-r--r-- | lib/Kconfig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Kconfig b/lib/Kconfig index 65c01573e1..5115d047f8 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -52,6 +52,15 @@ config LIB_RAND help This library provides pseudo-random number generator functions. +config SPL_TINY_MEMSET + bool "Use a very small memset() in SPL" + help + The faster memset() is the arch-specific one (if available) enabled + by CONFIG_USE_ARCH_MEMSET. If that is not enabled, we can still get + better performance by writing a word at a time. But in very + size-constrained envrionments even this may be too big. Enable this + option to reduce code size slightly at the cost of some speed. + source lib/dhry/Kconfig source lib/rsa/Kconfig |