Re: [edk2-devel] [edk2-discuss] PLDM messages via MCTP over KCS

2023-08-30 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Hi Aladyshev, > -Original Message- > From: Konstantin Aladyshev > Sent: Wednesday, August 30, 2023 11:09 PM > To: Chang, Abner > Cc: disc...@edk2.groups.io; devel@edk2.groups.io > Subject: Re: [edk2-discuss] PLDM messages via MCTP over KCS > > Caution:

Re: [edk2-devel] [PATCH v2 1/6] RedfishClientPkg: fix crash on access to uninialized list variable.

2023-08-30 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Yes Nickle, I agree to have a common API for initializing the structure members. Thanks Abner From: Nickle Wang Sent: Wednesday, August 30, 2023 9:48 AM To: Mike Maslenkin ; devel@edk2.groups.io; Chang, Abner Cc: ig...@ami.com Subject: RE: [PATCH v2 1/6]

Re: [edk2-devel] [edk2/add_mbedtls PATCH 0/9] *** Add HMAC/HKDF/RSA/HASH features based on Mbedtls ***

2023-08-30 Thread Yao, Jiewen
Hi Sean/Andrew/Leif/Mike Now, I think we actually have multiple options to handle this: 1) CryptoPkg in edk2 repo (add MbedTls to existing CryptoPkg) 2) CryptoPkg in edk2 repo + a new MbedTlsCryptoPkg in edk2 repo 3) CryptoPkg in edk2 repo + MbedTlsCryptoPkg in a new repo 4) Move CryptoPkg

Re: [edk2-devel] [edk2/add_mbedtls PATCH 0/9] *** Add HMAC/HKDF/RSA/HASH features based on Mbedtls ***

2023-08-30 Thread Yao, Jiewen
Hi Sean Thanks for the feedback. Personally, I don't have strong opinion on this. Since this is a big change, I would like to have Steward member's opinion. Hi Andrew/Leif/Mike What do you think? Thank you Yao, Jiewen > -Original Message- > From: devel@edk2.groups.io On Behalf Of

[edk2-devel] [PATCH v3 26/26] MdeModulePkg: Delete Memory Protection PCDs

2023-08-30 Thread Taylor Beebe
Now that the transition to use SetMemoryProtectionsLib and GetMemoryProtectionsLib is complete, delete the memory protection PCDs to avoid confusing the interface. All memory protection settings will now be set and consumed via the libraries. Signed-off-by: Taylor Beebe Cc: Jian J Wang Cc:

[edk2-devel] [PATCH v3 25/26] ArmVirtPkg: Delete Memory Protection PCDs

2023-08-30 Thread Taylor Beebe
Now that the transition to use SetMemoryProtectionsLib and GetMemoryProtectionsLib is complete, delete the memory protection PCDs to avoid confusing the interface. All memory protection settings will now be set and consumed via the libraries. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc:

[edk2-devel] [PATCH v3 23/26] MdeModulePkg: Delete PCD Profile from SetMemoryProtectionsLib

2023-08-30 Thread Taylor Beebe
Now that the transition to use SetMemoryProtectionsLib and GetMemoryProtectionsLib is complete, delete the PCD profile to avoid confusing the interface. All memory protection settings will now be set and consumed via the libraries. Signed-off-by: Taylor Beebe Cc: Jian J Wang Cc: Liming Gao ---

[edk2-devel] [PATCH v3 24/26] OvmfPkg: Delete Memory Protection PCDs

2023-08-30 Thread Taylor Beebe
Now that the transition to use SetMemoryProtectionsLib and GetMemoryProtectionsLib is complete, delete the memory protection PCDs to avoid confusing the interface. All memory protection settings will now be set and consumed via the libraries. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc:

[edk2-devel] [PATCH v3 21/26] OvmfPkg: Enable Choosing Memory Protection Profile via QemuCfg

