<p>Laszlo,
Do you think that another API is also needed: GetPhysicalAddressWidth() that returns number 36/52?
physical address width is needed by (besides those that rely on the width for mask calculation):
  UefiCpuPkg\CpuMpPei\CpuPaging.c
  UefiCpuPkg\PiSmmCpuDxeSmm\X64\PageTbl.c
  MdeModulePkg\Core\DxeIplPeim\X64\VirtualMemory.c
  MdeModulePkg\Universal\Acpi\S3SaveStateDxe\AcpiS3ContextSave.c
  MdeModulePkg\Universal\CapsulePei\UefiCapsule.c
  MdePkg\Library\SmmIoLib\SmmIoLib.c
  OvmfPkg\XenPlatformPei\MemDetect.c
  UefiCpuPkg\Universal\Acpi\S3Resume2Pei\S3Resume.c
  UefiPayloadPkg\UefiPayloadEntry\X64\VirtualMemory.c</p>

<p>GetPhysicalAddressMask() can call GetPhysicalAddressWidth().</p>

<p>Since it's a large-scale change but the SMM high MMIO access bug is critical/urgent, I prefer to firstly push this bug fix change and then work on the new APIs.</p>

<p><a href="https://bugzilla.tianocore.org/show_bug.cgi?id=3394" target="_blank">https://bugzilla.tianocore.org/show_bug.cgi?id=3394</a> was submitted to capture this.</p>


 <div width="1" style="color:white;clear:both">_._,_._,_</div> <hr>   Groups.io Links:<p>   You receive all messages sent to this group.    <p> <a target="_blank" href="https://edk2.groups.io/g/devel/message/75134">View/Reply Online (#75134)</a> |    |  <a target="_blank" href="https://groups.io/mt/82765279/1813853">Mute This Topic</a>  | <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>    <a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> | <a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |  <a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>  [edk2-devel-archive@redhat.com]<br> <div width="1" style="color:white;clear:both">_._,_._,_</div>