diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-11-20 16:42:15 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-12-04 18:01:00 +0530 |
commit | 9b65dcaedd737b36c21cd9ff585585c188a92b41 (patch) | |
tree | e3a0f3e8bc45b447b9b4208626d2a17d30f9354c /lib/sbi | |
parent | 555e73778add1f1bc85011f98b3210c7103d60a5 (diff) |
include: sbi: Add domains_init() platform operation
We introduce domains_init() platform operation which can be used by
platform support to initialize/populate domains in the coldboot path.
The domains_init() is called late in the coldboot sequence from the
sbi_domain_finalize() so sbi_printf() can be used by platform support
to print errors/warnings at time of populating domains.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib/sbi')
-rw-r--r-- | lib/sbi/sbi_domain.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/sbi/sbi_domain.c b/lib/sbi/sbi_domain.c index 639e016..1a3651b 100644 --- a/lib/sbi/sbi_domain.c +++ b/lib/sbi/sbi_domain.c @@ -375,6 +375,14 @@ int sbi_domain_finalize(struct sbi_scratch *scratch, u32 cold_hartid) struct sbi_domain *dom, *tdom; const struct sbi_platform *plat = sbi_platform_ptr(scratch); + /* Initialize domains for the platform */ + rc = sbi_platform_domains_init(plat); + if (rc) { + sbi_printf("%s: platform domains_init() failed (error %d)\n", + __func__, rc); + return rc; + } + /* Discover domains */ for (i = 0; i < SBI_HARTMASK_MAX_BITS; i++) { /* Ignore invalid HART */ |