2023-08-30 Thread Taylor Beebe
Now that the EDK2 tree uses GetMemoryProtectionsLib to query the platform memory protection settings, OvmfPkg can be updated to use QemuCfg to set the entire memory protection profile instead of just SetNxForStack. For example, the following will set the DXE memory protection to the RELEASE

[edk2-devel] [PATCH v3 22/26] ArmVirtPkg: Apply Memory Protections via SetMemoryProtectionsLib

2023-08-30 Thread Taylor Beebe
Set the memory protections on Arm virtual platforms. Because the QemuFg parser is not currently available in ArmVirtPkg, use the RELEASE profile by default. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Sami Mujawar Cc: Gerd Hoffmann ---

[edk2-devel] [PATCH v3 20/26] MdeModulePkg: Add Additional Profiles to SetMemoryProtectionsLib

2023-08-30 Thread Taylor Beebe
Now that the EDK2 tree uses GetMemoryProtectionsLib to query the platform memory protection settings, we can add additional profiles to SetMemoryProtectionsLib to give plaforms more options for setting memory protections. Signed-off-by: Taylor Beebe Cc: Jian J Wang Cc: Liming Gao ---

[edk2-devel] [PATCH v3 19/26] MdeModulePkg: Use GetMemoryProtectionsLib instead of Memory Protection PCDs

2023-08-30 Thread Taylor Beebe
Replace references to the memory protection PCDs to instead check the platform protections via GetMemoryProtectionsLib. Because the protection profile is equivalent to the PCD settings, this updated does not cause a torn state. Signed-off-by: Taylor Beebe Cc: Jian J Wang Cc: Liming Gao Cc:

[edk2-devel] [PATCH v3 18/26] UefiCpuPkg: Use GetMemoryProtectionsLib instead of Memory Protection PCDs

2023-08-30 Thread Taylor Beebe
Replace references to the memory protection PCDs to instead check the platform protections via GetMemoryProtectionsLib. Because the protection profile is equivalent to the PCD settings, this updated does not cause a torn state. Signed-off-by: Taylor Beebe Cc: Eric Dong Cc: Ray Ni Cc: Rahul

[edk2-devel] [PATCH v3 17/26] OvmfPkg: Use GetMemoryProtectionsLib instead of Memory Protection PCDs

2023-08-30 Thread Taylor Beebe
Replace references to the memory protection PCDs to instead check the platform protections via GetMemoryProtectionsLib. Because the protection profile is equivalent to the PCD settings, this updated does not cause a torn state. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Jiewen Yao Cc:

[edk2-devel] [PATCH v3 16/26] EmulatorPkg: Use GetMemoryProtectionsLib instead of Memory Protection PCDs

2023-08-30 Thread Taylor Beebe
Replace references to the memory protection PCDs to instead check the platform protections via GetMemoryProtectionsLib. Because the protection profile is equivalent to the PCD settings, this updated does not cause a torn state. Signed-off-by: Taylor Beebe Cc: Andrew Fish Cc: Ray Ni ---

[edk2-devel] [PATCH v3 13/26] UefiPayloadPkg: Update DXE Handoff to use SetMemoryProtectionsLib

2023-08-30 Thread Taylor Beebe
Update the DXE handoff logic in UefiPayloadPkg to use SetMemoryProtectionsLib to fetch the platform memory protection settings and reference them when creating the page tables. Because the protection profile is equivalent to the PCD settings even when the platform does not explicitly set a

[edk2-devel] [PATCH v3 14/26] MdeModulePkg: Update DXE Handoff to use SetMemoryProtectionsLib

2023-08-30 Thread Taylor Beebe
Update the DXE handoff logic in MdeModulePkg to use SetMemoryProtectionsLib to fetch the platform memory protection settings and reference them when creating the page tables. Because the protection profile is equivalent to the PCD settings even when the platform does not explicitly set a profile,

[edk2-devel] [PATCH v3 15/26] ArmPkg: Use GetMemoryProtectionsLib instead of Memory Protection PCDs

