News for hackers. Stuff that matters.
Re:Booting Modern Intel CPUs by usr1106 on Monday April 17, 2023 @01:46AM (#35597208)
Use the cache as RAM. So I guess you could run a small Linux system just in cache without any RAM?

Why? As a fun project with some old motherboard for example :)

Re:Booting Modern Intel CPUs by JoshTriplett on Monday April 17, 2023 @01:47AM (#35597213)
With a fair bit of effort; notably, DMA and IOMMUs probably won't work, and most modern devices don't really support PIO. You might be able to boot a really simple environment that runs out of an initramfs though. It's also entirely not obvious to what degree you can use the paging system.

It'd likely be a substantial effort to port Linux.

Re:Booting Modern Intel CPUs by usr1106 on Monday April 17, 2023 @01:56AM (#35597254)
Sure, I would not expect to do any advanced IO. But right, probably there is no serial console really close to the CPU either, this is not a Raspberry PI. No idea what signals could be used for that.

Page tables I am not sure either. Could you still do it like in Linux 1.0? No idea what things looked like then, but I assume much less dedicated hardware support.

Re:Booting Modern Intel CPUs by JoshTriplett on Monday April 17, 2023 @03:30AM (#35597736)
> probably there is no serial console really close to the CPU either

outb to 0x3f8 might work.

I know there were once versions of Linux that supported running without an MMU. Those versions, with very limited hardware support, might work in this mode.

Re:Booting Modern Intel CPUs by mschuster91 on Monday April 17, 2023 @04:14AM (#35598030)
Re:Booting Modern Intel CPUs by usr1106 on Monday April 17, 2023 @02:05AM (#35597294)
Substantial effort I don't doubt. First probably years of learning how things work under the hood for most normal mortals.
Re:Booting Modern Intel CPUs by wtallis on Monday April 17, 2023 @02:02AM (#35597282)
Hasn't Intel supported DMA into L3 cache for something like a decade now?
Re:Booting Modern Intel CPUs by usr1106 on Monday April 17, 2023 @02:07AM (#35597301)
Right, I did not specify what L ;) And the original article did not mention either.
Re:Booting Modern Intel CPUs by adrian_b on Monday April 17, 2023 @04:35AM (#35598162)
It is supported on true Xeon systems.

I believe that it is not supported in Core CPUs, not even in those of them which were branded as Xeon E or Xeon W.

Re:Booting Modern Intel CPUs by lamp987 on Monday April 17, 2023 @02:05AM (#35597297)
DMA on x86 does update contents of CPU caches.
Re:Booting Modern Intel CPUs by JoshTriplett on Monday April 17, 2023 @03:30AM (#35597738)
Yes, it does, but that doesn't mean the hardware necessarily supports doing it without a memory controller.
Re:Booting Modern Intel CPUs by Klinky on Monday April 17, 2023 @03:41AM (#35597814)
With the some of the new AMD Epyc CPUs having over 1GB of L3 cache, you could run a pretty full-featured Linux distro+ app entirely in cache.
Re:Booting Modern Intel CPUs by undersuit on Monday April 17, 2023 @02:01PM (#35604236)
If anyone can verify that Cache as RAM actually works on AMD though or explain how AMD boots without it that would be great:

>Cache-as-RAM (CAR) is no longer a supportable feature in AMD hardware.

https://git.furworks.de/coreboot-mirror/coreboot/commit/a245...

Re:Booting Modern Intel CPUs by mjg59 on Monday April 17, 2023 @03:02PM (#35605021)
The PSP sets up the memory controller before the x86 cores are started. It's not implausible that the PSP has some sort of cache as RAM stage, but that's before Coreboot starts.
Re:Booting Modern Intel CPUs by layer8 on Monday April 17, 2023 @03:23PM (#35605271)
For a moment I was confused that the PlayStation Portable would have x86 cores.