zephyr/soc/gd/gd32/gd32vf103/CMakeLists.txt
Jimmy Zheng f216c434d0 soc: gd32: gd32vf103: keep the mcause.interrupt by SOC-specific context
For Nuclei ECLIC, the interrupt level (mintstatus.MIL) is restored from
the previous interrupt level (mcause.MPIL) only if mcause.interrupt is set.
This behavior is not defined in the RISC-V CLIC spec.
If an ISR causes a context switch and mcause.interrupt is not set in the
next context (e.g. the next context is yielded from ecall), interrupts will
be masked after MRET because the interrupt level is not restored.

Use SOC-specific context to set mcause.interrupt to ensure the interrupt
level is restored correctly.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2025-02-05 17:48:45 +01:00

12 lines
361 B
CMake

# Copyright (c) 2021 Tokita, Hiroshi <tokita.hiroshi@gmail.com>
# SPDX-License-Identifier: Apache-2.0
zephyr_sources(entry.S)
zephyr_sources(soc.c)
zephyr_sources(soc_irq.S)
zephyr_include_directories(.)
zephyr_linker_sources(ROM_START SORT_KEY 0x0 init.ld)
set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/riscv/common/linker.ld CACHE INTERNAL "")