2023-08-30 Thread Taylor Beebe
Replace references to the memory protection PCDs to instead check the platform protections via GetMemoryProtectionsLib. Signed-off-by: Taylor Beebe Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Sami Mujawar --- ArmPkg/Drivers/CpuDxe/CpuDxe.c | 5 ++--- ArmPkg/ArmPkg.dsc| 1 +

[edk2-devel] [PATCH v3 11/26] OvmfPkg: Apply Memory Protections via SetMemoryProtectionsLib

2023-08-30 Thread Taylor Beebe
Use SetMemoryProtectionsLib to set the memory protections for the platform in both normal and PEI-less boot. The protections set are equivalent to the PCD settings and the ability to set NxForStack via QemuCfg is preserved. Once the transition to use SetMemoryProtectionsLib and

[edk2-devel] [PATCH v3 12/26] OvmfPkg: Update PeilessStartupLib to use SetMemoryProtectionsLib

2023-08-30 Thread Taylor Beebe
This patch updates the DXE Handoff in PEI-less Startup to use SetMemoryProtectionsLib to get the platform memory protection settings and build the page tables based on the applied protections. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann

[edk2-devel] [PATCH v3 10/26] OvmfPkg: Add Memory Protection Library Definitions to Platforms

2023-08-30 Thread Taylor Beebe
Add library classes for SetMemoryProtectionsLib and GetMemoryProtectionsLib to OvmfPkg platfomrs. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Cc: Rebecca Cran Cc: Peter Grehan Cc: Corvin Köhne Cc: Jianyong Wu Cc: Anatol Belski Cc:

[edk2-devel] [PATCH v3 08/26] UefiCpuPkg: Always Set Stack Guard in MpPei Init

2023-08-30 Thread Taylor Beebe
Memory protection is not set in PEI and ingested during and after DXE handoff. This paradigm means that the platform cannot reliably query the stack guard setting during MpInit. Because the execution path of PEI consistent and no third party code is executed, setting the stack guard in MpInit on

[edk2-devel] [PATCH v3 09/26] ArmVirtPkg: Add Memory Protection Library Definitions to Platforms

2023-08-30 Thread Taylor Beebe
Add library classes for SetMemoryProtectionsLib and GetMemoryProtectionsLib to ArmVirtPkg. Signed-off-by: Taylor Beebe Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Sami Mujawar Cc: Gerd Hoffmann Cc: Julien Grall --- ArmVirtPkg/ArmVirt.dsc.inc | 6 ++ 1 file changed, 6 insertions(+) diff

[edk2-devel] [PATCH v3 02/26] MdeModulePkg: Define SetMemoryProtectionsLib and GetMemoryProtectionsLib

2023-08-30 Thread Taylor Beebe
SetMemoryProtectionsLib is a PEIM which allows platforms to apply memory protection settings to the current boot. GetMemoryProtectionsLib has DXE and MM implementations to allow platforms to query the current memory protection settings via a global variable populated by the library

[edk2-devel] [PATCH v3 07/26] MdeModulePkg: Check Print Level Before Dumping GCD Memory Map

2023-08-30 Thread Taylor Beebe
When page/pool protections are active, the GCD sync process takes quite a bit longer than normal. This behavior is primarily due to a function which dumps the GCD memory map to the console. This dump function runs only on DEBUG builds but will iterate through the GCD memory map dozens of times

[edk2-devel] [PATCH v3 05/26] MdeModulePkg: Copy PEI PCD Database Into New Buffer

2023-08-30 Thread Taylor Beebe
HOB memory should not be written to in DXE phase. This patch copies the PCD database from PEI into a new buffer so updates to dynamic PCDs don't write to HOB memory. Signed-off-by: Taylor Beebe Cc: Jian J Wang Cc: Liming Gao Cc: Dandan Bi --- MdeModulePkg/Universal/PCD/Dxe/Service.c | 6

