zephyr/arch/arc/core
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
..
mpu arch: arc: apply the new thread stack layout 2018-02-16 12:20:16 +01:00
offsets arch: arc: bug fixes and add user space support in secure mode 2018-02-16 12:20:16 +01:00
CMakeLists.txt arch: arc: add user space support for arc 2018-02-16 12:20:16 +01:00
atomic.S
cache.c kernel: include: rename nano_internal.h to kernel_internal.h 2018-01-31 10:07:21 -06:00
cpu_idle.S
fast_irq.S arch: arc: add user space support for arc 2018-02-16 12:20:16 +01:00
fatal.c arch: arc: add user space support for arc 2018-02-16 12:20:16 +01:00
fault.c
fault_s.S arch: arc: handle exception in privilege task when USERSPACE enabled 2018-02-16 12:20:16 +01:00
irq_manage.c cleanup: Move #include directives 2017-09-11 12:41:07 -04:00
irq_offload.c
isr_wrapper.S arch: arc: save user thread's context into privilege stack 2018-02-16 12:20:16 +01:00
prep_c.c kernel: include: rename nano_internal.h to kernel_internal.h 2018-01-31 10:07:21 -06:00
regular_irq.S arch: arc: add user space support for arc 2018-02-16 12:20:16 +01:00
reset.S arch: arc: enable US bit to check user mode 2018-02-16 12:20:16 +01:00
swap.S arch: arc: bug fixes and add user space support in secure mode 2018-02-16 12:20:16 +01:00
sys_fatal_error_handler.c
thread.c arch: arc: apply the new thread stack layout 2018-02-16 12:20:16 +01:00
thread_entry_wrapper.S arch: arc: add user space support for arc 2018-02-16 12:20:16 +01:00
timestamp.c
userspace.S arch: arc: apply the new thread stack layout 2018-02-16 12:20:16 +01:00
vector_table.c