u-boot-brain/arch/arm/cpu
Chen-Yu Tsai b56e06d343 ARM: allocate extra space for PSCI stack in secure section during link phase
The PSCI implementation expects at most 2 pages worth of space reserved
at the end of the secure section for its stacks. If PSCI is relocated to
secure SRAM, then everything is fine. If no secure SRAM is available,
and PSCI remains in main memory, the reserved memory space doesn't cover
the space used by the stack.

If one accesses PSCI after Linux has fully booted, the memory that should
have been reserved for the PSCI stacks may have been used by the kernel
or userspace, and would be corrupted. Observed after effects include the
system hanging or telinit core dumping when trying to reboot. It seems
the init process gets hit the most on my test bed.

This fix allocates the space used by the PSCI stacks in the secure
section by skipping pages in the linker script, but only when there is
no secure SRAM, to avoid bloating the binary.

This fix is only a stop gap. It would be better to rework the stack
allocation mechanism, maybe with proper usage of CONFIG_ macros and an
explicit symbol.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2016-06-20 22:43:59 +02:00
..
arm11 ARM: cache: implement a default weak flush_cache() function 2015-08-12 20:47:48 -04:00
arm720t ARM: ARM720t: remove empty asm/arch/hardware.h 2015-04-23 08:52:27 -04:00
arm920t arm: Allow skipping of low-level init with I-cache on 2016-06-12 23:49:38 +02:00
arm926ejs Merge branch 'master' of git://git.denx.de/u-boot-atmel 2016-06-13 08:50:58 -04:00
arm946es arm: Allow skipping of low-level init with I-cache on 2016-06-12 23:49:38 +02:00
arm1136 arm: Allow skipping of low-level init with I-cache on 2016-06-12 23:49:38 +02:00
arm1176 ARM: start.S: fix typo 2016-02-29 14:49:35 -05:00
armv7 ARM: PSCI: save and restore clobbered registers in v7_flush_dcache_all 2016-06-20 22:43:59 +02:00
armv7m stm32: move stm32 specific code to mach-stm32 2016-01-20 10:19:41 -05:00
armv8 Merge branch 'master' of git://git.denx.de/u-boot-usb 2016-06-18 23:46:21 -04:00
pxa pxa: add support for D- and I- caches 2016-03-27 09:13:00 -04:00
sa1100 arm: Allow skipping of low-level init with I-cache on 2016-06-12 23:49:38 +02:00
Makefile Various Makefiles: Add SPDX-License-Identifier tags 2015-11-10 09:19:52 -05:00
u-boot-spl.lds spl: arm: Make sure to include all of the u_boot_list entries 2016-03-16 15:27:55 -04:00
u-boot.lds ARM: allocate extra space for PSCI stack in secure section during link phase 2016-06-20 22:43:59 +02:00