<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/include/sbi/sbi_hsm.h, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/opensbi.git/atom/include/sbi/sbi_hsm.h?h=master</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/include/sbi/sbi_hsm.h?h=master'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2024-12-06T03:56:35Z</updated>
<entry>
<title>lib: sbi: Add optional resume address to hart suspend</title>
<updated>2024-12-06T03:56:35Z</updated>
<author>
<name>Subrahmanya Lingappa</name>
<email>slingappa@ventanamicro.com</email>
</author>
<published>2024-08-06T05:08:46Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=fdd72635368beb5f9c85533b92abb31adee20406'/>
<id>urn:sha1:fdd72635368beb5f9c85533b92abb31adee20406</id>
<content type='text'>
Add an optional resume address to the platform specific hart suspend call.

Signed-off-by: Subrahmanya Lingappa &lt;slingappa@ventanamicro.com&gt;
Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Remove unused hartid parameters</title>
<updated>2024-09-26T10:59:29Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel.holland@sifive.com</email>
</author>
<published>2024-08-30T15:49:16Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=91550249726ddd0d90116977abbe71b0390a9a89'/>
<id>urn:sha1:91550249726ddd0d90116977abbe71b0390a9a89</id>
<content type='text'>
None of these functions use their hartid parameter.

Signed-off-by: Samuel Holland &lt;samuel.holland@sifive.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Use sbi_hartmask in sbi_hsm_hart_interruptible_mask()</title>
<updated>2024-09-26T10:58:18Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel.holland@sifive.com</email>
</author>
<published>2024-08-30T15:49:13Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=fe153c55164a9a9bc297717185db392342e4d9e6'/>
<id>urn:sha1:fe153c55164a9a9bc297717185db392342e4d9e6</id>
<content type='text'>
This removes several hartid/hartindex conversions, as well as two loops
through the mask for broadcast IPIs.

Signed-off-by: Samuel Holland &lt;samuel.holland@sifive.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Update __sbi_hsm_hart_get_state() to take a hart index</title>
<updated>2024-09-26T06:00:04Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel.holland@sifive.com</email>
</author>
<published>2024-08-30T15:49:12Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=ebe0f31446c577a15bd0a72689d6a93f6e355623'/>
<id>urn:sha1:ebe0f31446c577a15bd0a72689d6a93f6e355623</id>
<content type='text'>
This removes some hartindex conversions in sbi_system_suspend(), but is
mostly intended to support refactoring sbi_hsm_hart_interruptible_mask()
to work exclusively with struct sbi_hartmask.

Signed-off-by: Samuel Holland &lt;samuel.holland@sifive.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_hsm: Export some functions</title>
<updated>2023-02-27T14:10:21Z</updated>
<author>
<name>Andrew Jones</name>
<email>ajones@ventanamicro.com</email>
</author>
<published>2023-02-27T10:31:01Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=8a40306371b7e5dbe20da946edd0ddd9693bfa85'/>
<id>urn:sha1:8a40306371b7e5dbe20da946edd0ddd9693bfa85</id>
<content type='text'>
A coming patch can make use of a few internal hsm functions if
we export them.

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_hsm: handle failure when hart_stop returns SBI_ENOTSUPP</title>
<updated>2023-01-22T12:02:09Z</updated>
<author>
<name>Yu Chien Peter Lin</name>
<email>peterlin@andestech.com</email>
</author>
<published>2023-01-20T03:05:08Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=8ecbe6d3fba6a655b5b5d8e39381187826ac750f'/>
<id>urn:sha1:8ecbe6d3fba6a655b5b5d8e39381187826ac750f</id>
<content type='text'>
Make use of generic warm-boot path when platform hart_stop callback
returns SBI_ENOTSUPP, in case certain hart can not turn off its
power domain, or it detects some error occured in power management
unit, it can fall through warm-boot flow and wait for interrupt in
sbi_hsm_hart_wait().

Also improves comment in sbi_hsm_hart_wait().

Signed-off-by: Yu Chien Peter Lin &lt;peterlin@andestech.com&gt;
Reviewed-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
Reviewed-by: Atish Patra &lt;atishp@rivosinc.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi_hsm: Rename 'priv' argument to 'arg1'</title>
<updated>2023-01-09T11:22:34Z</updated>
<author>
<name>Bin Meng</name>
<email>bmeng@tinylab.org</email>
</author>
<published>2022-12-30T05:07:23Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=6997552ea2236b2a0fe1269e71e3588a58e100e7'/>
<id>urn:sha1:6997552ea2236b2a0fe1269e71e3588a58e100e7</id>
<content type='text'>
'priv' argument of sbi_hsm_hart_start() and sbi_hsm_hart_suspend()
may mislead people to think it stands for 'privilege mode', but it
is not. Change it to 'arg1' to clearly indicate the a1 register.

Signed-off-by: Bin Meng &lt;bmeng@tinylab.org&gt;
Reviewed-by: Samuel Holland &lt;samuel@sholland.org&gt;
Tested-by: Samuel Holland &lt;samuel@sholland.org&gt;
Reviewed-by: Atish Patra &lt;atishp@rivosinc.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi_hsm: Assume a consistent resume address</title>
<updated>2022-06-13T06:24:06Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel@sholland.org</email>
</author>
<published>2022-06-13T01:03:48Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=79e42eb2d646097198aed935042e289e53ff9876'/>
<id>urn:sha1:79e42eb2d646097198aed935042e289e53ff9876</id>
<content type='text'>
The suspend code needs to know the resume address for two reasons:
  1) Programming some hardware register or management firmware. Here we
     assume the hardware/firmware maintains its state between suspends,
     so it only needs to be programmed once at startup.
  2) When a non-retentive suspend request ends up being retentive, due
     to lack of hardware support, pending interrupt, or for some other
     reason. However, the behavior here is not platform-dependent, and
     this can be handled in the generic hart suspend function.

Since neither situation requires the platform-level suspend function to
know the resume address, stop passing it to that function. Instead,
handle the non-retentive to retentive situation generically.

Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi_hsm: Call a device hook during hart resume</title>
<updated>2022-06-13T06:24:06Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel@sholland.org</email>
</author>
<published>2022-06-13T01:03:47Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=b20ed9febe0b78228055ce69d8e3fbb13f64f1cc'/>
<id>urn:sha1:b20ed9febe0b78228055ce69d8e3fbb13f64f1cc</id>
<content type='text'>
Non-retentive suspend states may require platform-specific actions
during resume. For example, firmware may need to save and restore the
values of custom CSRs. Add a hook to support this.

Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Signed-off-by: Samuel Holland &lt;samuel@sholland.org&gt;
</content>
</entry>
</feed>
