diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-09-26 14:21:30 +0900 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-10-14 16:18:34 -0400 |
commit | 2fe1281c79cb8232cf0ca1c441db66e576a9acf4 (patch) | |
tree | 2c92236812eec9a189a44c5940fa0d203ff71a8a /arch/arm/cpu | |
parent | 4504062b271bf4d1cf256e4e87e156de6029e088 (diff) |
ARM: create .secure_stack section only for PSCI
Jon Master reports that QEMU refuses to load a U-Boot image built
with CONFIG_ARMV7_NONSEC, but without CONFIG_ARMV7_PSCI since
commit 5a3aae68c74e ("ARM: armv7: guard memory reserve for PSCI
with #ifdef CONFIG_ARMV7_PSCI").
It looks like only PSCI that needs the Secure stack, so move
the #ifdef to guard the whole of .secure_stack allocation in order
not to create the empty section.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reported-by: Jon Masters <jcm@redhat.com>
Link: http://patchwork.ozlabs.org/patch/664025/
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r-- | arch/arm/cpu/u-boot.lds | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds index 0a5fae6efc..37d4c605ac 100644 --- a/arch/arm/cpu/u-boot.lds +++ b/arch/arm/cpu/u-boot.lds @@ -74,6 +74,7 @@ SECTIONS *(._secure.data) } +#ifdef CONFIG_ARMV7_PSCI .secure_stack ALIGN(ADDR(.secure_data) + SIZEOF(.secure_data), CONSTANT(COMMONPAGESIZE)) (NOLOAD) : #ifdef __ARMV7_PSCI_STACK_IN_RAM @@ -83,10 +84,10 @@ SECTIONS #endif { KEEP(*(.__secure_stack_start)) -#ifdef CONFIG_ARMV7_PSCI + /* Skip addreses for stack */ . = . + CONFIG_ARMV7_PSCI_NR_CPUS * ARM_PSCI_STACK_SIZE; -#endif + /* Align end of stack section to page boundary */ . = ALIGN(CONSTANT(COMMONPAGESIZE)); @@ -109,6 +110,8 @@ SECTIONS . = LOADADDR(.secure_stack); #endif +#endif + .__secure_end : AT(ADDR(.__secure_end)) { *(.__secure_end) LONG(0x1d1071c); /* Must output something to reset LMA */ |