summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* pip: update edk2-pytool-library requirement from ~=0.21.9 to ~=0.22.3dependabot/pip/edk2-pytool-library-approx-eq-0.22.3dependabot[bot]2024-12-191-1/+1
| | | | | | | | | | | | | Updates the requirements on [edk2-pytool-library](https://github.com/tianocore/edk2-pytool-library) to permit the latest version. - [Release notes](https://github.com/tianocore/edk2-pytool-library/releases) - [Commits](https://github.com/tianocore/edk2-pytool-library/compare/v0.21.9...v0.22.3) --- updated-dependencies: - dependency-name: edk2-pytool-library dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
* UefiPayloadPkg: Fix the issue detected by UncrustifyGuo Dong2024-12-191-44/+48
| | | | Signed-off-by: Guo Dong <guo.dong@intel.com>
* UefiPayloadPkg: Enhance universal payload buildGuo Dong2024-12-191-7/+8
| | | | | | | If there is no relocation in the payload it would build failure. This will fix the build failure. Signed-off-by: Guo Dong <guo.dong@intel.com>
* UefiPayloadPkg: Enhance Universal payload serial port nodeGuo Dong2024-12-191-33/+77
| | | | | | | | | | Current implementation only supports serial port sub-node under PCI root bridge node. This enhancement support serial port node regardless it is under root node or PCI root bridge node using a single FDT passing function. Signed-off-by: Guo Dong <guo.dong@intel.com>
* .pytool/EccCheck: Open files in utf-8Michael Kubacki2024-12-191-4/+4
| | | | | | | | | | | | The EccCheck plugin currently fails if a file contains characters outside the platform-dependent encoding returned from locale.getencoding(). This change updates the encoding to utf-8 so the plugin is more robust while continuing to support backward compatibility with the ASCII range. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
* .pytool/LicenseCheck: Open files in utf-8Michael Kubacki2024-12-191-1/+1
| | | | | | | | | | | | The LicenseCheck plugin currently fails if a file contains characters outside the platform-dependent encoding returned from locale.getencoding(). This change updates the encoding to utf-8 so the plugin is more robust while continuing to support backward compatibility with the ASCII range. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
* NetworkPkg/WifiConnectionManagerDxe: Keep Setup page on no Wi-Fi modulePhil Noh2024-12-181-2/+1
| | | | | | | | | | With the driver, "Wi-Fi Configuration" Setup page is available regardless of Wi-Fi module existence. When there is no Wi-Fi module, it is found that entering the page causes exiting Setup browser. User would think the result as an error. For better user experience, the update enables the page to report the module status like a blank page. It prevents exiting Setup. Signed-off-by: Phil Noh <Phil.Noh@amd.com>
* EmulatorPkg: spurious failure in WriteBlocks on X64Doug Cook (WINDOWS)2024-12-171-2/+2
| | | | | | | | | | | | | | | | WinNtBlockIoWriteBlocks can spuriously fail on X64. This occurs because &BytesWritten is a `UINTN*` (i.e. `UINT64*`) but is cast to `LPDWORD` (i.e. `UINT32*`). Only the low 32 bits are initialized by WriteFile, so the high 32 bits are uninitialized. This means we will spuriously fail the `BytesWritten != BufferSize` test. This doesn't occur on X86-32 since UINTN is the same as DWORD in that case. Fix is to declare BytesWritten as DWORD to match the type expected by WriteFile. This also makes the cast unnecessary. Signed-off-by: Doug Cook <idigdoug@gmail.com>
* SecurityPkg/SecureBootConfigDxe: Enhance help in Delete Signature pagePhil Noh2024-12-171-46/+46
| | | | | | | | | | Currently "Delete Signature" Setup page lists enrolled signatures and each signature is shown with signature GUID (prompt) and type (help). It is possible for some signatures to be shown with same signature GUID and type. In this case, it is difficult to identify the target signature to delete. The update enhances help information to distinguish signatures. Signed-off-by: Phil Noh <Phil.Noh@amd.com>
* Maintainers.txt: Add myself as ShellPkg reviewerPierre Gondois2024-12-171-0/+1
| | | | | | | Add myself as a reviewer for the ShellPkg to help with the reviewing effort. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
* OvmfPkg: document runtime config optionsGerd Hoffmann2024-12-171-0/+191
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* UefiCpuPkg: x86 CpuDxe: Allocate AP Exception Stack Below 4GBOliver Smith-Denny2024-12-171-3/+25
| | | | | | | | | | | | | | | | | | | | | When setting up the APs' exception stacks, the x86 CpuDxe allocates any range and then copies over the existing GDT and IDT and adds the appropriate new entries for this AP, then installs them. This can cause an issue if the allocated buffer is over 4GB because the next time the AP is started, it goes through an INIT-SIPI-SIPI, stepping through real mode -> protected mode -> long mode and when it is in protected mode it needs a 32 code segment descriptor or else it will fault when trying to execute. If the GDT lives above 4GB, it cannot be accessed by the protected mode code and the triple fault is seen. This patch updates CpuDxe's MP management code to allocate the exception stacks for all APs below 4GB explicitly to avoid this problem, such as it does with the BSP's GDT that first gets populated to the APs. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
* MdePkg BootManagerPolicy.h: Define GUID for connecting storage devices.Chris Fernald2024-12-172-0/+15
| | | | | | | | | Some platforms require connecting storage media while booting to network, or require enumerating storage protocols that were not initially enumerated during BDS. This change adds a GUID to allow implementation of boot manager's ConnectDeviceClass to connect storage media. Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
* ShellPkg/AcpiView: RAS2 Parser - check validity of PCC CountCarsten Haitzler2024-12-171-1/+16
| | | | | | | This checks the number of PCC descriptor entries provided match the count set in the table, and if they don't indicate a warning. Signed-off-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>
* SourceLevelDebugPkg DxeDebugAgent: Handle additional initialize cases.Aaron Pop2024-12-161-0/+6
| | | | | | | | | Handle both DEBUG_AGENT_INIT_REINITIALIZE and DEBUG_AGENT_INIT_DXE_CORE_LATE InitFlags to prevent an assert. No additional initlization takes place for these cases. Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
* MdeModulePkg DxeMain: Add late initialization for Debug Agent.Chris Fernald2024-12-162-0/+7
| | | | | | | | | | Add a late initialize in DxeMain for the debug agent. This is required for the debug agent to be able to setup events to handle image loads, exit boot services, and other important callbacks. Define a reinitialize debug agent. Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
* ShellPkg/UefiShellLib: Accept "0 " as valid numeric stringTormod Volden2024-12-161-7/+11
| | | | | | | | | | | | | | | | | | | | | | | InternalShellIsHexOrDecimalNumber() would fail to interpret e.g. "0 " or "00 " as valid numeric strings. After skipping the "0" digits as leading zeroes, it would check if the next character is a valid hex or decimal digit, which would then fail on the terminating character. Therefore return success if "leading" zeroes have been consumed and there are no more characters. InternalShellStrHexToUint64() would fail to interpret e.g. "0 " or "00 " as valid numeric strings. After skipping the "0" digits as leading zeroes, it would find itself surprised by the following space. Restrict the "bad space" check to the case where it had just consumed the "x" or "X" marker. Otherwise the space is fine (depending on StopAtSpace either end of number or interspersed space) since there were only zeroes so far. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3080 Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
* ShellPkg/UefiShellLib: Only write value if successful conversionTormod Volden2024-12-161-5/+7
| | | | | | | | | The ShellConvertStringToUint64() function documentation says: "Upon a successful return the value of the conversion." So do not write any value if the conversion failed. Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
* ShellPkg/UefiShellLib: Simplify check for empty stringTormod Volden2024-12-161-2/+2
| | | | | | | | | | StrSize() uses StrLen() which counts until the terminating NULL character. For checking for an empty string it is more efficient to directly check for the NULL terminator instead of calling StrSize(). Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
* ShellPkg/UefiShellLib: Correct check for empty stringTormod Volden2024-12-161-2/+2
| | | | | | | | | StrSize() will never return zero since it counts the terminating NULL character. An empty string will have the storage size of the terminator. Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
* ShellPkg/UefiShellLib: Prevent out-of-bounds accessTormod Volden2024-12-161-2/+5
| | | | | | | | | | If InternalShellStrHexToUint64() is passed a string that starts with 'X' or 'x' it would try to read the byte before the start of the string buffer. Instead check if leading zeroes have been consumed. Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
* MdePkg/Ufs.h: Update to UFS 4.0Christopher Zurcher2024-12-161-92/+278
| | | | Signed-off-by: Christopher Zurcher <christopher.zurcher@microsoft.com>
* MdeModulePkg/Bus/Ufs: Use IndustryStandard headersChristopher Zurcher2024-12-166-2676/+4
| | | | | | | Remove duplicate private header files and reference UFS spec definitions from the IndustryStandard folder. Signed-off-by: Christopher Zurcher <christopher.zurcher@microsoft.com>
* MdePkg/IndustryStandard: Add UFS definitionsChristopher Zurcher2024-12-162-0/+1369
| | | | | | | | These files are direct ports from the (identical) files: MdeModulePkg\Bus\Ufs\UfsBlockIoPei\UfsHci.h MdeModulePkg\Bus\Ufs\UfsPassThruDxe\UfsPassThruHci.h Signed-off-by: Christopher Zurcher <christopher.zurcher@microsoft.com>
* CryptoPkg: revert BUFSIZ macro definition from commit 456dd8b99f00Laszlo Ersek2024-12-161-11/+0
| | | | | | | | | | | | | OpenSSL ticket <https://github.com/openssl/openssl/issues/8904> has been fixed in OpenSSL commit 2e9d61ecd81a ("crypto/evp/evp_key.c: #define BUFSIZ if <stdio.h> doesn't #define it", 2019-05-27). We should simplify "CryptoPkg/Library/Include/CrtLibSupport.h" and back out the change made to that file by edk2 commit 456dd8b99f00 ("CryptoPkg: Upgrade OpenSSL to 1.1.1b", 2019-06-03). Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1897 Signed-off-by: Laszlo Ersek <laszlo.ersek@posteo.net>
* Retrieve the USB class specific data from the configuration descriptorOleg Ilyasov2024-12-134-0/+669
| | | | | | | | | | | | | | | | If USB device reports class specific descriptors, it is currently the job of device driver to parse the configuration to find the class specific data. The new library functions parse the configuration descriptor and return class specific interface and class specific endpoint descriptors. Also, these new functions allow to retrieve the data from non-default alternate settings without performing a switch to this setting. Switching to the alternate setting currently implies the execution of UsbSetInterface function that performs USB control trnasfer. In some cases this switch is not desirable so the new functions UsbGetInterfaceDescriptorSetting and UsbGetEndpointDescriptorSetting come in handy. Signed-off-by: Oleg Ilyasov <olegi@ami.com>
* OvmfPkg: Add minimum Python version for CI badgeMichael Kubacki2024-12-131-1/+2
| | | | | | | | | | The Python version used for build and CI should always be at least the minimum version supported by edk2-pytool-extensions. A badge is added that keeps this information dynamically up-to-date based on the minimum version specified in edk2-pytool-extensions pyproject.toml file. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
* EmulatorPkg: Add minimum Python version for CI badgeMichael Kubacki2024-12-131-1/+2
| | | | | | | | | | The Python version used for build and CI should always be at least the minimum version supported by edk2-pytool-extensions. A badge is added that keeps this information dynamically up-to-date based on the minimum version specified in edk2-pytool-extensions pyproject.toml file. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
* ReadMe.rst: Add minimum Python version badgeMichael Kubacki2024-12-131-0/+7
| | | | | | | | | | The Python version used for build and CI should always be at least the minimum version supported by edk2-pytool-extensions. A badge is added that keeps this information dynamically up-to-date based on the minimum version specified in edk2-pytool-extensions pyproject.toml file. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
* OvmfPkg/TdxDxe: Clear GPR Mask for RBXCeping Sun2024-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refer to intel-tdx-module-api spec section 5.5.21, GPR mask (TDVMCALL_EXPOSE_REGS_MASK) is a bitmap that controls which part of the guest TD GPR and XMM state is passed as-is to the VMM and back. - A bit value of 0 indicates that the corresponding register is saved by the Intel TDX module and not passed as-is to Host VMM. - A bit value of 1 indicates that the corresponding register is passed as-is to the host VMM. Currently, RBX is used as the mailbox address in ApRunLoop.nasm, the corresponding bit value of RBX in MASK(Bit 3) is set as 1 which means the value is passed to Host VMM as-is and it can be changed by Host VMM. So the bitmask shall be set as 0 to avoid this situation. Reference: [TDX-API]: intel-tdx-module-abi-spec https://cdrdv2.intel.com/v1/dl/getContent/733579 Cc: Erdem Aktas <erdemaktas@google.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Min Xu <min.m.xu@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Hunter Adrian <adrian.hunter@intel.com> Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
* OvmfPkg: Remove macro MAX_LOONGARCH_EXCEPTIONChao Li2024-12-121-6/+0
| | | | | | | | | | | Since the UEFI 2.11 has been released, the macro MAX_LOONGARCH_EXCEPTION has been added in MdePkg, so it is deleted in LoongArchVirt/Sec/LoongArch64/Start.S Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Chao Li <lichao@loongson.cn>
* UefiCpuPkg: Remove macro MAX_LOONGARCH_EXCEPTIONChao Li2024-12-123-21/+0
| | | | | | | | | | | | | | | Since the UEFI 2.11 has been released, the macro MAX_LOONGARCH_EXCEPTION has been added in MdePkg, so it is deleted in LoongArch folder header file. Cc: Ray Ni <ray.ni@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Dun Tan <dun.tan@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Chao Li <lichao@loongson.cn>
* MdePkg: Synchronize UEFI2.11 LoongArch64 DebugSupportLib definitionChao Li2024-12-121-26/+37
| | | | | | | | | Synchronize the changes about LoongArch64 in section 18.2.5 of UEFI2.11. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Chao Li <lichao@loongson.cn>
* MdePkg: Allows loading X64 and ARM64 OPROM images on LoongArch64Chao Li2024-12-121-1/+9
| | | | | | | | | | | Enable foreign images loading on LoongArch64 if the EDKII_PECOFF_IMAGE_EMULATOR_PROTOCOL is present. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Chao Li <lichao@loongson.cn> Co-Authored-by: Dongyan Qian <qiandongyan@loongson.cn>
* ArmPkg: DefaultExceptionHandlerLib: Update function input bitwidthKun Qin2024-12-111-1/+1
| | | | | | | | | | | | The current DescribeExceptionSyndrome is taking ESR as 32bit value. However, ESR should be a 64 bit value. This change updates the function to intake a 64bit value. Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Kun Qin <kun.qin@microsoft.com>
* ArmPkg: ArmExceptionLib: Fixing exception vector and type castingKun Qin2024-12-111-7/+7
| | | | | | | | | | | | | | | | The current VectorBase is taking value from a 64bit PCD into a UINTN value, which could have truncated value for 32bit system. In addition, the comparison between UINTN and INTN could lead to undesired comparison outcome or compiler complaints. This change updates all of them to be UINT64 based operation. Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Kun Qin <kun.qin@microsoft.com>
* ArmPkg: ArmLib: Update function to match header fileKun Qin2024-12-111-3/+3
| | | | | | | | | | | Update function implementation to match interface definition. The return should be bound to 0xffff0000, which is guaranteed to be a UINT32. Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Kun Qin <kun.qin@microsoft.com>
* MdePkg: ArmLib: Return UINT32 for ArmCacheWritebackGranuleKun Qin2024-12-111-1/+1
| | | | | | | | | | | | | ArmCacheWritebackGranule should not return value higher than MAX_UINT32. This change will allow the usage without architecture depenedent return size. Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Kun Qin <kun.qin@microsoft.com>
* ArmPkg: ArmArchTimerLib: Update operations to be 64 bit wideKun Qin2024-12-111-16/+10
| | | | | | | | | | | | | | | | The existing operation in ArmArchTimerLib is operating on UINT32 or UINT64 based on the target system. This casting game originates from the fact that timer frequency is UINTN type. This change will simply promote all operations to UINT64 based, which will remove the casting and conditional #if in the code for better portability and readability. Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Kun Qin <kun.qin@microsoft.com>
* ArmPkg: TimerDxe: Use 64bit operation for timer ticksKun Qin2024-12-111-2/+1
| | | | | | | | | | | | | | The current implementation operates on 64bit value with implicit value truncation. This change updates the involved frequencies to use 64 bit based operations. Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Kun Qin <kun.qin@microsoft.com>
* ArmPkg: ArmGic: Cast CpuTarget to UINT32 for legacy GICKun Qin2024-12-111-1/+4
| | | | | | | | | | | | | | | The current code path supporting `PcdArmGicV3WithV2Legacy` will read 32 bit CPU target and try to program ARM_GIC_ICDIPTR. However, all these operations are 32bit wide. This change casts the CpuTarget variable to be UINT32 before calling MMIO read. Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Kun Qin <kun.qin@microsoft.com>
* DynamicTablesPkg: Correct parser for X64 architecture objectsAbdul Lateef Attar2024-12-112-5/+9
| | | | | | | | | | | | | - Add array size to CmArchCommonSpmiInterfaceInfoParser to correctly parse the SPMI interface object. - Use the size of enum values instead of fixed sizes. - Apply #pragma pack to the X64 object structure to ensure the total size of the structure matches the parser's combined individual field sizes without padding. Cc: Sami Mujawar <Sami.Mujawar@arm.com> Cc: Pierre Gondois <pierre.gondois@arm.com> Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
* MdePkg: Add Google Mock Library for SafeIntLibTsunFeng2024-12-114-0/+1151
| | | | Signed-off-by: TsunFeng <v-tshuang@microsoft.com>
* MdePkg: Update StatusCodeDataTypeId.hRaymond Yang2024-12-111-0/+6
| | | | | | | Refine comments for EFI_STATUS_CODE_SPECIFIC_DATA_GUID . Add the structs defined in this file for EFI_STATUS_CODE_SPECIFIC_DATA_GUID to comment. Signed-off-by: Raymond Yang <yangrongwei@hotmail.com>
* MdeModulePkg SmbiosMeasurementDxe: Release TableAddress after useYang Gang2024-12-111-0/+4
| | | | Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
* MdeModulePkg DriverHealthManagerDxe: Display HealthStatus as TextTwoYang Gang2024-12-111-2/+4
| | | | | | | When PcdBrowserGrayOutTextStatement is TRUE, TextOpCode will be GrayOut. HealthStatus cannot be displayed in help area, use TextTwo to display it. Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
* BaseTools: fix spelling errorWilliam Leara2024-12-111-1/+1
| | | | | | No functional change. Signed-off-by: William Leara <william.leara@dell.com>
* BaseTools: Typo fixesDionna Glaze2024-12-116-15/+13
| | | | | | Some in error messages, some in local variable names. Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
* BaseTools: Update alignment for entry seg for ClangDhaval2024-12-112-6/+11
| | | | | | | | | | | | | | | | It does 3 things: 1. Use separate linker file for clang vs GCC for RISCV64. 2. Use common page size instead of max page to ensure -z option align values are properly applied. 3. Enforce alignment for .entry segment as per -z option. When we want to have -z option aligned images, clang while alignes .text and .data segments correctly, .entry segment is by default not aligned unless explicitly specified. This patch makes it explicit to clang that entry seg should also be aligned to requirements. Somehow GCC does not require such explicit entry. Hence detachiong both ld files. Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com>
* MdeModulePkg/BrotliCustomDecompressLib: Make the library buildablePhil Noh2024-12-114-1/+33
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4877 Brotli decompression library is supported in EDK2 core. Currently it is not buildable when linking it to DxeIpl driver. The result is also checked on edk2 master branch. It could be related to updating Brotli submodule (v1.0.9) on the previous commit (1193aa2). The update makes the library buildable. It was verified for the functional status. Signed-off-by: Phil Noh <Phil.Noh@amd.com>