Linux x86/x86_64 Will Now Always Reserve The First 1MB Of RAM - Phoronix:
The Linux x86/x86_64 kernel code already had logic in place for reserving portions of the first 1MB of RAM to avoid the BIOS or kernel potentially clobbering that space among other reasons while now Linux 5.13 is doing away with that "wankery" and will just unconditionally always reserve the first 1MB of RAM.
[...] The motivation now for Linux 5.13 in getting that 1MB unconditional reservation in place for Linux x86/x86_64 stems from a bug report around an AMD Ryzen system being unbootable on Linux 5.13 since the change to consolidate their early memory reservations handling. Just unconditionally doing the first 1MB makes things much simpler to handle.
The change was sent in this morning as part of x86/urgent. "Do away with all the wankery of reserving X amount of memory in the first megabyte to prevent BIOS corrupting it and simply and unconditionally reserve the whole first megabyte."
no more wankery
(Score: 3, Interesting) by Anonymous Coward on Sunday June 06 2021, @06:35PM (1 child)
Do you have a source for documentation which definitively states how to calculate at runtime how much memory to reserve? AMD and Intel are both notorious for withholding processor documentation for low level functionality. Just ask the coreboot project.
(Score: 5, Interesting) by Anonymous Coward on Sunday June 06 2021, @07:21PM
It's not a processor problem, the problem is EFI runtime services, out-of-band service processors and trusted platform insecurities. Looking at the processor only, it boots with the interrupt descriptor table at 0x00, other than that no memory is unavailable to the operating system (technically, since all interrupts are masked at bootup, even the memory at 0x00 is usable).
But when you have other services running on a PC that can access main memory without going through the OS, all bets are off. In ancient times this included BIOS and VESA memory stores, DMA transfers before IOMMU, and any other peripheral processing offload. The subversion of the OS continued with Intel's trusted computing platform, the SMM extensions, and the idiocy that is EFI runtime services. And let's not even consider that coprocessor running Minix alongside your OS...