summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-06-06CryptoPkg: Fix wrong logic in X509GetTBSCertWenxing Hou1-2/+2
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4509 Both return 0x80 value and Asn1Tag != V_ASN1_SEQUENCE are wrong return. Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
2024-06-06OvmfPkg/PlatformInitLib: allow PhysBits larger than 48Gerd Hoffmann1-5/+5
If GuestPhysBits reports more than 48 phys-bits can be used allow to go beyond that limit. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-06-06OvmfPkg/PlatformInitLib: add support for GuestPhysBitsGerd Hoffmann1-3/+14
Add support for GuestPhysBits (cpuid 0x80000008, eax, bits 23:16). GuestPhysBits is a field which can be set by the hypervisor to inform the guest about the /usable/ physical address space bits. This can be smaller than the PhysBits of the CPU, for example because of nested paging limitations. OVMF will read GuestPhysBits, log the value, in case it is set use it as upper limit. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-06-06MdeModulePkg/HiiDatabaseDxe: Remove assert for VarStoreId = 0Jeff Brasen1-2/+3
It is legal for the VarStoreId of a question to be 0 per the UEFI spec: "Specifies the identifier of a previously declared variable store to use when storing the question’s value. A value of zero indicates no associated variable store." Instead of hitting an assert just skip this question as there is no value to return. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
2024-06-06OvmfPkg: add morlock supportGerd Hoffmann8-0/+26
Add dsc + fdf include files to add the MorLock drivers to the build. Add the include files to OVMF build configurations. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-06-05ArmVirtPkg: Remove the NorFlashQemuLibChao Li2-178/+0
The FdtNorFlashQemuLib has been enabled, remove ArmVirtPkg version. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4770 Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Chao Li <lichao@loongson.cn>
2024-06-05MdePkg: Remove non-ASCII characters from header fileNeo Hsueh2-6/+6
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4775 Signed-off-by: Neo Hsueh <Hong-Chih.Hsueh@amd.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Cc: Jiangang He <jiangang.he@amd.com>
2024-06-05MdePkg: Add Ipmi Net Sensor Thresholds command defines.Aaron1-0/+46
Adding definitions for Ipmi Net Sensor Get/Set Thresholds commands and structures as found in Ipmi specification v2.0 Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2024-06-04ArmVirtPkg: Enable the non-hardcode version FdtNorFlashQemuLibChao Li3-8/+38
Enable the non-hardcode version of FdtNorFlashQemuLib in ArmVirtQemu.dsc and ArmVirtQemuKernel.dsc, and it can work rightly after enabling it. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4770 Build-tested (with "ArmVirtQemu.dsc" and "ArmVirtQemuKernel.dsc"). Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Chao Li <lichao@loongson.cn> Co-authored-by: Xianglai Li <lixianglai@loongson.cn> Tested-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
2024-06-04OvmfPkg: Add no hardcode version of FdtNorFlashQemuLibChao Li2-0/+211
This library is copied from ArmVirtPkg, in the Arm version, the value of PcdFlashNvStorageVariableBase, PcdFlashNvStorageFtwWorkingBase and PcdFlashNvStorageFtwSpareBase are hardcoded in INC file. This version will calculate them from FDT resource and using the set PCD to store when the NorFlashInitialise is called. By default, the first available flash(not used for storage UEFI code) as NV variable storage medium. In this way, UEFI can better handle the change of flash base address, which is suitable for different cpu architecture board implementation. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4770 Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Chao Li <lichao@loongson.cn> Co-authored-by: Xianglai Li <lixianglai@loongson.cn> Tested-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
2024-06-04MdeModulePkg/HiiDatabaseDxe: Avoid struct assignmentArd Biesheuvel1-4/+5
Struct assignments are not permitted in EDK2, as they may be converted by the compiler into calls to the 'memcpy' intrinsic, which is not guaranteed to be available in EDK2. So replace the assignment with a call to CopyMem (), and -while at it- replace the loop with a single CopyMem () call, as the loop operates on items that are contiguous in memory. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-06-04UefiCpuPkg:fix issue when splitting paging entryDun Tan1-2/+7
This patch is to fix issue when splitting leaf paging entry in CpuPageTableLib code. In previous code, before we assign the new child paging structure address to the content of splitted paging entry, PageTableLibSetPnle() is called to make sure the bit7 is set to 0, which indicate the previous leaf entry is changed to non-leaf entry now. There is a gap between we change the bit7 and we assign the new child paging structure address to the content of the splitted paging entry. If the address of code execution or data access happens to be in the range covered by the splitted paging entry, this gap may cause issue. In this patch, we prepare the new paging entry content value in a local variable and assign the value to the splitted paging entry at once. The volatile keyword is used to ensure that no optimization will occur in compilation. 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> Cc: Zhou Jianfeng <jianfeng.zhou@intel.com>
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>