[edk2-devel] [PATCH V1 0/5] Move Tdx specific lib from SecurityPkg to OvmfPkg

2024-04-15 Thread Min Xu
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4752 HashLibTdx and TdTcg2Dxe are designed for Intel TDX enlightened OVMF. They're more reasonable to be put in OvmfPkg than in SecurityPkg. SecTpmMeasurementLibTdx is not used anymore. So it is deleted in this patch-set. Cc: Ard Biesheuvel Cc:

[edk2-devel] [PATCH V1 1/5] Security/SecTpmMeasurementLibTdx: Delete unused SecTpmMeasurementLibTdx

2024-04-15 Thread Min Xu
From: Min M Xu BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4752 Cc: Jiewen Yao Cc: Gerd Hoffmann Signed-off-by: Min Xu --- .../SecTpmMeasurementLibTdx.c | 175 -- .../SecTpmMeasurementLibTdx.inf | 34 SecurityPkg/SecurityPkg.dsc

[edk2-devel] [PATCH V1 2/5] OmvfPkg/HashLibTdx: Add HashLibTdx

2024-04-15 Thread Min Xu
From: Min M Xu BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4752 This library is the one of SecurityPkg/Library/HashLibTdx. It is designed for Intel TDX enlightened OVMF. So moving it from SecurityPkg to OvmfPkg. To prevent breaking the build, the moving is splitted into 2 patch. SecurityP

[edk2-devel] [PATCH V1 3/5] OvmfPkg/TdTcg2Dxe: Add TdTcg2Dxe

2024-04-15 Thread Min Xu
From: Min M Xu BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4752 This library is the one of SecurityPkg/Tcg/TdTcg2Dxe. It is designed for Intel TDX enlightened OVMF. So moving it from SecurityPkg to OvmfPkg. To prevent breaking the build, the moving is splitted into 2 patch. SecurityPkg/Tc

[edk2-devel] [PATCH V1 4/5] OvmfPkg: Update TdTcg2Dxe path in OvmfPkgX64 and IntelTdxX64.dsc

2024-04-15 Thread Min Xu
From: Min M Xu BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4752 Previously the TdTcg2Dxe and its corresponding HashLibTdx were in SecurityPkg. This patch updates the paths in OvmfPkgX64.dsc and IntelTdxX64.dsc after TdTcg2Dxe and HashLibTdxLib have been moved to OvmfPkg. Cc: Ard Biesheuv

[edk2-devel] [PATCH V1 5/5] SecurityPkg: Delete TdTcg2Dxe and HashLibTdx in SecurityPkg

2024-04-15 Thread Min Xu
From: Min M Xu BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4752 TdTcg2Dxe and HashLibTdx have been moved to OvmfPkg. So delete the codes in SecurityPkg and update SecurityPkg.dsc. Cc: Jiewen Yao Cc: Gerd Hoffmann Signed-off-by: Min Xu --- SecurityPkg/Library/HashLibTdx/HashLibTdx.c

Re: [edk2-devel] [PATCH V1 0/5] Move Tdx specific lib from SecurityPkg to OvmfPkg

2024-04-15 Thread Min Xu
The code is at: https://github.com/mxu9/edk2/tree/move_tdx.v1 > -Original Message- > From: Xu, Min M > Sent: Monday, April 15, 2024 3:56 PM > To: devel@edk2.groups.io > Cc: Xu, Min M ; Ard Biesheuvel > ; Yao, Jiewen ; Gerd > Hoffmann > Subject: [PATCH V1 0/5] Move Tdx specific lib from S

Re: [edk2-devel] [PATCH RESEND V4 1/6] MdePkg/Include: Update definitions of SPI related header files

2024-04-15 Thread Abdul Lateef Attar via groups.io
Reviewed-by: Abdul Lateef Attar On 04-04-2024 14:40, abner.ch...@amd.com wrote: From: abnchang BZ#: 4471 Update definitions according to PI spec 1.8 errata A Signed-off-by: Abner Chang Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Abdul Lateef Attar Cc: Brit Chesley --- MdePkg/In

Re: [edk2-devel] [PATCH V5 2/6] MdePkg/Include: Add SPI NOR Flash JEDEC SFDP header file

2024-04-15 Thread Abdul Lateef Attar via groups.io
Reviewed-by: Abdul Lateef Attar On 04-04-2024 14:54, abner.ch...@amd.com wrote: From: abnchang BZ#: 4472 Add definition of JEDEC Serial Flash Discoverable Parameters (SFDP) specification. https://www.jedec.org/standards-documents/docs/jesd216b Signed-off-by: Abner Chang Cc: Michael D Kinney

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

2024-04-15 Thread gaoliming via groups.io
Reviewed-by: Liming Gao > -邮件原件- > 发件人: devel@edk2.groups.io 代表 Xianglei Cai > 发送时间: 2024年4月15日 14:55 > 收件人: devel@edk2.groups.io > 抄送: Xianglei Cai ; Ray Ni ; > Liming Gao ; Krzysztof Lewandowski > ; Jenny Huang ; > More Shih > 主题: [edk2-devel] [PATCH V2 1/1] MdeModulePkg/XhciDxe: Rese

