OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Mar 29, 2024 5:31 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Memory and CPUs on PCI?
PostPosted: Tue May 09, 2023 7:17 am 
Offline

Joined: Thu Jul 14, 2022 10:46 am
Posts: 24
Location: Canada
Hey all! In our PCI docs, https://wiki.osdev.org/PCI we have RAM (class 5, subclass 0) and Processors (class 0xB) listed as attachable devices. Does that mean one could get a PCI-to-CPU-socket or PCI-to-DDR adapter? I checked online and i couldn't find anything of that sort...

Thanks in advance!


Top
 Profile  
 
 Post subject: Re: Memory and CPUs on PCI?
PostPosted: Tue May 09, 2023 9:02 am 
Offline
Member
Member
User avatar

Joined: Sun Feb 20, 2011 2:01 pm
Posts: 110
jaihsonk wrote:
Hey all! In our PCI docs, https://wiki.osdev.org/PCI we have RAM (class 5, subclass 0) and Processors (class 0xB) listed as attachable devices. Does that mean one could get a PCI-to-CPU-socket or PCI-to-DDR adapter? I checked online and i couldn't find anything of that sort...

Thanks in advance!

Yes, CPUs can be attatched by PCI. For a real world example, https://en.wikipedia.org/wiki/Xeon_Phi, or of course GPUs, although they show as a graphics card.

But as far as I can tell, this is used in the world of asymmetric coprocessing. Coprocessing was newfangled when PCI came in, so it was natural to try and design in some forward compatibility.

_________________
Whoever said you can't do OS development on Windows?
https://github.com/ChaiSoft/ChaiOS


Top
 Profile  
 
 Post subject: Re: Memory and CPUs on PCI?
PostPosted: Tue May 09, 2023 9:17 am 
Offline

Joined: Thu Jul 14, 2022 10:46 am
Posts: 24
Location: Canada
What about RAM?
Can I take out the regular CPU from my desktop, plug in the Xeon Phi (or another PCI CPU) and have that running by itself?
What should an OS do when it comes across a PCI CPU?


Top
 Profile  
 
 Post subject: Re: Memory and CPUs on PCI?
PostPosted: Tue May 09, 2023 10:07 am 
Offline

Joined: Thu Jul 14, 2022 10:46 am
Posts: 24
Location: Canada
Also, Can a PCI CPU and a regular CPU run simultaneously? If so, would that be considered a supercomputer?


Top
 Profile  
 
 Post subject: Re: Memory and CPUs on PCI?
PostPosted: Tue May 09, 2023 11:29 am 
Offline
Member
Member

Joined: Tue Apr 03, 2018 2:44 am
Posts: 402
jaihsonk wrote:
What about RAM?
Can I take out the regular CPU from my desktop, plug in the Xeon Phi (or another PCI CPU) and have that running by itself?


Probably not. PCs are designed to bootstrap using the main processor.

Some platforms do something similar though. The RaspberryPi, for example, is bootstrapped by the GPU, which then starts the "main" CPU(s) to run your OS. But this isn't the mainstream way of doing things, certainly on anything like a PC or similar machine.

But then this depends on where you draw the line. Some Intel chipsets contain a complete embedded computer, running a private copy of Minix OS, to run the Management Engine, completely seperately to the main CPU. I'm not sure if this Minix gets control before your main CPU is booted and is involved in booting the CPU, in a manner similar to the RPi.

