zephyr/arch
Jimmy Zheng 3804387350 arch: riscv: handle interrupt level for CLIC
CLIC supports mintstatus.MIL (RO) and mcause.MPIL (RW) for the current
interrupt level and the previous interrut level before a trap. Each ISR
must execute MRET to set mcause.MPIL back to mintstatus.MIL.

This commit introduces CONFIG_CLIC_SUPPORT_INTERRUPT_LEVEL to handle
mcause.MPIL for interrupt preemption in nested ISR, and uses
CONFIG_RISCV_ALWAYS_SWITCH_THROUGH_ECALL to ensure ISR always switch out
with MRET.

e.g.
  With CONFIG_RISCV_ALWAYS_SWITCH_THROUGH_ECALL=n, a context-switch in
  ISR may skip MRET in this flow:
  IRQ -> _isr_wrapper -> z_riscv_switch() -> retrun to arch_switch()

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2025-02-05 17:48:45 +01:00
..
arc arch: arc: Rename _Fault to z_arc_fault 2025-01-28 23:42:06 +01:00
arm Revert "arch: arm: cortex_m: Only trigger context switch if thread is preemptible" 2025-02-04 12:03:20 +01:00
arm64 arch: arm64: remove CONFIG_ARM64_ENABLE_FRAME_POINTER 2025-01-23 16:32:36 +01:00
common arch: remove CONFIG_LEGACY_MULTI_LEVEL_TABLE_GENERATION 2025-01-23 16:32:36 +01:00
mips arch: mips: Rename _Fault to z_mips_fault 2025-01-28 23:42:06 +01:00
nios2 arch: nios2: Rename _Fault to z_nios2_fault 2025-01-28 23:42:06 +01:00
posix kernel: move current thread pointer management to core code 2025-01-10 07:49:08 +01:00
riscv arch: riscv: handle interrupt level for CLIC 2025-02-05 17:48:45 +01:00
sparc Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
x86 arch: x86: core: reboot_rst_cnt: Enable support for warm reboot 2025-02-04 09:19:24 +01:00
xtensa Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
archs.yml hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
CMakeLists.txt
Kconfig arch: local ISR table declaration: Remove experimental label 2024-12-05 12:29:58 +01:00
Kconfig.v1 hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
Kconfig.v2 hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00