Re: [edk2-devel] [PATCH v1 1/2] MdePkg/SmBios.h: Add New ProcessorUpgrade definitions for SMBIOS Type4

2024-04-15 Thread Zeng, Star
Reviewed-by: Star Zeng to this series. -Original Message- From: Lou, Yun Sent: Sunday, April 14, 2024 11:24 PM To: devel@edk2.groups.io Cc: Lou, Yun ; Liu, Zhiguang ; Bi, Dandan ; Zeng, Star ; Gao, Zhichao ; Lin, Benny ; Guo, Gua ; Kinney, Michael D ; Liming Gao Subject: [PATCH v1

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

2024-04-15 Thread Dandan Bi
Hi Taylor, With this patch, MAT contains some entries with Attribute - 0x8000, doesn't have EFI_MEMORY_RO or EFI_MEMORY_XP. After revert this patch, don't see such entries in MAT. a. MAT with this patch: Entry (0x609E4268) Type - 0x5 PhysicalStart - 0x769

Re: [edk2-devel] [PATCH v1 03/13] UefiCpuPkg/SmmRelocationLib: Add library instance for OVMF

2024-04-15 Thread Wu, Jiaxin
Hi Gred, Because: 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 between the AMD & OVMF. OVMF: AmdCpuState->x64.SMBASE = (UINT32

[edk2-devel] [PATCH v2 00/10] Add SmmRelocationLib

2024-04-15 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 s

[edk2-devel] [PATCH v2 03/10] UefiCpuPkg/SmmRelocationLib: Add library instance for AMD

2024-04-15 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: Tom Lendacky Cc: Ray Ni Cc: Ze

[edk2-devel] [PATCH v2 04/10] OvmfPkg/SmmRelocationLib: Add library instance for OVMF

2024-04-15 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 be

[edk2-devel] [PATCH v2 01/10] UefiCpuPkg: Add SmmRelocationLib class

2024-04-15 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 s

[edk2-devel] [PATCH v2 02/10] UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib library instance

2024-04-15 Thread Wu, Jiaxin
This patch separates the smbase relocation logic from PiSmmCpuDxeSmm driver, and moves to the SmmRelocationInit interface. Platform shall consume the interface for the smbase relocation if need SMM support. Note: Before using SmmRelocationLib, the PiSmmCpuDxeSmm driver allocates the SMRAM to be u

[edk2-devel] [PATCH v2 05/10] OvmfPkg/PlatformInitLib: Create gEfiSmmSmramMemoryGuid

2024-04-15 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 v2 06/10] OvmfPkg: Refine SmmAccess implementation

2024-04-15 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 H

[edk2-devel] [PATCH v2 08/10] OvmfPkg/PlatformPei: Relocate SmBases in PEI phase

2024-04-15 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 +++ OvmfPkg/PlatformPei/PlatformPei.inf | 5 ++

[edk2-devel] [PATCH v2 10/10] UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic

2024-04-15 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 a

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

2024-04-15 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 ju

[edk2-devel] [PATCH v2 09/10] UefiPayloadPkg/UefiPayloadPkg.dsc: Include SmmRelocationLib

2024-04-15 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 --- UefiPayloadPkg/UefiPayloadPkg.dsc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/UefiPayloadPkg/UefiPayload

Re: [edk2-devel] [PATCH V5 3/6] MdeModulePkg: Add definitions in DEC for SPI NOR Flash SFDP driver

2024-04-15 Thread Abdul Lateef Attar via groups.io
Reviewed-by: Abdul Lateef Attar On 04-04-2024 14:54, abner.ch...@amd.com wrote: From: Abner Chang BZ#: 4473 Signed-off-by: Abner Chang Cc: Liming Gao Cc: Jian J Wang Cc: Abdul Lateef Attar --- MdeModulePkg/MdeModulePkg.dec | 28 +++- 1 file changed, 27 insertions(+)

Re: [edk2-devel] [PATCH v4 0/1] SecurityPkg/OpalPasswordDxe: Update UI according to UEFI spec

2024-04-15 Thread Yao, Jiewen
I am not sure why patch 0/1 contains the code. It should be the cover letter. Also, if Dandan has already reviewed that, you may add R-B tag. > -Original Message- > From: Kuo, CindyX > Sent: Friday, April 12, 2024 4:31 PM > To: devel@edk2.groups.io > Cc: Kuo, CindyX ; Yao, Jiewen ; > Kum

Re: [edk2-devel] [RFC PATCH] OvmfPkg/SecurityPkg: Add build option for coexistance of vTPM and RTMR.

2024-04-15 Thread Ard Biesheuvel
On Sat, 13 Apr 2024 at 11:37, Qinkun Bao wrote: > ... > > > > I think it is a bad idea to go and apply changes all across the boot > > software ecosystem to measure the same assets into different > > measurement protocols. I'mm afraid it creates technical debt that will > > come and bite us in the

[edk2-devel] [PATCH 0/2] Update DSC files to include AmdSvsmLib library

2024-04-15 Thread Lendacky, Thomas via groups.io
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4654 The MpInitLib library was recently updated to use a new library, AmdSvsmLib. This series adds the AmdSvsmLib library to all DSC files that use the (non UP) MpInitLib library. It is meant to be applied in conjunction with the SVSM support s

[edk2-devel] [PATCH 2/2] Platform/Intel: Add AmdSvsmLib to required DSC files

2024-04-15 Thread Lendacky, Thomas via groups.io
Any DSC file that uses the UefiCpuPkg MpInitLib library now requires the AmdSvsmLib library. Update the DSC files to include the AmdSvsmLib NULL library implementation. Cc: Leif Lindholm Cc: Michael D Kinney Cc: Sai Chaganty Cc: Nate DeSimone Cc: Chasel Chiu Cc: Kelly Steele Cc: Zailiang Sun

[edk2-devel] [PATCH 1/2] Platform/AMD: Add AmdSvsmLib to required DSC files

2024-04-15 Thread Lendacky, Thomas via groups.io
Any DSC file that uses the UefiCpuPkg MpInitLib library now requires the AmdSvsmLib library. Update the DSC files to include the AmdSvsmLib NULL library implementation. Also, fix the specification of VmgExitLib as it was renamed to CcExitLib. Cc: Abner Chang Cc: Abdul Lateef Attar Cc: Eric Xing

Re: [edk2-devel] [PATCH v2 09/10] UefiPayloadPkg/UefiPayloadPkg.dsc: Include SmmRelocationLib

2024-04-15 Thread Guo Dong
Reviewed-by: Guo Dong -Original Message- From: Wu, Jiaxin Sent: Monday, April 15, 2024 6:30 AM To: devel@edk2.groups.io Cc: Dong, Guo ; Rhodes, Sean ; Lu, James ; Guo, Gua ; Ni, Ray Subject: [PATCH v2 09/10] UefiPayloadPkg/UefiPayloadPkg.dsc: Include SmmRelocationLib This patch j

Re: [edk2-devel] [PATCH v2 1/1] SecurityPkg/Tcg2Config: Hide BIOS unsupported hash algorithm from UI

2024-04-15 Thread Yao, Jiewen
Merged https://github.com/tianocore/edk2/pull/5556 > -Original Message- > From: Xu, Wei6 > Sent: Friday, April 12, 2024 3:15 PM > To: devel@edk2.groups.io > Cc: Xu, Wei6 ; Kumar, Rahul R ; > Yao, Jiewen > Subject: [PATCH v2 1/1] SecurityPkg/Tcg2Config: Hide BIOS unsupported hash > algori

[edk2-devel] [PATCH 0/5] General Updates based on UEFI 2.10 and PI 1.8 Specifications

2024-04-15 Thread Sachin Ganesh via groups.io
*** BLURB HERE *** Sachin Ganesh (5): MdePkg: Add definition for NVMe Over Fabric Device Path MdePkg: Add new Resource Attributes defined in PI 1.8 Spec MdePkg: Use newly defined Unaccepted Memory Type MdePkg: Update Delayed Dispatch PPI as per PI 1.8 Spec MdePkg: Update to PI 1.8 Revisi

[edk2-devel] [PATCH 1/5] MdePkg: Add definition for NVMe Over Fabric Device Path

2024-04-15 Thread Sachin Ganesh via groups.io
In accordance with UEFI 2.10 Specification: Adding definition for NVMe Over Fabric (NVMe-oF) Device Path of Messaging Sub-Type. Cc: Liming Gao Cc: Michael D Kinney Cc: Zhiguang Liu Cc: Felix Polyudov Cc: Dhanaraj V Signed-off-by: Sachin Ganesh --- MdePkg/Include/Protocol/DevicePath.h | 22 +

[edk2-devel] [PATCH 2/5] MdePkg: Add new Resource Attributes defined in PI 1.8 Spec

2024-04-15 Thread Sachin Ganesh via groups.io
Defined Encrypted and Special Purpose resource attributes as defined in PI 1.8 Specification Cc: Liming Gao Cc: Michael D Kinney Cc: Zhiguang Liu Cc: Felix Polyudov Cc: Dhanaraj V Signed-off-by: Sachin Ganesh --- MdePkg/Include/Pi/PiHob.h | 2 ++ 1 file changed, 2 insertions(+) diff --git

[edk2-devel] [PATCH 5/5] MdePkg: Update to PI 1.8 Revision

2024-04-15 Thread Sachin Ganesh via groups.io
Revision macros have been updated to indicate PI 1.8 specification support Cc: Liming Gao Cc: Michael D Kinney Cc: Zhiguang Liu Cc: Felix Polyudov Cc: Dhanaraj V Signed-off-by: Sachin Ganesh --- MdePkg/Include/Pi/PiDxeCis.h | 6 +++--- MdePkg/Include/Pi/PiMmCis.h | 6 +++--- MdePkg

[edk2-devel] [PATCH 4/5] MdePkg: Update Delayed Dispatch PPI as per PI 1.8 Spec

2024-04-15 Thread Sachin Ganesh via groups.io
Added WaitOnEvent() function to EFI_DELAYTED_DISPATCH_PPI. Modified DispatchRegister() parameter list. Cc: Liming Gao Cc: Michael D Kinney Cc: Zhiguang Liu Cc: Felix Polyudov Cc: Dhanaraj V Signed-off-by: Sachin Ganesh --- MdePkg/Include/Ppi/DelayedDispatch.h | 24 +++-

[edk2-devel] [PATCH 0/5] General Updates based on UEFI 2.10 and PI 1.8 Specifications

2024-04-15 Thread Sachin Ganesh via groups.io
This series of patches are for general updates to MdePkg and MdeModulePkg based on UEFI 2.10 and PI 1.8 Specifications Sachin Ganesh (5): MdePkg: Add definition for NVMe Over Fabric Device Path MdePkg: Add new Resource Attributes defined in PI 1.8 Spec MdePkg: Use newly defined Unaccepted M

[edk2-devel] [PATCH 3/5] MdePkg: Use newly defined Unaccepted Memory Type

2024-04-15 Thread Sachin Ganesh via groups.io
EFI_RESOURCE_MEMORY_UNACCEPTED has been officially defined in the PI 1.8 specification. So all temporary solutions have been replaced with the actual definition. Cc: Liming Gao Cc: Michael D Kinney Cc: Zhiguang Liu Cc: Felix Polyudov Cc: Dhanaraj V Signed-off-by: Sachin Ganesh --- MdeModule

Re: [edk2-devel] [PATCH 1/5] MdePkg: Add definition for NVMe Over Fabric Device Path

2024-04-15 Thread Felix Polyudov via groups.io
Sachin, > +#define MSG_NVME_OF_NAMESPACE_DP 0x20 UEFI Specification defines this as 34, which is 0x22 Refer to https://uefi.org/specs/UEFI/2.10/10_Protocols_Device_Path_Protocol.html#nvme-over-fabric-nvme-of-namespace-device-path > > +typedef struct { > ... > + /// Unique identifier of an NVM

[edk2-devel] [PATCH 1/1] BaseTool/Ecc: Fix incorrect parsing of variable initialisation

2024-04-15 Thread levi.yun
If a global variable is initialised using a macro with multiple arguments, ECC incorrectly parses the statement and reports the macro arguments as variable declarations. Example: In the following statement: STATIC INT WrongVariable = MACRO_VERSION(1, 0), NextVariable; The logic in the ECC functi

[edk2-devel] [PATCH v2 0/1] MdeModulePkg: Warn if out of space when writing variables

2024-04-15 Thread Oliver Steffen
Emit a DEBUG_ERROR message if there is not enough space left to write/update a variable. This condition is currently not logged appropriately in all cases, given that full variable store can easily render the system unbootable. This new message helps identifying this condition quickly. Background:

[edk2-devel] [PATCH v2 1/1] MdeModulePkg: Warn if out of space when writing variables

2024-04-15 Thread Oliver Steffen
Emit a DEBUG_ERROR message if there is not enough flash variable left to write/update a variable. This condition is currently not logged appropriately in all cases, given that full variable store can easily render the system unbootable. This new message helps identifying this condition. Cc: Bob Fe

[edk2-devel] [PATCH v2 1/5] MdePkg: Add definition for NVMe Over Fabric Device Path

2024-04-15 Thread Sachin Ganesh via groups.io
In accordance with UEFI 2.10 Specification: Adding definition for NVMe Over Fabric (NVMe-oF) Device Path of Messaging Sub-Type. Cc: Liming Gao Cc: Michael D Kinney Cc: Zhiguang Liu Cc: Felix Polyudov Cc: Dhanaraj V Signed-off-by: Sachin Ganesh --- MdePkg/Include/Protocol/DevicePath.h | 22 +

Re: [edk2-devel] [PATCH 1/5] MdePkg: Add definition for NVMe Over Fabric Device Path

2024-04-15 Thread Sachin Ganesh via groups.io
Hi Felix, Corrected and resent the patch. Thank You, Sachin. -Original Message- From: Felix Polyudov Sent: Monday, April 15, 2024 11:04 PM To: Sachin Ganesh ; devel@edk2.groups.io Cc: gaolim...@byosoft.com.cn; michael.d.kin...@intel.com; zhiguang@intel.com; Dhanaraj V Subject: RE:

[edk2-devel] [PATCH v1 1/3] uefi-sct/SctPkg: TCG2 Protocol: correct definition of TPMT_HA struct

2024-04-15 Thread Stuart Yoder
The TPMT_HA struct defining event log hash algorithms was cut/pasted from the TCG EFI Protocol specification which used a C struct with a flexible array member as the last element. This is incorrect because TPMT_HA itself is used as an array element, and thus can't be variable size. Because the s

[edk2-devel] [PATCH v1 2/3] uefi-sct/SctPkg: TCG2 Protocol: use OFFSET_OF for computing offsets

2024-04-15 Thread Stuart Yoder
Use compiler-independent OFFSET_OF macro defined from Base.h instead of the GCC specific __builtin_offsetof Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/TCG2ProtocolBBTestConformance.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-)

