]> git.ipfire.org Git - people/ms/u-boot.git/commit
arm: discard relocation entries for secure text
authorPeng Fan <Peng.Fan@freescale.com>
Fri, 23 Oct 2015 02:13:03 +0000 (10:13 +0800)
committerStefano Babic <sbabic@denx.de>
Thu, 12 Nov 2015 16:31:02 +0000 (17:31 +0100)
commitd47cb0b61aa9e268f140455b2bc4421ae9e0b4bc
tree63cfcfb66bf5ae5e81e33aab913ce56de591fa67
parent346d106d1629b6945cdb6818fc1db9c3fed4f435
arm: discard relocation entries for secure text

The code such as PSCI in section named secure is bundled with
u-boot image, and when bootm, the code will be copied to their
runtime address same to compliation/linking address -
CONFIG_ARMV7_SECURE_BASE.

When compile the PSCI code and link it into the u-boot image,
there will be relocation entries in .rel.dyn section for PSCI.
Actually, we do not needs these relocation entries.

If still keep the relocation entries in .rel.dyn section,
r0 at line 103 and 106 in arch/arm/lib/relocate.S may be an invalid
address which may not support read/write for one SoC.
102         /* relative fix: increase location by offset */
103         add     r0, r0, r4
104         ldr     r1, [r0]
105         add     r1, r1, r4
106         str     r1, [r0]

So discard them to avoid touching the relocation entry in
arch/arm/lib/relocate.S.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: York Sun <yorksun@freescale.com>
Cc: Hans De Goede <hdegoede@redhat.com>
Cc: Ian Campbell <ijc@hellion.org.uk>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@konsulko.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
arch/arm/cpu/u-boot.lds