Re: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib

2024-04-18 Thread Wu, Jiaxin
Oh, sorry, I missed the that email. If so, that's great! Thanks Ray & Abner & Abdul. From: Chang, Abner Sent: Friday, April 19, 2024 11:47 AM To: Ni, Ray ; Wu, Jiaxin ; devel@edk2.groups.io Cc: Zeng, Star ; Gerd Hoffmann ; Kumar, Rahul R ; Dong, Guo ; Rhodes, Sean ; Lu, James ; Guo, Gua ;

Re: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib

2024-04-18 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Right, Abdul's RB is sufficient! Thanks Abner From: Ni, Ray Sent: Friday, April 19, 2024 11:35:17 AM To: Wu, Jiaxin ; devel@edk2.groups.io Cc: Zeng, Star ; Gerd Hoffmann ; Kumar, Rahul R ; Dong, Guo ; Rhodes, Sean ; Lu,

Re: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib

2024-04-18 Thread Ni, Ray
Jiaxin, I see Abdul from AMD has given R-B. I assume that's sufficient for merging this patch. Thanks, Ray From: Wu, Jiaxin Sent: Thursday, April 18, 2024 16:03 To: devel@edk2.groups.io ; Wu, Jiaxin Cc: Ni, Ray ; Zeng, Star ; Gerd Hoffmann ; Kumar, Rahul R ;

Re: [edk2-devel] [PATCH v3 13/13] UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic

2024-04-18 Thread Wu, Jiaxin
Ok, thanks Ray, I will follow the change in next version. From: Ni, Ray Sent: Thursday, April 18, 2024 4:15 PM To: Wu, Jiaxin ; devel@edk2.groups.io Cc: Zeng, Star ; Gerd Hoffmann ; Kumar, Rahul R Subject: Re: [PATCH v3 13/13] UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic + //

[edk2-devel] [PATCH V2 1/1] OvmfPkg/IntelTdx: Update TDVF README

2024-04-18 Thread Min Xu
From: Min M Xu BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4756 There are below updates in this patch: 1. Rename README to README.md so that it can be show as markdown document. 2. Update some information about TDVF. 2. Fix some typo. Cc: Jiewen Yao Cc: Gerd Hoffmann Signed-off-by:

Re: [edk2-devel] [PATCH V1 1/1] OvmfPkg/IntelTdx: Update TDVF README

2024-04-18 Thread Min Xu
On Thursday, April 18, 2024 7:50 PM, Gerd Hoffmann wrote: > > > -The Intel? TDX Virtual Firmware Design Guide is at > > +The Intel TDX Virtual Firmware Design Guide is at > > '' looks more like HTML than markdown. Thanks for reminder. It is fixed in v2. > > text updates look fine to me. >

Re: [edk2-devel] [edk2-libc Patch 2 1/1] ek2-libc: wrmsr function available in edk2module is not working as expected

2024-04-18 Thread Michael D Kinney
The use of BitFieldOr64() is really only required when updating a portion of a 32-bit or 64-bit value that are not aligned on a 32-bit boundary and do not have a 32-bit aligned width. Since this use case is setting the lower 32-bits, simpler logic should be used. data = LShiftU64(vedx, 32) |

Re: [edk2-devel] [PATCH v3 5/6] target/arm: Do memory type alignment check when translation disabled

2024-04-18 Thread Jonathan Cameron via groups.io
On Thu, 18 Apr 2024 09:15:55 +0100 Jonathan Cameron via wrote: > On Wed, 17 Apr 2024 13:07:35 -0700 > Richard Henderson wrote: > > > On 4/16/24 08:11, Jonathan Cameron wrote: > > > On Fri, 1 Mar 2024 10:41:09 -1000 > > > Richard Henderson wrote: > > > > > >> If translation is

Re: [edk2-devel] [PATCH 6/6] OvmfPkg: Use newly defined Unaccepted Memory Type

2024-04-18 Thread Sachin Ganesh via groups.io
Hi Jiewen, The other patches are as follows. They are all related to UEFI 2.10 and PI 1.8 Specification updates: 1) MdePkg: Add definition for NVMe Over Fabric Device Path -

