arch: arm: add initial support for CONFIG_USERSPACE

add related configs & (stub) functions for enabling
CONFIG_USERSPACE on arm w/o build errors.

Signed-off-by: Chunlin Han <chunlin.han@linaro.org>
This commit is contained in:
Chunlin Han 2017-09-26 20:59:35 +08:00 committed by Andrew Boie
commit 95d28e53bb
4 changed files with 111 additions and 0 deletions

View file

@ -22,6 +22,8 @@ config CPU_CORTEX_M
select HAS_CMSIS
select HAS_FLASH_LOAD_OFFSET
select HAS_DTS
select ARCH_HAS_STACK_PROTECTION if ARM_CORE_MPU
select ARCH_HAS_USERSPACE if ARM_CORE_MPU
help
This option signifies the use of a CPU of the Cortex-M family.
@ -47,6 +49,22 @@ config CPU_HAS_FPU
This option is enabled when the CPU has a hardware floating point
unit.
config ARM_STACK_PROTECTION
bool
default y if HW_STACK_PROTECTION
select MPU_STACK_GUARD if ARM_CORE_MPU
help
This option enables MPU stack guard to cause a system fatal error
if the bounds of the current process stack are overflowed.
config ARM_USERSPACE
bool
default y if USERSPACE
help
This option enables APIs to drop a thread's privileges, supporting
user-level threads that are protected from each other and from
crashing the kernel.
menu "Floating Point Options"
depends on CPU_HAS_FPU