Page 1 of 1

more than one CPU

Posted: Wed Sep 28, 2005 11:00 pm
by AdrianLapaj
I'm looking for some example code how to detect two or more CPUs and how to manage them

Re: more than one CPU

Posted: Thu Sep 29, 2005 11:00 pm
by Osbios
SMP (Symmetric Multiprocessing)
But the CPU need a LAPIC (all CPUs after K5. Damn K5 with his RISC core :/ )
And the board a APIC (is this thing on the motherboard?)

Some Wiki Info: http://en.wikipedia.org/wiki/Symmetric_multiprocessing

Some links on 2cpu:
http://www.2cpu.com/articles/75_1.html

And the Intel specification: http://developer.intel.com/design/penti ... 201606.pdf

Have fun!

Re: more than one CPU

Posted: Sun Oct 02, 2005 11:00 pm
by JAAman
iirc the APIC is actually on the CPU not the MB

DEFINATLY the the intel docs!! there is no greater resource, nor better friend to the OSDever than the intel docs!!

volume 1:Basic Architecture
ftp://download.intel.com/design/Pentium ... 366517.pdf

volume 2a:Instruction Set Reference A-M
ftp://download.intel.com/design/Pentium ... 366617.pdf

volume 2b:Instruction Set Reference N-Z
ftp://download.intel.com/design/Pentium ... 366717.pdf

volume 3:System Programing Guide (this is the MOST important one)
ftp://download.intel.com/design/Pentium ... 366817.pdf

volume 3 should have all the information you need on multiprocessor startup (including detection and use of hyperthreading and dual core)



had to say something -- I don't know why nobody ever tells people about the manuals-there free and they are designed specifically for this use

Re: more than one CPU

Posted: Tue Oct 04, 2005 11:00 pm
by Brendan
Hi,
JAAman wrote:iirc the APIC is actually on the CPU not the MB
Not really. For Pentium and later Intel CPUs there's a local APIC built into the CPU (which the BIOS disables during boot for most single-CPU computers). For older CPUs (80486) the local APIC is a seperate chip on the motherboard, that isn't included on single-CPU motherboards.

Then there's one or more IO APIC's on the motherboard (the IO APIC is a replacement for the PIC chip - the PIC chip is crap for multi-CPU).
JAAman wrote:DEFINATLY the the intel docs!! there is no greater resource, nor better friend to the OSDever than the intel docs!!
Of course, but you'd need the right Intel docs (although there are also 3 chapters in the system programming guide that are relevant). Try this link:

http://www.intel.com/design/pentium/datashts/242016.htm

This link is for Intel's "Multi-processor Specification", which explains how to detect and initialize multi-CPU systems.

Unfortunately, Intel's MP Specification is being replaced by ACPI, so you might want the ACPI standard/s too.


Cheers,

Brendan