<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/include/sbi/riscv_encoding.h, branch v1.2</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.2</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/include/sbi/riscv_encoding.h?h=v1.2'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2022-09-01T10:07:22Z</updated>
<entry>
<title>include: Remove sideleg and sedeleg</title>
<updated>2022-09-01T10:07:22Z</updated>
<author>
<name>Rahul Pathak</name>
<email>rpathak@ventanamicro.com</email>
</author>
<published>2022-08-24T14:54:37Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=622cc5f014eb983348aa0dc7fb5fbde43d074782'/>
<id>urn:sha1:622cc5f014eb983348aa0dc7fb5fbde43d074782</id>
<content type='text'>
sideleg and sedeleg csrs are not part of riscv isa spec
anymore, these csrs were part of N extension which
is removed from the riscv isa specification.

These commits removed all traces of these csrs from
riscv spec (https://github.com/riscv/riscv-isa-manual) -

commit f8d27f805b65 ("Remove or downgrade more references to N extension (#674)")
commit b6cade07034d ("Remove N extension chapter for now")

Signed-off-by: Rahul Pathak &lt;rpathak@ventanamicro.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>include: Add mstatus[h].GVA encodings</title>
<updated>2022-08-22T03:19:29Z</updated>
<author>
<name>Vivian Wang</name>
<email>dramforever@live.com</email>
</author>
<published>2022-08-04T14:32:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=9529e360dfca40feeb2471bdde990207d44d68e1'/>
<id>urn:sha1:9529e360dfca40feeb2471bdde990207d44d68e1</id>
<content type='text'>
The machine mode GVA field is in mstatus for RV64 and mstatush for RV32,
and is available if the hypervisor extension is available. If an
exception occurs, we may need to redirect the trap to HS-mode, in which
case, hstatus.GVA should be set to same as the machine mode GVA bit.

Add MSTATUS_GVA for RV64, MSTATUSH_GVA for RV32, and their SHIFT
encodings. The SHIFT index is helpful in assembly code, since field
extraction can be implemented in only one register. In pseudocode:

- For RV32: gva = (mstatus &gt;&gt; MSTATUS_GVA_SHIFT) &amp; 1;
- For RV64: gva = (mstatush &gt;&gt; MSTATUSH_GVA_SHIFT) &amp; 1;

Signed-off-by: Vivian Wang &lt;dramforever@live.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: utils: Remove CSRs that set/clear an IMSIC interrupt file bits</title>
<updated>2022-06-21T03:14:45Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2022-06-16T11:58:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=c6530012d46ed9c9655c426450bfa3aabcc0eadd'/>
<id>urn:sha1:c6530012d46ed9c9655c426450bfa3aabcc0eadd</id>
<content type='text'>
Based on architecture review committee feedback, the [m|s|vs]seteienum,
[m|s|vs]clreienum, [m|s|vs]seteipnum, and [m|s|vs]clreipnum CSRs are
removed in the latest AIA draft v0.3.0 specification.
(Refer, https://github.com/riscv/riscv-aia/releases/tag/0.3.0-draft.31)

These CSRs were mostly for software convenience and software can always
use [m|s|vs]iselect and [m|s|vs]ireg CSRs to update the IMSIC interrupt
file bits.

We update the IMSIC programming as-per above to match the latest AIA
draft specification.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Atish Patra &lt;atishp@rivosinc.com&gt;
</content>
</entry>
<entry>
<title>include: sbi: Add mtinst/htinst psuedoinstructions</title>
<updated>2022-06-21T03:01:04Z</updated>
<author>
<name>dramforever</name>
<email>dramforever@live.com</email>
</author>
<published>2022-06-09T07:07:29Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=551c70c0405b98ae75698d1674c9e0e09fdc6e01'/>
<id>urn:sha1:551c70c0405b98ae75698d1674c9e0e09fdc6e01</id>
<content type='text'>
Add psuedoinstruction encodings written to mtinst/htinst for faults
caused by implicit memory access for VS-stage address translation

Signed-off-by: dramforever &lt;dramforever@live.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi_illegal_insn: Add emulation for fence.tso</title>
<updated>2022-06-01T11:50:20Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel@sholland.org</email>
</author>
<published>2022-05-29T18:25:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=cb8271c8e43e3c317436b7377c4fa0ac669f8fb5'/>
<id>urn:sha1:cb8271c8e43e3c317436b7377c4fa0ac669f8fb5</id>
<content type='text'>
While OpenC906 appears to properly decode `fence.tso` as a fence
instruction[1], the version of the C906 taped out in the Allwinner D1
does not, and raises illegal instruction.

Handle this errata by emulating `fence.tso` as `fence rw, rw`.

[1]: https://github.com/T-head-Semi/openc906/blob/30827e7f/C906_RTL_FACTORY/gen_rtl/idu/rtl/aq_idu_id_decd.v#L2097

Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Implement Sstc extension</title>
<updated>2022-04-28T06:15:21Z</updated>
<author>
<name>Atish Patra</name>
<email>atishp@rivosinc.com</email>
</author>
<published>2022-04-26T06:29:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=d62f6da062ad0fcc3bdc042a3f3b200d91d18afd'/>
<id>urn:sha1:d62f6da062ad0fcc3bdc042a3f3b200d91d18afd</id>
<content type='text'>
Recently, Sstc extension was ratified. It defines stimecmp which allows
the supervisor mode to directly update the timecmp value without the
need of the SBI call. The hardware also can inject the S-mode timer
interrupt direclty to the supervisor without going through the M-mode.
To maintain backward compatibility with the older software, SBI call
now uses stimecmp directly if the hardware supports.

Implement the Sstc extension.

Signed-off-by: Atish Patra &lt;atishp@rivosinc.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>include: correct the definition of MSTATUS_VS</title>
<updated>2022-04-17T09:00:19Z</updated>
<author>
<name>Vincent Chen</name>
<email>vincent.chen@sifive.com</email>
</author>
<published>2022-04-12T01:16:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=c1e47d0c3f9274553df27e2d69c96c30029912b2'/>
<id>urn:sha1:c1e47d0c3f9274553df27e2d69c96c30029912b2</id>
<content type='text'>
Accordind to the RISC-V privileged specification, the VS filed is
mstatus[10:9] instead of mstatus[24:23]. Modify the MSTATUS_VS
to the correct value.

Reported-by: I-Cheng Cheng &lt;i-cheng.cheng@sifive.com&gt;
Signed-off-by: Vincent Chen &lt;vincent.chen@sifive.com&gt;
Reviewed-by: Xiang W &lt;wxjstz@126.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Add Smstateen extension defines</title>
<updated>2022-04-11T03:04:02Z</updated>
<author>
<name>Mayuresh Chitale</name>
<email>mchitale@ventanamicro.com</email>
</author>
<published>2022-04-11T03:04:02Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=499601a4fff98ff258076c010c980c5dbcc0c24d'/>
<id>urn:sha1:499601a4fff98ff258076c010c980c5dbcc0c24d</id>
<content type='text'>
Smstateen extension provides a mechanism to plug potential
covert channels which are opened by extensions that add to
processor state that may not get context-switched.

Signed-off-by: Mayuresh Chitale &lt;mchitale@ventanamicro.com&gt;
Reviewed-by: Xiang W &lt;wxjstz@126.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>include: Add defines for [m|h|s]envcfg CSRs</title>
<updated>2022-04-05T03:20:17Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2022-03-29T13:30:37Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=722f80d8e994c0fd9b72780259e7ed27893cc704'/>
<id>urn:sha1:722f80d8e994c0fd9b72780259e7ed27893cc704</id>
<content type='text'>
The latest RISC-V privileged specification introduces xenvcfg CSRs
to enable/disable certain features/extensions for lower privilege
modes. This patch adds defines for these new [m|h|s]envcfg CSRs.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Atish Patra &lt;atishp@rivosinc.com&gt;
Reviewed-by: Xiang W &lt;wxjstz@126.com&gt;
</content>
</entry>
<entry>
<title>include: sbi: Add AIA related CSR defines</title>
<updated>2022-02-15T15:02:07Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2021-04-05T11:43:20Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=01250d00447d3838e31c1fc67ce3acb1dd6b2682'/>
<id>urn:sha1:01250d00447d3838e31c1fc67ce3acb1dd6b2682</id>
<content type='text'>
The RISC-V AIA specification improves handling of per-HART local
interrupts in a backward compatible manner. This patch adds defines
for the new RISC-V AIA CSRs.

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