<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/include/sbi/riscv_encoding.h, branch master</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=master</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/include/sbi/riscv_encoding.h?h=master'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2026-06-16T07:00:22Z</updated>
<entry>
<title>include: sbi: Add GET_RDS_NUM/SET(_FP32/_FP64)_RDS macros</title>
<updated>2026-06-16T07:00:22Z</updated>
<author>
<name>Bo Gan</name>
<email>ganboing@gmail.com</email>
</author>
<published>2026-06-05T11:32:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=1b3424d5c0901dcea24ca3427009b299662949a0'/>
<id>urn:sha1:1b3424d5c0901dcea24ca3427009b299662949a0</id>
<content type='text'>
These macros can be used to decode rd' and set rd' in RVC instructions

Signed-off-by: Bo Gan &lt;ganboing@gmail.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Tested-by: Anirudh Srinivasan &lt;asrinivasan@oss.tenstorrent.com&gt;
Link: https://lore.kernel.org/r/20260605113214.242-4-ganboing@gmail.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>include: sbi: Add more mstatus and instruction encoding</title>
<updated>2026-06-16T06:59:29Z</updated>
<author>
<name>Bo Gan</name>
<email>ganboing@gmail.com</email>
</author>
<published>2026-06-05T11:32:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=3c4fa3404eb331b0c605d0de2d1b6d840d95109e'/>
<id>urn:sha1:3c4fa3404eb331b0c605d0de2d1b6d840d95109e</id>
<content type='text'>
- Add MXL encoding for calculating XLEN.
- Add instruction encoding for c.lbu/c.sb,
  and imm encoding for multiple RVC insn.

Signed-off-by: Bo Gan &lt;ganboing@gmail.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Tested-by: Anirudh Srinivasan &lt;asrinivasan@oss.tenstorrent.com&gt;
Link: https://lore.kernel.org/r/20260605113214.242-2-ganboing@gmail.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Add Smrnmi extension macros for registers and bits</title>
<updated>2026-05-09T07:29:43Z</updated>
<author>
<name>Evgeny Voevodin</name>
<email>evvoevod@tenstorrent.com</email>
</author>
<published>2026-05-07T18:08:03Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=b63606f98180cb92cc7c47c42b63bf92a21dfdee'/>
<id>urn:sha1:b63606f98180cb92cc7c47c42b63bf92a21dfdee</id>
<content type='text'>
Add CSR definitions (MNSCRATCH, MNSTATUS, MNEPC, MNCAUSE) and bit definitions
(MNSTATUS_NMIE, MNSTATUS_MNPV, MNSTATUS_MNPP). Also add SBI_HART_EXT_SMRNMI to
the hart extension enumeration.

Signed-off-by: Evgeny Voevodin &lt;evvoevod@tenstorrent.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/1c6feb6d359b9827b3c2ad8f4f0e0a4dfd1de911.1778176768.git.evvoevod@tenstorrent.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>firmware: Initialize stack guard via Zkr</title>
<updated>2026-02-20T05:53:13Z</updated>
<author>
<name>Xiang W</name>
<email>wxjstz@126.com</email>
</author>
<published>2026-01-04T05:18:10Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=ecdb6c90c83dfc89964e55d7c2a94a5c0f6bc437'/>
<id>urn:sha1:ecdb6c90c83dfc89964e55d7c2a94a5c0f6bc437</id>
<content type='text'>
Try to initialize stack protection guard via the zkr extension.

Signed-off-by: Xiang W &lt;wxjstz@126.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20260104051812.128496-1-wxjstz@126.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<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>
</feed>
