<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/include/sbi/sbi_ecall_interface.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_ecall_interface.h?h=v1.2</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/include/sbi/sbi_ecall_interface.h?h=v1.2'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2022-07-30T05:52:50Z</updated>
<entry>
<title>lib: sbi: Add the bound check for events during config match</title>
<updated>2022-07-30T05:52:50Z</updated>
<author>
<name>Atish Patra</name>
<email>atishp@rivosinc.com</email>
</author>
<published>2022-07-20T21:50:33Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=83db3af5f93dbbffb599af41c58e26a24b1abc1c'/>
<id>urn:sha1:83db3af5f93dbbffb599af41c58e26a24b1abc1c</id>
<content type='text'>
Currently, there is no sanity check for firmware event code. We don't see
any issue as Linux kernel driver does a bound check on firmware events
already. However, OpenSBI can't assume sane supervisor mode software
always. Thus, an invalid event idx can cause a buffer overflow error.
For hardware events, the match will fail for invalid event code anyways.
However, a search is unecessary if event code is invalid.

Add a event ID validation function to solve the issue.

Signed-off-by: Atish Patra &lt;atishp@rivosinc.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 PMU support</title>
<updated>2021-07-11T04:53:18Z</updated>
<author>
<name>Atish Patra</name>
<email>atish.patra@wdc.com</email>
</author>
<published>2021-07-10T16:18:11Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=13d40f21d588e17a31624ed415f114987b6bd3d0'/>
<id>urn:sha1:13d40f21d588e17a31624ed415f114987b6bd3d0</id>
<content type='text'>
RISC-V SBI v0.3 specification defined a PMU extension to configure/start/stop
the hardware/firmware pmu events.

Implement PMU support in OpenSBI library. The implementation is agnostic of
event to counter mapping &amp; mhpmevent value configuration. That means, it
expects platform hooks will be used to set up the mapping and provide
the mhpmevent value at runtime.

Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Signed-off-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>include: sbi: SBI function IDs for RFENCE extension</title>
<updated>2021-03-12T04:02:53Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2021-03-09T11:31:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=ff5bd949d55b14e1d308288ace71366b090f822d'/>
<id>urn:sha1:ff5bd949d55b14e1d308288ace71366b090f822d</id>
<content type='text'>
The SBI function IDs for RFENCE extension must match the SBI specification.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>include: sbi: Add HSM suspend related defines</title>
<updated>2021-03-03T04:49:13Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2021-02-01T11:54:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=6290a22e3428ffe79266310a3a10072efc198e97'/>
<id>urn:sha1:6290a22e3428ffe79266310a3a10072efc198e97</id>
<content type='text'>
This patch adds SBI HSM suspend related defines to ecall interface
header.

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: sbi: Simplify HSM state define names</title>
<updated>2021-03-03T04:47:35Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2021-02-01T04:42:47Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=5487cf095daecf72c81e2813dcce13e203398a55'/>
<id>urn:sha1:5487cf095daecf72c81e2813dcce13e203398a55</id>
<content type='text'>
We simplify HSM state define names so that these defines can directly
replace SBI_HART_xyz defines used by SBI HSM implementation.

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: sbi: Add SBI SRST extension related defines</title>
<updated>2020-12-01T11:33:50Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-11-24T04:20:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=54a7734d86fb43d3a7892d474c7d4593f34c124e'/>
<id>urn:sha1:54a7734d86fb43d3a7892d474c7d4593f34c124e</id>
<content type='text'>
We extend the SBI ecall interface header for the SBI SRST extension
recently accepted in SBI specification v0.3-draft.

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: Don't return any invalid error from SBI ecall</title>
<updated>2020-06-20T05:06:13Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-06-10T13:09:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=2314101989684585f942b50a827aac4886825ba1'/>
<id>urn:sha1:2314101989684585f942b50a827aac4886825ba1</id>
<content type='text'>
We should only return valid error codes from SBI ecalls as
defined by the RISC-V SBI spec.

To achieve this:
1. We use SBI_Exxxx defines for OpenSBI internal errors with
   error values starting from -1000
2. We use SBI_ERR_xxxx defines for errors defined by SBI spec
3. We map some of the SBI_Exxxx defines to SBI_ERR_xxxx defines
   which are semantically same
4. We throw a error print and force return error code to
   SBI_ERR_FAILED in sbi_ecall_handler() if we see an invalid
   error code being returned to S-mode

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: sbi: Add firmware extension constants</title>
<updated>2020-05-19T03:52:44Z</updated>
<author>
<name>Daniel Schaefer</name>
<email>git@danielschaefer.me</email>
</author>
<published>2020-05-15T09:34:55Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=89ba63493c4ce98861144180e408d6db391fd1c3'/>
<id>urn:sha1:89ba63493c4ce98861144180e408d6db391fd1c3</id>
<content type='text'>
Cc: Abner Chang &lt;abner.chang@hpe.com&gt;
Signed-off-by: Daniel Schaefer &lt;git@danielschaefer.me&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Fix coding style issues</title>
<updated>2020-03-10T04:57:28Z</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2020-03-09T03:52:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=650c0e525ce60e80b6756aa8cc4eeae5b20ccbd8'/>
<id>urn:sha1:650c0e525ce60e80b6756aa8cc4eeae5b20ccbd8</id>
<content type='text'>
This fixes various coding style issues found in the SBI codes.
No functional changes.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>lib: Implement Hart State Management (HSM) SBI extension</title>
<updated>2020-02-24T12:43:23Z</updated>
<author>
<name>Atish Patra</name>
<email>atish.patra@wdc.com</email>
</author>
<published>2020-02-12T01:32:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=e3f69fc1e934ce7815d9cde2d13dd2038a2894a6'/>
<id>urn:sha1:e3f69fc1e934ce7815d9cde2d13dd2038a2894a6</id>
<content type='text'>
This patch adds support HSM extension. The specification is available
at https://github.com/riscv/riscv-sbi-doc.

It allows to implement hart hotplug and fixed ordered hart booting in
supervisor.

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