diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-07-30 11:09:10 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-07-14 12:21:33 +0200 |
commit | 3773a63b2ac208b9e1d4ae743ceedd8e679cd156 (patch) | |
tree | 1fb003e6bda0ec695d633df4e09a4faaf0e5e600 /bsps/sparc/leon3/include/bsp | |
parent | bsp/leon3: Move leon3_power_down_loop() (diff) | |
download | rtems-3773a63b2ac208b9e1d4ae743ceedd8e679cd156.tar.bz2 |
bsp/leon3: Simplify fatal error handling
Diffstat (limited to 'bsps/sparc/leon3/include/bsp')
-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. */ |