zephyr/soc
Alexandre Mergnat 542a7fa25d arch: riscv: add memory protection support
The IRQ handler has had a major changes to manage syscall, reschedule
and interrupt from user thread and stack guard.

Add userspace support:
- Use a global variable to know if the current execution is user or
  machine. The location of this variable is read only for all user
  thread and read/write for kernel thread.
- Memory shared is supported.
- Use dynamic allocation to optimize PMP slot usage. If the area size
  is a power of 2, only one PMP slot is used, else 2 are used.

Add stack guard support:
- Use MPRV bit to force PMP rules to machine mode execution.
- IRQ stack have a locked stack guard to avoid re-write PMP
  configuration registers for each interruption and then win some
  cycle.
- The IRQ stack is used as "temporary" stack at the beginning of IRQ
  handler to save current ESF. That avoid to trigger write fault on
  thread stack during store ESF which that call IRQ handler to
  infinity.
- A stack guard is also setup for privileged stack of a user thread.

Thread:
- A PMP setup is specific to each thread. PMP setup are saved in each
  thread structure to improve reschedule performance.

Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
Reviewed-by: Nicolas Royer <nroyer@baylibre.com>
2020-11-09 15:37:11 -05:00
..
arc arc: defconfig: remove SYSTEM_CLOCK_SLOPPY_IDLE option 2020-10-28 12:21:10 -05:00
arm drivers: ieee802154: cc13xx_cc26xx: sub-ghz support 2020-11-09 10:25:24 +02:00
nios2
posix
riscv arch: riscv: add memory protection support 2020-11-09 15:37:11 -05:00
x86 x86: add common memory.ld 2020-09-30 14:14:07 -07:00
xtensa xtensa: intel_s1000: enable thread local storage 2020-10-24 10:52:00 -07:00
Kconfig timing: introduce timing functions as a generic feature 2020-09-05 13:28:38 -05:00