diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-03-16 08:31:08 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-03-17 07:25:23 +0100 |
commit | e5233057be3396e9cd75ffd3a92d2048df316a4b (patch) | |
tree | 550b78e2e5b834a57b89ff79e49a8a74c7398aca /bsps/riscv/riscv | |
parent | rtems/test.h: Use __attribute__ (diff) | |
download | rtems-e5233057be3396e9cd75ffd3a92d2048df316a4b.tar.bz2 |
bsps/riscv: Make SMP start more robust
In SMP configurations, check that we run on a configured processor. If not,
then there is not much that can be done since we do not have a stack available
for this processor. Just loop forever in this case. Do this in assemlby to
ensure that no stack memory is used.
Diffstat (limited to 'bsps/riscv/riscv')
-rw-r--r-- | bsps/riscv/riscv/start/bspsmp.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/bsps/riscv/riscv/start/bspsmp.c b/bsps/riscv/riscv/start/bspsmp.c index 91f4f7b96a..ce5792f5b8 100644 --- a/bsps/riscv/riscv/start/bspsmp.c +++ b/bsps/riscv/riscv/start/bspsmp.c @@ -36,10 +36,7 @@ void bsp_start_on_secondary_processor(Per_CPU_Control *cpu_self) cpu_index_self = _Per_CPU_Get_index(cpu_self); - if ( - cpu_index_self < rtems_configuration_get_maximum_processors() - && _SMP_Should_start_processor(cpu_index_self) - ) { + if (_SMP_Should_start_processor(cpu_index_self)) { set_csr(mie, MIP_MSIP | MIP_MEIP); _SMP_Start_multitasking_on_secondary_processor(cpu_self); } else { |