Initializing Multi-Core Processor and its Hyper-Threading

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Rukog
Member
Member
Posts: 51
Joined: Sun Aug 01, 2021 5:24 pm

Initializing Multi-Core Processor and its Hyper-Threading

Post by Rukog »

wth is that section :shock:

How far is that complex, 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.

But that multi-processor system appear to be more natural.
Image
Image
Image

Is there any tutorial about that? ive found only about TSS stuff.

It starts being complex at The MP Initialization Protocol Algorithm for MP Systems.
Octocontrabass
Member
Member
Posts: 5563
Joined: Mon Mar 25, 2013 7:01 pm

Re: Initializing Multi-Core Processor and its Hyper-Threadin

Post by Octocontrabass »

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.
Post Reply