diff options
| author | Anup Patel <[email protected]> | 2020-12-13 15:09:42 +0530 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 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 <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
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 a7cb61e9..1f8b942c 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); |
