<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/lib/sbi, branch v1.5</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/opensbi.git/atom/lib/sbi?h=v1.5</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/lib/sbi?h=v1.5'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2024-06-28T03:06:46Z</updated>
<entry>
<title>lib: sbi: check incoming dbtr shmem address</title>
<updated>2024-06-28T03:06:46Z</updated>
<author>
<name>Sergey Matyukevich</name>
<email>geomatsi@gmail.com</email>
</author>
<published>2024-06-27T12:04:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=23b7badeee3caa1445784273ba5dc8dbcbba7c34'/>
<id>urn:sha1:23b7badeee3caa1445784273ba5dc8dbcbba7c34</id>
<content type='text'>
Current Debug Trigger SBI extension proposal suggests to activate
shmem area and obtain its physical address from S-mode software
in the following way:

: If both `shmem_phys_lo` and `shmem_phys_hi` parameters are not
: all-ones bitwise then `shmem_phys_lo` specifies the lower XLEN
: bits and `shmem_phys_hi` specifies the upper XLEN bits of the
: shared memory physical base address. The `shmem_phys_lo` MUST
: be `(XLEN / 8)` byte aligned and the size of shared memory is
: assumed to be `trig_max * (XLEN / 2)` bytes.

For more details see the current version of the proposal:
- https://lists.riscv.org/g/tech-debug/message/1302

On the other hand, on RV32, the M-mode can only access the first 4GB of
the physical address space because M-mode does not have MMU to access
full 34-bit physical address space. Similarly, on RV64, the M-mode can
only access memory addressed by 64 bits.

This commit checks shmem address in function sbi_dbtr_setup_shmem
to make sure that shmem_phys_hi part of the valid address is zero.
Besides, the macro DBTR_SHMEM_MAKE_PHYS is updated to take into
account only low XLEN part.

Signed-off-by: Sergey Matyukevich &lt;geomatsi@gmail.com&gt;
Reviewed-by: Himanshu Chauhan &lt;hchauhan@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: fwft: return SBI_EINVAL rather than SBI_ERR_INVALID_PARAM</title>
<updated>2024-06-26T12:44:49Z</updated>
<author>
<name>Clément Léger</name>
<email>cleger@rivosinc.com</email>
</author>
<published>2024-06-24T10:29:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=caae2f7d455c78c509782e1eb8d47dfdd874b903'/>
<id>urn:sha1:caae2f7d455c78c509782e1eb8d47dfdd874b903</id>
<content type='text'>
Error code returned by the ecall handles should use the defines from
sbi_ecall_interface.h rather than sbi_error.h.

Signed-off-by: Clément Léger &lt;cleger@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: fwft: check feature value to be exactly 1 or 0</title>
<updated>2024-06-26T12:43:54Z</updated>
<author>
<name>Clément Léger</name>
<email>cleger@rivosinc.com</email>
</author>
<published>2024-06-24T10:29:08Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=e8717d126401435896b0e96c18e187f0b2431d5e'/>
<id>urn:sha1:e8717d126401435896b0e96c18e187f0b2431d5e</id>
<content type='text'>
As stated by the spec and pointed out by Andrew Jones, the value passed
for MISALIGNED_EXC_DELEG and PTE_AD_HW_UPDATING should be either 0 or 1.
Add check for these values and return SBI_EINVAL if not.

Signed-off-by: Clément Léger &lt;cleger@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: implement SBI FWFT extension</title>
<updated>2024-06-19T12:45:28Z</updated>
<author>
<name>Clément Léger</name>
<email>cleger@rivosinc.com</email>
</author>
<published>2024-06-19T09:42:42Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=ecef14d5732f837cbfa4a8cefa8fed7953e7abfb'/>
<id>urn:sha1:ecef14d5732f837cbfa4a8cefa8fed7953e7abfb</id>
<content type='text'>
The SBI FWFT extension defines a set of function that can be called
to control the configuration of some platform features (misaligned
trap delegation, etc). This patch implements sbi_fwft_set() and
sbi_fwft_get() as defined in the specification [1].

Link: https://lists.riscv.org/g/tech-prs/message/924 [1]
Signed-off-by: Clément Léger &lt;cleger@rivosinc.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: fwft: add support for SBI_FWFT_PTE_AD_HW_UPDATING</title>
<updated>2024-06-19T12:41:26Z</updated>
<author>
<name>Clément Léger</name>
<email>cleger@rivosinc.com</email>
</author>
<published>2024-06-19T09:42:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=e9ee9678ba509f42a93c8de518710c225c0499f5'/>
<id>urn:sha1:e9ee9678ba509f42a93c8de518710c225c0499f5</id>
<content type='text'>
Add support for SBI_FWFT_PTE_AD_HW_UPDATING based on SVADU presence.