[edk2-devel] [PATCH v3 04/26] MdeModulePkg: Implement SetMemoryProtectionsLib and GetMemoryProtectionsLib

2023-08-30 Thread Taylor Beebe
The SetMemoryProtectionsLib implementation has functionality for setting protections based on a preset profile or a custom DXE/MM profile passed in by the caller. The implementation also supports locking the protections (tracked via an extra boolean stored in the HOB entry) which prevents the

[edk2-devel] [PATCH v3 06/26] MdeModulePkg: Apply Protections to the HOB List

2023-08-30 Thread Taylor Beebe
Because the platform memory protection settings will be stored in the HOB, the HOB list should be marked read-only and non-executable as soon as possible in boot. This patch page-aligns the allocated HOB list in DXE and marks it RO/NX during memory protection initialization. Signed-off-by:

[edk2-devel] [PATCH v3 03/26] MdeModulePkg: Add NULL Instances for Get/SetMemoryProtectionsLib

2023-08-30 Thread Taylor Beebe
The NULL instances for GetMemoryProtectionsLib and SetMemoryProtectionsLib just zero out the memory protections structure effectively disabling memory protections. Signed-off-by: Taylor Beebe Cc: Jian J Wang Cc: Liming Gao ---

[edk2-devel] [PATCH v3 00/26] Implement Dynamic Memory Protections

2023-08-30 Thread Taylor Beebe
v3: - Fix incorrect ordering of the SetMemoryProtectionsLib profile definitions midway through the patch series by using C99 instantialization. - Update OvmfPkg to use the Release profile by default. - Update the method by which platform initialization in OvmfPkg associates the input FwCfg data

[edk2-devel] [PATCH v3 01/26] MdeModulePkg: Add DXE and MM Memory Protection Settings Definitions

2023-08-30 Thread Taylor Beebe
These headers provide settings definitions for memory protections, settings profiles for easily enabling memory protections, and the GUIDs used for producing the memory protection HOB entry. The settings options are functionally 1:1 with the existing PCD bitfield definitions. Instead of setting a

Re: [edk2-devel] [PATCH 1/1] ArmPkg/SmbiosMiscDxe: use UINT64 for BiosPhysicalSize

2023-08-30 Thread Leif Lindholm
On Wed, Aug 30, 2023 at 14:50:33 +0200, Ard Biesheuvel wrote: > On Wed, 30 Aug 2023 at 13:39, Leif Lindholm wrote: > > > > The top two bits of the Extended BIOS ROM Size field indicates the unit > > used for the remaining 14 bits. If the size is greater than 16GB, the > > unit is gigabytes. > >

Re: [edk2-devel] [edk2/add_mbedtls PATCH 0/9] *** Add HMAC/HKDF/RSA/HASH features based on Mbedtls ***

2023-08-30 Thread Sean
I appreciate and really like this work to enable mbedtls but I don't like the idea of adding another submodule to edk2. For a long time there has been discussion about formalizing the abstraction of the edk2 crypto api so that it would be practical to implement edk2's crypto using various

Re: [edk2-devel] [edk2/add_mbedtls PATCH 0/9] *** Add HMAC/HKDF/RSA/HASH features based on Mbedtls ***

2023-08-30 Thread Michael Kubacki
It would be great if you could update the CryptoPkg Readme.md file for this series. Thanks, Michael On 8/30/2023 3:52 AM, Wenxing Hou wrote: *** Add BaseCryptLibMbedTls for CryptoPkg, which can be an alternative to OpenSSL in some scenarios. There are four features in the patch:

[edk2-devel] [PATCH] MdeModulePkg/SmbiosDxe: Fix BcdRevision is not match with SMBIOS version

2023-08-30 Thread horacex . lien
From: HoraceX Lien REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4544 These value of Major/Minor version are updated from SMBIOS memory data, but BCD Revision is updated from PCD PcdSmbiosVersion. We should also update PCD PcdSmbiosVersion from SMBIOS memory data, to ensure that get

