> > > +    ASSERT (SizeOfMemorySpace <= 52);
> > > +
> > >      //
> > > -    // Calculate the table entries of PML4E and PDPTE.
> > > +    // Calculate the table entries of PML5E, PML4E and PDPTE.
> > >      //
> > >      NumberOfPml5Entries = 1;
> > > -    if (SizeOfMemorySpace > 48) {
> > > +    if (Enable5LevelPaging && (SizeOfMemorySpace > 48)) {
> > >        NumberOfPml5Entries = (UINTN)LShiftU64 (1, SizeOfMemorySpace - 48);
> > > -      SizeOfMemorySpace   = 48;
> > >      }
> > >
> > > +    SizeOfMemorySpace   = SizeOfMemorySpace > 48 ? 48 : 
> > > SizeOfMemorySpace;
> 
> if (SizeOfMemorySpace > 48) {
>     if (Enable5LevelPaging) {
>          NumberOfPml5Entries = ...
>     }
>     SizeOfMemorySpace = 48
> }
> 
> That is a much more readable version.

I had the same thought. New version is consistent with the logic below.


> 
> The only effect I can see is that this avoids creating page tables which
> would not be used anyway.
> 
> Can you explain where the hangs mentioned in the subject line are coming
> from and why the patch fixes them?


> 
> take care,
>   Gerd
> 
> 
> 
> 
> 



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


Reply via email to