diff options
Diffstat (limited to 'bsps/include/dev/irq/arm-gicv3.h')
-rw-r--r-- | bsps/include/dev/irq/arm-gicv3.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bsps/include/dev/irq/arm-gicv3.h b/bsps/include/dev/irq/arm-gicv3.h index 60bc315962..0583fded0a 100644 --- a/bsps/include/dev/irq/arm-gicv3.h +++ b/bsps/include/dev/irq/arm-gicv3.h @@ -9,6 +9,7 @@ */ /* + * Copyright (C) 2022 embedded brains GmbH (http://www.embedded-brains.de) * Copyright (C) 2019 On-Line Applications Research Corporation (OAR) * * Redistribution and use in source and binary forms, with or without @@ -155,6 +156,16 @@ static inline volatile gic_sgi_ppi *gicv3_get_sgi_ppi(uint32_t cpu_index) ((uintptr_t)BSP_ARM_GIC_REDIST_BASE + cpu_index * 0x20000 + 0x10000); } +static inline bool gicv3_sgi_ppi_is_pending( + rtems_vector_number vector, + uint32_t cpu_index +) +{ + volatile gic_sgi_ppi *sgi_ppi = gicv3_get_sgi_ppi(cpu_index); + + return (sgi_ppi->icspispendr[0] & (1U << vector)) != 0; +} + #ifdef __cplusplus } #endif |