u-boot/arch/arm
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
..
cpu ARM: allocate extra space for PSCI stack in secure section during link phase 2016-06-20 22:43:59 +02:00
dts sunxi: Add defconfig and dts file for inet86dz board 2016-06-20 22:43:59 +02:00
imx-common imx-common: timer: support i.MX6DQPlus 2016-05-24 14:59:56 +02:00
include ARM: PSCI: export common PSCI function declarations for C code 2016-06-20 22:43:59 +02:00
lib arm/arm64: implement a boot header capability 2016-06-06 13:39:19 -04:00
mach-at91 ARM: at91: Fix PMC bit definitions 2016-06-12 23:49:38 +02:00
mach-bcm283x rpi: remove redundant board files 2016-04-11 20:48:23 -04:00
mach-davinci arm: Add support for LEGO MINDSTORMS EV3 2016-03-14 19:18:40 -04:00
mach-exynos ARM: exynos: Fix build error if SERIAL is disabled in SPL 2016-05-26 12:55:49 +09:00
mach-highbank ARM: highbank: move SoC sources to mach-highbank 2015-02-21 08:23:51 -05:00
mach-integrator integrator: switch to DM serial port 2015-08-12 20:47:49 -04:00
mach-keystone ARM: k2g: Configure reset mux to device reset 2016-06-02 21:42:19 -04:00
mach-kirkwood configs: Re-sync with cmd/Kconfig 2016-04-25 15:09:47 -04:00
mach-meson arm: meson: implement calls to secure monitor 2016-05-27 15:39:47 -04:00
mach-mvebu configs: Re-sync with cmd/Kconfig 2016-04-25 15:09:47 -04:00
mach-orion5x Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
mach-rockchip clk: convert API to match reset/mailbox style 2016-06-19 17:05:55 -06:00
mach-s5pc1xx arm: s5pc1xx: move SoC to mach-s5pc1xx 2015-11-30 17:17:01 +09:00
mach-snapdragon clk: convert API to match reset/mailbox style 2016-06-19 17:05:55 -06:00
mach-socfpga ARM: socfpga: Sort Kconfig entries 2016-06-08 02:57:06 +02:00
mach-stm32 stm32: stm32f4: move flash driver to mtd driver location 2016-03-26 18:49:28 -04:00
mach-sunxi sunxi: Properly announce BOOT_DEVICE_BOARD as "FEL" 2016-05-25 17:52:39 +02:00
mach-tegra mailbox: add Tegra186 HSP driver 2016-06-19 17:05:55 -06:00
mach-uniphier ARM: uniphier: reserve memory for DRAM PHY training on PH1-LD20 2016-06-20 07:15:33 +09:00
mach-versatile arm: Remove versatileab board 2015-09-11 15:01:25 -04:00
mach-zynq clk: convert API to match reset/mailbox style 2016-06-19 17:05:55 -06:00
thumb1/include/asm/proc-armv arm: support Thumb-1 with CONFIG_SYS_THUMB_BUILD 2015-11-10 15:03:48 +01:00
config.mk arm: clang: Update support slightly 2016-04-01 17:17:39 -04:00
Kconfig sunxi: Select USE_TINY_PRINTF 2016-06-20 22:43:59 +02:00
Kconfig.debug arm: debug: add Kconfig entries for lowlevel debug 2014-10-26 22:23:12 +01:00
Makefile arm: Treat arm946es as v5te 2016-06-02 21:21:34 -04:00