diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-12-13 15:09:42 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-12-16 10:10:22 +0530 |
commit | 7baccfca790c429b85cf30ae83d06c6e8b934e86 (patch) | |
tree | 4e9db35f5001707a349c348a1e8c0e3e65bf8bd5 /include | |
parent | 2179777364cae3726c0e612f64b97a9bff05fc5b (diff) |
lib: sbi: Add function to register new domain
We add sbi_domain_register() function to help platform code register
a new domain explicitly instead of depending on domain_get() platform
callback. This function will eventually help us completely remove the
domain_get() platform callback.
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 'include')
-rw-r--r-- | include/sbi/sbi_domain.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/sbi/sbi_domain.h b/include/sbi/sbi_domain.h index a7cb61e..1f8b942 100644 --- a/include/sbi/sbi_domain.h +++ b/include/sbi/sbi_domain.h @@ -146,6 +146,16 @@ void sbi_domain_dump(const struct sbi_domain *dom, const char *suffix); /** Dump all domain details on the console */ void sbi_domain_dump_all(const char *suffix); +/** + * Register a new domain + * @param dom pointer to domain + * @param assign_mask pointer to HART mask of HARTs assigned to the domain + * + * @return 0 on success and negative error code on failure + */ +int sbi_domain_register(struct sbi_domain *dom, + const struct sbi_hartmask *assign_mask); + /** Finalize domain tables and startup non-root domains */ int sbi_domain_finalize(struct sbi_scratch *scratch, u32 cold_hartid); |