From: Andre Przywara <andre.przywara@arm.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 6/6] qemu-arm64: Enable POSITION_INDEPENDENT
Date: Wed, 30 Sep 2020 17:39:18 +0100 [thread overview]
Message-ID: <20200930163918.24995-7-andre.przywara@arm.com> (raw)
In-Reply-To: <20200930163918.24995-1-andre.przywara@arm.com>
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 | 1 +
configs/qemu_arm64_defconfig | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5ffa84c1d98..8ba73680699 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -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
diff --git a/configs/qemu_arm64_defconfig b/configs/qemu_arm64_defconfig
index 31ea2d342fc..4450e7ced42 100644
--- a/configs/qemu_arm64_defconfig
+++ b/configs/qemu_arm64_defconfig
@@ -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
--
2.17.5
next prev parent reply other threads:[~2020-09-30 16:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-30 16:39 [PATCH v2 0/6] qemu-arm64: Allow booting via Trusted Firmware Andre Przywara
2020-09-30 16:39 ` [PATCH v2 1/6] arm64: PIE: Do not skip static relocation Andre Przywara
2020-09-30 17:11 ` Stephen Warren
2020-10-01 8:33 ` Amit Tomar
2020-10-09 13:02 ` Tom Rini
2020-09-30 16:39 ` [PATCH v2 2/6] arm64: PIE: Skip fixups if distance is zero Andre Przywara
2020-10-09 13:02 ` Tom Rini
2020-09-30 16:39 ` [PATCH v2 3/6] arm64: PIE: Allow fixed stack pointer Andre Przywara
2020-10-09 13:02 ` Tom Rini
2020-09-30 16:39 ` [PATCH v2 4/6] qemu-arm: Remove need to specify flash banks Andre Przywara
2020-10-09 13:02 ` Tom Rini
2020-09-30 16:39 ` [PATCH v2 5/6] qemu-arm: Drop ARCH_SUPPORT_TFABOOT Andre Przywara
2020-09-30 17:40 ` Tom Rini
2020-10-09 13:02 ` Tom Rini
2020-09-30 16:39 ` Andre Przywara [this message]
2020-10-09 13:03 ` [PATCH v2 6/6] qemu-arm64: Enable POSITION_INDEPENDENT Tom Rini
2020-09-30 17:39 ` [PATCH v2 0/6] qemu-arm64: Allow booting via Trusted Firmware Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200930163918.24995-7-andre.przywara@arm.com \
--to=andre.przywara@arm.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox