From 0e906536fffa057f22098ec6a4dd6572c419b539 Mon Sep 17 00:00:00 2001 From: Daisuke Nojiri Date: Thu, 23 Oct 2014 18:14:39 -0700 Subject: [PATCH] armv7-m: use generic memset, memcpy, memmove this change makes bootblock and verstage built for armv7-m use generic memset, memcpy, and memmove because arch/arm/memset.S, memcpy.S, and memmove.S are not compatible with armv7-m. BUG=none BRANCH=ToT TEST=Ran bootblock on Cosmos prototype board. Emerged all current boards. Change-Id: Ie1df2525362ffc2e8438ff7bd5fad7629b0477de Signed-off-by: Daisuke Nojiri Reviewed-on: https://chromium-review.googlesource.com/225312 Reviewed-by: Vadim Bendebury --- src/arch/arm/Makefile.inc | 4 ++++ src/lib/Makefile.inc | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/src/arch/arm/Makefile.inc b/src/arch/arm/Makefile.inc index 9df605f255..58c9c953fc 100644 --- a/src/arch/arm/Makefile.inc +++ b/src/arch/arm/Makefile.inc @@ -48,9 +48,11 @@ bootblock-y += id.S bootblock-y += clock.c bootblock-y += stages.c bootblock-y += eabi_compat.c +ifneq ($(CONFIG_ARCH_BOOTBLOCK_ARM_V7_M),y) bootblock-y += memset.S bootblock-y += memcpy.S bootblock-y += memmove.S +endif bootblock-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c $(objcbfs)/bootblock.debug: $$(bootblock-objs) @@ -72,9 +74,11 @@ $(objcbfs)/verstage.debug: $$(verstage-objs) $$(VB2_LIB) verstage-$(CONFIG_EARLY_CONSOLE) += early_console.c verstage-y += div0.c verstage-y += eabi_compat.c +ifneq ($(CONFIG_ARCH_VERSTAGE_ARM_V7_M),y) verstage-y += memset.S verstage-y += memcpy.S verstage-y += memmove.S +endif verstage-y += stages.c verstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index 69f2ad96e3..a76e390e43 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -21,6 +21,9 @@ bootblock-y += cbfs.c bootblock-$(CONFIG_COMMON_CBFS_SPI_WRAPPER) += cbfs_spi.c bootblock-y += memchr.c bootblock-y += memcmp.c +ifeq ($(CONFIG_ARCH_BOOTBLOCK_ARM_V7_M),y) +bootblock-y += memset.c memcpy.c memmove.c +endif bootblock-$(CONFIG_GENERIC_UDELAY) += timer.c @@ -41,6 +44,9 @@ $(foreach arch,$(ARCH_SUPPORTED),\ verstage-y += delay.c verstage-y += cbfs.c verstage-y += memcmp.c +ifeq ($(CONFIG_ARCH_VERSTAGE_ARM_V7_M),y) +verstage-y += memset.c memcpy.c memmove.c +endif verstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c verstage-$(CONFIG_COMMON_CBFS_SPI_WRAPPER) += cbfs_spi.c verstage-y += tlcl.c