<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/include/sbi/riscv_encoding.h, branch v1.8</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/opensbi.git/atom/include/sbi/riscv_encoding.h?h=v1.8</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/include/sbi/riscv_encoding.h?h=v1.8'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2025-12-15T13:12:00Z</updated>
<entry>
<title>include: sbi: Ignore rs1 and rd fields in FENCE.TSO.</title>
<updated>2025-12-15T13:12:00Z</updated>
<author>
<name>Benedikt Freisen</name>
<email>b.freisen@gmx.net</email>
</author>
<published>2025-11-14T20:38:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=afc24152bb55927297716c72ef37f9d529893c55'/>
<id>urn:sha1:afc24152bb55927297716c72ef37f9d529893c55</id>
<content type='text'>
While FENCE.TSO is only specified with them set to zero, it is a special
case of FENCE, which needs to ignore these otherwise reserved fields, but
in some implementations, namely XuanTie C906 and C910, apparently does not.
See the RISCVuzz paper by Thomas et al. for details.

Signed-off-by: Benedikt Freisen &lt;b.freisen@gmx.net&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20251114203842.13396-5-b.freisen@gmx.net
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>include: sbi: Fix tab alignment.</title>
<updated>2025-12-15T13:12:00Z</updated>
<author>
<name>Benedikt Freisen</name>
<email>b.freisen@gmx.net</email>
</author>
<published>2025-11-14T20:38:38Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=dffa24b7f56c5f3567dac35b64eb59587c304ff1'/>
<id>urn:sha1:dffa24b7f56c5f3567dac35b64eb59587c304ff1</id>
<content type='text'>
A previous editor or formatter script appears to have been confused by a
diff view, where the prepended + or - changes the way tabs are displayed.
Since it is the file itself that matters, adjust that accordingly.

Signed-off-by: Benedikt Freisen &lt;b.freisen@gmx.net&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20251114203842.13396-4-b.freisen@gmx.net
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Enable Ssqosid Ext using mstateen0</title>
<updated>2025-12-08T05:34:06Z</updated>
<author>
<name>Chen Pei</name>
<email>cp0613@linux.alibaba.com</email>
</author>
<published>2025-11-14T11:57:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=b8b26fe121d08daf9158845743dcfc16a95eda6a'/>
<id>urn:sha1:b8b26fe121d08daf9158845743dcfc16a95eda6a</id>
<content type='text'>
The QoS Identifiers extension (Ssqosid) introduces the srmcfg register,
which configures a hart with two identifiers: a Resource Control ID
(RCID) and a Monitoring Counter ID (MCID). These identifiers accompany
each request issued by the hart to shared resource controllers.

If extension Smstateen is implemented together with Ssqosid, then
Ssqosid also requires the SRMCFG bit in mstateen0 to be implemented. If
mstateen0.SRMCFG is 0, attempts to access srmcfg in privilege modes less
privileged than M-mode raise an illegal-instruction exception. If
mstateen0.SRMCFG is 1 or if extension Smstateen is not implemented,
attempts to access srmcfg when V=1 raise a virtual-instruction exception.

This extension can be found in the RISC-V Instruction Set Manual:
https://github.com/riscv/riscv-isa-manual

Changes in v5:
 - Remove SBI_HART_EXT_SSQOSID dependency SBI_HART_PRIV_VER_1_12

Changes in v4:
 - Remove extraneous parentheses around SMSTATEEN0_SRMCFG

Changes in v3:
 - Check SBI_HART_EXT_SSQOSID when swapping SRMCFG

Changes in v2:
 - Remove trap-n-detect
 - Context switch CSR_SRMCFG

Signed-off-by: Chen Pei &lt;cp0613@linux.alibaba.com&gt;
Reviewed-by: Radim Krčmář &lt;rkrcmar@ventanamicro.com&gt;
Link: https://lore.kernel.org/r/20251114115722.1831-1-cp0613@linux.alibaba.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: Allow custom CSRs in csr_read_num() and csr_write_num()</title>
<updated>2025-10-21T14:04:09Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2025-09-30T15:32:16Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=55296fd27c0ce12a2024c7eacfdbab2dfd39476b'/>
<id>urn:sha1:55296fd27c0ce12a2024c7eacfdbab2dfd39476b</id>
<content type='text'>
Some of the platforms use platform specific CSR access functions for
configuring implementation specific CSRs (such as PMA registers).

