43#ifndef LIBBSP_SHARED_IRQ_GENERIC_H
44#define LIBBSP_SHARED_IRQ_GENERIC_H
61#if !defined(BSP_INTERRUPT_VECTOR_COUNT)
62 #error "BSP_INTERRUPT_VECTOR_COUNT shall be defined"
65#if defined(BSP_INTERRUPT_USE_INDEX_TABLE) && !defined(BSP_INTERRUPT_DISPATCH_TABLE_SIZE)
66 #error "if you define BSP_INTERRUPT_USE_INDEX_TABLE, you have to define BSP_INTERRUPT_DISPATCH_TABLE_SIZE etc. as well"
69#ifndef BSP_INTERRUPT_DISPATCH_TABLE_SIZE
70 #define BSP_INTERRUPT_DISPATCH_TABLE_SIZE BSP_INTERRUPT_VECTOR_COUNT
73#define bsp_interrupt_assert(e) _Assert(e)
81#ifdef BSP_INTERRUPT_USE_INDEX_TABLE
82 #if BSP_INTERRUPT_DISPATCH_TABLE_SIZE < 0x100
83 typedef uint8_t bsp_interrupt_dispatch_index_type;
84 #elif BSP_INTERRUPT_DISPATCH_TABLE_SIZE < 0x10000
85 typedef uint16_t bsp_interrupt_dispatch_index_type;
87 typedef uint32_t bsp_interrupt_dispatch_index_type;
89 extern bsp_interrupt_dispatch_index_type bsp_interrupt_dispatch_index_table [];
96 #ifdef BSP_INTERRUPT_USE_INDEX_TABLE
97 return bsp_interrupt_dispatch_index_table [vector];
153#ifdef BSP_INTERRUPT_CUSTOM_VALID_VECTOR
335#if defined(RTEMS_SMP)
375#if defined(RTEMS_SMP)
395#if defined(RTEMS_SMP)
397 (
const Atomic_Uintptr *) ptr,
412static inline void bsp_interrupt_entry_store_release(
417#if defined(RTEMS_SMP)
418 _Atomic_Store_uintptr(
419 (Atomic_Uintptr *) ptr,
420 (Atomic_Uintptr) value,
445 index = bsp_interrupt_dispatch_index( vector );
447 return bsp_interrupt_entry_load_acquire(
463static inline void bsp_interrupt_dispatch_entries(
469 entry = bsp_interrupt_entry_load_acquire( &
entry->next );
489static inline void bsp_interrupt_handler_dispatch_unlikely(
495 entry = bsp_interrupt_entry_load_first( vector );
498 bsp_interrupt_dispatch_entries(
entry );
515static inline void bsp_interrupt_handler_dispatch_unchecked(
521 entry = bsp_interrupt_entry_load_first( vector );
524 bsp_interrupt_dispatch_entries(
entry );
526#if defined(RTEMS_SMP)
527 bsp_interrupt_spurious( vector );
550 if ( bsp_interrupt_is_valid_vector( vector ) ) {
551 bsp_interrupt_handler_dispatch_unchecked( vector );
608void bsp_interrupt_entry_remove(
639 table_index = index / 8;
640 bit = (uint8_t) ( 1U << ( index % 8 ) );
652static inline void bsp_interrupt_set_handler_unique(
660 table_index = index / 8;
661 bit = (uint8_t) ( 1U << ( index % 8 ) );
676static inline bool bsp_interrupt_is_initialized(
void )
678 return bsp_interrupt_is_handler_unique( BSP_INTERRUPT_DISPATCH_TABLE_SIZE );
This header file provides the interfaces of the Assert Handler.
#define RTEMS_PREDICT_FALSE(_exp)
Evaluates the integral expression and tells the compiler that the predicted value is false (0).
Definition: basedefs.h:732
#define RTEMS_PREDICT_TRUE(_exp)
Evaluates the integral expression and tells the compiler that the predicted value is true (1).
Definition: basedefs.h:751
ISR_Vector_number rtems_vector_number
This integer type represents interrupt vector numbers.
Definition: intr.h:102
#define rtems_interrupt_local_disable(_isr_cookie)
Disables the maskable interrupts on the current processor.
Definition: intr.h:427
ISR_Level rtems_interrupt_level
This integer type represents interrupt levels.
Definition: intr.h:111
void(* rtems_interrupt_handler)(void *)
Interrupt handler routines shall have this type.
Definition: intr.h:965
#define rtems_interrupt_local_enable(_isr_cookie)
Restores the previous interrupt level on the current processor.
Definition: intr.h:468
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
Disables the interrupt vector.
Definition: irq.c:153
rtems_status_code bsp_interrupt_vector_is_enabled(rtems_vector_number vector, bool *enabled)
Checks if the interrupt is enabled.
Definition: irq.c:129
void bsp_interrupt_handler_default(rtems_vector_number vector)
Default interrupt handler.
Definition: irq.c:210
rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector)
Enables the interrupt vector.
Definition: irq.c:140
void bsp_interrupt_facility_initialize(void)
BSP specific initialization.
Definition: irq.c:166
rtems_status_code bsp_interrupt_raise(rtems_vector_number vector)
Causes the interrupt vector.
Definition: irq.c:117
rtems_status_code bsp_interrupt_is_pending(rtems_vector_number vector, bool *pending)
Checks if the interrupt is pending.
Definition: irq.c:106
rtems_status_code bsp_interrupt_clear(rtems_vector_number vector)
Clears the interrupt vector.
Definition: irq.c:123
rtems_status_code bsp_interrupt_get_attributes(rtems_vector_number vector, rtems_interrupt_attributes *attributes)
Gets the attributes of the interrupt vector.
Definition: irq.c:98
void bsp_interrupt_initialize(void)
Initialize Interrupt Manager implementation.
Definition: irq-generic.c:163
#define NULL
Requests a GPIO pin group configuration.
Definition: xil_types.h:54
This header file provides the interfaces of the Atomic Operations.
This header file is provided for backward compatiblility.
uint8_t bsp_interrupt_handler_unique_table[]
This table contains a bit map which indicates if an entry is unique or shared.
Definition: irq-generic.c:58
rtems_interrupt_entry ** bsp_interrupt_get_dispatch_table_slot(rtems_vector_number index)
Gets a reference to the interrupt handler table slot associated with the index.
Definition: irq-generic.c:49
rtems_interrupt_entry * bsp_interrupt_dispatch_table[]
Each member of this table references the first installed entry at the corresponding interrupt vector ...
Definition: irq-generic.c:47
void bsp_interrupt_lock(void)
Acquires the interrupt support lock.
Definition: irq-lock.c:42
void bsp_interrupt_unlock(void)
Releases the interrupt support lock.
Definition: irq-lock.c:49
rtems_status_code bsp_interrupt_check_and_lock(rtems_vector_number vector, rtems_interrupt_handler handler)
Checks the vector and routine. When the checks were successful, the interrupt support lock will be ob...
Definition: irq-generic.c:110
Definition: mmu-config.c:53
This structure provides the attributes of an interrupt vector.
Definition: intr.h:1857
This structure represents an interrupt entry.
Definition: intr.h:1005