diff options
author | Anup Patel <anup.patel@wdc.com> | 2018-12-19 15:26:11 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2018-12-19 15:47:52 +0530 |
commit | bc99e707cd84f5aedf82409ebbaed15353e49f95 (patch) | |
tree | 55f539027112584c1d80111e94dd471faa867001 | |
parent | d9c5bea9a22047a1d8adf1d741c2c23253700443 (diff) |
blob: Rename FW_xyz_FDT_OFFSET to FW_xyz_FDT_ADDR
Instead of placing FDT (passed by previous booting stage) at a
location relative to next address we should have absolute
location of placing FDT so that we more freedom of placing FDT.
This will be particularly useful for platforms/boards with
very less RAM (such as Kendryte board).
Due to above motivation, we rename FW_xyz_FDT_OFFSET options
to FW_xyz_FDT_ADDR options and use FW_xyz_FDT_ADDR options as
absolute address for placing FDT.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
-rw-r--r-- | blob/fw_jump.S | 7 | ||||
-rw-r--r-- | blob/fw_payload.S | 10 | ||||
-rw-r--r-- | blob/objects.mk | 8 | ||||
-rw-r--r-- | plat/qemu/sifive_u/config.mk | 4 | ||||
-rw-r--r-- | plat/qemu/virt/config.mk | 4 | ||||
-rw-r--r-- | plat/sifive/hifive_u540/config.mk | 4 |
6 files changed, 16 insertions, 21 deletions
diff --git a/blob/fw_jump.S b/blob/fw_jump.S index d20eafd..e11a8a9 100644 --- a/blob/fw_jump.S +++ b/blob/fw_jump.S @@ -14,12 +14,9 @@ .global fw_next_arg1 fw_next_arg1: /* We return FDT destination address in 'a0' */ -#ifdef FW_JUMP_FDT_OFFSET +#ifdef FW_JUMP_FDT_ADDR /* a0 = destination FDT start address */ - la a0, _jump_addr - REG_L a0, (a0) - li a1, FW_JUMP_FDT_OFFSET - add a0, a0, a1 + li a0, FW_JUMP_FDT_ADDR #else add a0, zero, zero #endif diff --git a/blob/fw_payload.S b/blob/fw_payload.S index abc2495..c601529 100644 --- a/blob/fw_payload.S +++ b/blob/fw_payload.S @@ -13,12 +13,10 @@ .section .entry, "ax", %progbits .global fw_next_arg1 fw_next_arg1: - /* We return FDT destinetion address in 'a0' */ -#ifdef FW_PAYLOAD_FDT_OFFSET - /* a0 = destinetion FDT start address */ - la a0, payload_bin - li a1, FW_PAYLOAD_FDT_OFFSET - add a0, a0, a1 + /* We return FDT destination address in 'a0' */ +#ifdef FW_PAYLOAD_FDT_ADDR + /* a0 = destination FDT start address */ + li a0, FW_PAYLOAD_FDT_ADDR #else add a0, zero, zero #endif diff --git a/blob/objects.mk b/blob/objects.mk index d1bfbdb..57ed467 100644 --- a/blob/objects.mk +++ b/blob/objects.mk @@ -20,8 +20,8 @@ blob-bins-$(FW_JUMP) += fw_jump.bin ifdef FW_JUMP_ADDR blob-cppflags-$(FW_JUMP) += -DFW_JUMP_ADDR=$(FW_JUMP_ADDR) endif -ifdef FW_JUMP_FDT_OFFSET -blob-cppflags-$(FW_JUMP) += -DFW_JUMP_FDT_OFFSET=$(FW_JUMP_FDT_OFFSET) +ifdef FW_JUMP_FDT_ADDR +blob-cppflags-$(FW_JUMP) += -DFW_JUMP_FDT_ADDR=$(FW_JUMP_FDT_ADDR) endif blob-bins-$(FW_PAYLOAD) += fw_payload.bin @@ -31,6 +31,6 @@ 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) +ifdef FW_PAYLOAD_FDT_ADDR +blob-cppflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_FDT_ADDR=$(FW_PAYLOAD_FDT_ADDR) endif diff --git a/plat/qemu/sifive_u/config.mk b/plat/qemu/sifive_u/config.mk index 66dc8de..97a08f5 100644 --- a/plat/qemu/sifive_u/config.mk +++ b/plat/qemu/sifive_u/config.mk @@ -26,7 +26,7 @@ PLAT_SYS_CLINT=y FW_TEXT_START=0x80000000 FW_JUMP=y FW_JUMP_ADDR=0x80200000 -FW_JUMP_FDT_OFFSET=0x2000000 +FW_JUMP_FDT_ADDR=0x82200000 FW_PAYLOAD=y FW_PAYLOAD_OFFSET=0x200000 -FW_PAYLOAD_FDT_OFFSET=0x2000000 +FW_PAYLOAD_FDT_ADDR=0x82200000 diff --git a/plat/qemu/virt/config.mk b/plat/qemu/virt/config.mk index 99c08cb..0b10613 100644 --- a/plat/qemu/virt/config.mk +++ b/plat/qemu/virt/config.mk @@ -26,7 +26,7 @@ PLAT_SYS_CLINT=y FW_TEXT_START=0x80000000 FW_JUMP=y FW_JUMP_ADDR=0x80200000 -FW_JUMP_FDT_OFFSET=0x2000000 +FW_JUMP_FDT_ADDR=0x82200000 FW_PAYLOAD=y FW_PAYLOAD_OFFSET=0x200000 -FW_PAYLOAD_FDT_OFFSET=0x2000000 +FW_PAYLOAD_FDT_ADDR=0x82200000 diff --git a/plat/sifive/hifive_u540/config.mk b/plat/sifive/hifive_u540/config.mk index 164fcdd..58ff919 100644 --- a/plat/sifive/hifive_u540/config.mk +++ b/plat/sifive/hifive_u540/config.mk @@ -26,7 +26,7 @@ PLAT_SYS_CLINT=y FW_TEXT_START=0x80000000 FW_JUMP=y FW_JUMP_ADDR=0x80200000 -FW_JUMP_FDT_OFFSET=0x2000000 +FW_JUMP_FDT_ADDR=0x82200000 FW_PAYLOAD=y FW_PAYLOAD_OFFSET=0x200000 -FW_PAYLOAD_FDT_OFFSET=0x2000000 +FW_PAYLOAD_FDT_ADDR=0x82200000 |