On Fri, Jan 26, 2024 at 02:49:13AM +0000, Liu, Zhiguang wrote:
> Hi Gerd,
> For the PCD, it current has below usage.
> 1) for 32-bit PEI and 64-bit DXE, this PCD will decide if use 5 level paging 
> in DXE.

Yes.  That is the only real use of the PCD today.  I expect the days of
32bit BEI / 64bit DXE firmware builds are numbered though.  There has
been a steady stream of patches from intel to push edk2 to full 64-bit
support, and there also is the x86s proposal[1].

> 2) for 64-bit PEI and DXE, reset vector chooses if use 5 level paging
> in early phase. But BIOS can still switch paging mode based on this
> PCD later.

I don't think edk2 implements the paging mode switch.  It's also not
that easy to do because the paging mode can only be switched with paging
turned off (which implies long mode turned off too).

> Since this PCD can be dynamic, we can let user to choose different
> paging mode in BIOS setup menu, and use this paging mode on reboot.

Is there any (pure 64-bit) firmware actually implementing this today?

> You may want to use one BIOS to support machine with different la57 
> capability, I assume two possible ways:
> 1) make the PCD as dynamic, and set it based on la57 capability.

You mean la57 state I assume (i.e. cr4.la57)?

i.e. for the 32-PEI / 64-DXE builds the PCD decides which mode will be
used, and for pure 64-bit builds the PCD will be set according to the
mode the CPU is running in?

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114609): https://edk2.groups.io/g/devel/message/114609
Mute This Topic: https://groups.io/mt/103950404/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to