Re: [edk2-devel] [PATCH] OvmfPkg: Harden #VC instruction emulation somewhat (CVE-2024-25742)

2024-04-18 Thread Peter Gonda via groups.io
On Thu, Apr 18, 2024 at 9:39 AM Adam Dunlap wrote: > > On Thu, Apr 18, 2024 at 5:15 AM Gerd Hoffmann wrote: > > > > On Wed, Apr 17, 2024 at 09:54:00AM -0700, Adam Dunlap via groups.io wrote: > > > + UINT8 OpCode; > > > > The linux kernel patch uses "unsigned int opcode" and apparently > >

Re: [edk2-devel] [PATCH] OvmfPkg: Harden #VC instruction emulation somewhat (CVE-2024-25742)

2024-04-18 Thread Adam Dunlap via groups.io
On Thu, Apr 18, 2024 at 5:15 AM Gerd Hoffmann wrote: > > On Wed, Apr 17, 2024 at 09:54:00AM -0700, Adam Dunlap via groups.io wrote: > > + UINT8 OpCode; > > The linux kernel patch uses "unsigned int opcode" and apparently > checks more than just the first byte for multi-byte opcodes. Why > do

Re: [edk2-devel] MdeModulePkg: Fix MAT SplitRecord() Logic introduce one bug and will cause SUT reset when boot to windows

2024-04-18 Thread Oliver Smith-Denny
On 4/18/2024 6:56 AM, Huang, Yanbo wrote: The PCD PcdPlatformEfiRtCodeMemorySize is used in https://github.com/tianocore/edk2-platforms/blob/master/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c This PCD seems defined the size allocated for run time services

Re: [edk2-devel] [PATCH 0/4] OvmfPkg: Add VirtHstiDxe driver

2024-04-18 Thread Yao, Jiewen
1) Yes, I highly recommend remove Q35 keyword. 2) Got it. I think we had better add such info in the code as comment as well. Thank you Yao, Jiewen > -Original Message- > From: kra...@redhat.com > Sent: Thursday, April 18, 2024 7:45 PM > To: Yao, Jiewen > Cc: devel@edk2.groups.io; Ard

Re: [edk2-devel] MdeModulePkg: Fix MAT SplitRecord() Logic introduce one bug and will cause SUT reset when boot to windows

2024-04-18 Thread Huang, Yanbo
The PCD PcdPlatformEfiRtCodeMemorySize is used in https://github.com/tianocore/edk2-platforms/blob/master/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c This PCD seems defined the size allocated for run time services code, and the similar PCD is

Re: [edk2-devel] [PATCH 6/6] OvmfPkg: Use newly defined Unaccepted Memory Type

2024-04-18 Thread Yao, Jiewen
Ah. That is good. I did not realize they are in one set. For this one, reviewed-by: Jiewen Yao > -Original Message- > From: Sachin Ganesh > Sent: Thursday, April 18, 2024 9:32 PM > To: Yao, Jiewen ; devel@edk2.groups.io > Cc: gaolim...@byosoft.com.cn; ardb+tianoc...@kernel.org;

Re: [edk2-devel] MdeModulePkg: Fix MAT SplitRecord() Logic introduce one bug and will cause SUT reset when boot to windows

2024-04-18 Thread Ard Biesheuvel
Hello Dandan, On Thu, 18 Apr 2024 at 15:03, Dandan Bi wrote: > > Hi Taylor, > > > > >>Extra EfiRuntimeServicesCode regions which aren't part of loaded runtime > >>images. > > This may be related to the original size of EfiRuntimeServicesCode in memory > map, and the size can be configured via

Re: [edk2-devel] MdeModulePkg: Fix MAT SplitRecord() Logic introduce one bug and will cause SUT reset when boot to windows

2024-04-18 Thread Dandan Bi
Hi Taylor, >>Extra EfiRuntimeServicesCode regions which aren't part of loaded runtime >>images. This may be related to the original size of EfiRuntimeServicesCode in memory map, and the size can be configured via PcdPlatformEfiRtCodeMemorySize. If the size is large enough to hold all the

[edk2-devel] [edk2-libc Patch 2 1/1] ek2-libc: wrmsr function available in edk2module is not working as expected