[edk2-devel] [PATCH v1] MdeModulePkg: Fix memory leak in LocateHandleBuffer()

2023-08-30 Thread Nate DeSimone
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4543 REF: https://uefi.org/specs/UEFI/2.10/07_Services_Boot_Services.html#efi-boot-services-locatehandlebuffer CoreLocateHandleBuffer() can in certain cases, can return an error and not free an allocated buffer. This scenario occurs if the

Re: [edk2-devel] [PATCH v2 6/6] RedfishClientPkg: spelling fixes

2023-08-30 Thread Igor Kulchytskyy via groups.io
Reviewed-by: Igor Kulchytskyy Reviewed the whole patch V2 Regards, Igor Kulchytskyy -Original Message- From: Mike Maslenkin Sent: Tuesday, August 29, 2023 4:01 AM To: devel@edk2.groups.io Cc: abner.ch...@amd.com; nick...@nvidia.com; Igor Kulchytskyy ; Mike Maslenkin Subject: [EXTERNAL]

Re: [edk2-devel] [edk2-discuss] PLDM messages via MCTP over KCS

2023-08-30 Thread Konstantin Aladyshev
Hi! I've started to implement MCTP over KCS binding for the libmctp (https://github.com/openbmc/libmctp) and test it with the current code in the ManageabilityPkg. I was able successfully send the MCTP packet to the BMC, but right now I'm having some troubles with receiving the answer back. I

Re: [edk2-devel] [PATCH 1/1] ArmPkg/ExceptionSupport: Support backtrace through an exception

2023-08-30 Thread Laszlo Ersek
On 8/30/23 15:00, Ard Biesheuvel wrote: > On Tue, 29 Aug 2023 at 16:37, Laszlo Ersek wrote: >> >> On 8/29/23 15:29, Ard Biesheuvel wrote: >>> Laszlo reports that the efi_gdb.py script fails to produce a full >>> backtrace when attaching it to an ARM firmware build that has halted on >>> an

Re: [edk2-devel] [PATCH v1 2/2] StandaloneMmPkg: Fix HOB space and heap space conflicted issue

2023-08-30 Thread Ard Biesheuvel
On Wed, 16 Aug 2023 at 10:56, Nhi Pham wrote: > > Hi Ard and Ming, > > I have been seeing an issue with StandaloneMM HobLib that can be fixed > by this patch as well. > > The function CreateHob() in the HobLib instance > StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.inf >

Re: [edk2-devel] [PATCH 1/1] ArmPkg/ExceptionSupport: Support backtrace through an exception

2023-08-30 Thread Ard Biesheuvel
On Tue, 29 Aug 2023 at 16:37, Laszlo Ersek wrote: > > On 8/29/23 15:29, Ard Biesheuvel wrote: > > Laszlo reports that the efi_gdb.py script fails to produce a full > > backtrace when attaching it to an ARM firmware build that has halted on > > an unhandled exception. > > > > The reason is that

Re: [edk2-devel] [PATCH 1/1] ArmPkg/SmbiosMiscDxe: use UINT64 for BiosPhysicalSize

2023-08-30 Thread Ard Biesheuvel
On Wed, 30 Aug 2023 at 13:39, Leif Lindholm wrote: > > The top two bits of the Extended BIOS ROM Size field indicates the unit > used for the remaining 14 bits. If the size is greater than 16GB, the > unit is gigabytes. > The test for this uses the local BiosPhysicalSize variable, which is a >

[edk2-devel] [PATCH 1/1] ArmPkg/SmbiosMiscDxe: use UINT64 for BiosPhysicalSize

2023-08-30 Thread Leif Lindholm
The top two bits of the Extended BIOS ROM Size field indicates the unit used for the remaining 14 bits. If the size is greater than 16GB, the unit is gigabytes. The test for this uses the local BiosPhysicalSize variable, which is a UINTN, meaning that when building for a 32/bit architecture (ARM)

