kernel: define arch interface for memory domains

Based on work by Chunlin Han <chunlin.han@linaro.org>.
This defines the interfaces that architectures will need to implement in
order to support memory domains in either MMU or MPU hardware.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2017-09-12 14:49:49 -07:00 committed by Andrew Boie
parent d627ae4802
commit be6740ea77

View file

@ -81,6 +81,21 @@ static inline unsigned int _Swap(unsigned int key)
}
#ifdef CONFIG_USERSPACE
/**
* @brief Get the maximum number of partitions for a memory domain
*
* A memory domain is a container data structure containing some number of
* memory partitions, where each partition represents a memory range with
* access policies.
*
* MMU-based systems don't have a limit here, but MPU-based systems will
* have an upper bound on how many different regions they can manage
* simultaneously.
*
* @return Max number of free regions, or -1 if there is no limit
*/
extern int _arch_mem_domain_max_partitions_get(void);
/**
* @brief Check memory region permissions
*