This video might answer that (I've not watched it yet.)

jaihsonk wrote:
What should an OS do when it comes across a PCI CPU?


Absent a specific example, it's hard to say, other than to ignore the PCI card if the OS doesn't have a driver for it.


Top
 Profile  
 
 Post subject: Re: Memory and CPUs on PCI?
PostPosted: Tue May 09, 2023 11:41 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5104
jaihsonk wrote:
What about RAM?

PCI is old enough that class 0x05 may have originally been intended for RAM expansion cards, but nowadays it's only used as a way to access the chipset's memory controller.

As far as I know, no PCI RAM expansion cards exist.

jaihsonk wrote:
Can I take out the regular CPU from my desktop, plug in the Xeon Phi (or another PCI CPU) and have that running by itself?

No. A PCI CPU can't initialize the rest of the PC.

jaihsonk wrote:
What should an OS do when it comes across a PCI CPU?

Ask the user to send you documentation so you can write a driver for it. :wink:

jaihsonk wrote:
Also, Can a PCI CPU and a regular CPU run simultaneously?

Yes.

jaihsonk wrote:
If so, would that be considered a supercomputer?

No. Regular PC CPUs are already made of multiple smaller CPUs stuck together, so adding one more doesn't make that big of a difference.


Top
 Profile  
 
 Post subject: Re: Memory and CPUs on PCI?
PostPosted: Wed May 10, 2023 6:48 am 
Offline
Member
Member
User avatar

Joined: Sun Feb 20, 2011 2:01 pm
Posts: 110
Octocontrabass wrote:
jaihsonk wrote:
If so, would that be considered a supercomputer?

No. Regular PC CPUs are already made of multiple smaller CPUs stuck together, so adding one more doesn't make that big of a difference.

To be clear, a Xeon Phi can have 72 cores.

Consider a server board, the SUPERMICRO MBD-H8QG6+-F-O
Image
That'll take 4x 16-core AMD Opteron 6300s, for a total of 64 cores. Now add a Xeon Phi, or two. That's a lot of cores!

But this is still not supercomputer territory, not these days.

_________________
Whoever said you can't do OS development on Windows?
https://github.com/ChaiSoft/ChaiOS


Top
 Profile  
 
 Post subject: Re: Memory and CPUs on PCI?
PostPosted: Wed May 10, 2023 7:04 am 
Offline

Joined: Thu Jul 14, 2022 10:46 am
Posts: 24
Location: Canada
OK I had the old definition of a supercomputer as being 2+ processors working off the same memory.
Thanks for your help :)


Top
 Profile  
 
 Post subject: Re: Memory and CPUs on PCI?
PostPosted: Wed May 10, 2023 8:27 am 
Offline
Member
Member

Joined: Wed Oct 01, 2008 1:55 pm
Posts: 3192
bellezzasolo wrote:
Octocontrabass wrote:
jaihsonk wrote:
If so, would that be considered a supercomputer?

No. Regular PC CPUs are already made of multiple smaller CPUs stuck together, so adding one more doesn't make that big of a difference.

To be clear, a Xeon Phi can have 72 cores.

Consider a server board, the SUPERMICRO MBD-H8QG6+-F-O
Image
That'll take 4x 16-core AMD Opteron 6300s, for a total of 64 cores. Now add a Xeon Phi, or two. That's a lot of cores!

But this is still not supercomputer territory, not these days.


I want a motherboard like that for experimentation. :-)

When I actually researched for a new "super-computer", I looked at multi-socket motherboards, but in the end I concluded that the high cost didn't seem to correlate well with performance, so I built my system around a single 12-core AMD thread ripper CPU with 128 GB of memory instead.


Top
 Profile  
 
 Post subject: Re: Memory and CPUs on PCI?
PostPosted: Thu May 11, 2023 3:38 pm 
Offline

Joined: Thu Jul 14, 2022 10:46 am
Posts: 24
Location: Canada
I'm having a hard time understanding PCI. I'm not a fast learner and I'm not good with docs lol Does anyone have a good implementation I can study?

Which PCI slot does CONFIG_ADDRESS and CONFIG_DATA address/read from? Or am I talking to some PCI master controller?
Where can I read the PCI device structure from? Or is the structure composed of data from multiple ports?

Sorry if these are foolish questions, I understand things better when people and real examples (as opposed to documents) tell me how things work


Top
 Profile  
 
 Post subject: Re: Memory and CPUs on PCI?
PostPosted: Thu May 11, 2023 4:23 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5104
jaihsonk wrote:
Which PCI slot does CONFIG_ADDRESS and CONFIG_DATA address/read from? Or am I talking to some PCI master controller?

You're talking to "some PCI master controller" - it's called a PCI host bridge. You write an address to CONFIG_ADDRESS and the PCI host bridge connects that address to CONFIG_DATA for you to read and write. (The address selects the slot, among other things.)

jaihsonk wrote:
Where can I read the PCI device structure from? Or is the structure composed of data from multiple ports?

You read it from CONFIG_DATA.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group