armv7: Add Position Independent Execution support
authorChia-Wei Wang <chiawei_wang@aspeedtech.com>
Tue, 3 Aug 2021 02:50:10 +0000 (10:50 +0800)
committerTom Rini <trini@konsulko.com>
Thu, 2 Sep 2021 13:48:20 +0000 (09:48 -0400)
commitcd82f199852d88218e1f17f5ec07cdd9112a89c4
treef69d3b9a4abc0505567961380bd69929e5570318
parentaa29b21d62d298fadcfbc8e36d8d248fbb24b52d
armv7: Add Position Independent Execution support

A U-Boot image could be loaded and executed at a different
location than it was linked at.

For example, Aspeed takes a stable release version of U-Boot image
as the golden one for recovery purposes. When the primary storage
such as flash is corrupted, the golden image would be loaded to any
SRAM/DRAM address on demands through ethernet/UART/etc and run for
rescue.

To deal with this condition, the PIE is needed as there is only one
signed, golden image, which could be however executed at different
places.

This patch adds the PIE support for ARMv7 platform.

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
arch/arm/Kconfig
arch/arm/cpu/armv7/start.S
arch/arm/lib/crt0.S
arch/arm/lib/relocate.S