When CONFIG_RISCV_VECTORED_MODE is disabled, CLIC claims interrupts using CSR 'mnxti' and handles all pending interrupts before exiting the ISR. When CONFIG_RISCV_VECTORED_MODE is enabled, all interrupts use vector mode and are claimed automatically. The RISC-V common ISR is used for interrupts hooked into SW ISR table, but it only handle one pending interrupt per ISR. This commit enhances CLIC to set vector mode for direct ISRs only and use the CLIC common entry for regular ISRs to handles multiple pending interrupts in an ISR. Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
37 lines
1 KiB
Text
37 lines
1 KiB
Text
# Copyright (c) 2021 Tokita, Hiroshi <tokita.hiroshi@gmail.com>
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
config NUCLEI_ECLIC
|
|
bool "Enhanced Core Local Interrupt Controller (ECLIC)"
|
|
default y
|
|
depends on DT_HAS_NUCLEI_ECLIC_ENABLED
|
|
select RISCV_SOC_HAS_CUSTOM_IRQ_HANDLING
|
|
select CLIC_SMCLICSHV_EXT if RISCV_VECTORED_MODE
|
|
help
|
|
Interrupt controller for Nuclei SoC core.
|
|
|
|
config NRFX_CLIC
|
|
bool "VPR Core Local Interrpt Controller (CLIC)"
|
|
default y
|
|
depends on DT_HAS_NORDIC_NRF_CLIC_ENABLED
|
|
select GEN_IRQ_VECTOR_TABLE
|
|
help
|
|
Interrupt controller for Nordic VPR cores.
|
|
|
|
config CLIC_SMCLICSHV_EXT
|
|
bool
|
|
help
|
|
The selective hardware vectoring extension gives users the flexibility
|
|
to select the behavior for each interrupt. The CLIC driver needs to
|
|
implement the riscv_clic_irq_vector_set() function.
|
|
|
|
if NUCLEI_ECLIC
|
|
|
|
config LEGACY_CLIC
|
|
bool "Use the legacy clic specification"
|
|
depends on RISCV_HAS_CLIC
|
|
help
|
|
Enables legacy clic, where smclicshv extension is not supported and
|
|
hardware vectoring is set via mode bits of mtvec.
|
|
|
|
endif # NUCLEI_ECLIC
|