From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [edk2-devel] [PATCH] UefiCpuPkg/PiSmmCpu: Remove hardcode 48 address size limitation To: Laszlo Ersek ,devel@edk2.groups.io From: "Ni, Ray" X-Originating-Location: CN (192.55.46.54) X-Originating-Platform: Windows Chrome 90 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Fri, 14 May 2021 17:04:22 -0700 References: In-Reply-To: Message-ID: <12259.1621037062277250978@groups.io> Content-Type: multipart/alternative; boundary="OVhwNSoHyOV2mwPT9dW4" --OVhwNSoHyOV2mwPT9dW4 Content-Type: text/plain; charset="utf-8"; markup=markdown Content-Transfer-Encoding: quoted-printable Laszlo, Do you think that another API is also needed: GetPhysicalAddressWidth() th= at 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 GetPhysicalAddressMask() can call GetPhysicalAddressWidth(). Since it's a large-scale change but the SMM high MMIO access bug is critic= al/urgent, I prefer to firstly push this bug fix change and then work on th= e new APIs. https://bugzilla.tianocore.org/show_bug.cgi?id=3D3394 was submitted to cap= ture this. --OVhwNSoHyOV2mwPT9dW4 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Laszlo, Do you think that another API is also needed: GetPhysicalAddressWidth() th= at 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

GetPhysicalAddressMask() can call GetPhysicalAddressWidth().

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

https://bugzilla.tianocore.org/show_bug.cgi?id=3D3394 was = submitted to capture this.

--OVhwNSoHyOV2mwPT9dW4--