16#ifndef ZEPHYR_INCLUDE_ARCH_ARM_AARCH32_IRQ_H_
17#define ZEPHYR_INCLUDE_ARCH_ARM_AARCH32_IRQ_H_
32#if defined(CONFIG_ARM_CUSTOM_INTERRUPT_CONTROLLER)
33GTEXT(z_soc_irq_get_active)
38#if !defined(CONFIG_ARM_CUSTOM_INTERRUPT_CONTROLLER)
45extern void z_arm_irq_priority_set(
unsigned int irq,
unsigned int prio,
55void z_soc_irq_init(
void);
56void z_soc_irq_enable(
unsigned int irq);
57void z_soc_irq_disable(
unsigned int irq);
58int z_soc_irq_is_enabled(
unsigned int irq);
60void z_soc_irq_priority_set(
61 unsigned int irq,
unsigned int prio,
unsigned int flags);
63unsigned int z_soc_irq_get_active(
void);
64void z_soc_irq_eoi(
unsigned int irq);
66#define arch_irq_enable(irq) z_soc_irq_enable(irq)
67#define arch_irq_disable(irq) z_soc_irq_disable(irq)
68#define arch_irq_is_enabled(irq) z_soc_irq_is_enabled(irq)
70#define z_arm_irq_priority_set(irq, prio, flags) \
71 z_soc_irq_priority_set(irq, prio, flags)
75extern void z_arm_int_exit(
void);
77extern void z_arm_interrupt_init(
void);
81#define TOSTR(s) DO_TOSTR(s)
84#define DO_CONCAT(x, y) x ## y
85#define CONCAT(x, y) DO_CONCAT(x, y)
93#define IRQ_ZERO_LATENCY BIT(0)
95#ifdef CONFIG_CPU_CORTEX_M
96#define _CHECK_PRIO(priority_p, flags_p) \
97 BUILD_ASSERT((flags_p & IRQ_ZERO_LATENCY) || \
98 priority_p <= IRQ_PRIO_LOWEST, \
99 "Invalid interrupt priority. Values must not exceed IRQ_PRIO_LOWEST");
101#define _CHECK_PRIO(priority_p, flags_p)
114#define ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) \
116 BUILD_ASSERT(IS_ENABLED(CONFIG_ZERO_LATENCY_IRQS) || !(flags_p & IRQ_ZERO_LATENCY), \
117 "ZLI interrupt registered but feature is disabled"); \
118 _CHECK_PRIO(priority_p, flags_p) \
119 Z_ISR_DECLARE(irq_p, 0, isr_p, isr_param_p); \
120 z_arm_irq_priority_set(irq_p, priority_p, flags_p); \
123#define ARCH_IRQ_DIRECT_CONNECT(irq_p, priority_p, isr_p, flags_p) \
125 BUILD_ASSERT(IS_ENABLED(CONFIG_ZERO_LATENCY_IRQS) || !(flags_p & IRQ_ZERO_LATENCY), \
126 "ZLI interrupt registered but feature is disabled"); \
127 _CHECK_PRIO(priority_p, flags_p) \
128 Z_ISR_DECLARE(irq_p, ISR_FLAG_DIRECT, isr_p, NULL); \
129 z_arm_irq_priority_set(irq_p, priority_p, flags_p); \
133extern void _arch_isr_direct_pm(
void);
134#define ARCH_ISR_DIRECT_PM() _arch_isr_direct_pm()
136#define ARCH_ISR_DIRECT_PM() do { } while (false)
139#define ARCH_ISR_DIRECT_HEADER() arch_isr_direct_header()
140#define ARCH_ISR_DIRECT_FOOTER(swap) arch_isr_direct_footer(swap)
143extern void z_arm_int_exit(
void);
145#ifdef CONFIG_TRACING_ISR
152#ifdef CONFIG_TRACING_ISR
159#ifdef CONFIG_TRACING_ISR
162 if (maybe_swap != 0) {
167#define ARCH_ISR_DIRECT_DECLARE(name) \
168 static inline int name##_body(void); \
169 __attribute__ ((interrupt ("IRQ"))) void name(void) \
171 int check_reschedule; \
172 ISR_DIRECT_HEADER(); \
173 check_reschedule = name##_body(); \
174 ISR_DIRECT_FOOTER(check_reschedule); \
176 static inline int name##_body(void)
178#if defined(CONFIG_DYNAMIC_DIRECT_INTERRUPTS)
180extern void z_arm_irq_direct_dynamic_dispatch_reschedule(
void);
181extern void z_arm_irq_direct_dynamic_dispatch_no_reschedule(
void);
229#define ARM_IRQ_DIRECT_DYNAMIC_CONNECT(irq_p, priority_p, flags_p, resch) \
230 IRQ_DIRECT_CONNECT(irq_p, priority_p, \
231 CONCAT(z_arm_irq_direct_dynamic_dispatch_, resch), flags_p)
236extern void z_irq_spurious(
const void *unused);
238#ifdef CONFIG_GEN_SW_ISR_TABLE
243extern void _isr_wrapper(
void);
246#if defined(CONFIG_ARM_SECURE_FIRMWARE)
251 IRQ_TARGET_STATE_SECURE = 0,
252 IRQ_TARGET_STATE_NON_SECURE
void arch_irq_disable(unsigned int irq)
int arch_irq_is_enabled(unsigned int irq)
void arch_irq_enable(unsigned int irq)
static void arch_isr_direct_footer(int maybe_swap)
Definition: irq.h:157
static void arch_isr_direct_header(void)
Definition: irq.h:150
void sys_trace_isr_enter(void)
Called when entering an ISR.
void sys_trace_isr_exit(void)
Called when exiting an ISR.
flags
Definition: http_parser.h:131
Public interface for configuring interrupts.
__UINT32_TYPE__ uint32_t
Definition: stdint.h:60
Software-managed ISR table.