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>
This commit is contained in:
Anup Patel 2018-12-19 15:26:11 +05:30 committed by Anup Patel
parent d9c5bea9a2
commit bc99e707cd
6 changed files with 16 additions and 21 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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