Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Assembly and multicore CPUs

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?

like image 304
dvl Avatar asked Oct 04 '09 14:10

dvl


People also ask

Does multi core mean multiple CPU?

The primary difference between multicore and multiprocessor is that a multicore operates a single CPU, while a multiprocessor has multiple CPUs. In a simplified way, if you want a computer to run a single program faster, that is a job for a multicore processor.

What is multicore CPU?

A multicore processor is a single integrated circuit (a.k.a., chip multiprocessor or CMP) that contains multiple core processing units, more commonly known as cores. There are many different multicore processor architectures, which vary in terms of. Number of cores.

What is an advantage of multicore CPUs?

A CPU that offers multiple cores may perform significantly better than a single-core CPU of the same speed. Multiple cores allow PCs to run multiple processes at the same time with greater ease, increasing your performance when multitasking or under the demands of powerful apps and programs.

What is the difference between multiple processors and multiple cores?

The main difference between multicore and multiprocessor is that the multicore refers to a single CPU with multiple execution units while the multiprocessor refers to a system that has two or more CPUs. Multicores have multiple cores or processing units in a single CPU.


2 Answers

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

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

  • Intel Multiprocessor Specification

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.

like image 80
asveikau Avatar answered Sep 17 '22 13:09

asveikau


I know this is an old question, but here's a more recent reference to intel multicore chips.

http://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-vol-3a-part-1-manual.html

Link found on: http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html

like image 45
Beachhouse Avatar answered Sep 21 '22 13:09

Beachhouse