Re: [edk2-devel] [Patch V2] MdeModulePkg/DxeCorePerformanceLib:fix smm perf issue

2023-08-30 Thread Ni, Ray
Reviewed-by: Ray Ni Thanks, Ray From: Tan, Dun Sent: Wednesday, August 30, 2023 3:35 PM To: devel@edk2.groups.io Cc: Wang, Jian J ; Gao, Liming ; Ni, Ray Subject: [Patch V2] MdeModulePkg/DxeCorePerformanceLib:fix smm perf issue Fix smm perf issue in

回复: [edk2-devel] [Patch V2 1/4] BaseTools: fixing FMMT ShrinkFv issue

2023-08-30 Thread gaoliming via groups.io
Christine: I have no comments for this patch set. Reviewed-by: Liming Gao Thanks Liming > -邮件原件- > 发件人: devel@edk2.groups.io 代表 Bob Feng > 发送时间: 2023年6月29日 14:54 > 收件人: Chen, Christine ; devel@edk2.groups.io > 抄送: Rebecca Cran ; Gao, Liming > > 主题: Re: [edk2-devel] [Patch V2 1/4]

[edk2-devel] [PATCH 7/9] CryptoPkg: Add Null functions for building pass

2023-08-30 Thread Wenxing Hou
Add Null functions to build. These feature are not supported now. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao cc: Yi Li Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Wenxing Hou --- .../BaseCryptLibMbedTls/Bn/CryptBnNull.c | 520

[edk2-devel] [PATCH 8/9] CryptoPkg: Add MD5/SHA1/SHA2 functions based on Mbedtls

2023-08-30 Thread Wenxing Hou
Add MD5/SHA1/SHA256/SHA384/SHA512 APIs. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao cc: Yi Li Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Wenxing Hou --- .../BaseCryptLibMbedTls/Hash/CryptMd5.c | 234 + .../BaseCryptLibMbedTls/Hash/CryptSha1.c

[edk2-devel] [PATCH 9/9] CryptoPkg: Add Mbedtls submodule in CI

2023-08-30 Thread Wenxing Hou
Change CI for new Mbedtls submodule. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao cc: Yi Li Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Wenxing Hou --- .pytool/CISettings.py | 2 ++ CryptoPkg/CryptoPkg.ci.yaml | 66 +++--

[edk2-devel] [PATCH 6/9] CryptoPkg: Add all .inf files for BaseCryptLibMbedTls

2023-08-30 Thread Wenxing Hou
Add .inf files and other support files. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao cc: Yi Li Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Wenxing Hou --- CryptoPkg/CryptoPkg.dec | 4 + CryptoPkg/CryptoPkgMbedTls.dsc| 280

[edk2-devel] [PATCH 5/9] CryptoPkg: Add RSA functions based on Mbedtls

2023-08-30 Thread Wenxing Hou
Add RSA APIs. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao cc: Yi Li Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Wenxing Hou --- .../BaseCryptLibMbedTls/InternalCryptLib.h| 44 +++ .../BaseCryptLibMbedTls/Pk/CryptRsaBasic.c| 268 ++

[edk2-devel] [PATCH 4/9] CryptoPkg: Add HKDF functions based on Mbedtls

2023-08-30 Thread Wenxing Hou
Add HKDF APIs. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao cc: Yi Li Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Wenxing Hou --- .../BaseCryptLibMbedTls/Kdf/CryptHkdf.c | 372 ++ .../BaseCryptLibMbedTls/Kdf/CryptHkdfNull.c | 192

[edk2-devel] [PATCH 3/9] CryptoPkg: Add HMAC functions based on Mbedtls

2023-08-30 Thread Wenxing Hou
Add HMAC APIS. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao cc: Yi Li Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Wenxing Hou --- .../BaseCryptLibMbedTls/Hmac/CryptHmac.c | 620 ++ .../BaseCryptLibMbedTls/Hmac/CryptHmacNull.c | 359

