<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/include/sbi/sbi_trap.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/sbi_trap.h?h=v1.2</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/include/sbi/sbi_trap.h?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>lib: sbi_trap: Save mstatus[h].GVA in trap-&gt;gva</title>
<updated>2022-08-22T03:19:39Z</updated>
<author>
<name>Vivian Wang</name>
<email>dramforever@live.com</email>
</author>
<published>2022-08-04T14:32:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=1fbe7778c9843930ce3dadb35804d56e1f782479'/>
<id>urn:sha1:1fbe7778c9843930ce3dadb35804d56e1f782479</id>
<content type='text'>
The machine mode GVA field is available if the hypervisor extension is
implemented, and indicates if mtval is a guest virtual address. Add a
gva field to sbi_trap_info for this, and in __sbi_expected_trap_hext,
save mstatus[h].GVA to it, so that gva indicates if tval is a guest
virtual address. If the hypervisor extension is not implemented, always
set gva to 0.

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: 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>
<entry>
<title>firware: optimize the exception exit code</title>
<updated>2021-04-01T05:18:35Z</updated>
<author>
<name>Xiang W</name>
<email>wxjstz@126.com</email>
</author>
<published>2021-03-30T12:07:35Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=4ef2f5d3e6b25356a8fab19574bed76ce60edeee'/>
<id>urn:sha1:4ef2f5d3e6b25356a8fab19574bed76ce60edeee</id>
<content type='text'>
There are two copies of the same abnormal exit code, this patch deletes one

Signed-off-by: Xiang W &lt;wxjstz@126.com&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>include: headers: Replace __ASSEMBLY__ with __ASSEMBLER__</title>
<updated>2021-03-22T10:32:48Z</updated>
<author>
<name>Marouene Boubakri</name>
<email>marouene.boubakri@nxp.com</email>
</author>
<published>2021-03-12T11:00:01Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=bfc85c70e7517dc633b74e33768247b4df6a661c'/>
<id>urn:sha1:bfc85c70e7517dc633b74e33768247b4df6a661c</id>
<content type='text'>
GCC has already a predefined macro __ASSEMBLER__ therefore, it can be
used without the need to define a new flag with -D__ASSEMBLY__.
This is useful when adding the library to projects having a build
system such one can build without the need to make changes.
THe build system does not use the Makefile in the sources tree.

Signed-off-by: Marouene Boubakri &lt;marouene.boubakri@nxp.com&gt;
Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>include: sbi: No need to pack struct sbi_trap_regs</title>
<updated>2021-01-15T05:10:29Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2021-01-11T10:55:38Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=e884416650c46c69c41f83235407dc840cfc9c3f'/>
<id>urn:sha1:e884416650c46c69c41f83235407dc840cfc9c3f</id>
<content type='text'>
All members in struct sbi_trap_regs are of machine word size so
no need to pack this structure. This also allows GCC to generate
more optimized instruction sequence when accessing members of
struct sbi_trap_regs.

Reported-by: Paul Campbell &lt;taniwha@gmail.com&gt;
Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Introduce sbi_trap_exit() API</title>
<updated>2021-01-07T04:23:17Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-12-29T06:09:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=b7df5e4392d34d8b8d5290d5b857676e672d4c96'/>
<id>urn:sha1:b7df5e4392d34d8b8d5290d5b857676e672d4c96</id>
<content type='text'>
We introduce sbi_trap_exit() API which can help non-firmware
(i.e. generic or platform) code to force exit trap/interrupt
handling and resume execution at context pointed by parameter
"const struct sbi_trap_regs *regs".

This new sbi_trap_exit() API will help Keystone Enclave project
to resume execution of enclave from custom SBI call handler.

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi_trap: Simplify sbi_trap_handler() API</title>
<updated>2020-03-28T08:02:23Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-03-20T03:23:35Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=40b221baffd6bb348b63367784d4f6fcff53c24a'/>
<id>urn:sha1:40b221baffd6bb348b63367784d4f6fcff53c24a</id>
<content type='text'>
This patch simplify sbi_trap_handler() API as follows:
1. Remove current hartid local variable because sbi_trap_handler()
   itself does not need it.
2. Remove scratch parameter because none of the functions directly
   called by sbi_trap_handler() require it.

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi_trap: Remove scratch parameter from sbi_trap_redirect()</title>
<updated>2020-03-28T08:02:04Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-03-19T14:03:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=cb78a482314e8e3c7f423bb13fc50bbd50c59b13'/>
<id>urn:sha1:cb78a482314e8e3c7f423bb13fc50bbd50c59b13</id>
<content type='text'>
The scratch parameter of sbi_trap_redirect() is not used hence we
remove it.

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