Jiaxin,
Let's keep using 48 or 57.
We can use separate patch to clean all existing code to use 47 and 56.

Thanks,
Ray

> -----Original Message-----
> From: Wu, Jiaxin <jiaxin...@intel.com>
> Sent: Thursday, May 11, 2023 1:08 PM
> To: devel@edk2.groups.io; kra...@redhat.com; Ni, Ray <ray...@intel.com>
> Cc: Dong, Eric <eric.d...@intel.com>; Zeng, Star <star.z...@intel.com>;
> Kumar, Rahul R <rahul.r.ku...@intel.com>
> Subject: RE: [edk2-devel] [PATCH v1 1/3] UefiCpuPkg/SecCore: Migrate page
> table to permanent memory
> 
> What's your comments to the existing code logic for the PhysicalAddressBits in
> the CreateIdentityMappingPageTables()? Looks all doesn't consider the  sign-
> extended case? is it reasonable create the paging but not used? All system 
> with
> long mode are sign-extended?
> 
> //
>   // IA-32e paging translates 48-bit linear addresses to 52-bit physical 
> addresses
>   //  when 5-Level Paging is disabled,
>   //  due to either unsupported by HW, or disabled by PCD.
>   //
>   ASSERT (PhysicalAddressBits <= 52);
>   if (!Page5LevelSupport && (PhysicalAddressBits > 48)) {
>     PhysicalAddressBits = 48;
>   }
> 
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Gerd
> > Hoffmann
> > Sent: Wednesday, May 10, 2023 3:48 PM
> > To: devel@edk2.groups.io; Ni, Ray <ray...@intel.com>
> > Cc: Wu, Jiaxin <jiaxin...@intel.com>; Dong, Eric <eric.d...@intel.com>;
> Zeng,
> > Star <star.z...@intel.com>; Kumar, Rahul R <rahul.r.ku...@intel.com>
> > Subject: Re: [edk2-devel] [PATCH v1 1/3] UefiCpuPkg/SecCore: Migrate page
> > table to permanent memory
> >
> > On Wed, May 10, 2023 at 02:48:52AM +0000, Ni, Ray wrote:
> > > Gerd,
> > > My understanding is that when code dereferences memory address, the code
> > itself is responsible for
> > > supplying the sign-extended linear address.
> > > The page table creation logic still maps the entire linear memory space
> > supported by the CPU.
> > >
> > > Why do you think covering the half of the space is better?
> >
> > edk2 boot services operate on the assumption that everything is identity
> > mapped, only runtime services know the concept of virtual addresses.
> >
> > The lower half of the address space can be identity-mapped (virtual
> > address == physical address).  The upper half can not, so I think it's
> > better for efi boot services to restrict themself to the lower half.
> >
> > take care,
> >   Gerd
> >
> >
> >
> > 
> >



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


Reply via email to