RE: [GIT PULL] x86/urgent for v5.13-rc5
From: Michael Kelley (LINUX)
Date: Thu Mar 02 2023 - 16:56:18 EST
From: Andy Lutomirski <luto@xxxxxxxxxx> Sent: Thursday, March 2, 2023 8:14 AM
>
> On Tue, Jun 8, 2021, at 10:53 AM, Michael Kelley wrote:
> > From: James Morris <jmorris@xxxxxxxxx> Sent: Monday, June 7, 2021 11:47 AM
> >>
> >> On Sun, 6 Jun 2021, Sasha Levin wrote:
> >>
> >> > >
> >> > >Let's see if Sasha can dig out something... CCed.
> >> > >
> >> > >@Sasha, can you figure out who we can talk to whether Windoze reserves
> >> > >the first megabyte of memory unconditionally?
> >> >
> >> > That's a great question, but I can't help there anymore :)
> >> >
> >> > Adding James Morris...
> >>
> >> Adding Michael Kelley.
> >>
> >
> > 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.
>
> Sorry to dredge up old skeletons. Do you know *where* Windows allocates that one
> page used for real mode startup? The current code in Linux has some bugs allocating
> that page, and it would be nice to sort it out.
The Windows folks tell me that the single page is typically allocated at physical address
0x1000. They don't allocate physical page 0, so they scan upward starting at physical
page 1 and use the first page that is not reserved by firmware. That's usually page 1.
Michael