2024-04-18 Thread Jayaprakash, N
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4745 This commit fixes the issue reported in the BZ4745. The wrmsr was always writing 0 to the higher 32 bits of the msr register. This was due to a logical flaw in the code, where the input variable of type unsigned int was left shitted by 32

[edk2-devel] [edk2-libc Patch 2 0/1] wrmsr function is not working as expected.

2024-04-18 Thread Jayaprakash, N
The wrmsr function always writes 0s to the higher 32 bits of the msr register. This PR fixes the this issue reported through the BZ4745. Jayaprakash N (1): ek2-libc: wrmsr function available in edk2module is not working as expected .../Python/Python-3.6.8/PyMod-3.6.8/Modules/edk2module.c

[edk2-devel] [edk2-redfish-client][PATCH] RedfishClientPkg: introduce RedfishBootstrapAccountDxe

2024-04-18 Thread Nickle Wang via groups.io
-Introduce RedfishBootstrapAccountDxe to delete bootstrap account from /redfish/v1/AccountService/Accounts after BIOS finished all Redfish jobs. The bootstrap account won't be available to other application. So deleting bootstrap account helps to release resource at BMC. - After bootstrap account

Re: [edk2-devel] [PATCH] OvmfPkg: Harden #VC instruction emulation somewhat (CVE-2024-25742)

2024-04-18 Thread Gerd Hoffmann
On Wed, Apr 17, 2024 at 09:54:00AM -0700, Adam Dunlap via groups.io wrote: > Ensure that when a #VC exception happens, the instruction at the > instruction pointer matches the instruction that is expected given the > error code. This is to mitigate the ahoi WeSee attack [1] that could > allow

Re: [edk2-devel] [PATCH V1 1/1] OvmfPkg/IntelTdx: Update TDVF README

2024-04-18 Thread Gerd Hoffmann
Hi, > -The Intel? TDX Virtual Firmware Design Guide is at > +The Intel TDX Virtual Firmware Design Guide is at '' looks more like HTML than markdown. text updates look fine to me. take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group.

Re: [edk2-devel] [PATCH 0/4] OvmfPkg: Add VirtHstiDxe driver

2024-04-18 Thread Gerd Hoffmann
On Wed, Apr 17, 2024 at 01:20:57PM +, Yao, Jiewen wrote: > That is good start. The SMRAM lock and Flash lock seem good to me. > > Comment: > 1) Do we really need to add "Q35" for the policy? > #define VIRT_HSTI_BYTE0_Q35_SMM_SMRAM_LOCK BIT0 > #define

Re: [edk2-devel] [PATCH 0/4] OvmfPkg: Add VirtHstiDxe driver

2024-04-18 Thread Gerd Hoffmann
On Wed, Apr 17, 2024 at 01:38:20PM +0200, Ard Biesheuvel wrote: > On Wed, 17 Apr 2024 at 10:18, Gerd Hoffmann wrote: > > > > On Fri, Mar 22, 2024 at 03:27:31PM +0100, Gerd Hoffmann wrote: > > > > > > > > > Gerd Hoffmann (2): > > > OvmfPkg/VirtHstiDxe: add varstore flash check > > >

Re: [edk2-devel] [PATCH v4 00/10] Add DeviceSecurity feature based on PFP 1.06 spec

2024-04-18 Thread Wenxing Hou
Dear EDKII reviewers: Thank you for your previous review of this patch set. Currently, five patches have been reviewed by. But there are five patches need review. Patch1: MdePkg: Add SPDM1.2 support. Patch2: MdePkg: Add TCG PFP 1.06 support. Patch4:

[edk2-devel] [PATCH v4 07/10] .pytool/CISettings.py: add libspdm submodule.

2024-04-18 Thread Wenxing Hou
Add DeviceSecurity submodule libspdm. Cc: Sean Brogan Cc: Joey Vagedes Cc: Michael D Kinney Cc: Liming Gao Signed-off-by: Wenxing Hou Reviewed-by: Joey Vagedes --- .pytool/CISettings.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.pytool/CISettings.py b/.pytool/CISettings.py

[edk2-devel] [PATCH v4 10/10] ReadMe.rst: Add libspdm submodule license

