summaryrefslogtreecommitdiff
path: root/MdeModulePkg
AgeCommit message (Collapse)AuthorFilesLines
2 daysMdeModulePkg/ArmFfaLib: Add MemoryAllocationLibHEADmasterMichael Kubacki5-0/+5
ArmFfaRxTxMap.c is built by both ArmFfaPeiLib and ArmFfaDxeLib. ArmFfaSecRxTxMap.c is built by ArmFfaSecLib. ArmFfaStandaloneMmRxTxMap.c is built by ArmFfaStandaloneMm*Lib. The files depend on `MemoryAllocationLib` APIs such as `AllocateAlignedPages()`. This change adds `MemoryAllocationLib` to those library INF files. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2 daysMdeModulePkg/ArmFfaLib: Add HobLib to StMm instancesMichael Kubacki2-0/+2
ArmFfaCommon.c is built by both ArmFfaStandaloneMmCoreLib and ArmFfaStandaloneMmLib. It links against HobLiib APIs such as `GetFirstHob()`. Right now, the symbols fail to link: ``` lld-link: error: undefined symbol: GetFirstHob ArmFfaStandaloneMmCoreLib.lib(ArmFfaCommon.obj) ``` Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
6 daysMdeModulePkg: consider UNSUPPORTED return as valid in ArmFfaStandaloneMmLibLevi Yun1-0/+13
commit b534cabbdac4 ("ArmFfaLib: Add Rx/Tx support for Stmm secure partition") makes ArmFfaStandlaoneMm(Core)Lib map Rx/Tx buffer in its constructor. This makes a failure of loading StandaloneMm in legacy platform which doesn't implements Rx/Tx buffer related API since it doesn't need to. StandaloneMm could be only service provider not cosumer in some platform where doesn't need to map RxTx buffer. Therefore, Considier EFI_UNSUPPORTED return in ArmFfaStandaloneMmLib's constructor. Fixes: b534cabbdac4 ("ArmFfaLib: Add Rx/Tx support for Stmm secure partition") Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
6 daysGlobal: fix ArmFfaLibRun() caller couldn't get ret-argsLevi Yun1-3/+38
When ArmFfaLibDirectMsgReq(2) is preempted, caller of these functions should resume it works via ArmFfaLibRun() and the secure partition will be return with FFA_DIRECT_MSG_RESP(2) with return arguments. However, since ArmFfaLibRun() gets its return in its stack variable, So caller of ArmFfaLibRun() doesn't get the return arguments from secure partition. To resolve this, add output parameter to ArmFfaLibRun() to receive return arguments. Continuous-integration-options: PatchCheck.ignore-multi-package Fixes: 5d1b38dd07c4 ("ArmPkg: Add ArmFfaLib used in Dxe driver") Reported-by: Mariam Elshakfy <Mariam.Elshakfy@arm.com> Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
6 daysArmPlatformPkg,EmbeddedPkg,MdeModulePkg: Move RealTimeClockLib headerINDIA\sachinganesh2-0/+127
RealTimeClockLib is an architectural implementation that is not restricted to the embedded segment or any platform in particular. So the header has been moved to MdeModulePkg. And the package has been added to the relevant INF files. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
9 daysMdeModulePkg: Deprecate EFI_UNICODE_COLLATION_PROTOCOL_GUIDGowtham M7-69/+13
Adding to the previous commit deprecating EFI_UNICODE_COLLATION_PROTOCOL_GUID in MdeModulePkg. Cc: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Gowtham M <gowthamm@ami.com>
10 daysMdeModulePkg/UiApp: Remove unused variableQihang Gao1-6/+0
Since the variable mLanguageString is not used at all, remove it to make code clean. Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
12 daysMdeModulePkg UsbMouseDxe: Correct some parameter commentsYang Gang2-2/+2
Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
13 daysMdeModulePkg: Fix malformed terminal control sequencesJack Little2-15/+19
Commit 9224a2b91764ab17b2c1dbc9fdcb012eaed62da6 adds support for larger terminal dimensions; however, the ANSI control sequences to manipulate the terminal cursor are not built to accomodate terminal dimensions that are three digits long. For example, suppose we want to move the cursor 163 columns to the right. The required control sequence would be `^[[163C`; however, the existing code will create a control sequence of `^[[@3C` due to trying to add 16 to the character '0' instead of either 1 or 6. This fix adds a third digit to the sequence templates for moving the cursor forward, moving it backwards, and setting the cursor position. Signed-off-by: Jack Little <jack.tay.little@hpe.com>
2025-08-25MdeModulePkg: Add PcdCapsuleFmpSupportSergii Dmytruk3-0/+13
When set to TRUE, bit EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED of OsIndications is set. At the moment EDK never sets this bit (there is only definition with no uses), maybe nothing actually checks its value. Whatever the reason is, it seems like a good idea to make setting it possible. Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2025-08-25MdeModulePkg/PeiCore: Print GUID of FV and FvFile in debug logRay Ni1-6/+32
When a BIOS implementation splits the PEIMs in multiple firmware volumes and the FVs are reported to PEI Core by different PEIMs at different time, it is hard to conclude the exact FV dispatch order. The change updates the existing PEI dispatch logic to print the GUID of the firmware volume and the FFS file which contains a nested FV. It helps developers to match the FV being dispatched to the FV defined in FDF file. Signed-off-by: Ray Ni <ray.ni@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn>
2025-08-22MdeModulePkg: Improve the implementation of EFI_SIMPLE_TEXT_OUTPUT_PROTOCOLGao Qihang3-0/+19
Fix TestString() to be compatible with wide/narrow string in GraphicsConsole driver. If WIDE_CHAR or NARROW_CHAR is hit in TestString function, ignore it since OutputString function will correctly handle it. Fix OutputString() to skip wide/narrow char in TerminalDxe. Because they are not displayable in terminal emulation tool, ingore to output if they are hit in OutputString function. Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
2025-08-22MdeModulePkg: Simplify PrintInternal function to fit wide characterGao Qihang1-54/+19
According to UEFI Spec, only Bit0...6 is valid in mode attribute, other bits are undefined and must be 0. So attribute with EFI_WIDE_ATTRIBUTE is unacceptable as EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.SetAttribute() input parameter. In current PrintInternal function, wide character removed WIDE_CHAR, and is used as EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.OutputString() input parameter. So, wide character is mistakenly be treated as narrow character. Because EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.OutputString() can handle unicode string with NARROW_CHAR and WIDE_CHAR, we can directly invoke OutputString() with whole unicode string in PrintInternal function instead of separated wide/narrow string. And then, the logic of computing unicode string width is also simplified. Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
2025-08-22MdeModulePkg/HiiDatabaseDxe: Avoid assert in InternalGetStringGao Qihang1-1/+2
If string default is set to zero in vfr file and VfrCompile may not found the invalid operation, assert is trigged. This patch will check whether StringId is 0 to avoid assert. Cc: Chao Li <lichao@loongson.cn> Signed-off-by: Gao Qihang <gaoqihang@loongson.cn>
2025-08-11MdeModulePkg: XhciDxe: Fix comment grammar in XhcMonitorAsyncRequestsSherry Fan1-2/+2
Clarify wording of the comment before the callback in XhcMonitorAsyncRequests. Signed-off-by: Sherry Fan <sherryfan@microsoft.com>
2025-08-11MdeModulePkg: XhciDxe: Fix USB reset issue: callback / update orderSherry Fan1-3/+25
As noted in the comment above the callback invocation, the URB's callback may free the URB, so any operations, including updates, must occur before the callback. Signed-off-by: Sherry Fan <sherryfan@microsoft.com>
2025-08-11MdeModulePkg: XhciDxe: Fix USB reset issue: use after freeSherry Fan2-4/+33
`XhcFreeUrb` attempts to unmap `Urb->DataMap` after `FreePool(Urb->Data)` has already been called in some cases, causing a use after free. Change the ordering so `Data` is freed after `Unmap`and only freed when appropriate. Signed-off-by: Sherry Fan <sherryfan@microsoft.com>
2025-08-08MdeModulePkg: Support conditional UFS initializationBob Morgan2-25/+41
Add SkipHceReenable and SkipLinkStartup flags to the EDKII_UFS_HC_PLATFORM_PROTOCOL to support using a UFS controller that has already been initialized. Signed-off-by: Bob Morgan <bobm@nvidia.com>
2025-08-07MdeModulePkg: Remove obsolete PEI_USB_HOST_CONTROLLER_PPIArd Biesheuvel4-254/+0
This PPI is no longer used - the EHCI and XHCI host controller PEIMs expose PEI_USB2_HOST_CONTROLLER_PPI instead. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-08-07MdeModulePkg/UsbBusPei: Drop support for obsolete host controller PPIArd Biesheuvel4-348/+132
There are two versions of the USB host controller PPI, and only the newer one, called PEI_USB2_HOST_CONTROLLER_PPI, is actually produced by the EHCI and XHCI host controller PEIMs in EDK2. (The other PPI was only produced by UhciPei which has been removed) So remove all the conditionally executed code based on the distinction between the two PPIs, and only support the newer one. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-08-07MdeModulePkg/Usb: Remove UhciPeiArd Biesheuvel7-5003/+0
Remove the UHCI PEI module, which is unused (in edk2-platforms) and obsolete. It also implements an older version of the USB host controller PPI, which can be dropped from EDK2 entirely once this driver is gone. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2025-08-07MdeModulePkg: Usb cumulative codeql issues.Michael Kubacki6-21/+39
Running Codeql on the MdeModulePkg\Bus\Usb drivers results in codeql errors stemming for the following two checks. - cpp/comparison-with-wider-type - cpp/overflow-buffer Signed-off-by: Aaron Pop <aaronpop@microsoft.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com> Co-authored-by: Taylor Beebe <tabeebe@microsoft.com> Co-authored-by: pohanch <125842322+pohanch@users.noreply.github.com> Co-authored-by: kenlautner <85201046+kenlautner@users.noreply.github.com> Co-authored-by: Oliver Smith-Denny <osde@linux.microsoft.com> Co-authored-by: Sean Brogan <sean.brogan@microsoft.com> Co-authored-by: Aaron <aaronpop@microsoft>
2025-08-07MdeModulePkg: Variable cumulative codeql issues.Michael Kubacki3-65/+72
Running Codeql on MdeModulePkg/Universal/Variable drivers results in codeql errors stemming for the following two checks. - cpp/comparison-with-wider-type - cpp/overflow-buffer - cpp/missing-null-test Signed-off-by: Aaron Pop <aaronpop@microsoft.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com> Co-authored-by: Taylor Beebe <tabeebe@microsoft.com> Co-authored-by: pohanch <125842322+pohanch@users.noreply.github.com> Co-authored-by: kenlautner <85201046+kenlautner@users.noreply.github.com> Co-authored-by: Oliver Smith-Denny <osde@linux.microsoft.com> Co-authored-by: Sean Brogan <sean.brogan@microsoft.com> Co-authored-by: Aaron <aaronpop@microsoft>
2025-08-07MdeModulePkg: added SecurityManagementLib mockAlexander Gryanko4-0/+104
Added Google Mock test support for SecurityManagementLib Signed-off-by: Alexander Gryanko <xpahos@gmail.com>
2025-08-06MdeModulePkg: UefiBootManagerLib Change default alignment for ramdisk boot.ddeptford1-3/+7
The ramdisk is modelled as an NVDIMM which have a naturally higher alignment than 4K. Operating systems may wish to map NVDIMMs using large pages, so force the allocation alignment to 2MB. This change was tested using HTTP ramdisk boot, targeting a flat windows image. Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2025-07-30MdeModulePkg: Change PCD type to support dynamicPranav V V1-4/+5
Move PcdSerialRegisterBase from [PcdsFixedAtBuild, PcdsPatchableInModule] section to [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] section to enable dynamic configuration. Signed-off-by: Pranav V V <pranav.v.v@intel.com>
2025-07-23MdeModulePkg: Unify EfiFileName ParsingOliver Smith-Denny3-4/+4
The various cores all attempt to print the EfiFileName when loading/dispatching drivers, but they are not unified on approach. This commit ensures they are using the same buffer size and the loop parsing variables are unsigned, as we should not have a negative index. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-07-23MdeModulePkg: Always Print Driver Load MessagesOliver Smith-Denny3-24/+10
Today, DXE/PEI/SMM Core's image loaders only print driver load messages if debug code is enabled. However, these are some of the most important prints in the codebase: on a given system even if you have nothing else to debug with, you can see the last driver executed. Debug code blocks are used to skip logic that only exists for debug purposes and wastes time on a release build. However, the logic to print a line and determine the filename from the PDB is not extensive and provides critical information, so it is inappropriate to wrap in a debug code section. Platforms can still choose to disable logging at DEBUG_INFO/DEBUG_LOAD and will not see the error messages. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-07-17MdeModulePkg: Console cumulative codeql issues.Michael Kubacki3-21/+29
Running Codeql on MdeModulePkg/Universal/Console drivers results in codeql errors stemming for the following checks. - cpp/comparison-with-wider-type - cpp/missing-null-test Signed-off-by: Aaron Pop <aaronpop@microsoft.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com> Co-authored-by: Taylor Beebe <tabeebe@microsoft.com> Co-authored-by: pohanch <125842322+pohanch@users.noreply.github.com> Co-authored-by: kenlautner <85201046+kenlautner@users.noreply.github.com> Co-authored-by: Oliver Smith-Denny <osde@linux.microsoft.com> Co-authored-by: Sean Brogan <sean.brogan@microsoft.com> Co-authored-by: Aaron <aaronpop@microsoft>
2025-07-17MdeModulePkg: FvSimpleFileSystemDxe cumulative codeql issues.Michael Kubacki2-1/+8
Running Codeql on MdeModulePkg/Universal/FvSimpleFileSystemDxe drivers results in codeql errors stemming from missing null tests. Signed-off-by: Aaron Pop <aaronpop@microsoft.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com> Co-authored-by: Taylor Beebe <tabeebe@microsoft.com> Co-authored-by: pohanch <125842322+pohanch@users.noreply.github.com> Co-authored-by: kenlautner <85201046+kenlautner@users.noreply.github.com> Co-authored-by: Oliver Smith-Denny <osde@linux.microsoft.com> Co-authored-by: Sean Brogan <sean.brogan@microsoft.com> Co-authored-by: Aaron <aaronpop@microsoft>
2025-07-14MdeModulePkg/Include: change type of buffer address in ArmFfaRxTxBufferInfoLevi Yun6-14/+16
Change type of buffer address type in ArmFfaRxTxBufferInfo so that reduce the type casting. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-07-14MdeModulePkg/Library: commonize some duplicate code in ArmFfaLibLevi Yun5-225/+194
Some of code for handling Rx/Tx buffer is duplicate. This patch commonize some of duplication routine used in Rx/Tx buffer related functions. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-07-14MdeModulePkg/Library: add ArmFfaSecLibLevi Yun5-6/+536
To use Arm-FFA intereface in PeilessSec, implments ArmFfaSecLib used by PeilessSec. For example, communicate with TPM service using CRB over ARM-FFA (via Tpm2DeviceLibFfa), PeilessSec need to use Arm-FFA interface. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-07-14MdeModulePkg: Make PcdFfaTxRxPageCount a PcdsFixedAtBuild PCDLevi Yun1-4/+4
The PcdFfaTxRxPageCount can never be changed dynamically and is configured at build time to specify the size of the Rx/Tx buffers. Therefore, make PcdFfaTxRxPageCount a PcdsFixedAtBuild PCD. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2025-07-14MdeModulePkg/Library: fix memory leak Rx/Tx Buffer in ArmFfaPeiLibLevi Yun7-53/+369
The commit e15fe066036da ("MdeModulePkg/Library: make ArmFfaPeiLib available early PEIM stage") uses ArmFfaPeiLib in the early PEIM stage. However, the Rx/Tx buffer allocated in the early PEIM stage uses temporary memory. This results in a memory leak when the temporary memory's heap is relocated to permanent memory. For example, if the Rx/Tx buffer memory is allocated at 0x20006000 in temporary memory, and if offset between temporary memory and permanent is 0x40000000, then: - Once permanent memory installed the temporary memory at 0x20006000 is migrated to 0x60006000. - However, ArmFfaPeiLib allocates new Rx/Tx buffer without freeing the migrated Rx/Tx buffers, i.e. the buffers at 0x60006000. This results in a memory leak as the migrated Rx/Tx buffer area is lost. To address this memory leak, use the MemoryAllocationHob's name, so that the migrated memory area will be reused as Rx/Tx buffer. This patch also includes rename ArmFfaRxTxStmm.c to ArmFfaStandaloneMmRxTxMap.c to keep the file name convention in ArmFfaLib with ArmFfa{Phase}{...}.c Fixes: e15fe066036da ("MdeModulePkg/Library: ...") Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com> Continuous-integration-options: PatchCheck.ignore-multi-package
2025-07-10MdeModulePkg: UsbBusDxe Reset USB port GetPortStatus returns device error.Alok Kulkarni1-2/+9
During USB device enumeration, issuing a hot reset on a port is skipped if there is a reset change status already detected on the port. This can happen when enumerating devices after a host controller soft reset (which drives a hot reset down the ports). However, in certain cases an attached device may not be responsive even if the reset change and connection status bits are set. For e.g., according to xHCI spec section 4.19.5.1 the port reset change bits can be set when a hot reset driven on the port transitions to a warm reset and completes with errors. For such instances it is worthwhile to force a hot reset during enumeration to try and recover unresponsive devices. During enumeration check whether querying port status returns EFI_DEVICE_ERROR and try a port reset if there is a device attached to the port. Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2025-07-09MdeModulePkg: MdeModulePkg.dec update PcdDxeNxMemoryProtectionPolicy.Aaron Pop1-2/+1
Update the comments for PcdDxeNxMemoryProtectionPolicy which contained old information. Signed-off-by: Aaron Pop <aaronpop@microsoft.com> Co-authored-by: Oliver Smith-Denny <osde@microsoft.com>
2025-07-09MdeModulePkg: Leak Memory if Not RW on FreePagesOliver Smith-Denny4-0/+98
Currently, if the DebugClearMemory bit is set in the PcdDebugPropertyMask, CoreConvertPagesEx will attempt to write a pattern to the pages being freed. However, it does not check that the page is writeable, which will cause a page fault if not. Furthermore, if NX protections are not enabled, the core does not ensure that any freed pages are RW, which is the state expected when they are allocated next. If they are not RW, the allocating driver will crash trying to use them. This patch updates the page freeing code to query the memory attributes protocol, if present, for the attributes. If this call fails or the attributes are not RW at a minimum, the core leaks the memory (returning success to the caller). If the memory attribute protocol is not present (either because a platform doesn't produce it or it is before the protocol has been produced, the core continues with freeing memory. This is either before the CPU Arch protocol is available (so drivers can't change memory attributes) or otherwise matches existing behavior. This was deemed the best approach to let memory that can't be guaranteed to be RW leak instead of letting a driver crash when allocating it. It was deemed less brittle to simply leak the memory instead of attempting to change the attributes. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-07-08MdeModulePkg/GraphicsConsoleDxe UGAGuoMinJ4-311/+18
The Universal Graphics Adapter (UGA) is a graphic abstraction. The UGA I/O and Draw protocols are deprecated since UEFI 2.0 was introduced. Cf. the UEFI spec v2.9: "Appendix L - EFI 1.10 Protocol Changes and Deprecation List" section L.2 "Deprecated Protocols" Remove the UGA support. Signed-off-by: GuoMinJ <newexplorerj@gmail.com> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-07-08MdeModulePkg/ConSplitterDxe UGAGuoMinJ5-731/+53
The Universal Graphics Adapter (UGA) is a graphic abstraction. The UGA I/O and Draw protocols are deprecated since UEFI 2.0 was introduced. Cf. the UEFI spec v2.9: "Appendix L - EFI 1.10 Protocol Changes and Deprecation List" section L.2 "Deprecated Protocols" Remove the UGA support. Signed-off-by: GuoMinJ <newexplorerj@gmail.com> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-07-08MdeModulePkg: Remove UGA supportGuoMinJ7-194/+58
The Universal Graphics Adapter (UGA) is a graphic abstraction. The UGA I/O and Draw protocols are deprecated since UEFI 2.0 was introduced. Cf. the UEFI spec v2.9: "Appendix L - EFI 1.10 Protocol Changes and Deprecation List" section L.2 "Deprecated Protocols" Remove the UGA support. Signed-off-by: GuoMinJ <newexplorerj@gmail.com> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2025-07-08MdeModulePkg: Don't Allocate Page 0Oliver Smith-Denny6-98/+8
Currently DxeIpl attempts to set page 0 to all 0's and to create a memory allocation HOB for it. However, DxeIpl will also unmap the page when mapping page tables and if null detection is not enabled, DxeCore will set the page to 0, regardless of allocation status. Because no consumers are using the memory allocation HOB for page 0, drop it. Instead, ensure that PeiCore and DxeCore do not allow allocating page 0; it should always be reserved for null pointer detection. It also complicates the story for platforms that are attempting to audit the system and ensure that no modules are using page 0. With these memory allocation HOBs in place, it is difficult to tell if it is simply DxeIpl who has allocated the memory or another module. This commit drops the memory allocation HOB publishing and ensures that DxeCore and PeiCore do not allocate page 0. DxeCore already will not allocate page 0 to callers of AllocatePages who call with a type other than AllocateAddress, this just changes so that AllocateAddress cannot allocate at page 0 (which if null detection is enabled will cause a page fault). PeiCore does not have AllocateAddress and so this ensures standard allocations do not receive page 0. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-07-04MdeModulePkg: Correct spelling errors and typosAbdul Lateef Attar3-3/+7
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2025-07-01MdeModulePkg: SectionExtractionPei cumulative codeql issues.Michael Kubacki1-6/+9
Running Codeql on MdeModulePkg/Universal/SectionExtractionPei drivers results in codeql errors stemming from missing null tests. Signed-off-by: Aaron Pop <aaronpop@microsoft.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com> Co-authored-by: Taylor Beebe <tabeebe@microsoft.com> Co-authored-by: pohanch <125842322+pohanch@users.noreply.github.com> Co-authored-by: kenlautner <85201046+kenlautner@users.noreply.github.com> Co-authored-by: Oliver Smith-Denny <osde@linux.microsoft.com> Co-authored-by: Sean Brogan <sean.brogan@microsoft.com> Co-authored-by: Aaron <aaronpop@microsoft>
2025-07-01MdeModulePkg: SmmCommunicationBuffer cumulative codeql issues.Michael Kubacki1-0/+4
Running Codeql on MdeModulePkg/Universal/SmmCommunicationBuffer drivers results in codeql errors stemming from missing null tests. Signed-off-by: Aaron Pop <aaronpop@microsoft.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com> Co-authored-by: Taylor Beebe <tabeebe@microsoft.com> Co-authored-by: pohanch <125842322+pohanch@users.noreply.github.com> Co-authored-by: kenlautner <85201046+kenlautner@users.noreply.github.com> Co-authored-by: Oliver Smith-Denny <osde@linux.microsoft.com> Co-authored-by: Sean Brogan <sean.brogan@microsoft.com> Co-authored-by: Aaron <aaronpop@microsoft>
2025-07-01MdeModulePkg/FaultTolerantWriteDxe: Add validation for FtwWorkSpaceHeaderWenbo Hou2-1/+8
Add validation for FtwWorkSpaceHeader within the WorkSpaceRefresh() function to address an issue where the variable store cannot recover from the FTW spare block if the variable store is erased or corrupted during an FTW write or reclaim operation. Signed-off-by: Wenbo Hou <wenbo.hou@microsoft.com>
2025-06-27MdeModulePkg: MmVariablePei: Use MM communicate v3Kun Qin3-17/+61
As the MM cores begin to support MM Communicate v3, this update moves the driver to communicate to MM agent through MM Communicate v3 PPI. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-06-27MdeModulePkg: VariableSmmRuntimeDxe: Use MM communicate v3Kun Qin3-73/+206
As MM cores start to support MM communciate v3. This change moves the variable driver to use MM communicate v3 if it is available, otherwise the driver will fallback to v2 to keep the same functionality. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-06-27MdeModulePkg: PiSmmIpl: Add check for MM communicate v3 headerKun Qin1-0/+7
This change adds a check to ensure the incoming buffer is correctly using MM communicate v3 header before dereferencing the content. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-06-26MdePkg, MdeModulePkg: ArmFfaLib: Expose FFA_ARGS and ArmCallFfaKun Qin1-35/+1
FFA is a framework that supports various protocols built on top. i.e. memory protocol, which is nothing that can be done through existing interfaces. Instead of requiring protocol authors to check conduit PCD in every implementation, exposing the ArmCallFfa is a unified way to allow other protocols to leverage FFA interfaces. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Kun Qin <kun.qin@microsoft.com>