<feed xmlns='http://www.w3.org/2005/Atom'>
<title>software/src/opensbi.git/include/sbi/sbi_domain.h, branch master</title>
<subtitle>RISC-V Open Source Supervisor Binary Interface</subtitle>
<id>https://git.landau.one/pub/scm/riscv/software/src/opensbi.git/atom?h=master</id>
<link rel='self' href='https://git.landau.one/pub/scm/riscv/software/src/opensbi.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/riscv/software/src/opensbi.git/'/>
<updated>2026-09-05T07:23:15+00:00</updated>
<entry>
<title>lib: sbi_domain: Rename per-domain data to per-domain state</title>
<updated>2026-09-05T07:23:15+00:00</updated>
<author>
<name>Rahul Pathak</name>
<email>rahul.pathak@oss.qualcomm.com</email>
</author>
<published>2026-08-20T12:13:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/riscv/software/src/opensbi.git/commit/?id=3593a5facc4c6938b90429a6973ba9ee21fc5899'/>
<id>urn:sha1:3593a5facc4c6938b90429a6973ba9ee21fc5899</id>
<content type='text'>
The per-domain sbi_domain_data hold each domain
associated state like hart context in sbi_domain_context,
mpxy state in sbi_mpxy, and others like each domain backed
by the corresponding MPT (SMMPT).
DATA reads as a generic name, while every use stores state.
Rename functions and macros appropriately. There are no
functional changes.

Signed-off-by: Rahul Pathak &lt;rahul.pathak@oss.qualcomm.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20260820121309.2551296-3-rahul.pathak@oss.qualcomm.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>include: sbi: Fix illegal shift in sbi_domain.h</title>
<updated>2026-03-09T06:41:24+00:00</updated>
<author>
<name>Marcos Oduardo</name>
<email>marcos.oduardo@gmail.com</email>
</author>
<published>2026-02-22T23:51:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/riscv/software/src/opensbi.git/commit/?id=3baca10015393359ec46a2500c8ebe7daa9672c6'/>
<id>urn:sha1:3baca10015393359ec46a2500c8ebe7daa9672c6</id>
<content type='text'>
In sbi_domain.h, when checking if a memory region is a subset of
another, an undefined behavior arithmetic operation was caught
when sanitizing with UBSan (shift exponent __riscv_xlen).

This patch adds a check to handle the case where the region order
is __riscv_xlen, avoiding the illegal shift and ensuring the operation
remains defined.

Please let me know if there’s any other most suitable solution for
this bug.

Signed-off-by: Marcos Oduardo &lt;marcos.oduardo@gmail.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20260222235219.276432-1-marcos.oduardo@gmail.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi_domain: make is_region_subset public</title>
<updated>2025-12-21T15:03:20+00:00</updated>
<author>
<name>Bo Gan</name>
<email>ganboing@gmail.com</email>
</author>
<published>2025-12-18T10:42:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/riscv/software/src/opensbi.git/commit/?id=ed1deab09ef6284d018fbf37ab397dcd4b9f82b8'/>
<id>urn:sha1:ed1deab09ef6284d018fbf37ab397dcd4b9f82b8</id>
<content type='text'>
The helper function is renamed as sbi_domain_memregion_is_subset,
and made public in header file.

Also add a convenient helper of sbi_domain_for_each_memregion_idx.

Signed-off-by: Bo Gan &lt;ganboing@gmail.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20251218104243.562667-4-ganboing@gmail.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi_domain: add sbi_domain_get_oldpmp_flags</title>
<updated>2025-12-21T15:03:18+00:00</updated>
<author>
<name>Bo Gan</name>
<email>ganboing@gmail.com</email>
</author>
<published>2025-12-18T10:42:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/riscv/software/src/opensbi.git/commit/?id=2c1bf5bb73194ca035bcd5ab3fbc6653de3162e1'/>
<id>urn:sha1:2c1bf5bb73194ca035bcd5ab3fbc6653de3162e1</id>
<content type='text'>
Factor out logic in `sbi_hart_oldpmp_configure` into function
`sbi_domain_get_oldpmp_flags`, analogous to `sbi_domain_get_smepmp_flags`.
Platform specific hart-protection implementation can now leverage it.

Signed-off-by: Bo Gan &lt;ganboing@gmail.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20251218104243.562667-3-ganboing@gmail.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi_domain: ensure consistent firmware PMP entries</title>
<updated>2025-11-02T11:05:19+00:00</updated>
<author>
<name>Yu-Chien Peter Lin</name>
<email>peter.lin@sifive.com</email>
</author>
<published>2025-10-08T08:44:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/riscv/software/src/opensbi.git/commit/?id=631efeeb4913f278b8f5e5920b8c233ac250ff28'/>
<id>urn:sha1:631efeeb4913f278b8f5e5920b8c233ac250ff28</id>
<content type='text'>
During domain context switches, all PMP entries are reconfigured
which can clear firmware access permissions, causing M-mode access
faults under SmePMP.

