<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/lib/sbi/objects.mk, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/opensbi.git/atom/lib/sbi/objects.mk?h=master</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/lib/sbi/objects.mk?h=master'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2026-06-12T06:28:35Z</updated>
<entry>
<title>lib: sbi: add UBSan support</title>
<updated>2026-06-12T06:28:35Z</updated>
<author>
<name>Marcos Oduardo</name>
<email>marcos.oduardo@gmail.com</email>
</author>
<published>2026-05-15T16:33:21Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=7bdcf557057097ce4661238e672a514ae1e74936'/>
<id>urn:sha1:7bdcf557057097ce4661238e672a514ae1e74936</id>
<content type='text'>
UBSan (Undefined Behavior Sanitizer) is a tool implemented using
compiler instrumentation at runtime that allows checking for
statements whose output is not deterministic or defined by the C
standard. Compiling and running OpenSBI with UBSan instrumentation
will print a message in the console if any sentence performs such
an action.

Support involves two main components:
1. The UBSan implementation hooks (derived from NetBSD),
   used by the compiler to handle the check output.
2. A test suite integrated with the SBI unit test framework to
   verify correct operation at runtime.

Usage:

  make UBSAN=y PLATFORM=generic ...

The test suite is built when both UBSAN=y and CONFIG_SBIUNIT=y are
enabled.

When UBSan is enabled, FW_PAYLOAD_OFFSET may need to be increased
due to the size increase added by the instrumentation. A
value of 0x400000 has been tested.

UBSan adds runtime overhead and is intended for development builds
only, not for production.

Note: This patch marks __stack_chk_guard in sbi_init.c as a weak
symbol to prevent multiple definition errors at compile time with
UBSan instrumentation enabled. This resolves the conflict
between the .globl definitions in sbi_init.c and test_head.S.

Signed-off-by: Marcos Oduardo &lt;marcos.oduardo@gmail.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20260515163321.2038366-1-marcos.oduardo@gmail.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Move RISC-V PMP encoding functions to sbi_pmp.c</title>
<updated>2026-06-10T07:47:30Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2026-04-30T04:55:20Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=e9797b5e574c87332679a30e542b519c93e650ca'/>
<id>urn:sha1:e9797b5e574c87332679a30e542b519c93e650ca</id>
<content type='text'>
Create a new file for handling the RISC-V PMP format and the new pmp_t
type, as opposed to hart PMP CSR specific access.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20260430045528.420437-4-npiggin@gmail.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Add floating-point context save/restore support.</title>
<updated>2026-05-18T08:32:28Z</updated>
<author>
<name>Dave Patel</name>
<email>dave.patel@riscstar.com</email>
</author>
<published>2026-05-18T08:30:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=718e1d194f5a41c657dfe094392abdeb02356680'/>
<id>urn:sha1:718e1d194f5a41c657dfe094392abdeb02356680</id>
<content type='text'>
Add support for saving and restoring RISC-V floating-point (F/D) extension
state in OpenSBI. This introduces a floating-point context structure and
helper routines to perform full context save and restore.

The floating-point context includes storage for all 32 FPi registers (f0–f31)
along with the fcsr control and status register. The register state is saved
and restored using double-precision load/store instructions (fsd/fld), and
single-precision load/store instructions (fsw/flw) on an RV64 system with
F and D-extension support.

The implementation follows an eager context switching model where the entire
FP state is saved and restored on every context switch. This avoids the need
for trap-based lazy management and keeps the design simple and deterministic.

Signed-off-by: Dave Patel &lt;dave.patel@riscstar.com&gt;
Signed-off-by: Anup Patel &lt;anup.patel@oss.qualcomm.com&gt;
Link: https://lore.kernel.org/r/20260518083023.997323-3-anup.patel@oss.qualcomm.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Add RISC-V vector context save/restore support</title>
<updated>2026-05-18T08:32:28Z</updated>
<author>
<name>Dave Patel</name>
<email>dave.patel@riscstar.com</email>
</author>
<published>2026-05-18T08:30:21Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=21461156da2be4633f53a60a77fe70da1a517db4'/>
<id>urn:sha1:21461156da2be4633f53a60a77fe70da1a517db4</id>
<content type='text'>
Eager context switch: Add support for saving and restoring RISC-V vector
extension state in OpenSBI. This introduces a per-hart vector context
structure and helper routines to perform full context save and restore.

The vector context includes vcsr CSRs along with storage for all 32 vector
registers. The register state is saved and restored using byte-wise vector
load/store instructions (vs8r/vl8r).

The implementation follows an eager context switching model where the entire
vector state is saved and restored on every context switch. This provides a
simple and deterministic mechanism without requiring lazy trap-based
management.

