zephyr/arch/arc
Wayne Ren bb50a88045 arch: arc: apply the new thread stack layout
The new thread stack layout is as follow:

|---------------------|
|  user stack         |
|---------------------|
| stack guard (opt.)  |
|---------------------|
|  privilege stack    |
-----------------------

For MPUv2
  * user stack is aligned to the power of 2 of user stack size
  * the stack guard is 2048 bytes
  * the default size of privileg stack is 256 bytes.
  For user thread, the following MPU regions are needded
    * one region for user stack, no need of stack guard for user stack
    * one region for stack guard when stack guard is enbaled
    * regions for memory domain.
  For kernel thread, the stack guard region will be at the top, adn
  The user stack and privilege stack will be merged.

MPUv3 is the same as V2's layout, except no need of power of 2
alignment.

* reimplement the user mode enter function. Now it's possible for
kernel thread to drop privileg to user thread.

* add a separate entry for user thread

* bug fixes in the cleanup of regs when go to user mode

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2018-02-16 12:20:16 +01:00
..
core arch: arc: apply the new thread stack layout 2018-02-16 12:20:16 +01:00
include arch: arc: apply the new thread stack layout 2018-02-16 12:20:16 +01:00
soc arch: arc: modify the kconfig for mpu case 2018-02-16 12:20:16 +01:00
CMakeLists.txt arch: architecture defines kernel entry 2017-12-27 14:16:08 -05:00
Kconfig arch: arc: add user space support for arc 2018-02-16 12:20:16 +01:00
defconfig