summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2021-04-09 13:32:40 +0300
committerAnup Patel <anup@brainfault.org>2021-04-13 08:26:35 +0300
commit7495bce6f96388f0aeadd95d59e64365cd008450 (patch)
treeb6fe6b36f185b975bcf133545de553fb6352696a /include
parentb1df1acd201e388a5ce96fd045593ee5b29c0387 (diff)
downloadopensbi-7495bce6f96388f0aeadd95d59e64365cd008450.tar.xz
lib: sbi: Add sbi_domain_memregion_init() API
This patch adds sbi_domain_memregion_init() helper API which can be used by platform support to initialize a domain memory region before adding it to the root domain. 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')
-rw-r--r--include/sbi/sbi_domain.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/sbi/sbi_domain.h b/include/sbi/sbi_domain.h
index 1f8b942..f9f4f7d 100644
--- a/include/sbi/sbi_domain.h
+++ b/include/sbi/sbi_domain.h
@@ -128,6 +128,20 @@ ulong sbi_domain_get_assigned_hartmask(const struct sbi_domain *dom,
void sbi_domain_memregion_initfw(struct sbi_domain_memregion *reg);
/**
+ * Initialize a domain memory region based on it's physical
+ * address and size.
+ *
+ * @param addr start physical address of memory region
+ * @param size physical size of memory region
+ * @param flags memory region flags
+ * @param reg pointer to memory region being initialized
+ */
+void sbi_domain_memregion_init(unsigned long addr,
+ unsigned long size,
+ unsigned long flags,
+ struct sbi_domain_memregion *reg);
+
+/**
* Check whether we can access specified address for given mode and
* memory region flags under a domain
* @param dom pointer to domain