u-boot/arch/arm
Wang Dongsheng c5e954eccd ARM: Disable "DISCARD" for secure section if CONFIG_ARMV7_SECURE_BASE isn't defined
"DISCARD" will remove ._secure.text relocate, but PSCI framework
has already used some absolute address those need to relocate.

Use readelf -t -r u-boot show us:
.__secure_start		addr: 601408e4
.__secure_end		addr: 60141460

60141140  00000017 R_ARM_RELATIVE
46	_secure_monitor:
47	#ifdef CONFIG_ARMV7_PSCI
48      ldr     r5, =_psci_vectors

60141194  00000017 R_ARM_RELATIVE
6014119c  00000017 R_ARM_RELATIVE
601411a4  00000017 R_ARM_RELATIVE
601411ac  00000017 R_ARM_RELATIVE
64	_psci_table:
66	.word	psci_cpu_suspend
...
72	.word	psci_migrate

60141344  00000017 R_ARM_RELATIVE
6014145c  00000017 R_ARM_RELATIVE
202	ldr     r5, =psci_text_end

Solutions:
1. Change absolute address to RelAdr.
   Based on LDR (immediate, ARM), we only have 4K offset to jump.
Now PSCI code size is close to 4K size that is LDR limit jump size,
so even if the LDR is based on the current instruction address,
there is also have a risk for RelAdr. If we use two jump steps I
think we can fix this issue, but looks too hack, so give up this way.

2. Enable "DISCARD" only for CONFIG_ARMV7_SECURE_BASE has defined.
   If CONFIG_ARMV7_SECURE_BASE is defined in platform, all of secure
will in the BASE address that is absolute.

Signed-off-by: Wang Dongsheng <dongsheng.wang@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-01-31 16:32:56 +01:00
..
cpu ARM: Disable "DISCARD" for secure section if CONFIG_ARMV7_SECURE_BASE isn't defined 2016-01-31 16:32:56 +01:00
dts Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq 2016-01-27 15:05:36 -05:00
imx-common imx_common: check for Serial Downloader in spl_boot_device 2016-01-03 15:57:56 +01:00
include arm: Remove S bit from MMU section entry 2016-01-31 16:32:56 +01:00
lib arm: Replace test for CONFIG_ARMV7 with CONFIG_CPU_V7 2016-01-31 16:32:56 +01:00
mach-at91 arm: at91/spl: atmel_sfr: move saic redirect to separate file 2015-11-30 22:27:55 +01:00
mach-bcm283x Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
mach-davinci arm: Remove da830evm board 2015-09-28 10:48:23 -04:00
mach-exynos arm: exynos: clean up checkpatch issues 2015-11-02 10:38:22 +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: add SD card and eMMC support 2015-10-22 14:22:25 -04:00
mach-kirkwood arm: mvebu/kirkwood: Use common timer functions 2016-01-14 14:08:59 +01:00
mach-mvebu arm: mvebu: Add support for the Armada XP theadorable board 2016-01-27 07:45:43 +01:00
mach-orion5x arm: support Thumb-1 with CONFIG_SYS_THUMB_BUILD 2015-11-10 15:03:48 +01:00
mach-rockchip rockchip: Add support for Raxda Rock 2 2016-01-21 20:42:37 -07:00
mach-s5pc1xx arm: s5pc1xx: move SoC to mach-s5pc1xx 2015-11-30 17:17:01 +09:00
mach-socfpga socfpga: Modify qts-filter args to allow input for bsp generated files and quartus project directories 2016-01-16 07:07:23 +01:00
mach-stm32 stm32: move stm32 specific code to mach-stm32 2016-01-20 10:19:41 -05:00
mach-tegra ARM: tegra: shut down USB device controller at boot 2016-01-28 21:01:23 -07:00
mach-uniphier ARM: uniphier: remove unneeded if conditionals 2016-01-20 08:40:33 +09:00
mach-versatile arm: Remove versatileab board 2015-09-11 15:01:25 -04:00
mach-zynq ARM: zynq: Remove memory division by 2 for ECC case 2016-01-27 15:55:55 +01: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, powerpc: Update cc-version tests to check for cc-name as well 2016-01-25 10:39:44 -05:00
Kconfig ARM: zynq: Do not select options if SPL is not enabled 2016-01-27 15:55:55 +01:00
Kconfig.debug arm: debug: add Kconfig entries for lowlevel debug 2014-10-26 22:23:12 +01:00
Makefile stm32: move stm32 specific code to mach-stm32 2016-01-20 10:19:41 -05:00