[edk2-devel] [PATCH 1/9] CryptoPkg: Add mbedtls submodule for EDKII

2023-08-30 Thread Wenxing Hou
Add mbedtls 3.3.0 as submodule in CryptoPkg. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao cc: Yi Li Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Wenxing Hou --- .gitmodules | 3 +++ CryptoPkg/Library/MbedTlsLib/mbedtls | 1 + 2 files

[edk2-devel] [PATCH 0/9] CryptoPkg: Add HMAC/HKDF/RSA/HASH features based on Mbedtls

2023-08-30 Thread Wenxing Hou
Purpose: Add BaseCryptLibMbedTls for CryptoPkg, which can be an alternative to OpenSSL in some scenarios. There are four features based on mbedtls in the patch: HMAC/HKDF/RSA/HASH. These functions can be uesed to reduce the size. The others features such as ECC/PKCS1 is WIP because of some known

Re: [edk2-devel] [PATCH V7 0/2] Support RSA4096 and RSA3072

2023-08-30 Thread Sheng Wei
Hi Jiewen, Do you have any comments on the patch V7? The 2 patches are for CryptoPkg and SecurityPky. Could you help to review/merge the patches? Thank you. BR Sheng Wei > -Original Message- > From: Sheng, W > Sent: Tuesday, August 22, 2023 1:59 PM > To: devel@edk2.groups.io; Yao, Jiewen

[edk2-devel] [edk2/add_mbedtls PATCH 9/9] CryptoPkg: Add Mbedtls submodule in CI

2023-08-30 Thread Wenxing Hou
Change CI for new Mbedtls submodule. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao cc: Yi Li Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Wenxing Hou --- .pytool/CISettings.py | 2 ++ CryptoPkg/CryptoPkg.ci.yaml | 66 +++--

[edk2-devel] [edk2/add_mbedtls PATCH 8/9] CryptoPkg: Add MD5/SHA1/SHA2 functions based on Mbedtls

2023-08-30 Thread Wenxing Hou
Add MD5/SHA1/SHA256/SHA384/SHA512 APIs. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao cc: Yi Li Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Wenxing Hou --- .../BaseCryptLibMbedTls/Hash/CryptMd5.c | 234 + .../BaseCryptLibMbedTls/Hash/CryptSha1.c

[edk2-devel] [edk2/add_mbedtls PATCH 7/9] CryptoPkg: Add Null functions for building pass

2023-08-30 Thread Wenxing Hou
Add Null functions to build. These feature are not supported now. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao cc: Yi Li Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Wenxing Hou --- .../BaseCryptLibMbedTls/Bn/CryptBnNull.c | 520

[edk2-devel] [edk2/add_mbedtls PATCH 6/9] CryptoPkg: Add all .inf files for BaseCryptLibMbedTls

2023-08-30 Thread Wenxing Hou
Add .inf files and other support files. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao cc: Yi Li Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Wenxing Hou --- CryptoPkg/CryptoPkg.dec | 4 + CryptoPkg/CryptoPkgMbedTls.dsc| 280

[edk2-devel] [edk2/add_mbedtls PATCH 5/9] CryptoPkg: Add RSA functions based on Mbedtls

2023-08-30 Thread Wenxing Hou
Add RSA APIs. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao cc: Yi Li Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Wenxing Hou --- .../BaseCryptLibMbedTls/InternalCryptLib.h| 44 +++ .../BaseCryptLibMbedTls/Pk/CryptRsaBasic.c| 268 ++

[edk2-devel] [edk2/add_mbedtls PATCH 4/9] CryptoPkg: Add HKDF functions based on Mbedtls

2023-08-30 Thread Wenxing Hou
Add HKDF APIs. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao cc: Yi Li Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Wenxing Hou --- .../BaseCryptLibMbedTls/Kdf/CryptHkdf.c | 372 ++ .../BaseCryptLibMbedTls/Kdf/CryptHkdfNull.c | 192

