-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Why does main_first_hart() take in a pointer to the HLS from the caller, but then overwrite its value to be hard-coded to the HLS for hart0?
platform/mpfs_hal/startup_gcc/system_startup.c
Lines 102 to 103 in 8af073c
| stack_top = (ptrdiff_t)((uint8_t*)&__stack_top_h0$); | |
| hls = (HLS_DATA*)(stack_top - HLS_DEBUG_AREA_SIZE); |
That HLS pointer for hart0 then gets passed into main_other_hart() to kick off the hart entry-point function, even if the specified "first hart" is not hart0.
And similarly for main_first_hart_app(), the HLS is passed in, but then overwritten to be hard-coded to the HLS for hart1. And that value is then passed into main_other_hart():
platform/mpfs_hal/startup_gcc/system_startup.c
Lines 302 to 305 in 8af073c
| stack_top = (ptrdiff_t)((uint8_t*)&__stack_top_h1$); | |
| hls = (HLS_DATA*)(stack_top - HLS_DEBUG_AREA_SIZE); | |
| hls->in_wfi_indicator = HLS_MAIN_HART_FIN_INIT; | |
| (void)main_other_hart(hls); |
Metadata
Metadata
Assignees
Labels
No labels