Hi, all

The current RTEMS can not run on the multi-core CPUs arranged in clusters, the current code treat mpidr as processor index,
but when multi-core arranged in cluster, mpidr is 0,0x100,0x200 ...
So a mapping needs to be established between mpidr and processor index.

MPIDR_EL1
+-------+-------+----+----+-------+----+-------+------+-----+
|[63:40]|[39:32]|[31]|[30]|[29:25]|[24]|[23:16]|[15:8]|[7:0]|
+-------+-------+----+----+-------+----+-------+------+-----+
|       | Aff3  |    | U  |  UNK  |    | Aff2  | Aff1 | Aff0|
+-------+-------+----+----+-------+----+-------+------+-----+

For the purpose of multi-core arranged in cluster,there are several places need to be improved.
1.start.S: calc and setup stack pointer for each core
2.cpu.h:_CPU_SMP_Get_current_processor()
3.bspsmp-arm-psci.c:_CPU_SMP_Start_processor()
4.arm_gicv3.c:arm_gic_irq_processor_count()
5.arm_gicv3.c:bsp_interrupt_raise_on()

I have made it run on a RK3568 board, use an array to map mpidr to processor index.But the changes may affect other BSPs, I need some advice on how to reduce the affect and make the changes more generic,
so these changes can be merged into the main version.

Linux get core id from the device tree.

Please feel free to give me your advice.

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to