RTEMS | bsps/raspberrypi5: Add SMP support (!1072)

Kinsey Moore (@opticron) gitlab at rtems.org
Tue Feb 24 14:12:16 UTC 2026




Kinsey Moore commented on a discussion on bsps/shared/start/bspsmp-arm-psci.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1072#note_143400

 >  #if defined( AARCH64_MULTILIB_ARCH_V8 ) || \
 >    defined( AARCH64_MULTILIB_ARCH_V8_ILP32 )
 >    uint32_t PSCI_FN_SYSTEM_CPU_ON = 0xC4000003;
 > -  uint64_t target_cpu = _AArch64_Read_mpidr_el1();
 > +  uint64_t target_cpu = _AArch64_Get_MPIDR_for_cpu_index( cpu_index );
 > +  target_cpu &= ( 0x00ff00ffffffULL );
 >    uint64_t ret;
 >  #else
 >    uint32_t PSCI_FN_SYSTEM_CPU_ON = 0x84000003;
 > -  uint32_t target_cpu = _AArch32_Read_mpidr();
 > +  uint32_t target_cpu = _ARM_Get_MPIDR_for_cpu_index( cpu_index );
 > +  target_cpu &= ( 0x00ffffffUL );

If `target_cpu` was uintptr_t and a common call returned uintptr_t, a lot of this duplication could be dropped. In addition, the modifications to target_cpu could be dropped. A universal function could be `uintptr_t _AArch_Get_MPIDR_for_cpu_index( uint32_t )` which can be relied upon to fill the fields appropriately.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1072#note_143400
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260224/9ebed6f2/attachment.htm>


More information about the bugs mailing list