summaryrefslogtreecommitdiffstats
path: root/bsps
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-06-26 07:15:28 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-06-28 15:03:23 +0200
commit0fd8287b2be109cd8671a65cac955f943ab60d32 (patch)
tree48576fbfd974eaf2456c020608638f440d542a31 /bsps
parentriscv: Avoid namespace pollution (diff)
downloadrtems-0fd8287b2be109cd8671a65cac955f943ab60d32.tar.bz2
riscv: Add _CPU_Get_current_per_CPU_control()
Update #3433.
Diffstat (limited to 'bsps')
-rw-r--r--bsps/riscv/riscv/start/start.S6
1 files changed, 5 insertions, 1 deletions
diff --git a/bsps/riscv/riscv/start/start.S b/bsps/riscv/riscv/start/start.S
index 390459a1fb..d5c6be9c3a 100644
--- a/bsps/riscv/riscv/start/start.S
+++ b/bsps/riscv/riscv/start/start.S
@@ -28,7 +28,7 @@
*/
#include <rtems/asm.h>
-#include <rtems/score/cpu.h>
+#include <rtems/score/percpu.h>
#include <rtems/score/riscv-utility.h>
#include <bsp/linker-symbols.h>
#include <bspopts.h>
@@ -55,6 +55,10 @@ SYM(_start):
#ifdef RTEMS_SMP
csrr s0, mhartid
+ la t0, _Per_CPU_Information
+ slli t1, s0, PER_CPU_CONTROL_SIZE_LOG2
+ add t0, t0, t1
+ csrw mscratch, t0
bnez s0, .Lwait_for_go
#endif