mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00
firmware: Add relocatable FW_PAYLOAD_FDT_ADDR
The fw_payload.bin has the same issue as described in previous patch. But only FW_PAYLOAD_FDT_ADDR is affected. Add FW_PAYLOAD_FDT_OFFSET to identify relocatable payload fdt address. Signed-off-by: Inochi Amaoto <inochiama@outlook.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:

committed by
Anup Patel

parent
7227cddcb4
commit
f056939d8a
@@ -46,6 +46,10 @@ fw_save_info:
|
|||||||
fw_next_arg1:
|
fw_next_arg1:
|
||||||
#ifdef FW_PAYLOAD_FDT_ADDR
|
#ifdef FW_PAYLOAD_FDT_ADDR
|
||||||
li a0, FW_PAYLOAD_FDT_ADDR
|
li a0, FW_PAYLOAD_FDT_ADDR
|
||||||
|
#elif defined(FW_PAYLOAD_FDT_OFFSET)
|
||||||
|
lla a0, _fw_start
|
||||||
|
li a1, FW_PAYLOAD_FDT_OFFSET
|
||||||
|
add a0, a0, a1
|
||||||
#else
|
#else
|
||||||
add a0, a1, zero
|
add a0, a1, zero
|
||||||
#endif
|
#endif
|
||||||
|
@@ -65,6 +65,9 @@ ifdef FW_PAYLOAD_ALIGN
|
|||||||
firmware-genflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_ALIGN=$(FW_PAYLOAD_ALIGN)
|
firmware-genflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_ALIGN=$(FW_PAYLOAD_ALIGN)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef FW_PAYLOAD_FDT_OFFSET
|
||||||
|
firmware-genflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_FDT_OFFSET=$(FW_PAYLOAD_FDT_OFFSET)
|
||||||
|
endif
|
||||||
ifdef FW_PAYLOAD_FDT_ADDR
|
ifdef FW_PAYLOAD_FDT_ADDR
|
||||||
firmware-genflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_FDT_ADDR=$(FW_PAYLOAD_FDT_ADDR)
|
firmware-genflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_FDT_ADDR=$(FW_PAYLOAD_FDT_ADDR)
|
||||||
endif
|
endif
|
||||||
|
Reference in New Issue
Block a user