<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/lib/utils/fdt/fdt_domain.c, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/opensbi.git/atom/lib/utils/fdt/fdt_domain.c?h=master</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/lib/utils/fdt/fdt_domain.c?h=master'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2026-05-18T12:50:50Z</updated>
<entry>
<title>lib: utils: fdt_domain: add root-regions-inheritance policy</title>
<updated>2026-05-18T12:50:50Z</updated>
<author>
<name>Yu-Chien Peter Lin</name>
<email>peter.lin@sifive.com</email>
</author>
<published>2026-05-16T07:29:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=f36acaeb80a490339923a5ec01ac3707741f6b90'/>
<id>urn:sha1:f36acaeb80a490339923a5ec01ac3707741f6b90</id>
<content type='text'>
Introduce root-regions-inheritance DT property to control
copying of root domain memregions. Support 'all' and 'm-only'
modes, always inheriting firmware and M-only regions; behavior
matches m-only policy when property is absent.

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/20260516072906.1427203-1-peter.lin@sifive.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: fdt_domain: Default boot-hart to coldboot HART for multi-domain boot</title>
<updated>2026-05-11T04:41:06Z</updated>
<author>
<name>Yu-Chien Peter Lin</name>
<email>peter.lin@sifive.com</email>
</author>
<published>2026-03-27T05:49:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=8cd279e321ce8eedd2750d3e2ed9a906e43e6e38'/>
<id>urn:sha1:8cd279e321ce8eedd2750d3e2ed9a906e43e6e38</id>
<content type='text'>
When "boot-hart" is not specified, dom-&gt;boot_hartid was left as -1U,
causing domain context switching to fail. Default it to the coldboot
HART to enable SMP boot in multi-domain setups, consistent with how
next-arg1 is handled.

Also update its description in domain_support.md.

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/20260327054936.3462935-1-peter.lin@sifive.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: utils:Check that hartid is valid</title>
<updated>2025-02-12T03:54:09Z</updated>
<author>
<name>Raj Vishwanathan</name>
<email>raj.vishwanathan@gmail.com</email>
</author>
<published>2025-02-11T22:00:42Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=5e90e54a1a53173128b264f4e22cfa5884f78526'/>
<id>urn:sha1:5e90e54a1a53173128b264f4e22cfa5884f78526</id>
<content type='text'>
It is possible that hartid may not be sequential and it should not be validated
against SBI_HARTMASK_MAX_BITS. Instead we should check the index of the hartid,
hart index, against SBI_HARTMASK_MAX_BITS.

Signed-off-by: Raj Vishwanathan &lt;Raj.Vishwanathan@gmail.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: utils: Make the enforce permission bit configurable from DT</title>
<updated>2025-02-11T12:26:48Z</updated>
<author>
<name>Chao Du</name>
<email>duchao@eswincomputing.com</email>
</author>
<published>2025-01-07T02:43:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=3f25380d85df0c8b8f188d23d0f80a560b416fb3'/>
<id>urn:sha1:3f25380d85df0c8b8f188d23d0f80a560b416fb3</id>
<content type='text'>
The domain_support.md documentation states that the enforce permission
bit (BIT[6]) could be set in the "regions" property of a domain
instance DT node. However, this bit is masked in the current
implementation. This patch unmasks the bit to make it configurable
from DT.

Signed-off-by: Chao Du &lt;duchao@eswincomputing.com&gt;
Reviewed-by: Xiang W &lt;wxjstz@126.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: utils/fdt: Use sbi_domain_memregion_init() when parsing domains</title>
<updated>2024-10-25T17:30:02Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2024-09-20T12:14:13Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=2d517fce9bd783f06a92d957a688890c894240cd'/>
<id>urn:sha1:2d517fce9bd783f06a92d957a688890c894240cd</id>
<content type='text'>
Use sbi_domain_memregion_init() at the time of parsing domains from
FDT so that sbi_domain_memregion_init() is always used for setting
up all memregions.

Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
Reviewed-by: Samuel Holland &lt;samuel.holland@sifive.com&gt;
</content>
</entry>
<entry>
<title>lib: utils: fdt_domain: Make opensbi-domain optional in CPU node</title>
<updated>2024-08-24T08:38:00Z</updated>
<author>
<name>Gregor Haas</name>
<email>gregorhaas1997@gmail.com</email>
</author>
<published>2024-08-09T03:47:12Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=b0ad9e0bdd7804fad76dac4228b8a79e3c953310'/>
<id>urn:sha1:b0ad9e0bdd7804fad76dac4228b8a79e3c953310</id>
<content type='text'>
The domain_support.md documentation states that "the HART to domain instance
assignment can be parsed from the device tree using *optional* DT property
opensbi-domain in each CPU DT node". However, the current implementation does
not treat this parameter as optional when determining which HARTs to assign to
a freshly discovered domain from the device tree, causing an effect where every
HART in the system must be explicitly assigned to a domain only if a domain is
specified in the device tree. Instead, this patch simply ignores CPUs that do
not specify a domain, and does not attempt to assign them into the recently
discovered domain.