2024-04-18 Thread Wenxing Hou
This patch add libspdm submodule license. Cc: Andrew Fish Cc: Leif Lindholm Cc: Michael D Kinney Signed-off-by: Wenxing Hou --- ReadMe.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/ReadMe.rst b/ReadMe.rst index 808ccd37af..cfd522fdbd 100644 --- a/ReadMe.rst +++ b/ReadMe.rst @@

[edk2-devel] [PATCH v4 09/10] SecurityPkg: Add libspdm submodule

2024-04-18 Thread Wenxing Hou
libspdm is submodule to support DeviceSecurity feature. Cc: Jiewen Yao Signed-off-by: Wenxing Hou Reviewed-by: Jiewen Yao --- SecurityPkg/DeviceSecurity/SpdmLib/libspdm | 1 + 1 file changed, 1 insertion(+) create mode 16 SecurityPkg/DeviceSecurity/SpdmLib/libspdm diff --git

[edk2-devel] [PATCH v4 08/10] .gitmodule: Add libspdm submodule for EDKII

2024-04-18 Thread Wenxing Hou
libspdm is submodule, which will be used in DeviceSecurity. Cc: Andrew Fish Cc: Michael D Kinney Cc: Michael D Kinney Cc: Jiewen Yao Signed-off-by: Wenxing Hou --- .gitmodules | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitmodules b/.gitmodules index 60d54b45eb..7f069abd3d

[edk2-devel] [PATCH v4 05/10] SecurityPkg: Add TCG PFP 1.06 support.

2024-04-18 Thread Wenxing Hou
Add new api Tpm2ExtendNvIndex. It is uesd in HashCompleteAndExtend when PcrIndex > MAX_PCR_INDEX. Cc: Jiewen Yao Cc: Rahul Kumar Signed-off-by: Wenxing Hou Reviewed-by: Jiewen Yao --- SecurityPkg/Include/Library/Tpm2CommandLib.h | 23 +++- .../HashLibBaseCryptoRouterDxe.c |

[edk2-devel] [PATCH v4 04/10] MdeModulePkg/Variable: Add TCG SPDM device measurement update

2024-04-18 Thread Wenxing Hou
Add EV_EFI_SPDM_DEVICE_POLICY support for MeasureVariable. Cc: Liming Gao Cc: Jiewen Yao Signed-off-by: Wenxing Hou --- MdeModulePkg/MdeModulePkg.dec | 5 +++ .../Variable/RuntimeDxe/Measurement.c | 38 --- .../RuntimeDxe/VariableRuntimeDxe.inf

[edk2-devel] [PATCH v4 03/10] MdePkg: Add devAuthBoot GlobalVariable

2024-04-18 Thread Wenxing Hou
According to UEFI 2.10 spec 3.3 Globally Defined Variables section, add devAuthBoot GlobalVariable. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Jiewen Yao Signed-off-by: Wenxing Hou Reviewed-by: Liming Gao --- MdePkg/Include/Guid/GlobalVariable.h | 8 +++-

[edk2-devel] [PATCH v4 02/10] MdePkg: Add TCG PFP 1.06 support.

2024-04-18 Thread Wenxing Hou
Add support for TCG PC Client Platform Firmware Profile Specification 1.06. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Jiewen Yao Signed-off-by: Wenxing Hou --- MdePkg/Include/IndustryStandard/Spdm.h| 4 +- .../IndustryStandard/UefiTcgPlatform.h| 186

[edk2-devel] [PATCH v4 01/10] MdePkg: Add SPDM1.2 support.

2024-04-18 Thread Wenxing Hou
Update Spdm.h to support 1.2 new features, such as: Authentication and measurement. It wil be used in DeviceSecurity. The DeviceSecurity feature is from TCG PC Client Platform Firmware Profile Specification 1.06. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Jiewen Yao

[edk2-devel] [PATCH v4 00/10] Add DeviceSecurity feature based on PFP 1.06 spec

2024-04-18 Thread Wenxing Hou
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2479 In PFP spec 1.06, platform firmware records the device certificate and device measurement for each SPDM responder. This PATCH set implement the DeviceSecurityLib to support spdm device Authentication and Measurement. Libspdm as submodule

