<feed xmlns='http://www.w3.org/2005/Atom'>
<title>starfive-tech/opensbi.git/firmware, branch debug</title>
<subtitle>StarFive Tech OpenSBI for VisionFive (JH7110) boards (mirror)</subtitle>
<id>https://git.radix-linux.su/starfive-tech/opensbi.git/atom?h=debug</id>
<link rel='self' href='https://git.radix-linux.su/starfive-tech/opensbi.git/atom?h=debug'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/'/>
<updated>2021-04-28T18:22:36+00:00</updated>
<entry>
<title>firmware/fw_payload: reduce the size by getting rid of padding</title>
<updated>2021-04-28T18:22:36+00:00</updated>
<author>
<name>Tekkaman Ninja</name>
<email>tekkamanninja@163.com</email>
</author>
<published>2021-04-01T01:16:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/commit/?id=2524b0ecd8684b42bc7a4c69794f40f11cbbe2a5'/>
<id>urn:sha1:2524b0ecd8684b42bc7a4c69794f40f11cbbe2a5</id>
<content type='text'>
Signed-off-by: Tekkaman Ninja &lt;tekkamanninja@163.com&gt;
</content>
</entry>
<entry>
<title>firmware: Support position independent execution</title>
<updated>2021-03-19T09:30:50+00:00</updated>
<author>
<name>Vincent Chen</name>
<email>vincent.chen@sifive.com</email>
</author>
<published>2021-03-17T01:16:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/commit/?id=0f20e8adcf42d31bc478d6700b625d00a68cb30e'/>
<id>urn:sha1:0f20e8adcf42d31bc478d6700b625d00a68cb30e</id>
<content type='text'>
Enable OpenSBI to support position independent execution. Because the
position independent code will cause an additional GOT reference when
accessing the global variables, it will reduce performance a bit. Therefore,
the position independent execution is disabled by default. Users can
through specifying "FW_PIC=y" on the make command to enable this feature.

In theory, after enabling position-independent execution, the OpenSBI
can run at arbitrary address with appropriate alignment. Therefore, the
original relocation mechanism will be skipped. In other words, OpenSBI will
directly run at the load address without any code movement.

Signed-off-by: Vincent Chen &lt;vincent.chen@sifive.com&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>firmware: Use lla to access all global symbols</title>
<updated>2021-03-19T09:27:45+00:00</updated>
<author>
<name>Vincent Chen</name>
<email>vincent.chen@sifive.com</email>
</author>
<published>2021-03-17T01:16:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/commit/?id=22d8ee9758128070aa838f7c8c46f9e50d6aaf5a'/>
<id>urn:sha1:22d8ee9758128070aa838f7c8c46f9e50d6aaf5a</id>
<content type='text'>
When OpenSBI is compiled as fPIE mode, the assembler will translate "la"
to GOT reference pattern. It will cause to cost an additional load
instruction when obtaining the symbol address. However, if the symbol
locates within the positive or negative 2GB region, we can use "lla"
instead of "la" to avoid unneeded GOT references. This patch assumes that
the OpenSBI image excluding the payload does not exceed 2GB. Based on
this assumption, all "la" instructions are replaced by "lla" to avoid
performance degradation when compiling as fPIE mode.

Signed-off-by: Vincent Chen &lt;vincent.chen@sifive.com&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Introduce sbi_trap_exit() API</title>
<updated>2021-01-07T04:23:17+00:00</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-12-29T06:09:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/commit/?id=b7df5e4392d34d8b8d5290d5b857676e672d4c96'/>
<id>urn:sha1:b7df5e4392d34d8b8d5290d5b857676e672d4c96</id>
<content type='text'>
We introduce sbi_trap_exit() API which can help non-firmware
(i.e. generic or platform) code to force exit trap/interrupt
handling and resume execution at context pointed by parameter
"const struct sbi_trap_regs *regs".

This new sbi_trap_exit() API will help Keystone Enclave project
to resume execution of enclave from custom SBI call handler.

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>firmware: fw_base: Optimize trap handler for RV32 systems</title>
<updated>2020-12-01T11:44:32+00:00</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-11-22T06:17:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/commit/?id=2677324f906133db8596de4868df87cb1224f113'/>
<id>urn:sha1:2677324f906133db8596de4868df87cb1224f113</id>
<content type='text'>
On RV32 systems, we have two CSRs for M-mode status (MSTATUS and
MSTATUSH) when H-extension is implemented. This means we have to
save/restore MSTATUSH for RV32 systems only when H-extension is
implemented. The current _trap_handler() has extra instructions
(roughly 10) for conditional save/restore of MSTATUSH CSR.

