Rukog wrote:by reading this I know now that TSS is just faking multitask, it simulates it through saving registers before jumping to another waiting task and it continues like that until all task are done.
Most OSes only use the TSS for the ring 0 stack pointer. Everything else gets saved and restored manually. And even with multiple CPUs, you still need to be able to switch tasks on each CPU.
Rukog wrote:Is there any tutorial about that?
There is an example on the wiki. You should also read more about
multiprocessing if you haven't already.
Rukog wrote:It starts being complex at The MP Initialization Protocol Algorithm for MP Systems.
That's because the Intel SDM explains what the BIOS needs to do, not what your OS needs to do. Your OS needs to collect a list of APs to start (from ACPI or the MP tables), then send each AP the INIT/SIPI/SIPI, then make sure all APs started. The
Multiprocessor Specification explains all of that in more detail. You can ignore the parts about the 82489DX and the CMOS shutdown byte, those only apply to 486s and socket 4 Pentiums.
ACPI 6.4 introduced a new way to start APs that's much easier to use. I don't think it's very common yet, since it's so new.