[PATCH v2 3/3] lib: sbi_domain: Introduce domain intialization order
Yu-Chien Peter Lin
peter.lin at sifive.com
Fri Aug 28 03:19:36 PDT 2026
Hi Anup,
On Mon, Aug 17, 2026 at 08:00:25PM +0530, Anup Patel wrote:
> Currently, the domain initialization order is implied by the order
> in which domains are populated by sbi_platform_domains_init() from
> sbi_domain_finalize(). This is not documented anywhere and forces
> unecessary ordering between domain DT nodes.
>
> To address the above, introduce per-domain 32-bit integer to represent
> intialization order (aka "init_order") where domain with a lower
> initialization order will be booted first and two domains must not
> have same initialization order. For DT based domain creation, new
> "init-order" DT property can be used in domain DT node to specify
> the initialization order. The ROOT domain is assumed to have lowest
> initialization order (aka 0xffffffff).
>
> Signed-off-by: Anup Patel <anup.patel at oss.qualcomm.com>
> Reviewed-by: Pawandeep Oza <pawandeep.oza at oss.qualcomm.com>
> Tested-by: Pawandeep Oza <pawandeep.oza at oss.qualcomm.com>
> ---
> docs/domain_support.md | 5 +++++
> include/sbi/sbi_domain.h | 2 ++
> lib/sbi/sbi_domain.c | 21 ++++++++++++++-------
> lib/sbi/sbi_domain_context.c | 17 +++++++++--------
> lib/utils/fdt/fdt_domain.c | 8 ++++++++
> 5 files changed, 38 insertions(+), 15 deletions(-)
>
> diff --git a/docs/domain_support.md b/docs/domain_support.md
> index 82f155e1..655bf474 100644
> --- a/docs/domain_support.md
> +++ b/docs/domain_support.md
> @@ -39,6 +39,9 @@ has following details:
>
> * **index** - Logical index of this domain
> * **name** - Name of this domain
> +* **init_order** - Initialization order of this domain. Domain with a
> + lower initialization order will be booted first and two domains must
> + not have same initialization order.
Maybe the init-order default behavior (FDT offset fallback) is
worth noting here.
Regards,
Peter Lin
More information about the opensbi
mailing list