summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* UefiCpuPkg/MmUnblockMemoryLib: Check if buffer range is validDun Tan2024-10-301-0/+90
| | | | | | | | | | | Check if input buffer range unblockable: 1.The input buffer range to block should be totally covered by one or multi memory allocation HOB 2.All the memory allocation HOB that overlap with the input buffer range should be EfiRuntimeServicesData, EfiACPIMemoryNVS or EfiReservedMemoryType. Signed-off-by: Dun Tan <dun.tan@intel.com>
* MdeModulePkg: Adding support for authenticated variablenikhil p sheshagiri2024-10-302-49/+132
| | | | | | | | | | | | | | | | storage data format REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4857 NVS needs to support both authenticated and non-authenticated header for NV region. PcdNvStoreDefaultValueBuffer can have variables with data format of the type Authenticated variable storage and this change provides the support to differentiate between the normal variable storage and authenticated variable storage for the hii database to consume and update the setup variables accordingly Signed-off-by: nikhil p sheshagiri <nikhil.p.sheshagiri@intel.com>
* StandaloneMmPkg/Core: Shadow Standalone BFV into MMRAMWei6 Xu2024-10-304-17/+28
| | | | | | | | | | | | | | | | BFV is outside the MMRAM. Currently, StandaloneMmIplPei uses the API MmUnblockMemoryRequest() to unblock the access for the BFV. However, the BFV's memory might be gone after ExitBootService event. If any access to the memory, unexpected error would happen. To fix the above issue, StandaloneMmCore should shadow standalone BFV into MMRAM before processing it, then free the shadowed BFV after MM driver dispatch is done. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
* UefiCpuPkg/PiSmmCpuDxeSmm: Fix extraneous parenthesesMike Beaton2024-10-291-1/+1
| | | | | | | | | | | Without this change, when building OvmfPkg with -D SMM_REQUIRE using the XCODE5 toolchain we get: error: equality comparison with extraneous parentheses which stops the build. Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
* StandaloneMmPkg/Core: Reset IsCommBufferValid to FALSE before MMI exitsWei6 Xu2024-10-291-4/+5
| | | | | | | | | | | | | | | | | | | In current implementation of MmCommunication, caller (StandaloneMmIplPei or MmCommunicationDxe) sets the IsCommBufferValid to TRUE and triggers synchronous MMI, then caller resets IsCommBufferValid to FLASE after MMI exits. If asynchronous MMI happens before caller resets the IsCommBufferValid to FALSE, StandaloneMmCore will mistakenly thought there is still a synchronous MMI and then update incorrect values into ReturnStatus and ReturnBufferSize. To fix the above issue, StandaloneMmCore should reset IsCommBufferValid to FALSE before MMI exits. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
* ShellPkg: CodeQL FixesOliver Smith-Denny2024-10-2921-60/+225
| | | | | | | | | | | | Includes changes across the module for the following CodeQL rules: - cpp/comparison-with-wider-type - cpp/overflow-buffer - cpp/redundant-null-check-param - cpp/uselesstest Co-authored-by: Taylor Beebe <taylor.d.beebe@gmail.com> Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
* ShellPkg: UefiShellCommandLib: CodeQL FixesOliver Smith-Denny2024-10-293-21/+52
| | | | | | | | | | | | Includes changes across the module for the following CodeQL rules: - cpp/comparison-with-wider-type - cpp/overflow-buffer - cpp/redundant-null-check-param - cpp/uselesstest Co-authored-by: Taylor Beebe <taylor.d.beebe@gmail.com> Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
* ShellPkg: DynamicCommand: CodeQL FixesOliver Smith-Denny2024-10-292-1/+9
| | | | | | | | | | | | Includes changes across the module for the following CodeQL rules: - cpp/comparison-with-wider-type - cpp/overflow-buffer - cpp/redundant-null-check-param - cpp/uselesstest Co-authored-by: Taylor Beebe <taylor.d.beebe@gmail.com> Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
* ShellPkg: Shell: CodeQL FixesOliver Smith-Denny2024-10-295-39/+151
| | | | | | | | | | | | Includes changes across the module for the following CodeQL rules: - cpp/comparison-with-wider-type - cpp/overflow-buffer - cpp/redundant-null-check-param - cpp/uselesstest Co-authored-by: Taylor Beebe <taylor.d.beebe@gmail.com> Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
* ShellPkg: UefiShellDriver1CommandsLib: CodeQL FixesOliver Smith-Denny2024-10-2910-87/+259
| | | | | | | | | | | | Includes changes across the module for the following CodeQL rules: - cpp/comparison-with-wider-type - cpp/overflow-buffer - cpp/redundant-null-check-param - cpp/uselesstest Co-authored-by: Taylor Beebe <taylor.d.beebe@gmail.com> Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
* ShellPkg: UefiShellLevel1CommandsLib: CodeQL FixesOliver Smith-Denny2024-10-294-3/+33
| | | | | | | | | | | | Includes changes across the module for the following CodeQL rules: - cpp/comparison-with-wider-type - cpp/overflow-buffer - cpp/redundant-null-check-param - cpp/uselesstest Co-authored-by: Taylor Beebe <taylor.d.beebe@gmail.com> Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
* ShellPkg: UefiShellLevel2CommandsLib: CodeQL FixesOliver Smith-Denny2024-10-297-37/+85
| | | | | | | | | | | | Includes changes across the module for the following CodeQL rules: - cpp/comparison-with-wider-type - cpp/overflow-buffer - cpp/redundant-null-check-param - cpp/uselesstest Co-authored-by: Taylor Beebe <taylor.d.beebe@gmail.com> Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
* ShellPkg: UefiShellDebug1CommandsLib: CodeQL FixesOliver Smith-Denny2024-10-2924-30/+161
| | | | | | | | | | | | Includes changes across the module for the following CodeQL rules: - cpp/comparison-with-wider-type - cpp/overflow-buffer - cpp/redundant-null-check-param - cpp/uselesstest Co-authored-by: Taylor Beebe <taylor.d.beebe@gmail.com> Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
* EmulatorPkg/Win/Host: Source level debugging on already loaded DLLAshraf Ali2024-10-281-8/+2
| | | | Signed-off-by: Ashraf Ali <ashraf.ali.s@intel.com>
* IntelFsp2WrapperPkg: Prevent null pointer dereferenceMichael Kubacki2024-10-281-2/+11
| | | | | | | Return from `FspsWrapperInitDispatchMode()` if a buffer allocation fails instead of attempting to dereference the pointer. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
* MdePkg/MockUefiLib: Added new mock functions.v-sbolisetti2024-10-282-4/+382
| | | | Signed-off-by: v-sbolisetti <v-sbolisetti@microsoft.com>
* MdeModulePkg: Added PPI support in UFS PEI driver.INDIA\kanagavels2024-10-286-30/+331
| | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4490 Added PPI support in UFS PEI driver to link the platform specific code as same as UFS DXE driver. Signed-off-by: Kanagavel S <kanagavels@ami.com>
* MdeModulePkg/TerminalDxe: Return success if device not support SetControlHua Ma2024-10-281-0/+3
| | | | | | | Some serial device may not support SetControl. Ignore the error from SetControl if EFI_UNSUPPORTED is return. Signed-off-by: Hua Ma <hua.ma@intel.com>
* FatPkg: Fix potentially uninitialized variableBret Barkelew2024-10-252-0/+6
| | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1559 Initializes the variable to prevent an uninitialized variable warning in Visual Studio with C4701 enabled. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
* MdeModulePkg/PciHostBridgeDxe: Add MemoryFence after write.joe2024-10-251-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On AARCH64, there is no ordering guarantee between configuration space (ECAM) writes and memory space reads (MMIO). ARM AMBA CHI only guarantees ordering for reads and writes within a single address region, however, on some systems MMIO and ECAM may be split into separateaddress regions. A problem may arise when an ECAM write is issued a completion before a subsequent MMIO read is issued and receives a completion. For example, a typical PCI software flow is the following: 1. ECAM write to device command register to enable memory space 2. MMIO read from device memory space for which access was enabled in step 1. There is no guarantee that step 2. will not begin before the completion of step 1. on systems where ECAM/MMIO are specified as separate address regions, even if both spaces have the memory attributes device-nGnRnE. - Add a barrier after the final PCI Configuration space write in RootBridgeIoPciAccess. Configuration space reads should not have side-efects. - When configuration space is strongly ordered, this ensures that program execution cannot continue until the completion is received for the previous Cfg-Write, which may have side-effects. - Risk of reading a "write-only" register and causing a CA which leaves the device unresponsive. The expectation based on the PCI Base Spec v6.1 section 7.4 is that all PCI Spec-defined registers will be readable, however, there may exist design-specific registers that fall into this category. Signed-off-by: Aaron Pop <aaronpop@microsoft.com> Co-authored-by: Ard Biesheuvel <ardb@kernel.org>
* .pytool/UncrustifyCheck: Add a in-place optionBret Barkelew2024-10-252-1/+27
| | | | | | | | | | | | | | To simplify automatic formatting of new code, this feature lets a local developer specify the `UNCRUSTIFY_IN_PLACE=TRUE` parameter on the command line to automatically format files. This is particularly useful when a large amount of new code needs to be formatted in batch. See the readme for more details. Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
* DynamicTablesPkg: Drop the unnecessary comparision of UINT8 max valueSudeep Holla2024-10-241-3/+1
| | | | | | | | | | | | | | | | Clang build breaks with the following error: | DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c:1441:20: | error: result of comparison of constant 256 with expression of type 'UINT8' | (aka 'unsigned char') is always false [-Werror,-Wtautological-constant-out-of-range-compare] | 1441 | (AccessSize > 256)) || | | ~~~~~~~~~~ ^ ~~~ | 1 error generated. AccessSize is UINT8 and the maximum value for UINT8 is 255, so the comparision is unnecessary. Drop the check to fix the build. Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
* EmbeddedPkg: Add MDEPKG_NDEBUG to RELEASE buildMike Beaton2024-10-231-0/+1
| | | | | | | | Although EmbeddedPkg normally provides components to other packages, it is less surprising if its own build defines MDEPKG_NDEBUG when consuming packages normally would. Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
* EmbeddedPkg: Remove non-needed MDEPKG_NDEBUG dependent codeMike Beaton2024-10-231-4/+2
| | | | | | | | | | | | Remove small amount of MDEPKG_NDEBUG dependent code which is no longer needed, given update of 'null' debug macros in ae83c6b7fd83a5906e016a32027c1bcd792a624e to explicitly mark debug-only code as discarded. Additionally, correctly mark as STATIC the two arrays within the updated code block. Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
* BaseTools/GenFw X64: Detect GOTCPRELX relaxations applied by LLDArd Biesheuvel2024-10-231-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GenFw relies on static ELF relocation tables emitted by the linker (via the --emit-relocs command line switch). These are different from the dynamic relocations that a dynamic loader uses: static relocations are emitted by the compiler/assembler, and consumed by the linker to construct the executable. Only when the load address is a priori unknown are dynamic relocations emitted, by the linker, in a format that the dynamic loader can consume. This distinction is relevant because only dynamic relocations cover the GOT, and so GOT based indirections are better avoided. Unfortunately, there are cases where the toolchain insists on emitting GOT based symbol references, and so we have to deal with them in one of 2 ways: - replace GOT based symbol references with direct references, so that the GOT entries themselves are no longer used, and can be ignored when generating the PE/COFF relocation tables (AARCH64 and RISCV64 take this approach); - infer the locations of the GOT slots from the references appearing in the code, and emit PE/COFF relocations for them so that their contents will be fixed up appropriately. The latter is the approach taken by GenFw for x86_64, which is the only feasible approach for its ISA, given that GOT slots can be used as memory operands in many different types of instructions, not all of which can be converted straight-forwardly. E.g., movq foo@GOTPCREL(%rip), %rax can always be converted into leaq foo(%rip), %rax whereas cmpq foo@GOTPCREL(%rip), %rax can only be converted under the 32-bit position dependent code model, into cmpq $foo, %rax and so the GOT references cannot be elided when generating position independent code, which is what GenFw requires. To remove the need for the linker to guess where the instructions start, the ELF psABI for x86_64 specifies a couple of relaxable alternatives for GOTPCREL, which are used to annotate particular classes of GOT referencing instructions that may be relaxed to their non-GOT counterparts. There is no specification for what --emit-relocs is supposed to produce, or whether or not its output is supposed to reflect such relaxations. ld.bfd and LLD behave differently in this regard, and the latter may emit R_X86_64_REX_GOTPCRELX relocations for MOV instructions that it already has relaxed into LEA instructions. This means the displacement in the instruction no longer refers to the GOT slot, but directly to the object itself, and emitting a relocation is not only unnecessary, but also harmful as the PE/COFF loader will corrupt the object when it applies the relocations at startup. Under the position independent code model, the only relaxation that the linker could have applied for a R_X86_64_REX_GOTPCRELX relocation is MOV to LEA, so detect whether the instruction is already LEA, and ignore the relocation if that is the case. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
* MdePkg/Include/Guid: Fix EFI_CXL_COMPONENT_EVENT_LOG in Cper.hSienski Piotr2024-10-221-4/+4
| | | | | | | | | | | [Issue Description] CXL_ERROR_PCIE_DEV_ID in Cper.h was renamed to EFI_CXL_ERROR_PCIE_DEV_ID, but EFI_CXL_COMPONENT_EVENT_LOG still uses previous name. [Resolution] Modify EFI_CXL_COMPONENT_EVENT_LOG to use EFI_CXL_ERROR_PCIE_DEV_ID Signed-off-by: Sienski Piotr <piotr.sienski@intel.com>
* ShellPkg: Updated Type 4 Info as per Smbios 3.8.0Revathy V2024-10-221-0/+4
| | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4861 Added PROCESSOR_FAMILY_NAME support in ShellPkg. Signed-off-by: Revathy <revathyv@ami.com>
* MdePkg: Updated Type 4 Info as per Smbios 3.8.0Revathy V2024-10-221-0/+1
| | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4861 Added PROCESSOR_FAMILY_NAME support in MdePkg. Signed-off-by: Revathy <revathyv@ami.com>
* DynamicTablesPkg: Update X64 FADT XPm1aEvtBlkAbdul Lateef Attar2024-10-221-2/+2
| | | | | | | | | Copy the provided configuration data for PM1 event block. Cc: Sami Mujawar <Sami.Mujawar@arm.com> Cc: Pierre Gondois <pierre.gondois@arm.com> Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
* Update CI config following CompilerIntrinsicsLib move from ArmPkgRebecca Cran2024-10-221-1/+0
| | | | | | | | | | | | | | Library/CompilerIntrinsicsLib was moved from ArmPkg to MdePkg. Since MdePkg is passing EccCheck without needing to ignore CompilerIntrinsicsLib, just remove it from ArmPkg.ci.yaml. This fixes the error during "stuart_ci_build": ERROR - EccCheck.IgnoreInf -> Build/.pytool/Plugin/EccCheck/ArmPkg/Library/CompilerIntrinsicsLib not found in filesystem. Invalid ignore files Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
* DynamicTablesPkg: Update creator id for WSMT tableAbdul Lateef Attar2024-10-221-1/+1
| | | | | | | | Update WSMT table with generic creator id. Cc: Sami Mujawar <Sami.Mujawar@arm.com> Cc: Pierre Gondois <pierre.gondois@arm.com> Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
* MdeModulePkg UsbNetwork: Use USB class definition from MdePkgOleg Ilyasov2024-10-224-7/+3
| | | | | | | | | - Class specific types for interface and endpoint are generic - Definitions are in IndustryStandard/Usb.h - Remove type redefinitions - Update references to the descriptor types Signed-off-by: Oleg Ilyasov <olegi@ami.com>
* ShellPkg/SmbiosView: Correct wrong length offset usage in SMBIOS Type4Jason Zhao2024-10-221-2/+2
| | | | | | | | The patch will correct wrong length offset usage in SMBIOS Type4. For SMBIOS Ver3.6, length should be larger than 0x30. For SMBIOS Ver3.8, length should be larger than 0x32. Signed-off-by: Jason Zhao <jason.zhao@intel.com>
* MdePkg/Include/Guid: Rename CXL definitions in Cper.hSienski Piotr2024-10-211-26/+26
| | | | | | | | | | | [Issue Description] In MdePkg/Include/Guid/Cper.h there are multiple definitions regarding CXL that can do use EFI_ prefix in their names [Resolution] Rename these definitions in MdePkg/Include/Guid/Cper.h Signed-off-by: Sienski Piotr <piotr.sienski@intel.com>
* BaseTools: Remove -Wno-unneeded-internal-declaration from CLANGDWARFMike Beaton2024-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Subsequent to updating the 'null' DEBUG macro to explicitly discard its expression, it is possible to remove this warning suppression from CLANGDWARF and still successfully compile its RELEASE build. Note that CLANGPDB did and does not have this warning suppressed, and so before updating the 'null' DEBUG macro, CLANGPDB RELEASE was not building successfully in recent versions of clang, but was stopping with the error: .../edk2/OvmfPkg/VirtioSerialDxe/VirtioSerial.c:28:22: error: variable &apos;EventNames&apos; is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] STATIC CONST CHAR8 *EventNames[] = { ^ This change makes the two CLANG variants match with respect to this warning, and leaves the warning enabled which is considered a benefit as it has the potential to catch real coding errors Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
* MdePkg: Fix null macros for XCODE5 and CLANGMike Beaton2024-10-182-7/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building OvmfPkg in RELEASE mode in the XCODE5 toolchain, the ASSERT_EFI_ERROR change prevents this error: .../MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c:141:15: error: variable 'Status' set but not used [-Werror,-Wunused-but-set-variable] EFI_STATUS Status; ^ which is currently stopping the build. When building in RELEASE mode in the CLANGPDB toolchain,the DEBUG macro change prevents this error: .../edk2/OvmfPkg/VirtioSerialDxe/VirtioSerial.c:28:22: error: variable &apos;EventNames&apos; is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] STATIC CONST CHAR8 *EventNames[] = { ^ which is currently stopping the build. CLANGDWARF produces the same error as CLANGPDB above, if -Wno-unneeded-internal-declaration is removed from its build flags. With the null DEBUG macro change, this warning suppression can be removed from CLANGDWARF, which is considered a benefit as it has the potential to catch real coding errors. This is done in a subsequent commit. This commit has the desirable side effect that we no longer require (and cannot use) explicit `#ifndef MDEPKG_NDEBUG` around items only used in DEBUG macros. This requires the ArmPkg change made here to be in the same commit as the MdePkg changes. Note: In common with existing macros in EDK II, including the pre-existing and unchanged DEBUG/NOOPT versions of the macros which are modified here, we use the standard approach of adding `do { ... } while (FALSE)` wrapping to ensure that the macros behave correctly with surrounding code (e.g. require a following ';' and do not combine in unexpected ways with nearby conditionals). Continuous-integration-options: PatchCheck.ignore-multi-package Co-authored-by: Mikhail Krichanov <krichanov@ispras.ru> Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
* MdePkg: Add Google Test Library and Protocolv-chhsieh2024-10-1714-0/+996
| | | | | | | | | | | | | | | Mock Libraries: MdePkg\Test\Mock\Library\GoogleTest\MockCpuLib MdePkg\Test\Mock\Library\GoogleTest\MockPciSegmentLib MdePkg\Test\Mock\Library\GoogleTest\MockReportStatusCodeLib MdePkg\Test\Mock\Library\GoogleTest\MockSmmServicesTableLib Mock Protocol: MdePkg\Test\Mock\Include\GoogleTest\Protocol\MockMpService.h Signed-off-by: jack Hsieh <v-chhsieh@microsoft.com> Cc: Maintainer Shruti Gupta <shrugupt@microsoft.com> Cc: Reviewer Shruti Gupta <shrugupt@microsoft.com>
* MdeModulePkg: Replace right bit shift operator with RShiftU64Jeremy Compostella2024-10-171-1/+1
| | | | | | | Instead of using bit shift operations, it is preferable to use BaseLib bit shift functions to prevent compilers from inserting intrinsics. Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
* MdeModulePkg: Fix PeiAllocatePages() corner caseJeremy Compostella2024-10-171-15/+22
| | | | | | | | | | | | | | | | | | | | | | I recently ran into an AllocatePages() hang. It turns out that AllocatePages() does not account for the Memory Allocation HOB when it makes the decision of allocating out of free memory. Here is the scenario: FreeMemoryTop - 0x71C03000 FreeMemoryBottom - 0x71BDBFD8 => We have 159,784 bytes left => ~39.0098 pages left. We attempt to allocate 39 pages. There are enough pages left but allocating those pages requires to allocate a Memory Allocation HOB which needs an extra 48 bytes. But once the pages are allocated, there are only 40 bytes left. In addition to taking into account the Memory Allocation HOB size, this commit reverses the condition to keep it simple. Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
* MdePkg/Include/Guid: Add missing CXL definitions to Cper.hSienski Piotr2024-10-171-0/+98
| | | | | | | | | | | | [Issue Description] In MdePkg/Include/Guid/Cper.h there are missing multiple definitions regarding CXL that can be found in UEFI 2.10 spec chapters N.2.13 and N.2.14 [Resolution] Add these definitions to MdePkg/Include/Guid/Cper.h Signed-off-by: Sienski Piotr <piotr.sienski@intel.com>
* MdeModulePkg: PeiMain: Updated dispatcher for delayed dispatchKun Qin2024-10-171-1/+4
| | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4496 This change adds a check for PEI dispatcher to continue dispatching when there are still pending delayed dispatch requests, to be compatible with newly integrated Delayed Dispatcher PPI interface. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Dandan Bi <dandan.bi@intel.com> Cc: Debkumar De <debkumar.de@intel.com> Cc: Catharine West <catharine.west@intel.com> Co-authored-by: John Schock <joschock@microsoft.com> Signed-off-by: Kun Qin <kuqin12@gmail.com>
* MdeModulePkg: PeiMain: Introduce implementation of delayed dispatchKun Qin2024-10-176-1/+540
| | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4496 This change adds the implementation that fits the needs and description of PI spec defined Delayed Dispatch PPI in Pei Core. The PPI would allow minimal delay for registered callbacks. As well as allowing other functions to wait for GUIDed delayed dispatch callbacks. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Debkumar De <debkumar.de@intel.com> Cc: Catharine West <catharine.west@intel.com> Co-authored-by: Mike Turner <mikeyt@pobox.com> Co-authored-by: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Kun Qin <kuqin12@gmail.com>
* MdePkg: Update Delayed Dispatch PPI as per PI 1.8 A SpecKun Qin2024-10-171-20/+20
| | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4496 PI spec defined the `Register` function input argument `Delay` as output. However, this parameter should be used to define the minmal time delay the callback should fire. Thus it should be an input parameter. This change fixed the argument type. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Co-authored-by: Mike Turner <mikeyt@pobox.com> Co-authored-by: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Kun Qin <kuqin12@gmail.com>
* edksetup.sh: Fix the Issue of PYTHON_COMMAND Un-ConfigurableJason1 Lin2024-10-171-2/+10
| | | | | | | | | | | | | | | | | - With the commit e6447d2a08f5ca585816d093e79a01dad3781f98 introduced, there do not have chance for caller to configure the PYTHON_COMMAND environment variable outside of this script. - All the configured value would be assigned into "python3" forcedly, without checking the environment variable is set or not. - This patch included the below changes, - Check the "PYTHON_COMMAND" is set or not before assigning the default value "python3" on it. - Rename the function naming into "SetupPythonCommand" to align its functionality. Signed-off-by: Jason1 Lin <jason1.lin@intel.com>
* UnitTestFrameworkPkg: VS2022 Support on UnitTest.Ashraf Ali S2024-10-161-0/+2
| | | | | | | Currently EDK2 is supporting VS2022, with VS2022 UnitTestFrameworkPkg build is failing, this patch is to add the VS2022 support for UnitTest Signed-off-by: Ashraf Ali S <ashraf.ali.s@intel.com>
* Add USB Association Descriptor definitionsOleg Ilyasov2024-10-161-7/+27
| | | | | | | - USB 3.0 spec, Section 9.6.4 - Add class specific descriptor types Signed-off-by: Oleg Ilyasov <olegi@ami.com>
* ArmPkg: CodeQL Fixes.kuqin122024-10-162-8/+8
| | | | | | | | | | Makes changes to comply with alerts raised by CodeQL. The issues here fall into the following category: 1. unsigned-comparison-zero Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
* UefiCpuPkg/PiSmmCpuDxeSmm: Save and restore CR2 only if SmiProfile enableJiaxin Wu2024-10-161-2/+18
| | | | | | | | A page fault (#PF) that triggers an update to the page table only occurs if SmiProfile is enabled. Therefore, it is necessary to save and restore the CR2 register if SmiProfile is configured to be enabled. Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
* MdePkg: Describe storage location of config tables as per PI 1.7 A specINDIA\sachinganesh2024-10-163-0/+11
| | | | | | | | | | | | Added comments to describe the storage location of DXE Services Table, HOB List Table and PEI Vector Handoff Table. As defined in PI 1.7 A Errata specification. Cc: Felix Polyudov <felixp@ami.com> Cc: Dhanaraj V <vdhanaraj@ami.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
* MdePkg: Clarify EFI_MM_SX_DISPATCH_PROTOCOL.Register() as per PI 1.7 A specINDIA\sachinganesh2024-10-161-5/+1
| | | | | | | | | | | | Clarified comments regarding the usage of RegisterContext parameter of Register() API in EFI_MM_SX_DISPATCH_PROTOCOL. As defined in the PI 1.7 A Errata specification. Cc: Felix Polyudov <felixp@ami.com> Cc: Dhanaraj V <vdhanaraj@ami.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>