RTEMS | bsp/aarch64:SMP improvement on aarch64 (!113)

xiaojun zheng (@zhengxiaojun) gitlab at rtems.org
Thu Sep 19 04:01:25 UTC 2024




xiaojun zheng commented on a discussion on bsps/aarch64/shared/start/start.S: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/113#note_112238

 >  _el1_start:
 >  
 >  #ifdef RTEMS_SMP
 > -  /* Read MPIDR and get current processor index */
 > -  mrs x7, mpidr_el1
 > -  and x7, x7, #0xff
 > +  ldr x3, =aarch64_cpu_boot_params

`aarch64_cpu_boot_params` is not the map table, it is a global variable used to store the core index that core0 want to start, so the core can setup stack pointer correctly. If call `_AArch64_Get_current_processor` here, how to decide whether to call default implementation or the map implementation? And the function should be callable from assembly code, I think use a global variable here can reduce complexity.

The patch provided two functions aarch64_get/set_cpu_hwid() to visit the map table, in fact, only the get function is nessary for now, if the hwid is loaded from dts maybe set function is needed. And the map table can be static.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/113#note_112238
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/20240919/fdf29cea/attachment-0001.htm>


More information about the bugs mailing list