Reputation: 233
What x86-64 instructions are used to enable/disable other cores/processors and how does one start executing code on them?
Is there documentation somewhere on how this is done by the operating system?
Upvotes: 9
Views: 6236
Reputation: 5052
I know this is an old question, but here's a more recent reference to intel multicore chips.
Link found on: http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html
Upvotes: 2
Reputation: 40264
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.
Upvotes: 2
Reputation: 5888
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.
Upvotes: 0
Reputation: 1673
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...
Upvotes: -1