diff options
Diffstat (limited to 'bsps/sparc/leon3/include/bsp/leon3.h')
-rw-r--r-- | bsps/sparc/leon3/include/bsp/leon3.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bsps/sparc/leon3/include/bsp/leon3.h b/bsps/sparc/leon3/include/bsp/leon3.h index 1394dd1c1c..476ed73647 100644 --- a/bsps/sparc/leon3/include/bsp/leon3.h +++ b/bsps/sparc/leon3/include/bsp/leon3.h @@ -162,6 +162,18 @@ static inline uint32_t leon3_get_data_cache_config_register( void ) } /** + * @brief Gets the processor count. + * + * @param[in] regs is the IRQ(A)MP register block address. + * + * @return Returns the processor count. + */ +static inline uint32_t leon3_get_cpu_count( const irqamp *regs ) +{ + return IRQAMP_MPSTAT_NCPU_GET( grlib_load_32( ®s->mpstat ) ) + 1; +} + +/** * @brief This constant defines the index of the GPTIMER timer used by the * clock driver. */ |