From: "Ni, Ray" <ray.ni@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"pedro.falcato@gmail.com" <pedro.falcato@gmail.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>, Andrew Fish <afish@apple.com>,
"Kinney, Michael D" <michael.d.kinney@intel.com>,
Ard Biesheuvel <ardb@kernel.org>
Subject: Re: [edk2-devel] Side effects of enabling PML5 in EFI
Date: Thu, 11 May 2023 03:36:31 +0000 [thread overview]
Message-ID: <MN6PR11MB82448D757D311FC8948F51C28C749@MN6PR11MB8244.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CAKbZUD2yT9n3DeZ0qcUCjEe36GCxPUWdt1owcUsyF2hqvS+-sg@mail.gmail.com>
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Pedro
> Falcato
> Sent: Thursday, May 11, 2023 12:39 AM
> To: Ni, Ray <ray.ni@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>; devel@edk2.groups.io; Andrew Fish
> <afish@apple.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Ard
> Biesheuvel <ardb@kernel.org>
> Subject: Re: [edk2-devel] Side effects of enabling PML5 in EFI
>
> On Wed, May 10, 2023 at 10:34 AM Ni, Ray <ray.ni@intel.com> wrote:
> >
> > Firmware chooses to use 5-level paging when the platform using this firmware
> claims to boot 5-level paging OS only.
> >
> > Usually, firmware uses 4-level paging to keep maximum OS compability.
>
> Hi Ray,
>
> So, what happens if I don't enable LA57, have a gazillion TB of memory
> (such that I go over the 128TB 47-bit AS limit). Will EFI never try to
> access memory up there and page fault?
No. UEFI firmware on x86 doesn't try to create non-1:1 mapping page table to let
firmware code access these high physical addresses.
>
> What happens to the OS/bootloader? If it asks for memory up there (for
> KASLR, etc)? Does the memory map pre-reserve those upper regions of
> memory that are not accessible using 4-level paging?
That depends on how the EFI_HOB_CPU is produced from the firmware code.
The UEFI memory map data is from GCD database in DxeCore.
GCD database is built based on the physical address size value in EFI_HOB_CPU.
>
> I really fail to see the advantages of PML5 support in EFI fw at the
> moment, particularly as you can simply choose to start all your
> allocations lower down the memory map (where you can indeed access
> things), reserve the upper, inaccessible bits, and things Should Work?
> Unless you're keeping some MMIO ranges up there, in which case, the
> solution is probably hard.
I agree that 5-level paging is only needed when very high MMIO is needed for
silicon init.
>
> --
> Pedro
>
>
>
>
next prev parent reply other threads:[~2023-05-11 3:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-09 17:24 Side effects of enabling PML5 in EFI Pedro Falcato
2023-05-10 9:17 ` [edk2-devel] " Gerd Hoffmann
2023-05-10 9:34 ` Ni, Ray
2023-05-10 16:38 ` Pedro Falcato
2023-05-11 3:36 ` Ni, Ray [this message]
2023-05-10 16:31 ` Pedro Falcato
2023-05-10 9:41 ` Ard Biesheuvel
2023-05-10 16:51 ` Pedro Falcato
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MN6PR11MB82448D757D311FC8948F51C28C749@MN6PR11MB8244.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox