Skip to contentSkip to conversation

docs: firmware: Document FW_PIC compile time option

PATCH New Bin Meng 2 participants 2 messages Jul 12, 2021 – Jul 17, 2021

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/1 docs: firmware: Document FW_PIC compile time option

FW_PIC=y is on by default, but the doc is missing when this was introduced. Add some description for it.

---

 docs/firmware/fw.md | 6 ++++++
 1 file changed, 6 insertions(+)
docs/firmware/fw.md +6 -0
index a3bb70c..db9a31c 100644
@@ -69,6 +69,12 @@ parameters:
   argument by the prior booting stage.
 * **FW_FDT_PADDING** - Optional zero bytes padding to the embedded flattened
   device tree binary file specified by **FW_FDT_PATH** option.
+* **FW_PIC** - "FW_PIC=y" generates position independent executable firmware
+  images. OpenSBI can run at arbitrary address with appropriate alignment.
+  Therefore, the original relocation mechanism ("FW_PIC=n") will be skipped.
+  In other words, OpenSBI will directly run at the load address without any
+  code movement. This option requires a toolchain with PIE support, and it
+  is on by default.
 
 Additionally, each firmware type as a set of type specific configuration
 parameters. Detailed information for each firmware type can be found in the
Signature · 1 line
2.25.1
Applied
#1 lore raw

PATCH 1/1 docs: firmware: Document FW_PIC compile time option

Quoted 5 lines · Bin Meng

FW_PIC=y is on by default, but the doc is missing when this was introduced. Add some description for it.

Thanks for adding this.

Applied this patch to the riscv/opensbi repo.

Thanks,
Anup

Quoted 30 lines

---

 docs/firmware/fw.md | 6 ++++++
 1 file changed, 6 insertions(+)
docs/firmware/fw.md +6 -1
index a3bb70c..db9a31c 100644
@@ -69,6 +69,12 @@ parameters:
   argument by the prior booting stage.
 * **FW_FDT_PADDING** - Optional zero bytes padding to the embedded flattened
   device tree binary file specified by **FW_FDT_PATH** option.
+* **FW_PIC** - "FW_PIC=y" generates position independent executable firmware
+  images. OpenSBI can run at arbitrary address with appropriate alignment.
+  Therefore, the original relocation mechanism ("FW_PIC=n") will be skipped.
+  In other words, OpenSBI will directly run at the load address without any
+  code movement. This option requires a toolchain with PIE support, and it
+  is on by default.
 
 Additionally, each firmware type as a set of type specific configuration
 parameters. Detailed information for each firmware type can be found in the
--

2.25.1

--
opensbi mailing list
opensbi at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi