fix(esp_hw_support): clear reserved interrupts that are not applicable for each target

This commit is contained in:
Omar Chebib
2024-03-12 11:01:51 +08:00
parent 6e4eeec97c
commit a79c6f7f67
21 changed files with 404 additions and 359 deletions

View File

@@ -630,7 +630,7 @@ esp_err_t esp_intr_alloc_intrstatus(int source, int flags, uint32_t intrstatusre
esp_intr_disable(ret);
}
#ifdef SOC_CPU_HAS_FLEXIBLE_INTC
#if SOC_CPU_HAS_FLEXIBLE_INTC
//Extract the level from the interrupt passed flags
int level = esp_intr_flags_to_level(flags);
esp_cpu_intr_set_priority(intr, level);
@@ -642,6 +642,11 @@ esp_err_t esp_intr_alloc_intrstatus(int source, int flags, uint32_t intrstatusre
}
#endif
#if SOC_INT_PLIC_SUPPORTED
/* Make sure the interrupt is not delegated to user mode (IDF uses machine mode only) */
RV_CLEAR_CSR(mideleg, BIT(intr));
#endif
portEXIT_CRITICAL(&spinlock);
//Fill return handle if needed, otherwise free handle.