Sort domain regions to place firmware regions first, ensuring
consistent firmware PMP entries so they won't be revoked during
domain context switches.

Signed-off-by: Yu-Chien Peter Lin &lt;peter.lin@sifive.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20251008084444.3525615-7-peter.lin@sifive.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi_domain: add SBI_DOMAIN_MEMREGION_FW memregion flag</title>
<updated>2025-11-02T10:56:19+00:00</updated>
<author>
<name>Yu-Chien Peter Lin</name>
<email>peter.lin@sifive.com</email>
</author>
<published>2025-10-08T08:44:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/riscv/software/src/opensbi.git/commit/?id=b34caeef815f2e3b54a13e69c8d163bc218712b9'/>
<id>urn:sha1:b34caeef815f2e3b54a13e69c8d163bc218712b9</id>
<content type='text'>
Add a new memregion flag, SBI_DOMAIN_MEMREGION_FW and mark the
OpenSBI code and data regions.

Signed-off-by: Yu-Chien Peter Lin &lt;peter.lin@sifive.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20251008084444.3525615-6-peter.lin@sifive.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi_hart: move sbi_hart_get_smepmp_flags() to sbi_domain</title>
<updated>2025-11-02T10:25:57+00:00</updated>
<author>
<name>Yu-Chien Peter Lin</name>
<email>peter.lin@sifive.com</email>
</author>
<published>2025-10-08T08:44:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/riscv/software/src/opensbi.git/commit/?id=32c1d38dcf1a184b100bba2e26047939c32ec625'/>
<id>urn:sha1:32c1d38dcf1a184b100bba2e26047939c32ec625</id>
<content type='text'>
Move sbi_hart_get_smepmp_flags() from sbi_hart.c to sbi_domain.c and
rename it to sbi_domain_get_smepmp_flags() to better reflect its
purpose of converting domain memory region flags to PMP configuration.

Also removes unused parameters (scratch and dom).

Signed-off-by: Yu-Chien Peter Lin &lt;peter.lin@sifive.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20251008084444.3525615-2-peter.lin@sifive.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Fix non-root domain startup</title>
<updated>2025-02-19T11:41:39+00:00</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2025-02-11T15:36:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/riscv/software/src/opensbi.git/commit/?id=1f64fef919fc5739df6c3395a9abd256dc88cb24'/>
<id>urn:sha1:1f64fef919fc5739df6c3395a9abd256dc88cb24</id>
<content type='text'>
Currently, the sbi_sse_init() in cold boot path is called after
sbi_domain_finalize() so boot HART of non-root domains will start
before SSE cold boot init which can cause warm boot of such HARTs
to crash in sbi_sse_init().

To address the above issue, factor-out the non-root domain startup
from sbi_domain_finalize() function as a separate sbi_domain_startup()
function  which can be called after sbi_sse_init() in cold boot path.

Fixes: 93f7d819fdeb ("lib: sbi: sse: allow adding new events")
Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi_domain: Use domain data support for per-domain hart context</title>
<updated>2024-10-25T17:30:10+00:00</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2024-09-23T08:16:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/riscv/software/src/opensbi.git/commit/?id=f609fd85846ac35e2780df50ba0ad801622e13d8'/>
<id>urn:sha1:f609fd85846ac35e2780df50ba0ad801622e13d8</id>
<content type='text'>
The per-domain hartindex_to_context_table[] is yet another per-domain
data required for implementing hart entry into (or exit from) domain.

Use the recently added domain data support for per-domain hart context
so that a dedicated hartindex_to_context_table[] in struct sbi_domain
is not needed.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Yu Chien Peter Lin &lt;peterlin@andestech.com&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Introduce domain data</title>
<updated>2024-10-25T17:30:07+00:00</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2024-09-23T04:30:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/riscv/software/src/opensbi.git/commit/?id=81d79913a0c23d7acc38ade7e8d8e3d48a388a3f'/>
<id>urn:sha1:81d79913a0c23d7acc38ade7e8d8e3d48a388a3f</id>
<content type='text'>
Different parts of OpenSBI require their own per-domain data so
introduce domain data (or sbi_domain_data) which can be registered
by any part of OpenSBI. Using the domain data, the domain framework
will create a data pointer for every domain which can be used to
maintain some per-domain state.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Yu Chien Peter Lin &lt;peterlin@andestech.com&gt;
</content>
</entry>
</feed>
