Commit 57832073 authored by Adithya Baglody's avatar Adithya Baglody Committed by Andrew Boie
Browse files

kernel: arch interface for memory domain



Additional arch specific interfaces to handle memory domain
destroy and single partition removal.

Signed-off-by: default avatarAdithya Baglody <adithya.nagaraj.baglody@intel.com>
parent 641f867a
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -95,6 +95,30 @@ static inline unsigned int _Swap(unsigned int key)
 * @return Max number of free regions, or -1 if there is no limit
 */
extern int _arch_mem_domain_max_partitions_get(void);

/**
 * @brief Remove a partition from the memory domain
 *
 * A memory domain contains multiple partitions and this API provides the
 * freedom to remove a particular partition while keeping others intact.
 * This API will handle any arch/HW specific changes that needs to be done.
 *
 * @param domain The memory domain structure
 * @param partition_id The partition that needs to be deleted
 */
extern void _arch_mem_domain_partition_remove(struct k_mem_domain *domain,
					      u32_t  partition_id);

/**
 * @brief Remove the memory domain
 *
 * A memory domain contains multiple partitions and this API will traverse
 * all these to reset them back to default setting.
 * This API will handle any arch/HW specific changes that needs to be done.
 *
 * @param domain The memory domain structure which needs to be deleted.
 */
extern void _arch_mem_domain_destroy(struct k_mem_domain *domain);
#endif

#ifdef CONFIG_USERSPACE