more than one CPU

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
AdrianLapaj
Posts: 2
Joined: Wed Sep 07, 2005 11:00 pm

more than one CPU

Post by AdrianLapaj »

I'm looking for some example code how to detect two or more CPUs and how to manage them
Osbios
Member
Member
Posts: 116
Joined: Fri Jun 10, 2005 11:00 pm

Re: more than one CPU

Post 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!
dw 0xAA55
User avatar
JAAman
Member
Member
Posts: 879
Joined: Wed Oct 27, 2004 11:00 pm
Location: WA

Re: more than one CPU

Post 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
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: more than one CPU

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Post Reply