Re: [edk2-devel] [PATCH V3 1/1] MdeModulePkg/XhciDxe: Add PCD for the delay of HCRST

2024-04-18 Thread Xianglei Cai
Hi Liming, Could you help pick the change to master branch? Thanks, Xianglei -Original Message- From: gaoliming Sent: Monday, April 15, 2024 2:36 PM To: Cai, Xianglei ; devel@edk2.groups.io Cc: Ni, Ray ; Lewandowski, Krzysztof ; Huang, Jenny ; Shih, More ; Chiu, Ian Subject: 回复:

Re: [edk2-devel] [PATCH V2 1/1] MdeModulePkg/XhciDxe: Reset endpoint while USB Transaction error

2024-04-18 Thread Xianglei Cai
Hi Liming, Could you help pick the change to the master branch? Thanks, Xianglei -Original Message- From: gaoliming Sent: Monday, April 15, 2024 5:52 PM To: devel@edk2.groups.io; Cai, Xianglei Cc: Ni, Ray ; Lewandowski, Krzysztof ; Huang, Jenny ; Shih, More Subject: 回复:

Re: [edk2-devel] [PATCH v3 13/13] UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic

2024-04-18 Thread Ni, Ray
+ // + // Check whether the Required TileSize is enough. + // + if (TileSize > SIZE_8KB) { +DEBUG ((DEBUG_ERROR, "The Range of Smbase in SMRAM is not enough -- Required TileSize = 0x%08x, Actual TileSize = 0x%08x\n", TileSize, SIZE_8KB)); +FreePool (mCpuHotPlugData.SmBase); +

Re: [edk2-devel] [PATCH] OvmfPkg: Harden #VC instruction emulation somewhat (CVE-2024-25742)

2024-04-18 Thread Yao, Jiewen
Thanks Adam and Ard. Since this #VC specific hardening, I would rely on AMD people's expertise to fix it. I have no objection for the patch. Thank you Yao, Jiewen > -Original Message- > From: Adam Dunlap > Sent: Thursday, April 18, 2024 1:45 AM > To: Ard Biesheuvel > Cc:

Re: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib

2024-04-18 Thread Wu, Jiaxin
Hi Tom & Abner, Could you help check & review AMD related patch? > UefiCpuPkg/SmmRelocationLib: Add library instance for AMD Thanks, Jiaxin > -Original Message- > From: devel@edk2.groups.io On Behalf Of Wu, > Jiaxin > Sent: Thursday, April 18, 2024 2:56 PM > To: devel@edk2.groups.io

Re: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib

2024-04-18 Thread Wu, Jiaxin
Hi Gerd, Could you help review & check below OVMF related patches? > OvmfPkg/SmmRelocationLib: Add library instance for OVMF > OvmfPkg/PlatformInitLib: Create gEfiSmmSmramMemoryGuid > OvmfPkg: Refine SmmAccess implementation > OvmfPkg/SmmCpuFeaturesLib: Check Smbase Relocation is done or

Re: [edk2-devel] [PATCH v3 05/13] UefiCpuPkg/SmmRelocationLib: Remove unnecessary global variable

2024-04-18 Thread Wu, Jiaxin
Sure, I will you split the removal of CpuIndex parameter in a new patch. Thanks, Jiaxin From: Ni, Ray Sent: Thursday, April 18, 2024 3:48 PM To: Wu, Jiaxin ; devel@edk2.groups.io Cc: Zeng, Star ; Gerd Hoffmann ; Kumar, Rahul R Subject: Re: [PATCH v3 05/13] UefiCpuPkg/SmmRelocationLib: Remove

Re: [edk2-devel] [PATCH v3 05/13] UefiCpuPkg/SmmRelocationLib: Remove unnecessary global variable