[edk2-devel] [edk2/add_mbedtls PATCH 3/9] CryptoPkg: Add HMAC functions based on Mbedtls

2023-08-30 Thread Wenxing Hou
Add HMAC APIS. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao cc: Yi Li Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Wenxing Hou --- .../BaseCryptLibMbedTls/Hmac/CryptHmac.c | 620 ++ .../BaseCryptLibMbedTls/Hmac/CryptHmacNull.c | 359

[edk2-devel] [edk2/add_mbedtls PATCH 0/9] *** Add HMAC/HKDF/RSA/HASH features based on Mbedtls ***

2023-08-30 Thread Wenxing Hou
*** Add BaseCryptLibMbedTls for CryptoPkg, which can be an alternative to OpenSSL in some scenarios. There are four features in the patch: HMAC/HKDF/RSA/HASH.*** Wenxing Hou (9): CryptoPkg: Add mbedtls submodule for EDKII CryptoPkg: Add mbedtls_config and MbedTlsLib.inf CryptoPkg: Add

[edk2-devel] [edk2/add_mbedtls PATCH 1/9] CryptoPkg: Add mbedtls submodule for EDKII

2023-08-30 Thread Wenxing Hou
Add mbedtls 3.3.0 as submodule in CryptoPkg. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Cc: Jiewen Yao cc: Yi Li Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Wenxing Hou --- .gitmodules | 3 +++ CryptoPkg/Library/MbedTlsLib/mbedtls | 1 + 2 files

[edk2-devel] [Patch V2] MdeModulePkg/DxeCorePerformanceLib:fix smm perf issue

2023-08-30 Thread duntan
Fix smm perf issue in DxeCorePerformanceLib. In current code logic, total SMM perf record is copied multiple times to FPDT table if multiple ReadyToBoot events are signaled. This patch changes the function InternalGetSmmPerfData() to only get newly generated Smm perf data. Then previous generated

[edk2-devel] [Patch V3 5/5] UefiCpuPkg/PiSmmCpuDxe: use MpService2Ppi to wakeup AP in s3

2023-08-30 Thread duntan
Use MpService2Ppi to wakeup AP in s3 boot flow during initializing CPU. If mSmmS3ResumeState->MpService2Ppi is not 0, then BSP will use MpService2Ppi->StartupAllCPUs to do CPU initialization for both BSP and AP instead of only sending InitSipiSipi for AP. Signed-off-by: Dun Tan Cc: Eric Dong

[edk2-devel] [Patch V3 4/5] UefiCpuPkg/PiSmmCpuDxe: code refinement for CpuS3.c

2023-08-30 Thread duntan
This commit is code logic refinement for s3 boot flow in CpuS3.c. It doesn't change any code functionality. This commit implementes InitializeAp and InitializeBsp as a single function since they are doing almost the same thing. Then both BSP and AP will execute the same function

[edk2-devel] [Patch V3 0/5] Use MpService2Ppi to wakeup CPU in Smm CpuS3

2023-08-30 Thread duntan
In V3 patch set: 1.Adjusted the order of some code in InitializeCpuBeforeRebase/After to make the code easier to understand 2.Remove the function cast of InitializeCpuProcedure. Only the 'code refinement for CpuS3.c' and 'use MpService2Ppi to wakeup AP in s3' patches are modified in V3 patch

Re: [edk2-devel] [PATCH 1/1] ShellPkg/SmbiosView: Update display of PCIe system slot ID

2023-08-30 Thread Gao, Zhichao
Already add me push tag. Once it pass the CI, it would be merged. Thanks, Zhichao > -Original Message- > From: Nhi Pham > Sent: Tuesday, August 29, 2023 10:36 AM > To: Gao, Zhichao ; Nhi Pham > ; devel@edk2.groups.io > Subject: Re: [PATCH 1/1] ShellPkg/SmbiosView: Update display of PCIe