Signed-off-by: Clément Léger &lt;cleger@rivosinc.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: fwft: add support for SBI_FWFT_MISALIGNED_EXC_DELEG</title>
<updated>2024-06-19T12:40:36Z</updated>
<author>
<name>Clément Léger</name>
<email>cleger@rivosinc.com</email>
</author>
<published>2024-06-19T09:42:40Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=c97a1d58918bcdbbb5dbabaf869b09be2b877577'/>
<id>urn:sha1:c97a1d58918bcdbbb5dbabaf869b09be2b877577</id>
<content type='text'>
Add support for SBI_FWFT_MISALIGNED_EXC_DELEG withing FWFT support. This
support allows to delegate misaligned accesses traps.

Signed-off-by: Clément Léger &lt;cleger@rivosinc.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: add support for firmware features extension</title>
<updated>2024-06-19T12:39:22Z</updated>
<author>
<name>Clément Léger</name>
<email>cleger@rivosinc.com</email>
</author>
<published>2024-06-19T09:42:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=aa5a8593696b39059832d12455c31dcfeb4d9259'/>
<id>urn:sha1:aa5a8593696b39059832d12455c31dcfeb4d9259</id>
<content type='text'>
This extension allows the software running in supervisor mode to control
the behavior of various features of the SBI [1]. Implement the support
for such extension.

Link: https://lists.riscv.org/g/tech-prs/message/924 [1]
Signed-off-by: Clément Léger &lt;cleger@rivosinc.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Add support for Svade and Svadu extensions</title>
<updated>2024-06-18T11:11:32Z</updated>
<author>
<name>Yong-Xuan Wang</name>
<email>yongxuan.wang@sifive.com</email>
</author>
<published>2024-06-05T12:11:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=53844c98d082cbba29a6e568196add6de95e858f'/>
<id>urn:sha1:53844c98d082cbba29a6e568196add6de95e858f</id>
<content type='text'>
Add support for Svade and Svadu extensions. When both are present in the
device tree, the M-mode firmware should select the Svade extension
to comply with the RVA23 profile, which mandates Svade and lists Svadu as
an optional extension.

Signed-off-by: Yong-Xuan Wang &lt;yongxuan.wang@sifive.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>sbi: sbi_domain_context: Fix trap context for domain context switching</title>
<updated>2024-06-13T13:51:27Z</updated>
<author>
<name>Yu Chien Peter Lin</name>
<email>peterlin@andestech.com</email>
</author>
<published>2024-06-07T11:39:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=3a94a3258039f225d068cb575844062c3f86bc03'/>
<id>urn:sha1:3a94a3258039f225d068cb575844062c3f86bc03</id>
<content type='text'>
Save/restore sbi_trap_context during domain context switching to
ensure proper trap handling and isolation. This maintains correct
domain-specific state, avoiding context corruption.

Fixes: abea949721bc ("lib: sbi: Introduce trap context")
Signed-off-by: Yu Chien Peter Lin &lt;peterlin@andestech.com&gt;
Reviewed-by: Alvin Chang &lt;alvinga@andestech.com&gt;
Tested-by: Alvin Chang &lt;alvinga@andestech.com&gt;
Reviewed-by: Yong Li &lt;yong.li@intel.com&gt;
Tested-by: Yong Li &lt;yong.li@intel.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: sse: handle missing writable attributes</title>
<updated>2024-05-23T05:23:02Z</updated>
<author>
<name>Clément Léger</name>
<email>cleger@rivosinc.com</email>
</author>
<published>2024-05-16T12:30:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=ae5ef1848d8404e1acdaed5dc460dd1bf2d33140'/>
<id>urn:sha1:ae5ef1848d8404e1acdaed5dc460dd1bf2d33140</id>
<content type='text'>
The spec states that a6, a7, flags and sepc are writable but the
implementation was not allowing that. Add support for these 4 writable
attributes.

Signed-off-by: Clément Léger &lt;cleger@rivosinc.com&gt;
Reviewed-by: Samuel Holland &lt;samuel.holland@sifive.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
</feed>
