<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/lib/sbi/sbi_init.c, branch v1.3</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/opensbi.git/atom/lib/sbi/sbi_init.c?h=v1.3</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/lib/sbi/sbi_init.c?h=v1.3'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2023-06-05T10:16:22Z</updated>
<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: Only register available extensions</title>
<updated>2023-05-21T11:23:02Z</updated>
<author>
<name>Andrew Jones</name>
<email>ajones@ventanamicro.com</email>
</author>
<published>2023-05-15T11:12:37Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=8b952d4fcd4e1341ed7061bd01b8b12802031ea1'/>
<id>urn:sha1:8b952d4fcd4e1341ed7061bd01b8b12802031ea1</id>
<content type='text'>
When an extension implements a probe function it means there's a
chance that the extension is not available. Use this function in the
register_extensions callback to determine if the extension should be
registered at all. Where the probe implementation is simple, just
open code the check.

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: Remove unnecessary semicolon</title>
<updated>2023-05-11T07:01:34Z</updated>
<author>
<name>Xiang W</name>
<email>wxjstz@126.com</email>
</author>
<published>2023-04-25T08:56:23Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=4e3353057a3b975ca58c9b831749e2760f7812c0'/>
<id>urn:sha1:4e3353057a3b975ca58c9b831749e2760f7812c0</id>
<content type='text'>
We have redundant semicolon at quite a few places so let's remove it.

Signed-off-by: Xiang W &lt;wxjstz@126.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Add debug print when sbi_pmu_init fails</title>
<updated>2023-04-20T08:49:44Z</updated>
<author>
<name>Tan En De</name>
<email>ende.tan@starfivetech.com</email>
</author>
<published>2023-04-14T05:13:11Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=791953030836d39687688a8e7f1a3e708892cfa1'/>
<id>urn:sha1:791953030836d39687688a8e7f1a3e708892cfa1</id>
<content type='text'>
Since sbi_pmu_init is called after sbi_console_init,
the sbi_printf can be called when sbi_pmu_init fails.

Signed-off-by: Tan En De &lt;ende.tan@starfivetech.com&gt;
Reviewed-by: Atish Patra &lt;atishp@rivosinc.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Print the CPPC device name</title>
<updated>2023-04-07T04:06:42Z</updated>
<author>
<name>Sunil V L</name>
<email>sunilvl@ventanamicro.com</email>
</author>
<published>2023-03-29T08:57:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=91767d093bf76c169c61194dd3ea7bbec1fc13f6'/>
<id>urn:sha1:91767d093bf76c169c61194dd3ea7bbec1fc13f6</id>
<content type='text'>
If CPPC device is registered by the platform, print its name.

Signed-off-by: Sunil V L &lt;sunilvl@ventanamicro.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: Introduce sbi_entry_count() function</title>
<updated>2023-04-06T13:18:15Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2023-03-20T13:22:02Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=f64dfcd2b5e78e9eea3fe3fee58e0632b5f81b99'/>
<id>urn:sha1:f64dfcd2b5e78e9eea3fe3fee58e0632b5f81b99</id>
<content type='text'>
We introduce sbi_entry_count() function which counts the number
of times a HART enters OpenSBI via cold-boot or warm-boot path.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Clear IPIs before init_warm_startup in non-boot harts</title>
<updated>2023-03-10T08:43:40Z</updated>
<author>
<name>Evgenii Shatokhin</name>
<email>e.shatokhin@yadro.com</email>
</author>
<published>2023-03-05T21:22:47Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=c6a092cd80112529cb2e92e180767ff5341b22a3'/>
<id>urn:sha1:c6a092cd80112529cb2e92e180767ff5341b22a3</id>
<content type='text'>
Since commit 50d4fde1c5a4 ("lib: Remove redundant sbi_platform_ipi_clear()
calls"), the IPI sent from the boot hart in wake_coldboot_harts() is not
cleared in the secondary harts until they reach sbi_ipi_init(). However,
sbi_hsm_init() and sbi_hsm_hart_wait() are called earlier, so a secondary
hart might enter sbi_hsm_hart_wait() with an already pending IPI.

sbi_hsm_hart_wait() makes sure the hart leaves the loop only when it is
actually ready, so a pending unrelated IPI should not cause safety issues.
However, it might be inefficient on certain hardware, because it prevents
"wfi" from stalling the hart even if the hardware supports this, making the
hart needlessly spin in a "busy-wait" loop.

This behaviour can be observed, for example, in a QEMU VM (QEMU 7.2.0) with
"-machine virt" running a Linux guest. Inserting delays in
sbi_hsm_hart_start() allows reproducing the issue more reliably.

The comment in wait_for_coldboot() suggests that the initial IPI is needed
in the warm resume path, so let us clear it before init_warm_startup()
only.

To do this, sbi_ipi_raw_clear() was created similar to sbi_ipi_raw_send().

Signed-off-by: Evgenii Shatokhin &lt;e.shatokhin@yadro.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Refactor the calls to sbi_hart_switch_mode()</title>
<updated>2023-03-10T08:30:36Z</updated>
<author>
<name>Evgenii Shatokhin</name>
<email>e.shatokhin@yadro.com</email>
</author>
<published>2023-03-05T21:22:45Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=d56049e299cce3bca2022903a5550acdc323d8a4'/>
<id>urn:sha1:d56049e299cce3bca2022903a5550acdc323d8a4</id>
<content type='text'>
Move them into sbi_hsm_hart_start_finish() and sbi_hsm_hart_resume_finish()
to make them easier to manage.

This will be used by subsequent patches.

Suggested-by: Anup Patel &lt;anup@brainfault.org&gt;
Signed-off-by: Evgenii Shatokhin &lt;e.shatokhin@yadro.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Add system suspend skeleton</title>
<updated>2023-02-27T14:13:52Z</updated>
<author>
<name>Andrew Jones</name>
<email>ajones@ventanamicro.com</email>
</author>
<published>2023-02-27T10:31:02Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=73623a0acac7f62646757cdd5a03b325eba3e0c9'/>
<id>urn:sha1:73623a0acac7f62646757cdd5a03b325eba3e0c9</id>
<content type='text'>
Add the SUSP extension probe and ecall support, but for now the
system suspend function is just a stub.

Signed-off-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
</feed>
