f81dee0b2b
* add the implementation of syscall * based on 'trap_s' intruction, id = 3 * add the privilege stack * the privilege stack is allocted with thread stack * for the kernel thread, the privilege stack is also a part of thread stack, the start of stack can be configured as stack guard * for the user thread, no stack guard, when the user stack is overflow, it will fall into kernel memory area which requires kernel privilege, privilege violation will be raised * modify the linker template and add MPU_ADDR_ALIGN * add user space corresponding codes in mpu * the user sp aux reg will be part of thread context * When user thread is interruptted for the 1st time, the context is saved in user stack (U bit of IRQ_CTLR is set to 1). When nest interrupt comes, the context is saved in thread's privilege stack * the arc_mpu_regions.c is moved to board folder, as it's board specific * the above codes have been tested through tests/kernel/mem_protect/ userspace for MPU version 2 Signed-off-by: Wayne Ren <wei.ren@synopsys.com> |
||
---|---|---|
.. | ||
mpu | ||
offsets | ||
atomic.S | ||
cache.c | ||
CMakeLists.txt | ||
cpu_idle.S | ||
fast_irq.S | ||
fatal.c | ||
fault.c | ||
fault_s.S | ||
irq_manage.c | ||
irq_offload.c | ||
isr_wrapper.S | ||
prep_c.c | ||
regular_irq.S | ||
reset.S | ||
swap.S | ||
sys_fatal_error_handler.c | ||
thread.c | ||
thread_entry_wrapper.S | ||
timestamp.c | ||
userspace.S | ||
vector_table.c |