[PATCH 1/1] docs/firmware: Update FW_JUMP documentation
Nylon Chen
nylon.chen at sifive.com
Mon Sep 12 22:46:05 PDT 2022
From: "Nylon.Chen" <nylon.chen at sifive.com>
Add a tip for OpenSBI's Jump mode.
help user avoids the kernel overwritten.
Signed-off-by: Nylon Chen <nylon.chen at sifive.com>
Signed-off-by: Nylon.Chen <nylon.chen at sifive.com>
---
docs/firmware/fw_jump.md | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/docs/firmware/fw_jump.md b/docs/firmware/fw_jump.md
index 35a4301..c20d722 100644
--- a/docs/firmware/fw_jump.md
+++ b/docs/firmware/fw_jump.md
@@ -40,6 +40,24 @@ follows:
the booting stage following the OpenSBI firmware. If this option is not
provided, then the OpenSBI firmware will pass the FDT address passed by the
previous booting stage to the next booting stage.
+
+ If your *PLATFORM=generic* and your *FW_JUMP_FDT_ADDR* is default, you must check
+ your Linux size because Linux will be overwritten in OpneSBI's FDT copy loop.
+ You can use the following method.
+
+ ```
+ LAST_SECTION=`${CROSS_COMPILE}objdump -h vmlinux | grep "00*" | awk '{print $5,$3}'\
+ | sort -rfu | head -n 1 | awk '{split($0,addr," ");print addr[1]}'` \
+ && LAST_SECTION_SIZE=`${CROSS_COMPILE}objdump -h vmlinux | grep "00*" |awk '{print $5,$3}'\
+ | sort -rfu | head -n 1 | awk '{split($0,addr,"")}'` \
+ && OFFSET_ADDR=$(( 16#$LAST_SECTION_SIZE + 16#$LAST_SECTION)) \
+ && printf "The LMA of the last section of the Kernel is 0x%X\n" ${OFFSET_ADDR}
+ ```
+
+ If the result is bigger than the default of FW_JUMP_FDT_ADDR(0x2200000),
+ you must change it to avoid the problem of being overwritten.
+
+
*FW_JUMP* Example
-----------------
--
2.36.1
More information about the opensbi
mailing list