Sure, ConvertMemoryPageAttributes() can handle this. Will remove the 
"mXdSupported" check there in next version patch. 

Thanks,
Dun
-----Original Message-----
From: Ni, Ray <ray...@intel.com> 
Sent: Friday, June 2, 2023 11:55 AM
To: devel@edk2.groups.io; Tan, Dun <dun....@intel.com>
Cc: Dong, Eric <eric.d...@intel.com>; Kumar, Rahul R <rahul.r.ku...@intel.com>; 
Gerd Hoffmann <kra...@redhat.com>
Subject: RE: [edk2-devel] [Patch V4 14/15] UefiCpuPkg: Refinement to smm 
runtime InitPaging() code

> +  } else {
> +    MemoryAttrMask = EFI_MEMORY_XP;
> +    for (Index = 0; Index < mSmmCpuSmramRangeCount; Index++) {
> +      Base = mSmmCpuSmramRanges[Index].CpuStart;
> +      if ((Base > PreviousAddress) && mXdSupported) {

Is "mXdSupported" check really needed? But you didn't add that check for the 
last remaining range.
ConvertMemoryPageAttributes() can handle the case when XD is not supported by 
CPU.

 



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


Reply via email to