Assembly and multicore CPUs

僤鯓⒐⒋嵵緔 提交于 2019-12-04 02:41:59

Pretty painful to get an x86 up and going... it is not so much in the cores as in the APIC system. You need to look into the docs for your chipset, tends to be pretty much hidden unfortunately.

You will have to be at the kernel level, definitely. Looking at Linux sounds like a good idea.

Assuming you're talking about implementing a kernel....

My understanding is it's largely based on this document:

If memory serves me right (no pun intended), to detect multi-processor support you scan certain ranges of memory for a magic set of bytes that the firmware set up for you. From there you can walk the structures that describe the CPUs, and you can talk to the APIC controller about setting up interrupts on various CPUs, etc.

There are probably documentation from Intel/AMD on Model Specific Registers that you can set to do specific things like that. I'm not sure whether you have access to it unless you're writing something that sits at the kernel level...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!