diff options
author | Nylon.Chen <nylon.chen@sifive.com> | 2022-09-27 10:34:09 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2022-10-13 06:55:15 +0300 |
commit | 7105c189f67028ef73720d7e9816c800ab53dda5 (patch) | |
tree | 0439bd3ed165f95bdf5ac278be8084941c5b3617 /docs | |
parent | 7f09fba86e439808e0b40bdf536937c42e1ea2c9 (diff) | |
download | opensbi-7105c189f67028ef73720d7e9816c800ab53dda5.tar.xz |
docs/firmware: Update FW_JUMP documentation
Add a tip for OpenSBI's FW_JUMP which helps
users avoid overwriting the kernel.
Signed-off-by: Nylon Chen <nylon.chen@sifive.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/firmware/fw_jump.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/firmware/fw_jump.md b/docs/firmware/fw_jump.md index 35a4301..956897e 100644 --- a/docs/firmware/fw_jump.md +++ b/docs/firmware/fw_jump.md @@ -41,6 +41,22 @@ follows: provided, then the OpenSBI firmware will pass the FDT address passed by the previous booting stage to the next booting stage. + When using the default *FW_JUMP_FDT_ADDR* with *PLATFORM=generic*, you must + ensure *FW_JUMP_FDT_ADDR* is set high enough to avoid overwriting the kernel. + You can use the following method. + + ``` + ${CROSS_COMPILE}objdump -h $KERNEL_ELF | sort -k 5,5 | awk -n '/^ +[0-9]+ /\ + {addr="0x"$3; size="0x"$5; printf "0x""%x\n",addr+size}' \ + | (( `tail -1` > 0x2200000 )) && echo fdt overlaps kernel,\ + increase FW_JUMP_FDT_ADDR + + ${LLVM}objdump -h --show-lma $KERNEL_ELF | sort -k 5,5 | \ + awk -n '/^ +[0-9]+ / {addr="0x"$3; size="0x"$5; printf "0x""%x\n",addr+size}'\ + | (( `tail -1` > 0x2200000 )) && echo fdt overlaps kernel,\ + increase FW_JUMP_FDT_ADDR + ``` + *FW_JUMP* Example ----------------- |