<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/lib/sbi, branch release-1.3.x</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/opensbi.git/atom/lib/sbi?h=release-1.3.x</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/lib/sbi?h=release-1.3.x'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2023-07-05T03:59:24Z</updated>
<entry>
<title>lib: sbi_pmu: Avoid out of bounds access</title>
<updated>2023-07-05T03:59:24Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2023-07-03T13:43:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=eb736a5118b8d271bd649d713b6a058882c8fb7b'/>
<id>urn:sha1:eb736a5118b8d271bd649d713b6a058882c8fb7b</id>
<content type='text'>
On a misconfigured system we could access phs-&gt;active_events[] out of
bounds. Check that num_hw_ctrs is less or equal SBI_PMU_HW_CTR_MAX.

Addresses-Coverity-ID: 1566113 ("Out-of-bounds read")
Addresses-Coverity-ID: 1566114 ("Out-of-bounds write")
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.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: fix comment indent</title>
<updated>2023-07-05T03:55:32Z</updated>
<author>
<name>Gianluca Guida</name>
<email>gianluca@rivosinc.com</email>
</author>
<published>2023-06-29T14:24:08Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=0907de38dbcd121d2f8b4bafaf7f9fe76092d5f1'/>
<id>urn:sha1:0907de38dbcd121d2f8b4bafaf7f9fe76092d5f1</id>
<content type='text'>
Use tabs rather than spaces.

Signed-off-by: Gianluca Guida &lt;gianluca@rivosinc.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: check A2 register in ecall_dbcn_handler.</title>
<updated>2023-06-23T03:16:07Z</updated>
<author>
<name>Gianluca Guida</name>
<email>gianluca@rivosinc.com</email>
</author>
<published>2023-06-22T17:38:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=8bd666a25b543ba391ae6ee81c1a2469e95c4a05'/>
<id>urn:sha1:8bd666a25b543ba391ae6ee81c1a2469e95c4a05</id>
<content type='text'>
Do not ignore register A2 (high bits of physical address) in the dbcn
handler (RV64).

Signed-off-by: Gianluca Guida &lt;gianluca@rivosinc.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Use scratch space to save per-HART domain pointer</title>
<updated>2023-06-05T10:25:21Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2023-04-25T03:42:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=66daafe3ba210eec78900269817ee504ffa9c212'/>
<id>urn:sha1:66daafe3ba210eec78900269817ee504ffa9c212</id>
<content type='text'>
Instead of using a global array indexed by hartid, we should use
scratch space to save per-HART domain pointer.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Use heap for root domain creation</title>
<updated>2023-06-05T10:20:33Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2023-04-21T08:18:37Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=ef4542dc1363038676e688cf3cb5edd174f65d76'/>
<id>urn:sha1:ef4542dc1363038676e688cf3cb5edd174f65d76</id>
<content type='text'>
Let's use heap allocation in root domain creation instead of using
a fixed size global array.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi_pmu: Use heap for per-HART PMU state</title>
<updated>2023-06-05T10:18:43Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2023-04-19T08:10:19Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=bbff53fe3b6cdd3c9bc084d489640d7ee2a3f831'/>
<id>urn:sha1:bbff53fe3b6cdd3c9bc084d489640d7ee2a3f831</id>
<content type='text'>
Instead of using a global array for per-HART PMU state, we should
use heap to on-demand allocate per-HART PMU state when the HART
is initialized in cold boot or warm boot path.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Print scratch size and usage at boot time</title>
<updated>2023-06-05T10:16:22Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2023-04-20T08:32:37Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=2a04f7037317c6c5b591b160a074c700de9b3378'/>
<id>urn:sha1:2a04f7037317c6c5b591b160a074c700de9b3378</id>
<content type='text'>
The scratch space being a scarce resource so let us print it's
size and usage at boot time.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Introduce simple heap allocator</title>
<updated>2023-06-05T10:16:09Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2023-04-18T13:08:21Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=40d36a6673131e36075b1df78af4d7ab92e8cc01'/>
<id>urn:sha1:40d36a6673131e36075b1df78af4d7ab92e8cc01</id>
<content type='text'>
We provide simple heap allocator to manage the heap space provided
by OpenSBI firmware and platform.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Align system suspend errors with spec</title>
<updated>2023-06-04T09:48:40Z</updated>
<author>
<name>Andrew Jones</name>
<email>ajones@ventanamicro.com</email>
</author>
<published>2023-06-01T07:48:10Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=bdde2ecd27af1ac158669809f6658376fb5137ab'/>
<id>urn:sha1:bdde2ecd27af1ac158669809f6658376fb5137ab</id>
<content type='text'>
The spec says sbi_system_suspend() will return SBI_ERR_INVALID_PARAM
when "sleep_type is reserved or is platform-specific and unimplemented"
and SBI_ERR_NOT_SUPPORTED when sleep_type "is not reserved and is
implemented, but the platform does not support it due to one or more
missing dependencies." Ensure SBI_ERR_INVALID_PARAM is returned for
reserved sleep types and that the system suspend driver can choose
which of the two error types to return itself by returning an error
from its check function rather than a boolean.

Signed-off-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Fix return of sbi_console_init</title>
<updated>2023-05-26T07:06:54Z</updated>
<author>
<name>Xiang W</name>
<email>wxjstz@126.com</email>
</author>
<published>2023-05-22T05:18:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=8b99a7f7d8294be29e18a667d51e13755ed2c0e0'/>
<id>urn:sha1:8b99a7f7d8294be29e18a667d51e13755ed2c0e0</id>
<content type='text'>
console is not a required peripheral. So it should return success when
the console does not exist.

Signed-off-by: Xiang W &lt;wxjstz@126.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
</feed>
