kernel: move memory domain kconfigs into its own file
This moves memory domain related kconfigs into its own file Kconfig.mem_domain. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
17a5beb341
commit
169bc07e83
2 changed files with 57 additions and 53 deletions
|
@ -943,59 +943,7 @@ config BOUNDS_CHECK_BYPASS_MITIGATION
|
||||||
macros do nothing.
|
macros do nothing.
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
rsource "Kconfig.mem_domain"
|
||||||
menu "Memory Domains"
|
|
||||||
|
|
||||||
config MAX_DOMAIN_PARTITIONS
|
|
||||||
int "Maximum number of partitions per memory domain"
|
|
||||||
default 16
|
|
||||||
range 0 255
|
|
||||||
depends on USERSPACE
|
|
||||||
help
|
|
||||||
Configure the maximum number of partitions per memory domain.
|
|
||||||
|
|
||||||
config ARCH_MEM_DOMAIN_DATA
|
|
||||||
bool
|
|
||||||
depends on USERSPACE
|
|
||||||
help
|
|
||||||
This hidden option is selected by the target architecture if
|
|
||||||
architecture-specific data is needed on a per memory domain basis.
|
|
||||||
If so, the architecture defines a 'struct arch_mem_domain' which is
|
|
||||||
embedded within every struct k_mem_domain. The architecture
|
|
||||||
must also define the arch_mem_domain_init() function to set this up
|
|
||||||
when a memory domain is created.
|
|
||||||
|
|
||||||
Typical uses might be a set of page tables for that memory domain.
|
|
||||||
|
|
||||||
config ARCH_MEM_DOMAIN_SYNCHRONOUS_API
|
|
||||||
bool
|
|
||||||
depends on USERSPACE
|
|
||||||
help
|
|
||||||
This hidden option is selected by the target architecture if
|
|
||||||
modifying a memory domain's partitions at runtime, or changing
|
|
||||||
a memory domain's thread membership requires synchronous calls
|
|
||||||
into the architecture layer.
|
|
||||||
|
|
||||||
If enabled, the architecture layer must implement the following
|
|
||||||
APIs:
|
|
||||||
|
|
||||||
arch_mem_domain_thread_add
|
|
||||||
arch_mem_domain_thread_remove
|
|
||||||
arch_mem_domain_partition_remove
|
|
||||||
arch_mem_domain_partition_add
|
|
||||||
|
|
||||||
It's important to note that although supervisor threads can be
|
|
||||||
members of memory domains, they have no implications on supervisor
|
|
||||||
thread access to memory. Memory domain APIs may only be invoked from
|
|
||||||
supervisor mode.
|
|
||||||
|
|
||||||
For these reasons, on uniprocessor systems unless memory access
|
|
||||||
policy is managed in separate software constructions like page
|
|
||||||
tables, these APIs don't need to be implemented as the underlying
|
|
||||||
memory management hardware will be reprogrammed on context switch
|
|
||||||
anyway.
|
|
||||||
endmenu
|
|
||||||
|
|
||||||
rsource "Kconfig.smp"
|
rsource "Kconfig.smp"
|
||||||
|
|
||||||
config TICKLESS_KERNEL
|
config TICKLESS_KERNEL
|
||||||
|
|
56
kernel/Kconfig.mem_domain
Normal file
56
kernel/Kconfig.mem_domain
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
# Kernel configuration options
|
||||||
|
|
||||||
|
# Copyright (c) 2014-2015 Wind River Systems, Inc.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
menu "Memory Domains"
|
||||||
|
|
||||||
|
config MAX_DOMAIN_PARTITIONS
|
||||||
|
int "Maximum number of partitions per memory domain"
|
||||||
|
default 16
|
||||||
|
range 0 255
|
||||||
|
depends on USERSPACE
|
||||||
|
help
|
||||||
|
Configure the maximum number of partitions per memory domain.
|
||||||
|
|
||||||
|
config ARCH_MEM_DOMAIN_DATA
|
||||||
|
bool
|
||||||
|
depends on USERSPACE
|
||||||
|
help
|
||||||
|
This hidden option is selected by the target architecture if
|
||||||
|
architecture-specific data is needed on a per memory domain basis.
|
||||||
|
If so, the architecture defines a 'struct arch_mem_domain' which is
|
||||||
|
embedded within every struct k_mem_domain. The architecture
|
||||||
|
must also define the arch_mem_domain_init() function to set this up
|
||||||
|
when a memory domain is created.
|
||||||
|
|
||||||
|
Typical uses might be a set of page tables for that memory domain.
|
||||||
|
|
||||||
|
config ARCH_MEM_DOMAIN_SYNCHRONOUS_API
|
||||||
|
bool
|
||||||
|
depends on USERSPACE
|
||||||
|
help
|
||||||
|
This hidden option is selected by the target architecture if
|
||||||
|
modifying a memory domain's partitions at runtime, or changing
|
||||||
|
a memory domain's thread membership requires synchronous calls
|
||||||
|
into the architecture layer.
|
||||||
|
|
||||||
|
If enabled, the architecture layer must implement the following
|
||||||
|
APIs:
|
||||||
|
|
||||||
|
arch_mem_domain_thread_add
|
||||||
|
arch_mem_domain_thread_remove
|
||||||
|
arch_mem_domain_partition_remove
|
||||||
|
arch_mem_domain_partition_add
|
||||||
|
|
||||||
|
It's important to note that although supervisor threads can be
|
||||||
|
members of memory domains, they have no implications on supervisor
|
||||||
|
thread access to memory. Memory domain APIs may only be invoked from
|
||||||
|
supervisor mode.
|
||||||
|
|
||||||
|
For these reasons, on uniprocessor systems unless memory access
|
||||||
|
policy is managed in separate software constructions like page
|
||||||
|
tables, these APIs don't need to be implemented as the underlying
|
||||||
|
memory management hardware will be reprogrammed on context switch
|
||||||
|
anyway.
|
||||||
|
endmenu
|
Loading…
Add table
Add a link
Reference in a new issue