summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-06-04UefiCpuPkg: Remove GetAcpiCpuData() in CpuS3.cDun Tan3-272/+5
Remove GetAcpiCpuData() in CpuS3.c. The mAcpiCpuData is not needed in S3 boot anymore. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
2024-06-04MdeModulePkg:Remove MpService2Ppi field in SMM_S3_RESUME_STATEDun Tan1-2/+1
This MpService2Ppi field in SMM_S3_RESUME_STATE is used to wakeup AP to do the CPU initialization during smm s3 boot when the execution mode of PEI and DXE are the same. Currently, in CpuS3.c of smm cpu driver, BSP doesn't need to wakeup AP anymore. The initialization for AP will be done in S3Resume.c before transfer to CpuS3.c of smm cpu driver. So we can remove the MpService2Ppi field in SMM_S3_RESUME_STATE. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2024-06-04UefiCpuPkg: Remove unneeded MpService2Ppi assignmentDun Tan1-14/+0
Remove the unneeded assignment of MpService2Ppi field in SmmS3ResumeState. Previously, when the execution combination of PEI and DXE are the same, the pointer of mpservice ppi will be passed to CpuS3.c in smm cpu driver to wakeup all APs, instead of init-sipi-sipi. Currently, CpuS3.c doesn't need to wakeup Aps anymore. So remove the duplicated mpservice locate and assignment to MpService2Ppi field in SmmS3ResumeState. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
2024-06-04UefiCpuPkg:Remove code to wakeup AP and relocate apDun Tan6-686/+12
After the code to load mtrr setting, set register table, handle APIC setting and Interrupt after INIT-SIPI-SIPI is moved, the InitializeCpuProcedure() only contains following code logic: 1.Bsp runs ExecuteFirstSmiInit(). 2.Bsp transfers AP to safe hlt-loop During S3 boot, since APs will be relocated to new safe buffer by the callback of gEdkiiEndOfS3ResumeGuid in PeiMpLib, Bsp doesn't need to transfer AP to safe hlt-loop any more. SmmRestoreCpu() in CpuS3 only needs to runs the ExecuteFirstSmiInit() on BSP. So remove code to wakeup AP by INIT-SIPI-SIPI and remove code to relocate ap to safe hlt-loop. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
2024-06-04UefiCpuPkg:Remove code to handle APIC setting and InterruptDun Tan1-5/+0
Remove ProgramVirtualWireMode()/DisableLvtInterrupts() since APs won't be waken by INIT-SIPI-SIPI in CpuS3.c any more. The two functions has been executed in MpInitLibInitialize() in PeiMplib. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
2024-06-04UefiCpuPkg:Relocate AP to new safe buffer in PeiMpLibDun Tan3-2/+161
In this commit, change PeiMpLib to install callback of gEdkiiEndOfS3ResumeGuid to relocate AP to new safe buffer. The gEdkiiEndOfS3ResumeGuid is installed in S3Resume.c before jmping to OS waking vector. Previously, code in CpuS3.c of PiSmmCpuDxe driver will prepare the new safe buffer for AP and place AP in hlt loop state. With this code change, we can remove the Machine Instructions of mApHltLoopCode in PiSmmCpuDxe. Also we can reuse the related code in DxeMpLib for PeiMpLib. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
2024-06-04UefiCpuPkg: Install gEdkiiEndOfS3ResumeGuid in S3ResumeDun Tan1-0/+13
Install gEdkiiEndOfS3ResumeGuid in S3Resume to trigger callback registered by PeiMpLib. The callback is to relocate Ap to new safe memory before jump to OS waking vector in S3 boot flow. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
2024-06-04UefiCpuPkg:Move some code in DxeMpLib to common placeDun Tan3-148/+198
Move some code in DxeMpLib.C to common MpLib.c. The related code is to relocate Ap to new safe buffer before booting into OS. In next commits, these code also will be used by PeiMpLib. This commit doesn't change any code functionality. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
2024-06-04UefiCpuPkg:Abstract some DxeMpLib code to functionDun Tan1-82/+140
Abstract some DxeMpLib code to function in this commit. Some of these internal functions will be moved to common MpLib.c in following commits. Then PeiMpLib can reuse the code. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
2024-06-04UefiCpuPkg: Disable PG in IA32 ApLoopCodeDun Tan1-1/+5
Disable paging in IA32 RelocateApLoop assembly code to fix the issue that the AP page table is unavailiable after boot OS under IA32 execution mode. This issue exist in IA32 PEI + IA32 DXE normal boot (also S3 boot with IA32 PEI after previous three commits are accepted). In current MpLib code, the IA32 execution mode code did not create page table in reserved memory like what X64 code did. If PcdCpuStackGuard is TRUE, the PG is enabled for AP in current RelocateApLoop assembly code. And the page table for AP is unavailiable after boot OS. This might cause potential issue. So disable PG in IA32 RelocateApLoop. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
2024-06-04UefiCpuPkg: Remove code to set register tableDun Tan1-423/+0
Remove code to set register table in CpuS3.c. In previous commit, PcdCpuFeaturesInitOnS3Resume has been set to TRUE. So that CpuFeaturesPei PEIM will initialize the CPU registers and perform CPU features initialization. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
2024-06-04UefiCpuPkg:Set PcdCpuFeaturesInitOnS3Resume to TRUEDun Tan1-2/+2
Set PcdCpuFeaturesInitOnS3Resume to TRUE. So that CpuFeaturesPei PEIM will initialize the CPU registers and perform CPU features initialization. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
2024-06-04UefiCpuPkg: Remove code to load mtrr settingDun Tan1-33/+1
Remove code to load mtrr setting in CpuS3.c. In previous commits, before transferring to CpuS3.c, MTRR setting has been loaded in S3RestoreConfig2() for all CPU. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
2024-06-04UefiCpuPkg: LoadMtrrData for all cpu in S3ResumeDun Tan2-2/+53
In this commit, S3Resume.c wakeup all Aps to run LoadMtrrData for all cpu before transfer to CpuS3.c in smm cpu driver. The MtrrSetting table can be restored by gEdkiiS3MtrrSettingGuid which is saved by lockbox in PEI phase. This can avoid waking up APs in CpuS3.c. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
2024-06-04UefiCpuPkg: Save MTRR by lockbox in CpuS3DataDxeDun Tan2-2/+15
Save MTRR by lockbox in CpuS3DataDxe. In S3 boot, The MTRR setting will be restored in S3Resume.c in following patches. Then S3Resume.c will wakeup all APs to load the MTRR setting. This can avoid waking up APs in CpuS3.c. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
2024-06-04UefiCpuPkg: Add locbox lib instance in DSCDun Tan1-1/+2
Add locbox lib instance in DSC. The SmmLockBoxDxeLib will be consumed by CpuS3DataDxe driver Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
2024-06-04OvmfPkg: Save MTRR by lockbox in CpuS3DataDxeDun Tan2-2/+15
Save MTRR by lockbox in CpuS3DataDxe. In S3 boot, The MTRR setting will be restored in S3Resume.c in following patches. Then S3Resume.c will wakeup all APs to load the MTRR setting. This can avoid waking up APs in CpuS3.c. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
2024-06-04MdeModulePkg: Add gEdkiiS3MtrrSettingGuidDun Tan1-1/+4
Add gEdkiiS3MtrrSettingGuid a new GUID for s3 MTRR setting. This GUID will be used to save MTRR_SETTINGS at EndOfDxe by LockBox and restore at S3 boot PEI phase for s3 usage. Signed-off-by: Dun Tan <dun.tan@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
2024-06-03ArmPkg: Set BIOS Segment to 0 in SMBIOS Type 0 tableRebecca Cran2-2/+1
According to the SMBIOS specification, on UEFI systems the BIOS Segment field in the Type 0 table isn't relevant and should be set to 0. Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
2024-06-03CryptoPkg/BaseCryptLib: Enable more functions for SMM/StandaloneMMNhi Pham1-3/+3
This facilitates RSA extension, PKCS7 sign, and bignum function to broaden the range of algorithms available in SMM/StandaloneMM for platform utilization. Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
2024-06-02MdeModulePkg: Update GCD attribute conversion to support SP attributeDu Lin1-0/+1
Add a new entry into GCD attribute conversion table to convert EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE to EFI_MEMORY_SP. Signed-off-by: Du Lin <du.lin@intel.com>
2024-05-31OvmfPkg/VirtioRngDxe: check if device is readyGerd Hoffmann2-3/+11
Add a 'Ready' boolean to the driver state struct, use it to track whenever the device is ready to be used. In case it is not ready throw an EFI_DEVICE_ERROR instead of sending a request which will never receive an answer. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-05-31CryptoPkg: Remove deprecated code related to SHA-1Shang Qingyu2-16/+0
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4698 The default drbg type of randlib has been switched to aes_256_ctr in openssl1.1.1, so sha1 is not really used in RandomSeed(). Remove related code which do SHA-1 support checking in CryptRand.c and CryptRandTsc.c to avoid potential compatibility errors. Cc: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Shang Qingyu <qingyu.shang@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com>
2024-05-31CryptoPkg: Fix bug for correct return value checking when get X509CertQingyu1-3/+3
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4509 CryptX509.c file has X509GetTBSCert() funtion and it is added Inf variable to collect the return value of ASN1_get_object(), which return 0x80 in error case. Supplement the return value check during the second function call and correct the check logic. Signed-off-by: Qingyu <qingyu.shang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com>
2024-05-31CryptoPkg: Add support for aes128-sha256 and aes256-sha256 cipherShang Qingyu1-0/+11
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4739 AES256-SHA256 is a Tls1.2 suite we need to support, add it to deflt_ciphers in OpensslStub. Signed-off-by: Shang Qingyu <qingyu.shang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com>
2024-05-31pip: bump edk2-pytool-extensions from 0.26.4 to 0.27.5dependabot[bot]1-1/+1
Bumps [edk2-pytool-extensions](https://github.com/tianocore/edk2-pytool-extensions) from 0.26.4 to 0.27.5. - [Release notes](https://github.com/tianocore/edk2-pytool-extensions/releases) - [Commits](https://github.com/tianocore/edk2-pytool-extensions/compare/v0.26.4...v0.27.5) --- updated-dependencies: - dependency-name: edk2-pytool-extensions dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
2024-05-30pip: bump edk2-pytool-library from 0.20.0 to 0.21.5dependabot[bot]1-1/+1
Bumps [edk2-pytool-library](https://github.com/tianocore/edk2-pytool-library) from 0.20.0 to 0.21.5. - [Release notes](https://github.com/tianocore/edk2-pytool-library/releases) - [Commits](https://github.com/tianocore/edk2-pytool-library/compare/v0.20.0...v0.21.5) --- updated-dependencies: - dependency-name: edk2-pytool-library dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
2024-05-30NetworkPkg TcpDxe: Fixed system stuck on PXE boot flow in iPXE environmentSam1-1/+1
This bug fix is based on the following commit "NetworkPkg TcpDxe: SECURITY PATCH" REF: 1904a64 Issue Description: An "Invalid handle" error was detected during runtime when attempting to destroy a child instance of the hashing protocol. The problematic code segment was: NetworkPkg\TcpDxe\TcpDriver.c Status = Hash2ServiceBinding->DestroyChild(Hash2ServiceBinding, ​&mHash2ServiceHandle); Root Cause Analysis: The root cause of the error was the passing of an incorrect parameter type, a pointer to an EFI_HANDLE instead of an EFI_HANDLE itself, to the DestroyChild function. This mismatch resulted in the function receiving an invalid handle. Implemented Solution: To resolve this issue, the function call was corrected to pass mHash2ServiceHandle directly: NetworkPkg\TcpDxe\TcpDriver.c Status = Hash2ServiceBinding->DestroyChild(Hash2ServiceBinding, mHash2ServiceHandle); This modification ensures the correct handle type is used, effectively rectifying the "Invalid handle" error. Verification: Testing has been conducted, confirming the efficacy of the fix. Additionally, the BIOS can boot into the OS in an iPXE environment. Cc: Doug Flick [MSFT] <doug.edk2@gmail.com> Signed-off-by: Sam Tsai [Wiwynn] <sam_tsai@wiwynn.com> Reviewed-by: Saloni Kasbekar <saloni.kasbekar@intel.com>
2024-05-30pip: bump regex from 2023.12.25 to 2024.5.15dependabot[bot]1-1/+1
Bumps [regex](https://github.com/mrabarnett/mrab-regex) from 2023.12.25 to 2024.5.15. - [Changelog](https://github.com/mrabarnett/mrab-regex/blob/hg/changelog.txt) - [Commits](https://github.com/mrabarnett/mrab-regex/compare/2023.12.25...2024.5.15) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
2024-05-30OvmfPkg: Update VMM Hob list check to support new resource attributesDu Lin1-0/+2
Encrypted and Special Purpose resource attributes are introduced in PI 1.8 Specification. This patch is to update VMM Hob list integrity check to recognize these resource attributes. Signed-off-by: Du Lin <du.lin@intel.com>
2024-05-30MdePkg: Add Ipmi definitions header file for OEM net functionNickle Wang1-0/+18
Add net function definitions for OEM/Non-IPMI group request and response Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com> Cc: Nick Ramirez <nramirez@nvidia.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
2024-05-30UefiPayloadPkg: Update ReadMe.md to swig installGua Guo1-1/+3
Update ReadMe.md for swig install process in windows OS. Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Cc: James Lu <james.lu@intel.com> Cc: Gua Guo <gua.guo@intel.com> Signed-off-by: Gua Guo <gua.guo@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com>
2024-05-30EmulatorPkg: fix build error.Gerd Hoffmann1-1/+1
GasketSecSetTime is EMU_SET_TIME and returns EFI_STATUS. Fix the declaration accordingly. Fixes build error with gcc 14. /home/kraxel/projects/edk2/EmulatorPkg/Unix/Host/EmuThunk.c:429:3: error: initialization of ‘EFI_STATUS (__attribute__((ms_abi)) *)(EFI_TIME *)’ {aka ‘long long unsigned int (__attribute__((ms_abi)) *)(EFI_TIME *)’} from incompatible pointer type ‘void (__attribute__((ms_abi)) *)(EFI_TIME *)’ [-Wincompatible-pointer-types] 429 | GasketSecSetTime, | ^~~~~~~~~~~~~~~~ Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-05-30StandaloneMmPkg: Initialize 'WillReturn' variableZhiguang Liu1-0/+1
The local variable 'WillReturn' was being used without prior initialization in some code paths. This patch ensures that 'WillReturn' is properly initialized to prevent undefined behavior. Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
2024-05-30MdeModulePkg/SMM: Initialize 'WillReturn' variableZhiguang Liu1-0/+1
The local variable 'WillReturn' was being used without prior initialization in some code paths. This patch ensures that 'WillReturn' is properly initialized to prevent undefined behavior. Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
2024-05-30SecurityPkg: Update libspdm submodule to use GitLab cmocka repoMichael Kubacki1-0/+0
As noted in https://github.com/DMTF/libspdm/issues/2707, the cmocka submodule on cryptomilk is unreliable and impacting downstream consumer builds of SecurityPkg. This is considered a regression in that pre-existing workflows that clone and recursively initialize the repo are now broken. The cmocka host was switched to a more reliable gitlab host in https://github.com/DMTF/libspdm/pull/2710. This change updates the submodule in edk2 to use that commit so edk2 users are not blocked by cryptomilk.org service issues. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-05-29.github: Add PR templateMichael Kubacki3-0/+79
Adds a pull request template with important information to note in the PR description and guidance on how to classify the PR. A simple GitHub action is present that applies three labels based on the boxes checked in the PR template: - `impact:breaking-change` - `impact:security` - `impact:testing` These provide several purposes. 1. Bring attention to the impact of the PR both for reviewers and consumers that reference the PR in the future during debug or integration. 2. Allow automated tools like those that create release notes to be able to highlight important changes. 3. Similarly, to allow PR searches to conditionalize the search on PRs with these tags present. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-05-28BaseTools/Scripts: Remove Cc: tag check from PatchCheck.pyMichael D Kinney1-2/+0
The commit message format requirements have been updated for GitHub PR based code reviews and no longer required Cc: tags for the maintainers and reviewers. Remove the Cc: tag check from PatchCheck.py. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2024-05-27Add SM3 functions with openssl for MbedtlsWenxing Hou11-8/+1010
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Because the Mbedlts 3.3.0 doesn't have Sm3, the Sm3 implementaion is based on Openssl. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com> Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27CryptoPkg: Update *.inf in BaseCryptLibMbedTlsWenxing Hou5-66/+80
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Update all *.inf in BaseCryptLibMbedTls based on new implementation. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com> Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27CryptoPkg: Add ImageTimestampVerify based on MbedtlsWenxing Hou1-0/+381
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Timestamp Countersignature Verification implementaion based on Mbedtls. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com> Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27CryptoPkg: Add AuthenticodeVerify based on MbedtlsWenxing Hou1-0/+214
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Implement AuthenticodeVerify based on Mbedtls. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com> Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27CryptoPkg: Add more RSA related functions based on MbedtlsWenxing Hou3-0/+770
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Implement more RSA functions such as RsaPkcs1Sign based Mbedlts. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com> Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27CryptoPkg: Add Pkcs5 functions based on MbedtlsWenxing Hou1-0/+100
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 PBKDF2 Key Derivation Function Wrapper Implementation over MbedTLS. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com> Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27CryptoPkg: Add Pkcs7 related functions based on MbedtlsWenxing Hou7-12/+2843
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Because the current Mbedlts pkcs7 library doesn't support authenticatedAttributes and only support 0 or 1 certificates in Signed data, the patch implement Pkcs7 by low Mbedtls Api. And the implementation has pass unit_tes and integration test. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com> Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27CryptoPkg: Add X509 functions based on MbedtlsWenxing Hou1-0/+1940
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 X.509 Certificate Handler Wrapper Implementation over MbedTLS. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com> Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27CryptoPkg: Add Pem APIs based on MbedtlsWenxing Hou1-0/+138
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Implement Pem API based on Mbedtls. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com> Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27CryptoPkg: Add rand function for BaseCryptLibMbedTlsWenxing Hou4-0/+246
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 Add rand function for BaseCryptLibMbedTls. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com> Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27CryptoPkg: Add AeadAesGcm based on MbedtlsWenxing Hou1-0/+227
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4177 AeadAesGcm implementation based on Mbedtls. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Yi Li <yi1.li@intel.com> Signed-off-by: Wenxing Hou <wenxing.hou@intel.com> Reviewed-by: Yi Li <yi1.li@intel.com> Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2024-05-27UefiCpuPkg/MpLib:Do not assume BSP is #0.Ning Feng1-18/+31
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4778 MPInitlib have wrong expectation that BSP index should always be 0 in MpInitLibInitialize(), SwitchBsp(),ApWakeupFunction(). That will cause the data mismatch, if the initial BSP is not 0. Reviewed-by: Ray Ni <ray.ni@intel.com> Signed-off-by: Ning Feng <ning.feng@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com>