These extra instructions in RV32 _trap_handler() can be avoided
if we create separate low-level trap handler for RV32 systems
having H-extension. This patch optimizes low-level trap handler
for RV32 systems accordingly.

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
</content>
</entry>
<entry>
<title>firmware: Remove FW_PAYLOAD_FDT_PATH compile-time option</title>
<updated>2020-10-18T04:59:59+00:00</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-10-14T11:13:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/commit/?id=9c07c513aa9b2df64a971432e8dae3338a8e22ab'/>
<id>urn:sha1:9c07c513aa9b2df64a971432e8dae3338a8e22ab</id>
<content type='text'>
The FW_PAYLOAD_FDT_PATH compile-time option is replaced by
FW_FDT_PATH compile-time option which is more flexible and
common across all OpenSBI firmwares.

This patch removes FW_PAYLOAD_FDT_PATH and updates related
documentation to use FW_FDT_PATH.

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>firmware: Add common FW_FDT_PATH compile-time option</title>
<updated>2020-10-18T04:58:26+00:00</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-10-14T10:33:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/commit/?id=6ca096977d723f3ac50291d668719bd938a85544'/>
<id>urn:sha1:6ca096977d723f3ac50291d668719bd938a85544</id>
<content type='text'>
Currently, only FW_PAYLOAD has mechanism to embed external
FDT using FW_PAYLOAD_FDT_PATH compile-time option.

This patch adds a common FW_FDT_PATH compile-time option to
embed external FDT for all OpenSBI firmwares (i.e FW_JUMP,
FW_PAYLOAD, and FW_DYNAMIC).

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>firmware: fw_base: Improve exception stack setup in trap handler</title>
<updated>2020-08-14T09:05:47+00:00</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-08-10T13:07:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/commit/?id=4b18a2acc2f4568746efc82ec25705f33c4ae31e'/>
<id>urn:sha1:4b18a2acc2f4568746efc82ec25705f33c4ae31e</id>
<content type='text'>
Currently, the low-level trap handler (i.e. _trap_handler()) uses
branch instructions to conditionally setup exception stack based
on which mode trap occured.

This patch implements exception stack setup using xor instructions
which is faster with same number of instructions due to lack of
branch instructions.

The new exception stack setup approach can be best described by the
following pseudocode:

 Came_From_M_Mode = ((MSTATUS.MPP &lt; PRV_M) ? 1 : 0) - 1;
 Exception_Stack = TP ^ (Came_From_M_Mode &amp; (SP ^ TP))

 Came_From_M_Mode = 0    ==&gt;    Exception_Stack = TP
 Came_From_M_Mode = -1   ==&gt;    Exception_Stack = SP

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>firmware: Remove FW_PAYLOAD_FDT and related documentation</title>
<updated>2020-06-05T03:33:05+00:00</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-05-25T09:43:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/commit/?id=51f0e4a0533fe8b5d713379ab3a6cb676add82da'/>
<id>urn:sha1:51f0e4a0533fe8b5d713379ab3a6cb676add82da</id>
<content type='text'>
Now that no platform is using FW_PAYLOAD_FDT mechanism, we
remove related code from Makefile and related documentation.

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>firmware: Allow fw_platform_init() to return updated FDT location</title>
<updated>2020-06-05T03:32:34+00:00</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-05-24T04:33:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/opensbi.git/commit/?id=86ec5341e421b3f6ac39c75da648b7a22e56f248'/>
<id>urn:sha1:86ec5341e421b3f6ac39c75da648b7a22e56f248</id>
<content type='text'>
Currently, the fw_platform_init() does not return anything but we can
further improve by allowing fw_platform_init() to return updated FDT
location.

It is certainly not mandatory for fw_platform_init() to return a new
location of FDT (or modify FDT). In fact, the fw_platform_init() can
always return the original FDT location (i.e. 'arg1') unmodified.

This new capability of fw_platform_init() will allow platforms to:
1. Have multiple built-in FDTs and select one
2. Modify FDT before using based on platform specific straps or OTP

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
</feed>
