<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/include/sbi/sbi_trap.h, branch v1.0</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.0</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/include/sbi/sbi_trap.h?h=v1.0'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2021-04-01T05:18:35Z</updated>
<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>
<entry>
<title>lib: Optimize unpriv load/store implementation</title>
<updated>2020-03-28T08:01:53Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-03-19T11:43:16Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=1de66d170e71fb94732ffc80dcf4e70e623c4f7a'/>
<id>urn:sha1:1de66d170e71fb94732ffc80dcf4e70e623c4f7a</id>
<content type='text'>
This patch optimize unpriv load/store implementation by having
dedicated unpriv trap handler (just like KVM RISC-V).

As a result of this optimization:
1. We have reduced roughly 13+ instruction in all unpriv load/store
   functions. The reduced instruction also include two function calls.
2. Per-HART trap info pointer in scratch space is now redundant
   hence removed.
3. The sbi_trap_handler() is now much cleaner because we don't have
   to handle unpriv load/store traps.

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>include: Extend struct sbi_trap_info for mtval2 and mtinst</title>
<updated>2019-12-16T09:18:19Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2019-12-12T01:52:03Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=4370f18f3467fee4a80fd463f1c0247d02f912d6'/>
<id>urn:sha1:4370f18f3467fee4a80fd463f1c0247d02f912d6</id>
<content type='text'>
We have two new trap CSRs namely mtval2 and mtinst when
RISC-V hypervisor extension is available hence we extend
struct sbi_trap_info accordingly.

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
</content>
</entry>
<entry>
<title>lib: Better naming of unpriv APIs for wider use</title>
<updated>2019-11-21T08:27:33Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2019-11-17T08:46:24Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=0e1322bacbaccb34f167ebe243ab04836b99105c'/>
<id>urn:sha1:0e1322bacbaccb34f167ebe243ab04836b99105c</id>
<content type='text'>
The unpriv APIs can be useful to external firmware and out-of-tree
platform support code.

This patch adds "sbi_" prefix to unpriv load/store APIs and rename
struct riscv_unpriv to struct sbi_trap_info everywhere. We also
place struct sbi_trap_info in sbi/sbi_trap.h so that we can use
it for sbi_trap_redirect() as well.

Overall, this patch will make naming of unpriv APIs consistent
with other OpenSBI APIs.

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: Extend sbi_trap_redirect() for hypervisor extension</title>
<updated>2019-09-30T09:59:37Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2019-04-15T06:23:31Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=bbeb8e619d1cc528d2d56531512d6ea406f9738b'/>
<id>urn:sha1:bbeb8e619d1cc528d2d56531512d6ea406f9738b</id>
<content type='text'>
When hypervisor extension is available, we can get traps from VS/VU
modes. We should be able to force redirect some of these traps to
HS-mode. In other words, we should be able forward traps from VS/VU
mode to HS-mode using sbi_trap_redirect() hence this patch.

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