It Turns Out Windows Unconditionally Reserves The First 1MB Of RAM, Linux Was Just Late To Do So

Written by Michael Larabel in Linux Kernel on 9 June 2021 at 03:00 AM EDT. 48 Comments
LINUX KERNEL
Sent in last weekend to the Linux 5.13 kernel was the change so Linux x86/x86_64 will always reserve the first 1MB of RAM in order to avoid corruption issues with some BIOS and frame-buffers sometimes fiddling with that lowest portion of system memory. While the thought was reserving that first 1MB unconditionally was a bit onerous and that perhaps Windows has some way of determining how much low memory area to reserve, it turns out Windows has been employing this same behavior for years.

While Linus Torvalds landed the change in Linux 5.13 to reserve that first 1MB of RAM on Linux x86/x86_64 systems, he did comment, "This seems a bit draconic. How does this work at all under Windows? There must be some windows knowledge about what the BIOS updates that we're not aware of. I've pulled it, but it does seem like something odd is going on."


Following much interest in the change, a Microsoft engineer was kind enough to check with the Windows team and did comment that in fact Windows has been unconditionally reserving the first 1MB of RAM on both Intel and AMD systems and they have been doing that for many years at this point. "I checked with the Windows team. Peter Anvin's statement from 11 years ago is true. On Intel and AMD processors, Windows unconditionally reserves the 1st megabyte of memory, minus one page used for real mode startup. This is done to work around BIOS bugs."

So indeed it looks like Linux will stick with this new behavior on their front for also reserving the first 1MB of RAM across x86/x86_64 systems to deal with buggy BIOS implementations.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week