[edk2-devel] [PATCH v1 0/3] TCG2 protocol clean up

2024-04-15 Thread Stuart Yoder
This patch series cleans up some issues found when building edk2-test with a non-GCC compiler: -TPMT_HA struct had an error due to incorrect use of C flexible array member -compute struct member offsets using OFFSET_OF, which is not GCC specific -clean up of #pragma pack in one file Patches

[edk2-devel] [PATCH v1 3/3] uefi-sct/SctPkg: TCG2 Protocol: #pragma pack cleanup

2024-04-15 Thread Stuart Yoder
Fix compiler warning by adding #pragma pack() to close a pragma section. Also delete extraneous #pragma pack(1). Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/TCG2ProtocolBBTest.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --gi

[edk2-devel] Event: Tools, CI, Code base construction meeting series - Monday, April 15, 2024 #cal-reminder

2024-04-15 Thread Group Notification
*Reminder: Tools, CI, Code base construction meeting series* *When:* Monday, April 15, 2024 4:30pm to 5:30pm (UTC-07:00) America/Los Angeles *Where:* https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZDI2ZDg4NmMtMjI1My00MzI5LWFmYjAtMGQyNjUzNTBjZGYw%40thread.v2/0?context=%7b%22Tid%22%3a%2272f

[edk2-devel] Now: Tools, CI, Code base construction meeting series - Monday, April 15, 2024 #cal-notice

