bsps: Add gicv3_sgi_ppi_is_pending()

This commit is contained in:
Sebastian Huber
2022-04-06 09:48:52 +02:00
parent 9abcaaebc3
commit f10c551f54
2 changed files with 12 additions and 4 deletions
+11
View File
@@ -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