<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/lib/sbi/sbi_trap.c, branch v1.2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/opensbi.git/atom/lib/sbi/sbi_trap.c?h=v1.2</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/lib/sbi/sbi_trap.c?h=v1.2'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2022-09-13T11:12:59Z</updated>
<entry>
<title>lib: sbi_trap: Add helper to get GVA in sbi_trap_regs</title>
<updated>2022-09-13T11:12:59Z</updated>
<author>
<name>Vivian Wang</name>
<email>dramforever@live.com</email>
</author>
<published>2022-09-02T15:48:34Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=37a0d83b6d5a06fd740fcdfb5e4074c33e472a2d'/>
<id>urn:sha1:37a0d83b6d5a06fd740fcdfb5e4074c33e472a2d</id>
<content type='text'>
The GVA bit is in mstatus on RV64, and in mstatush in RV32. Refactor
code handling this in sbi_trap_handler into a helper function to extract
GVA from sbi_trap_regs, so that future code accessing GVA can be
XLEN-agnostic.

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>include: sbi: Reduce includes in sbi_pmu.h</title>
<updated>2022-09-01T11:23:28Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2022-08-24T11:19:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=5019fd124b4c46e1581129c5154fc2cdd3b777ed'/>
<id>urn:sha1:5019fd124b4c46e1581129c5154fc2cdd3b777ed</id>
<content type='text'>
The sbi_pmu.h should only include minimal required headers whereas
sbi_pmu.c should include all required headers.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
Reviewed-by: Atish Patra &lt;atishp@rivosinc.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Use the official extension name for AIA M-mode CSRs</title>
<updated>2022-08-22T03:31:33Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2022-08-18T15:07:03Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=adf44b51bae1b91dbb90c51fcecfbc23bb3062a5'/>
<id>urn:sha1:adf44b51bae1b91dbb90c51fcecfbc23bb3062a5</id>
<content type='text'>
The arch review of AIA spec is completed and we now have official
extension names for AIA: Smaia (M-mode AIA CSRs) and Ssaia (S-mode
AIA CSRs).

Refer, section 1.6 of the latest AIA v0.3.1 stable specification at
https://github.com/riscv/riscv-aia/releases/download/0.3.1-draft.32/riscv-interrupts-032.pdf)

Based on above, we update generic library to use "Smaia" extension
name for AIA M-mode CSRs.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
Reviewed-by: Atish Patra &lt;atishp@rivosinc.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi_trap: Set hstatus.GVA when going to HS-mode</title>
<updated>2022-08-22T03:20:23Z</updated>
<author>
<name>Vivian Wang</name>
<email>dramforever@live.com</email>
</author>
<published>2022-08-04T14:32:31Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=a69eb6cc65a16f26455bfb5b7cab768ac891bc1d'/>
<id>urn:sha1:a69eb6cc65a16f26455bfb5b7cab768ac891bc1d</id>
<content type='text'>
The privileged spec specifies that on a trap to HS-mode, hstatus.GVA
should be set to 1 if stval is written with a guest virtual address, and
to 0 otherwise. Implement this by setting hstatus.GVA to trap-&gt;gva when
redirecting traps to HS-mode.

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: sbi_trap: Set hypervisor CSRs for HS-mode</title>
<updated>2022-08-22T03:20:04Z</updated>
<author>
<name>Vivian Wang</name>
<email>dramforever@live.com</email>
</author>
<published>2022-08-04T14:32:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=5a0ca098f176fd5b84d311e82543a05aaab8cafb'/>
<id>urn:sha1:5a0ca098f176fd5b84d311e82543a05aaab8cafb</id>
<content type='text'>
The hypervisor CSRs hstatus, htval, htinst should always be set if the
trap is to be taken in HS-mode, regardless of which mode it came from.

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: sbi: Set gva when creating sbi_trap_info</title>
<updated>2022-08-22T03:19:49Z</updated>
<author>
<name>Vivian Wang</name>
<email>dramforever@live.com</email>
</author>
<published>2022-08-04T14:32:29Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=1c4ce74f5128b7e1094ad253c9bc5fd732e3d82b'/>
<id>urn:sha1:1c4ce74f5128b7e1094ad253c9bc5fd732e3d82b</id>
<content type='text'>
In some cases the sbi_trap_info argument passed to sbi_trap_redirect is
created from scratch by filling its fields. Since we previously added a
gva field to struct sbi_trap_info, initialize gva in these cases also.

Suggested-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
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: sbi_trap: Redirect exception based on hedeleg</title>
<updated>2022-06-13T05:32:49Z</updated>
<author>
<name>dramforever</name>
<email>dramforever@live.com</email>
</author>
<published>2022-06-12T05:57:37Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=adc3388d76af18487d8ba4a53a1d1e83655435f3'/>
<id>urn:sha1:adc3388d76af18487d8ba4a53a1d1e83655435f3</id>
<content type='text'>
HS-mode software can choose what exceptions to delegate to VS-mode using
the hedeleg CSR. Synthetic VS/VU-mode exceptions should also honor
hedeleg. They should be redirected to VS-mode if and only if delegated
by HS-mode.

Signed-off-by: dramforever &lt;dramforever@live.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: Convert hart features into hart extensions</title>
<updated>2022-05-07T04:46:30Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2022-04-28T15:59:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=cad6c91045331009f38d13f63956a119b0b053c8'/>
<id>urn:sha1:cad6c91045331009f38d13f63956a119b0b053c8</id>
<content type='text'>
Since past few years, we have been using "hart features" in OpenSBI
to represent all optionalities and multi-letter extensions defined
by the RISC-V specifications.

The RISC-V profiles specification has taken a different approach and
started assigning extension names for all optionalities which did not
have any extension name previously.
(Refer, https://github.com/riscv/riscv-profiles/blob/main/profiles.adoc)

Inspired from the RISC-V profiles specification, we convert OpenSBI
hart features into hart extensions. Going forward, we align the
extension naming with RISC-V profiles specification. Currently, only
"time CSR" and "AIA CSR" have not been assigned extension name but
for everything else we have a name.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Atish Patra &lt;atishp@rivosinc.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Add a simple external interrupt handling framework</title>
<updated>2022-02-28T04:13:12Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2022-02-18T17:48:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=f3f4604c196dea70b0bb64aba747aa6d7a9e244f'/>
<id>urn:sha1:f3f4604c196dea70b0bb64aba747aa6d7a9e244f</id>
<content type='text'>
Currently, the external interrupt handling is scattered between
sbi_init and sbi_trap. This patch moves all external interrupt
handling into a simple framework called sbi_irqchip.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Xiang W &lt;wxjstz@126.com&gt;
Reviewed-by: Atish Patra &lt;atishp@rivosinc.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Add sbi_trap_set_external_irqfn() API</title>
<updated>2022-02-15T15:03:55Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2021-04-06T11:37:42Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=222132f48c8efd3b2c84b0883df18216b170bf3d'/>
<id>urn:sha1:222132f48c8efd3b2c84b0883df18216b170bf3d</id>
<content type='text'>
This patch adds sbi_trap_set_external_irqfn() API which can be used by
OpenSBI platform code to set a callback function for external interrupts.
The RISC-V AIA IMSIC driver will use this API to implement inter-processor
interrupts on-top-of MSIs.

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>