2024-04-15 Thread Group Notification
*Tools, CI, Code base construction meeting series* *When:* Monday, April 15, 2024 4:30pm to 5:30pm (UTC-07:00) America/Los Angeles *Where:* https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZDI2ZDg4NmMtMjI1My00MzI5LWFmYjAtMGQyNjUzNTBjZGYw%40thread.v2/0?context=%7b%22Tid%22%3a%2272f988bf-86f1

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

2024-04-15 Thread Taylor Beebe
On 4/15/2024 3:57 AM, Bi, Dandan wrote: Hi Taylor, With this patch, MAT contains some entries with Attribute - 0x8000, doesn't have EFI_MEMORY_RO or EFI_MEMORY_XP. After revert this patch, don't see such entries in MAT. a. MAT with this patch: Entry (0x609E4268) Type

[edk2-devel] Event: TianoCore Bug Triage - APAC / NAMO - Tuesday, April 16, 2024 #cal-reminder

2024-04-15 Thread Group Notification
*Reminder: TianoCore Bug Triage - APAC / NAMO* *When:* Tuesday, April 16, 2024 6:30pm to 7:30pm (UTC-07:00) America/Los Angeles *Where:* https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTk1YzJhN2UtOGQwNi00NjY4LWEwMTktY2JiODRlYTY1NmY0%40thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4e