2024-04-18 Thread Ni, Ray
UINT64 EFIAPI HookReturnFromSmm ( - IN UINTN CpuIndex, IN OUT SMRAM_SAVE_STATE_MAP *CpuState, IN UINT64NewInstructionPointer32, IN UINT64NewInstructionPointer ) { diff --git

Re: [edk2-devel] [PATCH v3 04/13] UefiCpuPkg/SmmRelocationLib: Avoid unnecessary memory allocation

2024-04-18 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Wu, Jiaxin Sent: Thursday, April 18, 2024 14:55 To: devel@edk2.groups.io Cc: Ni, Ray ; Zeng, Star ; Gerd Hoffmann ; Kumar, Rahul R Subject: [PATCH v3 04/13] UefiCpuPkg/SmmRelocationLib: Avoid unnecessary memory

Re: [edk2-devel] [PATCH v3 03/13] UefiCpuPkg/SmmRelocationLib: Rename global variables

2024-04-18 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Wu, Jiaxin Sent: Thursday, April 18, 2024 14:55 To: devel@edk2.groups.io Cc: Ni, Ray ; Zeng, Star ; Gerd Hoffmann ; Kumar, Rahul R Subject: [PATCH v3 03/13] UefiCpuPkg/SmmRelocationLib: Rename global variables This patch

Re: [edk2-devel] [PATCH v3 02/13] UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib library instance

2024-04-18 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Wu, Jiaxin Sent: Thursday, April 18, 2024 14:55 To: devel@edk2.groups.io Cc: Ni, Ray ; Zeng, Star ; Gerd Hoffmann ; Kumar, Rahul R Subject: [PATCH v3 02/13] UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib library

[edk2-devel] [PATCH v3 13/13] UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic

2024-04-18 Thread Wu, Jiaxin
This patch is to remove legacy SmBase relocation in PiSmmCpuDxeSmm Driver. The responsibility for SmBase relocation has been transferred to the SmmRelocationInit interface, which now handles the following tasks: 1. Relocates the SmBase for each processor. 2. Generates the gSmmBaseHobGuid HOB. As

[edk2-devel] [PATCH v3 11/13] OvmfPkg/PlatformPei: Relocate SmBases in PEI phase

2024-04-18 Thread Wu, Jiaxin
This patch is to consume SmmRelocationInit for SmBase Relocation. Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Gerd Hoffmann Cc: Ray Ni Signed-off-by: Jiaxin Wu --- OvmfPkg/PlatformPei/Platform.c | 3 + OvmfPkg/PlatformPei/Platform.h | 5 ++

[edk2-devel] [PATCH v3 12/13] UefiPayloadPkg/UefiPayloadPkg.dsc: Include SmmRelocationLib

2024-04-18 Thread Wu, Jiaxin
This patch just includes SmmRelocationLib in UefiPayloadPkg. Cc: Guo Dong Cc: Sean Rhodes Cc: James Lu Cc: Gua Guo Cc: Ray Ni Signed-off-by: Jiaxin Wu Reviewed-by: Gua Guo Reviewed-by: Guo Dong --- UefiPayloadPkg/UefiPayloadPkg.dsc | 2 ++ 1 file changed, 2 insertions(+) diff --git

[edk2-devel] [PATCH v3 10/13] OvmfPkg/SmmCpuFeaturesLib: Check Smbase Relocation is done or not

2024-04-18 Thread Wu, Jiaxin
Based on gSmmBaseHobGuid: If gSmmBaseHobGuid found, means SmBase info has been relocated and recorded in the SmBase array. So, this patch check smbase relocation is done or not in SmmCpuFeaturesInitializeProcessor(). With SmmRelocationLib, gSmmBaseHobGuid will be always created. Here this patch

[edk2-devel] [PATCH v3 09/13] OvmfPkg: Refine SmmAccess implementation

2024-04-18 Thread Wu, Jiaxin
This patch refines the SmmAccess implementation: 1. SmramMap will be retrieved from the gEfiSmmSmramMemoryGuid instead of original from the TSEG Memory Base register. 2. Remove the gEfiAcpiVariableGuid creation, thus the DESCRIPTOR_INDEX definition can be also cleaned. 3. The gEfiAcpiVariableGuid

[edk2-devel] [PATCH v3 08/13] OvmfPkg/PlatformInitLib: Create gEfiSmmSmramMemoryGuid

2024-04-18 Thread Wu, Jiaxin
Background: In the PiSmmCpuDxeSmm driver, SMRAM allocation for SMI handlers and processor Save State areas was traditionally performed using the Smst->AllocatePages() function during the DXE phase. The introduction of SmmRelocationLib changes this process by moving the allocation to the PEI phase,

[edk2-devel] [PATCH v3 07/13] OvmfPkg/SmmRelocationLib: Add library instance for OVMF

2024-04-18 Thread Wu, Jiaxin
There are below 2 differences between AMD & OVMF according existing implementation: 1.The mode of the CPU check is different between the AMD & OVMF. OVMF: CpuSaveState->x86.SMMRevId & 0X AMD: LMAValue = (UINT32)AsmReadMsr64 (EFER_ADDRESS) & LMA 2.Existing SmBase configuration is different

[edk2-devel] [PATCH v3 06/13] UefiCpuPkg/SmmRelocationLib: Add library instance for AMD

2024-04-18 Thread Wu, Jiaxin
Due to the definition difference of SMRAM Save State, SmmBase config in SMRAM Save State for AMD is also different. This patch provides the AmdSmmRelocationLib library instance to handle the SMRAM Save State difference. Cc: Abdul Lateef Attar Cc: Abner Chang Cc: Ray Ni Cc: Zeng Star Cc: Gerd

[edk2-devel] [PATCH v3 05/13] UefiCpuPkg/SmmRelocationLib: Remove unnecessary global variable

2024-04-18 Thread Wu, Jiaxin
This patch aims on mProcessorInfo global variable, which can be defined as local variable in SmmRelocateBases(). With this patch, no need to allocate the memory for all CPUs to store the Processor Info. Cc: Ray Ni Cc: Zeng Star Cc: Gerd Hoffmann Cc: Rahul Kumar Signed-off-by: Jiaxin Wu ---

[edk2-devel] [PATCH v3 04/13] UefiCpuPkg/SmmRelocationLib: Avoid unnecessary memory allocation

2024-04-18 Thread Wu, Jiaxin
Since SMM relocation is performed serially for each CPU, there is no need to allocate buffers for all CPUs to store the SmBase address in mSmBase and the Rebased flag in mRebased. A defined global variable is sufficient. This patch focuses on the mSmBase and mRebased global variables to prevent

[edk2-devel] [PATCH v3 03/13] UefiCpuPkg/SmmRelocationLib: Rename global variables

2024-04-18 Thread Wu, Jiaxin
This patch aims to rename global variables for clearer association with Smm Init, ensuring their names are distinct from those used in the PiSmmCpuDxeSmm Driver. Cc: Ray Ni Cc: Zeng Star Cc: Gerd Hoffmann Cc: Rahul Kumar Signed-off-by: Jiaxin Wu ---

[edk2-devel] [PATCH v3 02/13] UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib library instance

2024-04-18 Thread Wu, Jiaxin
This patch just separates the smbase relocation logic from PiSmmCpuDxeSmm driver, and moves to the SmmRelocationInit interface. It maintains the original implementation of most functions and leaves the definitions of global variables intact. Further refinements to the code are planned for

[edk2-devel] [PATCH v3 01/13] UefiCpuPkg: Add SmmRelocationLib class

2024-04-18 Thread Wu, Jiaxin
Intel plans to separate the smbase relocation logic from PiSmmCpuDxeSmm driver, and the related behavior will be moved to the new interface defined by the SmmRelocationLib class. The SmmRelocationLib class provides the SmmRelocationInit() interface for platform to do the smbase relocation, which

[edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib

2024-04-18 Thread Wu, Jiaxin
PR: https://github.com/tianocore/edk2/pull/5546 Intel plans to separate the smbase relocation logic from PiSmmCpuDxeSmm driver, and the related behavior will be moved to the new interface defined by the SmmRelocationLib class. The SmmRelocationLib class provides the SmmRelocationInit() interface

Re: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc:add rdmsr_ex & wrmsr_ex functions to read/write cpu specific msrs

2024-04-18 Thread Jayaprakash, N
Thanks Mike. I shall make necessary changes and submit the PR again for review. Regards, JP -Original Message- From: Kinney, Michael D Sent: Thursday, April 18, 2024 10:46 AM To: Jayaprakash, N ; devel@edk2.groups.io Cc: Rebecca Cran ; Kinney, Michael D Subject: RE: [edk2-devel]