Extend the common csr_read_num() and csr_write_num() to allow custom
CSRs so that platform specific CSR access functions are not needed.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
Link: https://lore.kernel.org/r/20250930153216.89853-1-apatel@ventanamicro.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>include: sbi: Remove unused (LOG_)REGBYTES</title>
<updated>2025-07-22T10:24:27Z</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@jrtc27.com</email>
</author>
<published>2025-07-09T23:29:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=cc546e1a06930c5ebaf6e90a9a28dca4218f1954'/>
<id>urn:sha1:cc546e1a06930c5ebaf6e90a9a28dca4218f1954</id>
<content type='text'>
These are no longer used, so remove them.

Signed-off-by: Jessica Clarke &lt;jrtc27@jrtc27.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20250709232932.37622-3-jrtc27@jrtc27.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>include: sbi: Use array for struct sbi_trap_regs and GET/SET macros</title>
<updated>2025-07-22T10:24:27Z</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@jrtc27.com</email>
</author>
<published>2025-07-09T23:29:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=ffd3ed976d88fa5cda56d9d2c139557c69eec5d8'/>
<id>urn:sha1:ffd3ed976d88fa5cda56d9d2c139557c69eec5d8</id>
<content type='text'>
Rather than hand-rolling scaled pointer arithmetic with casts and
shifts, let the compiler do so by indexing an array of GPRs, taking
advantage of the language's type system to scale based on whatever type
the register happens to be. This makes it easier to support CHERI where
the registers are capabilities, not plain integers, and so this pointer
arithmetic would need to change (and currently REGBYTES is both the size
of a register and the size of an integer word upstream).

Signed-off-by: Jessica Clarke &lt;jrtc27@jrtc27.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20250709232932.37622-1-jrtc27@jrtc27.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: Enable Control Transfer Records (CTR) Ext using xstateen.</title>
<updated>2025-04-13T00:41:43Z</updated>
<author>
<name>Rajnesh Kanwal</name>
<email>rkanwal@rivosinc.com</email>
</author>
<published>2025-03-07T12:44:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=aa40c53ce498d1774f7779ea25ab1326640d8c63'/>
<id>urn:sha1:aa40c53ce498d1774f7779ea25ab1326640d8c63</id>
<content type='text'>
The Control Transfer Records (CTR) extension provides a method to
record a limited branch history in register-accessible internal chip
storage.

This extension is similar to Arch LBR in x86 and BRBE in ARM.
The Extension has been stable and the latest release can be found here
https://github.com/riscv/riscv-control-transfer-records/release

Signed-off-by: Rajnesh Kanwal &lt;rkanwal@rivosinc.com&gt;
Reviewed-by: Atish Patra &lt;atishp@rivosinc.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20250307124451.122828-1-rkanwal@rivosinc.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi_trap: Add support for vectored interrupts</title>
<updated>2025-04-13T00:21:17Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel.holland@sifive.com</email>
</author>
<published>2025-03-05T01:45:43Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=afa0e3091bebf2aaba167f37119a9a4f608a55a8'/>
<id>urn:sha1:afa0e3091bebf2aaba167f37119a9a4f608a55a8</id>
<content type='text'>
When redirecting an exception to S-mode, transform the (v)stvec CSR
value as described in the privileged spec to derive the S-mode PC.
Since OpenSBI never redirects interrupts, only synchronous exceptions,
the only action needed is to mask out the (v)stvec.MODE field.

Reported-by: Jan Reinhard &lt;jan.reinhard@sysgo.com&gt;
Closes: https://github.com/riscv-software-src/opensbi/issues/391
Signed-off-by: Samuel Holland &lt;samuel.holland@sifive.com&gt;
Reviwed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20250305014729.3143535-1-samuel.holland@sifive.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: sse: Add support for SSTATUS.SDT</title>
<updated>2025-03-27T12:46:44Z</updated>
<author>
<name>Clément Léger</name>
<email>cleger@rivosinc.com</email>
</author>
<published>2025-03-25T10:26:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=3ac49712e3bcfd8d64cd17511e27b7836821e41c'/>
<id>urn:sha1:3ac49712e3bcfd8d64cd17511e27b7836821e41c</id>
<content type='text'>
Similarly to what is done for SPELP, handle SSTATUS.SDT upon event
injection. In order to mimick an interrupt, set SDT to 1 for injection and
save its previous value in interrupted_flags[5:5]. Restore it upon
completion.

Signed-off-by: Clément Léger &lt;cleger@rivosinc.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
</content>
</entry>
</feed>