Re: [edk2-devel] [PATCH v2 01/10] UefiCpuPkg: Add SmmRelocationLib class

2024-04-15 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Wu, Jiaxin Sent: Monday, April 15, 2024 21:30 To: devel@edk2.groups.io Cc: Ni, Ray ; Zeng, Star ; Gerd Hoffmann ; Kumar, Rahul R Subject: [PATCH v2 01/10] UefiCpuPkg: Add SmmRelocationLib class Intel plans to separate the

Re: [edk2-devel] [PATCH v3 10/13] UefiCpuPkg: Add a new GUID to store the processors resource

2024-04-15 Thread Chao Li
Hi Ray, Thanks, Chao On 2024/4/15 10:10, Ni, Ray wrote: + +typedef struct { +  UINT32    NumberOfProcessor; +  UINTN *ApicId; [Ray] How about "UINTN  ApicId[]"? The difference between the two is your version contains an 8-byte pointer pointing to somewhere else. My version implies the A

[edk2-devel] [PATCH v4 1/6] Revert 2ec8f0c6407f062441b205b900038933865c7b3c

2024-04-15 Thread Zhiguang Liu
This reverts commit "StandaloneMmPkg: Disallow unregister MMI handler in other MMI handler" for better design later. Cc: Liming Gao Cc: Jiaxin Wu Cc: Ray Ni Cc: Laszlo Ersek Reviewed-by: Ray Ni Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Sami Mujawar Signed-off-by: Zhiguang Liu --- Standalon

[edk2-devel] [PATCH v4 2/6] Revert 049ff6c39c73edd3709c05bd0e46184320471358

2024-04-15 Thread Zhiguang Liu
This reverts commit "StandaloneMmPkg: Support to unregister MMI handler inside MMI handler" for better design later. Cc: Liming Gao Cc: Jiaxin Wu Cc: Ray Ni Cc: Laszlo Ersek Reviewed-by: Ray Ni Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Sami Mujawar Signed-off-by: Zhiguang Liu --- Standalon

[edk2-devel] [PATCH v4 3/6] Revert 17b28722008eab745ce186b72cd325944cbe6bf0

2024-04-15 Thread Zhiguang Liu
This reverts commit "MdeModulePkg/SMM: Disallow unregister SMI handler in other SMI handler" for better design later. Cc: Liming Gao Cc: Jiaxin Wu Cc: Ray Ni Cc: Laszlo Ersek Reviewed-by: Ray Ni Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Sami Mujawar Signed-off-by: Zhiguang Liu --- MdeModu

[edk2-devel] [PATCH v4 0/6] Support to unregister SMI handler in SMI handlers

2024-04-15 Thread Zhiguang Liu
Months ago, I sent patch set to fix potential issues in the usage of SMI handler unregistering SMI handler. Discussion can be found in below link: https://edk2.groups.io/g/devel/topic/103925794#114251 The conclusion was to only support SMI handler unregistering itself, and not allow SMI handler

[edk2-devel] [PATCH v4 4/6] Revert ae1079b386a597108a8070652bf7cdaa4ec3dda3

2024-04-15 Thread Zhiguang Liu
This reverts "MdeModulePkg/SMM: Support to unregister SMI handler inside SMI handler" for better design later. Cc: Liming Gao Cc: Jiaxin Wu Cc: Ray Ni Cc: Laszlo Ersek Reviewed-by: Ray Ni Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Sami Mujawar Signed-off-by: Zhiguang Liu --- MdeModulePkg/Co

[edk2-devel] [PATCH v4 5/6] MdeModulePkg/SMM: Support to unregister SMI handler in SMI handlers

2024-04-15 Thread Zhiguang Liu
This patch fix a use-after-free issue where unregistering an SMI handler could lead to the deletion of the SMI_HANDLER while it is still in use by SmiManage(). The fix involves modifying SmiHandlerUnRegister() to detect whether it is being called from within the SmiManage() stack. If so, the remova

[edk2-devel] [PATCH v4 6/6] StandaloneMmPkg: Support to unregister MMI handler in MMI handlers

2024-04-15 Thread Zhiguang Liu
This patch fix a use-after-free issue where unregistering an MMI handler could lead to the deletion of the MMI_HANDLER while it is still in use by MmiManage(). The fix involves modifying MmiHandlerUnRegister() to detect whether it is being called from within the MmiManage() stack. If so, the remova

[edk2-devel] [PATCH v4 00/13] Part 2 patch set to add LoongArch support into UefiCpuPkg

2024-04-15 Thread Chao Li
This patch set adjusted some order in UefiCpuPig alphabetically, added LoongArch libraries and drivers into UefiCpuPkg, it is a continuation of the first patch series v8 submitted at https://edk2.groups.io/g/devel/message/114526. And also separated from https://edk2.groups.io/g/devel/message/11658

[edk2-devel] [PATCH v4 01/13] UefiCpuPkg/CpuTimerLib: Reorder the INF file alphabetically

2024-04-15 Thread Chao Li
Some of the order is not in alphabetical, reorder. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4726 Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Chao Li Acked-by: Gerd Hoffmann Reviewed-by: Ray Ni --- UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf | 2 +- 1 file c

[edk2-devel] [PATCH v4 02/13] UefiCpuPkg/CpuExceptionHandlerLib: Reorder the INF files alphabetically

2024-04-15 Thread Chao Li
Some of the order is not in alphabetical, reorder. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4726 Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Chao Li Acked-by: Gerd Hoffmann Reviewed-by: Ray Ni --- .../DxeCpuExceptionHandlerLib.inf | 20 +---

[edk2-devel] [PATCH v4 04/13] UefiCpuPkg/CpuDxe: Reorder the INF file alphabetically

2024-04-15 Thread Chao Li
Some of the order is not in alphabetical, reorder. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4726 Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Chao Li Acked-by: Gerd Hoffmann Reviewed-by: Ray Ni --- UefiCpuPkg/CpuDxe/CpuDxe.inf | 16 1 file changed,

[edk2-devel] [PATCH v4 03/13] UefiCpuPkg/MpInitLib: Reorder the INF files alphabetically

2024-04-15 Thread Chao Li
Some of the order is not in alphabetical, reorder. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4726 Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Chao Li Acked-by: Gerd Hoffmann Reviewed-by: Ray Ni --- UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf | 29 ++--

[edk2-devel] [PATCH v4 05/13] UefiCpuPkg: Add LoongArch64 CPU Timer instance

2024-04-15 Thread Chao Li
Add the LoongArch64 CPU Timer instance to CpuTimerLib, using CPUCFG 0x4 and 0x5 for Stable Counter frequency. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4734 Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Chao Li Acked-by: Gerd Hoffmann Reviewed-by: Ray Ni --- .../Libr

[edk2-devel] [PATCH v4 06/13] UefiCpuPkg: Add CPU exception library for LoongArch

2024-04-15 Thread Chao Li
Added LoongArch exception handler into CpuExceptionHandlerLib. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4734 Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Chao Li Co-authored-by: Baoqi Zhang Acked-by: Gerd Hoffmann Reviewed-by: Ray Ni --- .../DxeCpuExceptionHandler

[edk2-devel] [PATCH v4 07/13] UefiCpuPkg: Add CpuMmuLib.h to UefiCpuPkg

2024-04-15 Thread Chao Li
Add a new header file CpuMmuLib.h, whitch is referenced from ArmPkg/Include/Library/ArmMmuLib.h. Currently, only support for LoongArch64 is added, and more architectures can be accommodated in the future. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4734 Cc: Ray Ni Cc: Rahul Kumar Cc: Ger

[edk2-devel] [PATCH v4 08/13] UefiCpuPkg: Added a new PCD named PcdLoongArchExceptionVectorBaseAddress

2024-04-15 Thread Chao Li
Added PcdLoongArchExceptionVectorBaseAddress use for storing the CPU exception vector base address. This PCD can be populated at build time or changed at runtime, and is used only by LoongArch. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4734 Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann

[edk2-devel] [PATCH v4 09/13] UefiCpuPkg: Add CpuMmuLib to UefiCpuPkg

2024-04-15 Thread Chao Li
Add a new base library named CpuMmuLib and add a LoongArch64 instance with in the library. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4734 Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Chao Li Co-authored-by: Baoqi Zhang Co-authored-by: Dongyan Qian Co-authored-by: Xia

[edk2-devel] [PATCH v4 10/13] UefiCpuPkg: Add a new GUID to store the processors resource

2024-04-15 Thread Chao Li
On a multi-processor system, if the BSP dose not know how many APs are online or cannot wake up the AP via broadcast, it can collect AP resouces before wakeing up the AP and add a new HOB to save the processor resouces. Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Chao Li --- .

[edk2-devel] [PATCH v4 11/13] UefiCpuPkg: Add multiprocessor library for LoongArch64

2024-04-15 Thread Chao Li
Added LoongArch multiprocessor initialization instance into MpInitLib. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4734 Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Chao Li Acked-by: Gerd Hoffmann Reviewed-by: Ray Ni --- UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |

[edk2-devel] [PATCH v4 12/13] UefiCpuPkg: Add CpuDxe driver for LoongArch64

2024-04-15 Thread Chao Li
Added LoongArch64 CPU driver into CpuDxe. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4734 Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Chao Li Co-authored-by: Baoqi Zhang Co-authored-by: Dongyan Qian Acked-by: Gerd Hoffmann Acked-by: Ray Ni --- UefiCpuPkg/CpuDxe/Cp

[edk2-devel] [PATCH v4 13/13] UefiCpuPkg/UefiCpuPkg.dsc: Add CpuMmio2Dxe.inf to LoongArch64 field

2024-04-15 Thread Chao Li
LoongArch64 requires CpuMmio2Dxe, add it into LoongArch64 field. Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Chao Li Reviewed-by: Ray Ni --- UefiCpuPkg/UefiCpuPkg.dsc | 1 + 1 file changed, 1 insertion(+) diff --git a/UefiCpuPkg/UefiCpuPkg.dsc b/UefiCpuPkg/UefiCpuPkg.dsc ind

Re: [edk2-devel] [PATCH v2 02/10] UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib library instance

2024-04-15 Thread Ni, Ray
Comments below starting with [Ray.xx] Thanks, Ray /** @@ -30,11 +30,12 @@ SemaphoreHook ( { SMRAM_SAVE_STATE_MAP *CpuState; mRebasedFlag = RebasedFlag; - CpuState = (SMRAM_SAVE_STATE_MAP *)(UINTN)(SMM_DEFAULT_SMBASE + SMRAM_SAVE_STATE_MAP_OFFSET); + CpuState =

Re: [edk2-devel] [PATCH v4 10/13] UefiCpuPkg: Add a new GUID to store the processors resource

2024-04-15 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Chao Li Sent: Tuesday, April 16, 2024 10:44 To: devel@edk2.groups.io Cc: Ni, Ray ; Kumar, Rahul R ; Gerd Hoffmann Subject: [PATCH v4 10/13] UefiCpuPkg: Add a new GUID to store the processors resource On a multi-processor

Re: [edk2-devel] [PATCH v2 03/10] UefiCpuPkg/SmmRelocationLib: Add library instance for AMD

2024-04-15 Thread Ni, Ray
Acked-by: Ray Ni Thanks, Ray From: Wu, Jiaxin Sent: Monday, April 15, 2024 21:30 To: devel@edk2.groups.io Cc: Abdul Lateef Attar ; Abner Chang ; Tom Lendacky ; Ni, Ray ; Zeng, Star ; Gerd Hoffmann ; Kumar, Rahul R Subject: [PATCH v2 03/10] UefiCpuPkg/SmmRelo

Re: [edk2-devel] [PATCH v4 00/13] Part 2 patch set to add LoongArch support into UefiCpuPkg

2024-04-15 Thread Ni, Ray
PR created for merge: Loongcpu by niruiyu · Pull Request #5560 · tianocore/edk2 (github.com) Thanks, Ray From: Chao Li Sent: Tuesday, April 16, 2024 10:42 To: devel@edk2.groups.io Cc: Ni, Ray ; Kumar, Rahul R ; Gerd

Re: [edk2-devel] [PATCH 1/1] BaseTool/Ecc: Fix incorrect parsing of variable initialisation

2024-04-15 Thread Sami Mujawar
Dear Maintainers, This patch fixes an ECC tool issue that is preventing the Arm CCA patch series from passing the edk2-CI tests, see https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=122726&view=logs&j=ec42d809-3c3b-54a9-276c-e54a8b9aaee9&t=bd91c6c3-6d75-5ede-7b63-5767cf827334&l=74

Re: [edk2-devel] [PATCH v4 6/6] StandaloneMmPkg: Support to unregister MMI handler in MMI handlers

2024-04-15 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Liu, Zhiguang Sent: Tuesday, April 16, 2024 10:41 To: devel@edk2.groups.io Cc: Liu, Zhiguang ; Liming Gao ; Wu, Jiaxin ; Ni, Ray ; Laszlo Ersek ; Ard Biesheuvel ; Sami Mujawar Subject: [PATCH v4 6/6] StandaloneMmPkg: Sup

Re: [edk2-devel] [PATCH v4 5/6] MdeModulePkg/SMM: Support to unregister SMI handler in SMI handlers

2024-04-15 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Liu, Zhiguang Sent: Tuesday, April 16, 2024 10:41 To: devel@edk2.groups.io Cc: Liu, Zhiguang ; Liming Gao ; Wu, Jiaxin ; Ni, Ray ; Laszlo Ersek Subject: [PATCH v4 5/6] MdeModulePkg/SMM: Support to unregister SMI handler

[edk2-devel] 回复: [PATCH v2 1/5] MdePkg: Add definition for NVMe Over Fabric Device Path

2024-04-15 Thread gaoliming via groups.io
Reviewed-by: Liming Gao > -邮件原件- > 发件人: Sachin Ganesh > 发送时间: 2024年4月16日 3:28 > 收件人: devel@edk2.groups.io > 抄送: gaolim...@byosoft.com.cn; michael.d.kin...@intel.com; > zhiguang@intel.com; Felix Polyudov ; Dhanaraj V > ; Sachin Ganesh > 主题: [PATCH v2 1/5] MdePkg: Add definition for N

[edk2-devel] [PATCH v5 1/2] SecurityPkg/OpalPasswordDxe: Change callback action to meet UEFI spec

2024-04-15 Thread Cindy Kuo
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4735 Should not call HiiGetBrowserData() and HiiSetBrowserData() in ACTION_FORM_OPEN callback function. Those APIs are called within OpalHiiSetBrowserData/OpalHiiGetBrowserData which have been used by OpalHii.c. Change callback action from FORM_

[edk2-devel] [PATCH v5 0/2] SecurityPkg/OpalPasswordDxe: Update according to UEFI spec

2024-04-15 Thread Cindy Kuo
For opalHii current design, it will display all NVME disks when the user enters TCG Drive Management dynamically. Also, the related disk info form will be created along with the disks. These actions will call get/set browser to refresh the display, which is not allowed in ACTION_FORM_OPEN callbac

[edk2-devel] [PATCH v5 2/2] SecurityPkg/OpalPasswordDxe: Force reparsing IFR binary when RETRIEVE

2024-04-15 Thread Cindy Kuo
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4735 When change callback action from FORM_OPEN to RETRIEVE, it is observed that NVNE disks will not be displayed when the user enters the formset at the first time. Revisit the formset can see the update. 1. Add HiiUpdateForm() to force reparsi

Re: [edk2-devel] [PATCH] NetworkPkg/WifiConnectionManagerDxe: Update UI according to UEFI spec

2024-04-15 Thread Michael D Kinney
Acked-by: Michael D Kinney > -Original Message- > From: devel@edk2.groups.io On Behalf Of Clark- > williams, Zachary > Sent: Wednesday, April 10, 2024 9:03 AM > To: Tan, Ming ; devel@edk2.groups.io > Cc: Kasbekar, Saloni ; Bi, Dandan > ; POLUDOV, FELIX ; Liu, Liqi > > Subject: Re: [edk

Re: [edk2-devel] [PATCH v1 1/3] uefi-sct/SctPkg: TCG2 Protocol: correct definition of TPMT_HA struct

2024-04-15 Thread Heinrich Schuchardt
On 4/16/24 00:23, Stuart Yoder wrote: The TPMT_HA struct defining event log hash algorithms was cut/pasted from the TCG EFI Protocol specification which used a C struct with a flexible array member as the last element. This is incorrect because TPMT_HA itself is used as an array element, and thu

Re: [edk2-devel] [PATCH v1 3/3] uefi-sct/SctPkg: TCG2 Protocol: #pragma pack cleanup

2024-04-15 Thread Heinrich Schuchardt
On 4/16/24 00:23, Stuart Yoder wrote: Fix compiler warning by adding #pragma pack() to close a pragma section. Also delete extraneous #pragma pack(1). Signed-off-by: Stuart Yoder Reviewed-by: Heinrich Schuchardt --- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/TCG2Proto