ARMv7-A: Modify up_fullcontextrestore() for CONFIG_BUILD_KERNEL. It changed CPSR while in kernel. That will crash is the new CPSR is user mode while executing in kernel space. Fixed by adding a SYS_context_restore system call. There is an alternative, simpler modification to up_fullcontextrestore() that could have been done: It might have been possible to use the SPSR instead of the CPRSR and then do an exception return from up_fullcontextrestore(). That would be more efficient, but I never tried it.

This commit is contained in:
Gregory Nutt 2014-09-12 08:04:27 -06:00
parent e7fc0a315e
commit 79fa2a7b09
2 changed files with 2 additions and 2 deletions

View File

@ -455,7 +455,7 @@ CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_LIB_SYSCALL=y
CONFIG_SYS_RESERVED=5
CONFIG_SYS_RESERVED=6
CONFIG_SYS_NNEST=2
#

View File

@ -438,7 +438,7 @@ CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048
CONFIG_LIB_SYSCALL=y
CONFIG_SYS_RESERVED=5
CONFIG_SYS_RESERVED=6
CONFIG_SYS_NNEST=2
#