<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/include/sbi/sbi_platform.h, branch v0.8</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/opensbi.git/atom/include/sbi/sbi_platform.h?h=v0.8</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/include/sbi/sbi_platform.h?h=v0.8'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2020-05-19T03:49:34Z</updated>
<entry>
<title>lib: sbi: Improve get_feature_str() implementation and usage</title>
<updated>2020-05-19T03:49:34Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-05-10T06:06:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=49841832b85bbcc8ae99dc2b808175a1a8650ff3'/>
<id>urn:sha1:49841832b85bbcc8ae99dc2b808175a1a8650ff3</id>
<content type='text'>
We do following improvements for get_feature_str():
1. We should return "none" from get_feature_str() no features
   available instead of sbi_boot_prints() explicitly handling
   failure.
2. We don't need to return failure (just like misa_xlen())
   because we are returning "none" for no features and we are
   truncating output when space is not available.
3. Based on 1 and 2, the sbi_boot_prints() can be further
   simplified.
4. No need for two char[] in sbi_boot_prints()

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: Add platform features in boot time print</title>
<updated>2020-05-10T04:54:08Z</updated>
<author>
<name>Atish Patra</name>
<email>atish.patra@wdc.com</email>
</author>
<published>2020-05-09T23:47:31Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=1f235ec47f85ba90916493c7eb1378b5427a66b5'/>
<id>urn:sha1:1f235ec47f85ba90916493c7eb1378b5427a66b5</id>
<content type='text'>
We have now clear distinction between platform and hart features.
Modify the boot print messages to print platform features in a string
format. In the process, this patch moved relatively larger functions
to its own file from platform.h header file.

Signed-off-by: Atish Patra &lt;atish.patra@wdc.com&gt;
Tested-by: Jonathan Balkind &lt;jbalkind@cs.princeton.edu&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>platform: Move platform features to hart</title>
<updated>2020-05-10T04:35:41Z</updated>
<author>
<name>Atish Patra</name>
<email>atish.patra@wdc.com</email>
</author>
<published>2020-05-09T23:47:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=b2df751acfd2858f2370d896f91543593647b243'/>
<id>urn:sha1:b2df751acfd2858f2370d896f91543593647b243</id>
<content type='text'>
PMP &amp; performance counters belong to a hart rather than a platform.
In addition to that, these features enable reading/writing from a
particular csr. Thus, they can be detected and set at runtime rather
than compile time.

Move PMP/MCOUNTEREN/SCOUNTEREN features to hart and detect them at runtime.

Signed-off-by: Atish Patra &lt;atish.patra@wdc.com&gt;
Tested-by: Jonathan Balkind &lt;jbalkind@cs.princeton.edu&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>include: sbi_platform: Combine reboot and shutdown into one callback</title>
<updated>2020-04-27T09:05:29Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-04-24T06:56:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=a9eac67ad019200e9a281a6fc10e394353a026f2'/>
<id>urn:sha1:a9eac67ad019200e9a281a6fc10e394353a026f2</id>
<content type='text'>
We can achieve shutdown, cold reboot, and warm reboot using just
one sbi_platform callback so we combine system_reboot() and
system_shutdown() callbacks into one system_reset() callback.

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: No need to provide default PMP region using platform callbacks</title>
<updated>2020-04-27T08:27:27Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-04-23T06:22:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=1bb00ab3aeabde78579774eef8eadc7b7e765924'/>
<id>urn:sha1:1bb00ab3aeabde78579774eef8eadc7b7e765924</id>
<content type='text'>
The default (usually last) PMP region provides S-mode access to
complete memory range not covered by other PMP regions.

Currently, the default PMP region is described as platform specific
PMP region which is not appropriate because all platforms need it
and default PMP region should be part of generic library.

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
<entry>
<title>include: sbi_platform: Remove priv parameter from hart_start() callback</title>
<updated>2020-03-28T08:02:26Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-03-20T11:14:38Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=7b211ff92482379aa34c0a217e2aeded5713b2d5'/>
<id>urn:sha1:7b211ff92482379aa34c0a217e2aeded5713b2d5</id>
<content type='text'>
The priv parameter in hart_start() platform callback is redundant 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>include: sbi_platform: Introduce HART index to HART id table</title>
<updated>2020-03-19T04:00:01Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-03-15T06:09:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=c51f02cf143b081c2a81717393a0e6cef2ce2521'/>
<id>urn:sha1:c51f02cf143b081c2a81717393a0e6cef2ce2521</id>
<content type='text'>
A platform can have discontinuous and/or sparse HART ids so we
cannot always assume a set of HARTs with continuous HART ids.

This patch adds support for discontinuous and sparse HART ids by
introducing HART index to HART id table. This table has platform
hart_count entries and it maps HART index to HART id.

The HART index to HART id table has only two restrictions:
1. HART index &lt; sbi_platform hart_count
2. HART id &lt; SBI_HARTMASK_MAX_BITS

Example1:
Let's say we have a platform with 2 HART ids 11 and 22, for such a
a platform:
hart_count = 2
hart_index2id[0] = 11
hart_index2id[1] = 22

Example2:
Let's say we have a platform with 5 HARTs ids 0, 1, 2, 3, and 4
but out of these HART with id 0 is not usable so for such a platform:
hart_count = 5
hart_index2id[0] = -1U
hart_index2id[1] = 1
hart_index2id[2] = 2
hart_index2id[3] = 3
hart_index2id[4] = 4
OR
hart_count = 4
hart_index2id[0] = 1
hart_index2id[1] = 2
hart_index2id[2] = 3
hart_index2id[3] = 4

With HART index to HART id table in place, the hart_disabled()
callback is now redundant so we remove it as well.

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Atish Patra &lt;atish.patra@wdc.com&gt;
</content>
</entry>
<entry>
<title>include: sbi_platform: Improve sbi_platform_hart_disabled() API</title>
<updated>2020-03-19T03:45:29Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-03-14T14:09:15Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=bd6ef02d47015706bc7a79cc16b3f19946889a3b'/>
<id>urn:sha1:bd6ef02d47015706bc7a79cc16b3f19946889a3b</id>
<content type='text'>
The sbi_platform_hart_disabled() should return TRUE for HART id
greater than platform hart count.

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
<entry>
<title>platform: Use one unified per-HART stack size macro for all platforms</title>
<updated>2020-03-14T03:44:00Z</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2020-03-13T05:39:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=72a0628c7e8063f1e6c02541cbd459eff617dd07'/>
<id>urn:sha1:72a0628c7e8063f1e6c02541cbd459eff617dd07</id>
<content type='text'>
As of today all platforms use 8KB of per-HART stack hence there is
no need for each platform to define its own macro or use the magic
number. Create one macro for all platforms. Platform still can use
its own version if needed.

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>include: Remove disabled_hart_mask from sbi_platform</title>
<updated>2020-03-11T10:00:12Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2020-03-02T12:19:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=44ce5b99e97eb0c3695414cdb64c61f07d9a76a4'/>
<id>urn:sha1:44ce5b99e97eb0c3695414cdb64c61f07d9a76a4</id>
<content type='text'>
The disabled_hard_mask in sbi_platform is only 64bits wide so we
cannot disable a HART with HARTID &gt; 63. To tackle this, we remove
disabled_hart_mask and replace it with hart_disabled() platform
callback.

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