Hi all, I have been implementing SMP for a new architecture (Epiphany) and I have some questions.
When the secondary processor should be waiting (or going to idle state)? At Thread_Start_multitasking? When a secondary processor is interrupted by another one? When it's allocated a thread (lazy allocate)? And in that case, what's the interprocess interrupt handler should do? The current SMP interrupt handler checks for the type of the message (shutdown, test, cache, etc). Should the interrupt handler assembly code check for dispatch necessary (which is set by another processor that allocated a thread for it), and then executes this thread? Please correct me if I am wrong. And if this is correct, where the secondary processor should be waiting (which function)? One major question, what's exactly the must-be-added code to both Context Switch, and ISR Handler, that differs from uni-processor systems. When I tried to run smp01 with my current implementation, I noticed that the boot processor goes to IDLE thread after initialization, and a secondary processor is the one who executes Init, is that the correct behaviour? I think it's not, although the boot processor does all its necessary functions before restart itself and jump to idle task, and it's allocating Init to processor 1. [1] https://github.com/heshamelmatary/rtems-epiphany Regards, Hesham _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel