summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnup Patel <[email protected]>2018-12-19 14:53:26 +0530
committerAnup Patel <[email protected]>2018-12-19 15:38:48 +0530
commitfbb4a52330790d2d63f638f2a7589c3d1914da0b (patch)
tree833a64bc81fe8ab26f86091cc5d1f0c8c368bdbd
parent91fc25f59b18342d6cc3ae69d6ccf2d8d303e1b2 (diff)
blob: payload: Introduce FW_PAYLOAD_OFFSET compile time option
This patch remove hard-coding of payload location in fw_payload.elf.ldS by adding compile-time option FW_PAYLOAD_OFFSET. With the new compile-time option, payload will be placed at PLAT_TEXT_START + FW_PAYLOAD_OFFSET address. Signed-off-by: Anup Patel <[email protected]>
-rw-r--r--blob/fw_payload.elf.ldS2
-rw-r--r--blob/objects.mk3
-rw-r--r--plat/qemu/sifive_u/config.mk1
-rw-r--r--plat/qemu/virt/config.mk1
-rw-r--r--plat/sifive/hifive_u540/config.mk1
5 files changed, 7 insertions, 1 deletions
diff --git a/blob/fw_payload.elf.ldS b/blob/fw_payload.elf.ldS
index 2196e9c9..9420f08c 100644
--- a/blob/fw_payload.elf.ldS
+++ b/blob/fw_payload.elf.ldS
@@ -14,7 +14,7 @@ SECTIONS
{
#include "fw_common.ldS"
- . = ALIGN(0x200000);
+ . = PLAT_TEXT_START + FW_PAYLOAD_OFFSET;
.payload :
{
diff --git a/blob/objects.mk b/blob/objects.mk
index 7376213b..29c2f95c 100644
--- a/blob/objects.mk
+++ b/blob/objects.mk
@@ -24,6 +24,9 @@ blob-bins-$(FW_PAYLOAD) += fw_payload.bin
ifdef FW_PAYLOAD_PATH
blob-cppflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_PATH=$(FW_PAYLOAD_PATH)
endif
+ifdef FW_PAYLOAD_OFFSET
+blob-cppflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_OFFSET=$(FW_PAYLOAD_OFFSET)
+endif
ifdef FW_PAYLOAD_FDT_OFFSET
blob-cppflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_FDT_OFFSET=$(FW_PAYLOAD_FDT_OFFSET)
endif
diff --git a/plat/qemu/sifive_u/config.mk b/plat/qemu/sifive_u/config.mk
index ab5d52bd..c856f652 100644
--- a/plat/qemu/sifive_u/config.mk
+++ b/plat/qemu/sifive_u/config.mk
@@ -28,4 +28,5 @@ FW_JUMP=y
FW_JUMP_ADDR=0x80200000
FW_JUMP_FDT_OFFSET=0x2000000
FW_PAYLOAD=y
+FW_PAYLOAD_OFFSET=0x200000
FW_PAYLOAD_FDT_OFFSET=0x2000000
diff --git a/plat/qemu/virt/config.mk b/plat/qemu/virt/config.mk
index 3e33157f..e922df85 100644
--- a/plat/qemu/virt/config.mk
+++ b/plat/qemu/virt/config.mk
@@ -28,4 +28,5 @@ FW_JUMP=y
FW_JUMP_ADDR=0x80200000
FW_JUMP_FDT_OFFSET=0x2000000
FW_PAYLOAD=y
+FW_PAYLOAD_OFFSET=0x200000
FW_PAYLOAD_FDT_OFFSET=0x2000000
diff --git a/plat/sifive/hifive_u540/config.mk b/plat/sifive/hifive_u540/config.mk
index fe5e0402..2dc0ac53 100644
--- a/plat/sifive/hifive_u540/config.mk
+++ b/plat/sifive/hifive_u540/config.mk
@@ -28,4 +28,5 @@ FW_JUMP=y
FW_JUMP_ADDR=0x80200000
FW_JUMP_FDT_OFFSET=0x2000000
FW_PAYLOAD=y
+FW_PAYLOAD_OFFSET=0x200000
FW_PAYLOAD_FDT_OFFSET=0x2000000