diff options
author | Jun Nie <jun.nie@linaro.org> | 2018-08-24 10:27:38 +0800 |
---|---|---|
committer | Jun Nie <jun.nie@linaro.org> | 2018-08-24 10:27:38 +0800 |
commit | 146b7c4513eef98b612d71124c760995782022df (patch) | |
tree | 88a277afd3761ef1add5548791aa3e514009228c | |
parent | b9c9a6f5c3325905f31de11647ce111e607e3481 (diff) |
Aarch32: add arch version flag in makefile
add arch version flag in makefile so that this build flag
can be detected when building code.
Signed-off-by: Jun Nie <jun.nie@linaro.org>
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | framework/tftf.ld.S | 2 | ||||
-rw-r--r-- | plat/common/aarch32/platform_mp_stack.S | 4 |
3 files changed, 6 insertions, 3 deletions
@@ -221,12 +221,13 @@ endif ASFLAGS += -nostdinc -ffreestanding -Wa,--fatal-warnings \ -Werror -Wmissing-include-dirs \ -D__ASSEMBLY__ $(ASFLAGS_$(ARCH)) \ + -D ARM_ARCH_MAJOR=$(ARM_ARCH_MAJOR) \ ${DEFINES} ${INCLUDES} TFTF_CFLAGS += -nostdinc -pedantic -ffreestanding -Wall\ -Werror -Wno-error=unused-function \ -Wmissing-include-dirs $(TFTF_CFLAGS_$(ARCH)) \ -std=c99 -c -Os ${DEFINES} ${INCLUDES} -TFTF_CFLAGS += -ffunction-sections -fdata-sections +TFTF_CFLAGS += -ffunction-sections -fdata-sections -D ARM_ARCH_MAJOR=$(ARM_ARCH_MAJOR) # Get the content of CFLAGS user defined value last so they are appended after # the options defined in the Makefile diff --git a/framework/tftf.ld.S b/framework/tftf.ld.S index 73f4e2f..58f4d28 100644 --- a/framework/tftf.ld.S +++ b/framework/tftf.ld.S @@ -72,11 +72,13 @@ SECTIONS __STACKS_END__ = .; } >RAM +#if ARM_ARCH_MAJOR == 7 stacks (NOLOAD) : { __IRQ_STACKS_START__ = .; *(irq_stacks) __IRQ_STACKS_END__ = .; } >RAM +#endif /* * The .bss section gets initialised to 0 at runtime. diff --git a/plat/common/aarch32/platform_mp_stack.S b/plat/common/aarch32/platform_mp_stack.S index d0f9e6f..1532f6e 100644 --- a/plat/common/aarch32/platform_mp_stack.S +++ b/plat/common/aarch32/platform_mp_stack.S @@ -81,7 +81,7 @@ func platform_set_stack get_mp_stack platform_normal_stacks, PLATFORM_STACK_SIZE mov sp, r0 -#if ARM_ARCH_MAJOR != 8 +#if ARM_ARCH_MAJOR == 7 mrs r2, cpsr msr cpsr, #SPSR_ARMV7_IRQ get_mp_stack irq_stacks, IRQ_STACK_SIZE @@ -101,7 +101,7 @@ endfunc platform_set_stack declare_stack platform_normal_stacks, tftf_normal_stacks, \ PLATFORM_STACK_SIZE, PLATFORM_CORE_COUNT -#if ARM_ARCH_MAJOR != 8 +#if ARM_ARCH_MAJOR == 7 /* ----------------------------------------------------- * Per-cpu stacks in normal memory. * Used for C code during runtime execution (when coherent |