Signed-off-by: Dave Patel &lt;dave.patel@riscstar.com&gt;
Signed-off-by: Anup Patel &lt;anup.patel@oss.qualcomm.com&gt;
Link: https://lore.kernel.org/r/20260518083023.997323-2-anup.patel@oss.qualcomm.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Factor-out PMP programming into separate sources</title>
<updated>2025-12-16T14:46:47Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2025-12-09T13:52:35Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=5eec86eec8ee92f9c7d4211c34fddf794609ed71'/>
<id>urn:sha1:5eec86eec8ee92f9c7d4211c34fddf794609ed71</id>
<content type='text'>
The PMP programming is a significant part of sbi_hart.c so factor-out
this into separate sources sbi_hart_pmp.c and sbi_hart_pmp.h for better
maintainability.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Link: https://lore.kernel.org/r/20251209135235.423391-6-apatel@ventanamicro.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Introduce hart protection abstraction</title>
<updated>2025-12-16T14:46:47Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2025-12-09T13:52:32Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=809df05c35ae20d6b68676c24640f92fa0e2666c'/>
<id>urn:sha1:809df05c35ae20d6b68676c24640f92fa0e2666c</id>
<content type='text'>
Currently, PMP and ePMP are the only hart protection mechanisms
available in OpenSBI but new protection mechanisms (such as Smmpt)
will be added in the near future.

To allow multiple hart protection mechanisms, introduce hart
protection abstraction and related APIs.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Link: https://lore.kernel.org/r/20251209135235.423391-3-apatel@ventanamicro.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: Emulate AMO instructions when Zaamo is not available</title>
<updated>2025-05-20T03:48:03Z</updated>
<author>
<name>Chao-ying Fu</name>
<email>icebergfu@gmail.com</email>
</author>
<published>2025-05-19T12:12:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=8a3071222ae57e7a1736c6e953fa1ab3628e599e'/>
<id>urn:sha1:8a3071222ae57e7a1736c6e953fa1ab3628e599e</id>
<content type='text'>
The AMO instructions are very critical for Linux so allow low-end
RISC-V implementations without Zaamo to boot Linux by emulating AMO
instructions using Zalrsc when OpenSBI is compiled without Zaamo.

Signed-off-by: Chao-ying Fu &lt;cfu@mips.com&gt;
Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Link: https://lore.kernel.org/r/20250519121207.976949-1-apatel@ventanamicro.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi_misaligned_ldst: Add handling of vector load/store</title>
<updated>2024-12-06T12:13:06Z</updated>
<author>
<name>Nylon Chen</name>
<email>nylon.chen@sifive.com</email>
</author>
<published>2024-12-06T03:21:49Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=c2acc5e5b0d85166153032eaea181021c73e9752'/>
<id>urn:sha1:c2acc5e5b0d85166153032eaea181021c73e9752</id>
<content type='text'>
Add misaligned load/store handling for the vector extension
to the sbi_misaligned_ldst library.

This implementation is inspired from the misaligned_vec_ldst
implementation in the riscv-pk project.

Co-developed-by: Zong Li &lt;zong.li@sifive.com&gt;
Signed-off-by: Zong Li &lt;zong.li@sifive.com&gt;
Signed-off-by: Nylon Chen &lt;nylon.chen@sifive.com&gt;
Reviewed-by: Andy Chiu &lt;andy.chiu@sifive.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Implement SBI MPXY extension</title>
<updated>2024-12-06T03:56:52Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2024-08-08T05:34:55Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=e67d91cdcc1cba32b08d104821558d8211596e16'/>
<id>urn:sha1:e67d91cdcc1cba32b08d104821558d8211596e16</id>
<content type='text'>
Implement the SBI MPXY extension which provides an SBI interface to
the supervisor software for send messages via MPXY framework.

Signed-off-by: Rahul Pathak &lt;rpathak@ventanamicro.com&gt;
Co-developed-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Add SBI Message Proxy (MPXY) framework</title>
<updated>2024-12-06T03:56:50Z</updated>
<author>
<name>Rahul Pathak</name>
<email>rpathak@ventanamicro.com</email>
</author>
<published>2024-08-08T05:33:04Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=7939bf1329eb551845dbfa3ee06d92d30de70662'/>
<id>urn:sha1:7939bf1329eb551845dbfa3ee06d92d30de70662</id>
<content type='text'>
Introduce SBI Message Proxy (MPXY) framework which allows platform specific
code or drivers to register message protocol specific channels.

This framework enables the supervisor software to send messages belonging
to different message protocols via OpenSBI firmware.

Signed-off-by: Rahul Pathak &lt;rpathak@ventanamicro.com&gt;
Co-developed-by: Himanshu Chauhan &lt;hchauhan@ventanamicro.com&gt;
Signed-off-by: Himanshu Chauhan &lt;hchauhan@ventanamicro.com&gt;
Co-developed-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
</content>
</entry>
</feed>
