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

Preetam Das (@lostux) gitlab at rtems.org
Tue Feb 24 14:42:41 UTC 2026




Preetam Das commented on a discussion on bsps/shared/start/bspsmp-arm-psci.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1072#note_143407

 >  #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 we want such function that would provide ready to use `target_cpu` field with the mask already applied, then I think it should be called something else, not `_AArch_Get_MPIDR_for_cpu_index` because it sound like it returns the raw MPIDR values.

So, I am guessing we want to keep the new `_AArch64_Get_MPIDR_for_cpu_index` implementation and just to add another one  `uintptr_t _AARCH_Get_PSCI_cpu_target( uint32_t )` to remove the duplication, right? Or should I drop the previous one?

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1072#note_143407
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/f57f7419/attachment-0001.htm>


More information about the bugs mailing list