3 ms·
> That would be, all kernels. They all program the physical memory controller to suit their needs. None of the operating system kernels I know of (including Li
by cesarb 6y ago
> That would be, all kernels. They all program the physical memory controller to suit their needs.
None of the operating system kernels I know of (including Linux, all the BSDs, and Microsoft Windows) program the physical memory controller; it's always done by the platform firmware while running from ROM or cache-as-RAM, before the operating system kernel is loaded into RAM.
- JoeAltmaier 6y agoLinux: https://www.kernel.org/doc/html/latest/driver-api/memory-devices/index.html https://www.kernel.org/doc/html/latest/driver-api/memory-dev... Windows is harder to find (not open source) but issue tracking indicates it has one: https://www.intel.com/content/www/us/en/support/articles/000023446/software/chipset-software.html https://www.intel.com/content/www/us/en/support/articles/000... Of course the bootloaders all set up RAM. They have to, to load the operating system. Then the OS sets it up again, to suit itself.
- cesarb 6y agoAccording to https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/memory/Kconfig?h=v5.9 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin... these drivers are only used in some embedded systems. I looked at the kernel configuration for the distribution I'm using (/boot/config-`uname -r`), and CONFIG_MEMORY is not set, so none of these drivers are even available. That is: at least for desktop Linux, the firmware (not the bootloader) is the only one which sets up the physical memory controller (and actually, the only one which knows how to set up the physical memory controller; according to https://en.wikipedia.org/wiki/Coreboot#Initializing_DRAM https://en.wikipedia.org/wiki/Coreboot#Initializing_DRAM there's no public information on how to do so for modern desktop platforms).
- JoeAltmaier 6y agoThe critical issue with such design choices is, how do you fix/update such code? If there's no driver and no kernel module, it gets knarly (and beyond the average consumer's skills).
- JoeAltmaier 6y agobtw I work entirely in the embedded domain, thus my view on the subject.