]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
qemu-arm64: Enable POSITION_INDEPENDENT
authorAndre Przywara <andre.przywara@arm.com>
Wed, 30 Sep 2020 16:39:18 +0000 (17:39 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 8 Oct 2020 15:42:36 +0000 (11:42 -0400)
Now that PIE works when U-Boot is started from ROM, let's enable
CONFIG_POSITION_INDEPENDENT, which allows to load U-Boot also via
ARM Trusted-Firmware's fip.bin to DRAM, without tweaking the
configuration.

To get a writable initial stack, we need to keep the fixed initial
stack pointer, which points to DRAM in our case.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
arch/arm/Kconfig
configs/qemu_arm64_defconfig

index 0ecd0c67f3506df96dbb696a3b85fba8336e8047..a067a076769bf734bad1572b6685414d3fd6e405 100644 (file)
@@ -22,6 +22,7 @@ config POSITION_INDEPENDENT
 
 config INIT_SP_RELATIVE
        bool "Specify the early stack pointer relative to the .bss section"
+       default n if ARCH_QEMU
        default y if POSITION_INDEPENDENT
        help
          U-Boot typically uses a hard-coded value for the stack pointer
index 31ea2d342fc96ed38f5ef92c478aa109c4cc7b92..4450e7ced428bb91482b0b989505a68f6bdf6b67 100644 (file)
@@ -1,6 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_QEMU=y
 CONFIG_NR_DRAM_BANKS=1
+CONFIG_POSITION_INDEPENDENT=y
 CONFIG_ENV_SIZE=0x40000
 CONFIG_ENV_SECT_SIZE=0x40000
 CONFIG_AHCI=y