Signed-off-by: Gregor Haas &lt;gregorhaas1997@gmail.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: utils/fdt: Constify FDT parsing functions</title>
<updated>2024-08-24T07:32:25Z</updated>
<author>
<name>Samuel Holland</name>
<email>samuel.holland@sifive.com</email>
</author>
<published>2024-07-31T04:58:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=33ba4e05673a8c8f538b4b1c0c5908a73e5ed6d7'/>
<id>urn:sha1:33ba4e05673a8c8f538b4b1c0c5908a73e5ed6d7</id>
<content type='text'>
Distinguish between functions which modify the devicetree and those
which only extract information from it. Other than the iterators in
fdt_domain.c, this is a mechanical conversion.

Signed-off-by: Samuel Holland &lt;samuel.holland@sifive.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: utils: fdt_domain: Use consistent device-tree address when next-arg1 is missing</title>
<updated>2024-08-23T08:47:29Z</updated>
<author>
<name>Yu Chien Peter Lin</name>
<email>peterlin@andestech.com</email>
</author>
<published>2024-07-24T15:00:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=56183ca609aa72a075d96d23eebe3df7fbaf53cd'/>
<id>urn:sha1:56183ca609aa72a075d96d23eebe3df7fbaf53cd</id>
<content type='text'>
The diagram shown below illustrates the boot-flow involving OP-TEE OS
initialization.

    (1)-----------+
     | U-Boot SPL |
     +------------+
         |
         v
    (2)-------------------------------------------------------------+
     | OpenSBI (fw_dynamic)                                         |
     |                (4)------------------------+                  |
     |                 | optee dispatcher driver |                  |
     +-----------------+-------^---------|-------+------------------+
M-mode   |                     |         |
---------+--[trusted domain]---+----.----+--[untrusted domain]-------
S-mode   |  (coldboot domain)  |    |    |
         v                     |    |    v
    (3)---------------------------+ |(5)----------------------------+
     | OP-TEE OS                  | | | U-Boot                      |
     +----------------------------+ | +-----------------------------+
                                    |    |
                                    |    v
                                    |(6)----------------------------+
                                    | | Linux                       |
                                    | +-----------------------------+

As OP-TEE OS has device-tree node fixups that need to be passed
through to the next boot stages, e.g. the reserved memory node:

  reserved-memory {
    #address-cells = &lt;2&gt;;
    #size-cells = &lt;2&gt;;
    ranges;
    optee_core@f1000000 {
      no-map;
      reg = &lt;0x0 0xf1000000   // OP-TEE OS base address
             0x0 0x01000000&gt;;
    };
    &lt;...&gt;
  };

Instead of using 0x0 as the default value, allow identical next-arg1
to be used by non-coldboot domain (i.e., untrusted domain) when the
property is not provided.

Also, update the description of next-arg1 property in the document.

Signed-off-by: Yu Chien Peter Lin &lt;peterlin@andestech.com&gt;
Reviewed-by: Alvin Chang &lt;alvinga@andestech.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: sbi: Extend sbi_hartmask to support both hartid and hartindex</title>
<updated>2023-09-24T06:09:32Z</updated>
<author>
<name>Xiang W</name>
<email>wxjstz@126.com</email>
</author>
<published>2023-08-31T03:39:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=296e70d69da74b09426e4f565306f26e9a6c79f8'/>
<id>urn:sha1:296e70d69da74b09426e4f565306f26e9a6c79f8</id>
<content type='text'>
Currently, the sbi_hartmask is indexed by hartid which puts a
limit on hartid to be less than SBI_HARTMASK_MAX_BITS.

We extend the sbi_hartmask implementation to use hartindex and
support updating sbi_hartmask using hartid. This removes the
limit on hartid and existing code works largely unmodified.

Signed-off-by: Xiang W &lt;wxjstz@126.com&gt;
Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>lib: utils/fdt: Use heap in FDT domain parsing</title>
<updated>2023-06-05T10:29:35Z</updated>
<author>
<name>Anup Patel</name>
<email>apatel@ventanamicro.com</email>
</author>
<published>2023-04-20T12:39:55Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=3c1c972cb69d670ddc309391c4db76f1f19fd77e'/>
<id>urn:sha1:3c1c972cb69d670ddc309391c4db76f1f19fd77e</id>
<content type='text'>
Let's use heap allocation in FDT domain parsing instead of using
a fixed size global array.

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