summaryrefslogtreecommitdiff
path: root/include/sbi/sbi_domain.h
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2021-04-09 07:31:11 +0300
committerAnup Patel <anup@brainfault.org>2021-04-13 08:26:37 +0300
commit4dc0001b09477c20856ece363ecf50346e7ddddb (patch)
treed560ab0314aac159e1eef8249a110e492d9b15ed /include/sbi/sbi_domain.h
parent7495bce6f96388f0aeadd95d59e64365cd008450 (diff)
downloadopensbi-4dc0001b09477c20856ece363ecf50346e7ddddb.tar.xz
lib: sbi: Add sbi_domain_root_add_memregion() API
We should allow platform support to add more root memory regions before domains are finalized. This will help platform support to protect critical M-mode only resources. This patch adds sbi_domain_root_add_memregion() API for above described purpose. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Xiang W <wxjstz@126.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'include/sbi/sbi_domain.h')
-rw-r--r--include/sbi/sbi_domain.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sbi/sbi_domain.h b/include/sbi/sbi_domain.h
index f9f4f7d..84d17da 100644
--- a/include/sbi/sbi_domain.h
+++ b/include/sbi/sbi_domain.h
@@ -170,6 +170,14 @@ void sbi_domain_dump_all(const char *suffix);
int sbi_domain_register(struct sbi_domain *dom,
const struct sbi_hartmask *assign_mask);
+/**
+ * Add a memory region to the root domain
+ * @param reg pointer to the memory region to be added
+ *
+ * @return 0 on success and negative error code on failure
+ */
+int sbi_domain_root_add_memregion(const struct sbi_domain_memregion *reg);
+
/** Finalize domain tables and startup non-root domains */
int sbi_domain_finalize(struct sbi_scratch *scratch, u32 cold_hartid);