summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library
AgeCommit message (Collapse)AuthorFilesLines
4 daysMdeModulePkg/UefiHiiLib: Fix memory leaks in ValidateQuestionFromVfrQihang Gao1-0/+8
QuestionName is allocated by HiiGetString() but is not released in several code path. This causes memory leaks whenever these paths are taken. Add FreePool (QuestionName) after it is no longer needed. No functional change intended. Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
11 daysMdeModulePkg: Add EFIAPI to GptLib functionsMichael Kubacki1-0/+3
EFIAPI is required on library interface functions to ensure that the correct calling convention is used. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2026-09-15MdeModulePkg: Update UI strings to indicate case-insensitive key optionsQihang Gao1-2/+2
Update the prompt strings for save/exit and confirm actions to show both uppercase and lowercase key options (e.g., 'Y(y)' and 'N(n)') to make it clear that the system accepts either case. This improves user experience by avoiding confusion about case sensitivity. Affected strings: - ARE_YOU_SURE (CustomizedDisplayLib) - CONFIRM_OPTION (DisplayEngineDxe) - RECONNECT_CHANGES_OPTIONS (DisplayEngineDxe) French translations are updated accordingly. Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
2026-09-07MdeModulePkg: Report EFI_SW_DXE_BS_PC_BOOT_OPTION_COMPLETESachin Ganesh1-0/+2
Previously EfiBootManagerBoot reported EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED when a boot option returned an error, but reported nothing on success. Report the PI 1.10 status code EFI_SW_DXE_BS_PC_BOOT_OPTION_COMPLETE when a boot option loads, executes, and returns success, so status code listeners can tell that a boot option was attempted and that control returned to firmware. Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
2026-08-28MdeModulePkg/ImagePropertiesRecordLib: Fix incorrect use of sizeofMingjie Shen1-1/+1
In GetFilename(), the post-loop fallback termination used sizeof (EfiFileName), which is the size of the CHAR8 * pointer parameter (8 bytes on X64), not the buffer size. Use EfiFileNameSize - 4 to match the bound of the copy loop above so the string is terminated at the true end of the buffer. Tested on OvmfPkgIa32X64, DEBUG, GCC: DumpImageRecords() prints all runtime image names correctly and NUL-terminated, with no ASSERTs. Signed-off-by: Mingjie Shen <shen497@purdue.edu>
2026-08-28MdeModulePkg/BootMaintenanceManagerUiLib: Change numeric step to 1Qihang Gao1-1/+1
Set the numeric step to 1 to allow +/- key adjustment. Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
2026-08-27MdeModulePkg/UefiBootManagerLib: Add constructor to INF fileMichael Kubacki1-0/+1
UefiBootManagerLibConstructor() is a constructor function in BmBoot.c that is missing as the constructor in the INF file. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2026-08-11MdeModulePkg/UefiHiiLib: Fix regression from 12828Aaron Pop1-1/+0
12828 introduced an ASSERT in HiiGetBrowserData() that fires when InternalHiiBrowserCallback() returns NULL. This is a valid return value indicating the browser has no data for the requested variable, and callers already handle this by checking the FALSE return value. The ASSERT is incorrect because it triggers on a non-error path, causing a crash when the browser callback legitimately returns no data. Remove the unnecessary ASSERT while keeping the existing FALSE return so callers continue to handle this case gracefully. Cc: Qihang Gao <gaoqihang@loongson.cn> Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2026-08-05MdeModulePkg: Fix unchecked return statusAaron Pop1-0/+3
https://github.com/github/codeql/blob/codeql-cli-2.7.3/csharp/ql/src/API%20Abuse/UncheckedReturnValue.qhelp When a function has a return status, it should be checked to verify the function completed successfully. Failing to check the return status can result in null pointer dereferences or use of uninitialized variables. Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2026-08-05MdeModulePkg: Fix missing NULL testsAaron Pop6-11/+55
https://github.com/github/codeql/blob/codeql-cli-2.7.3/cpp/ql/src/Critical/MissingNullTest.qhelp For items which allocate memory, or get a pointer from another structure, it is important to validate that the pointers are not null before they are dereferenced. Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2026-08-05MdeModulePkg: Fix comparison with wider widthsAaron Pop6-27/+27
https://codeql.github.com/codeql-query-help/cpp/cpp-comparison-with-wider-type If the narrow type (smaller range) is compared against a wide type (larger range), the narrow value may overflow before reaching the wide value. This can cause unexpected behavior, such as: Infinite loops (loop condition never becomes false). Incorrect logic (comparison results are misleading). Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2026-08-05MdeModulePkg: Fix conditionally uninitialized variablesAaron Pop4-4/+19
https://github.com/github/codeql/blob/codeql-cli-2.7.3/cpp/ql/src/Security/CWE/CWE-457/ConditionallyUninitializedVariable.qhelp Some local variables, when going through a code path, can end up uninitialized (using the value they had at the start of the function). This is generally due to an error path that can occur based on the library instances, or the unchecked error (i.e. a allocation failing). These variables should be initialized with a known value that will result in the function being able to exit gracefully. Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2026-08-05MdeModulePkg: Fix missing NULL testsAaron Pop7-69/+246
https://github.com/github/codeql/blob/codeql-cli-2.7.3/cpp/ql/src/Critical/MissingNullTest.qhelp For items which allocate memory, or get a pointer from another structure, it is important to validate that the pointers are not null before they are dereferenced. Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2026-08-05MdeModulePkg: Fix Comparison overflowAaron Pop2-7/+18
https://github.com/github/codeql/blob/codeql-cli-2.7.3/cpp/ql/src/Security/CWE/CWE-190/ComparisonWithWiderType.qhelp Switch to using SafeUint16Add for calculating offsets into block data. The data being used in the calculation comes from config block strings, and there is no validation of the values before the calculation occurs. Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2026-08-05MdeModulePkg: Fix missing NULL testsAaron Pop1-15/+62
https://github.com/github/codeql/blob/codeql-cli-2.7.3/cpp/ql/src/Critical/MissingNullTest.qhelp For items which allocate memory, or get a pointer from another structure, it is important to validate that the pointers are not null before they are dereferenced. Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2026-08-05MdeModulePkg: Fix comparison with wider widthsAaron Pop1-1/+1
https://codeql.github.com/codeql-query-help/cpp/cpp-comparison-with-wider-type If the narrow type (smaller range) is compared against a wide type (larger range), the narrow value may overflow before reaching the wide value. This can cause unexpected behavior, such as: Infinite loops (loop condition never becomes false). Incorrect logic (comparison results are misleading). Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2026-07-30MdeModulePkg: Fix missing NULL testsAaron Pop7-17/+61
https://github.com/github/codeql/blob/codeql-cli-2.7.3/cpp/ql/src/Critical/MissingNullTest.qhelp For items which allocate memory, or get a pointer from another structure, it is important to validate that the pointers are not null before they are dereferenced. Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2026-07-30MdeModulePkg: Fix comparison with wider widthsAaron Pop1-5/+5
https://codeql.github.com/codeql-query-help/cpp/cpp-comparison-with-wider-type If the narrow type (smaller range) is compared against a wide type (larger range), the narrow value may overflow before reaching the wide value. This can cause unexpected behavior, such as: Infinite loops (loop condition never becomes false). Incorrect logic (comparison results are misleading). Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2026-07-21MdeModulePkg/GptLib: Add host-based unit tests for malformed GPT inputRichard Lyu2-3/+571
Extend the GptLib host-based tests with negative cases that guard the security hardening in PartitionValidGptTable(), PartitionCheckGptEntry() and PartitionRestoreGptTable() against future regressions. These tests exercise the shared parser, not the specific fix itself. The new cases drive the parser with malformed GPT structures that an attacker may present: bad signature/revision, header-size boundaries, CRC corruption, MyLBA replay, zero/non-power-of-two entry sizes, LBA multiplication overflow, out-of-range and overlapping entries, and restore failure on write-protected media. The INF file header is updated to note the added malformed coverage. Signed-off-by: Richard Lyu <richard.lyu@suse.com>
2026-07-21MdeModulePkg/GptLib: Add host-based unit tests for valid GPT behaviorRichard Lyu4-0/+925
Add the positive-path host-based tests for the shared GptLib parser (extracted as part of the parser security hardening), ensuring the tightened checks in PartitionValidGptTable(), PartitionCheckGptEntry() and PartitionRestoreGptTable() do not falsely reject well-formed GPTs. The tests run against an in-memory mock disk and cover accepted primary/backup headers, boundary but legal header/entry sizes, correct entry-status flagging on valid entries, and primary/backup restore round-trips. Signed-off-by: Richard Lyu <richard.lyu@suse.com>
2026-07-21MdeModulePkg/GptLib: Validate GPT header fields before useRichard Lyu1-3/+31
PartitionValidGptTable() checked the signature, header CRC32, MyLBA, the entry-array CRC32 and the entry-array size overflow, but not several other UEFI-mandated GPT header constraints. DxeTpm2MeasureBootLib used to enforce these via Tpm2SanitizeEfiPartitionTableHeader(); once it switched to this shared parser, the checks were lost on the path. Also reject a header unless Header.Revision is GPT_HEADER_REVISION_V1, HeaderSize is at least the 92-byte minimum, NumberOfPartitionEntries is non-zero, SizeOfPartitionEntry is 128 * 2^n, and PartitionEntryLBA * BlockSize cannot overflow. The "entries lie before FirstUsableLBA" rule is intentionally omitted, as this routine also validates the backup header whose entry array follows the usable region. This restores the validation the measurement path lost and, because GptLib is shared, tightens PartitionDxe the same way: malformed headers are now rejected and the parse and measure paths stay identical. Ref: https://seclists.org/oss-sec/2026/q2/727 Signed-off-by: Richard Lyu <richard.lyu@suse.com>
2026-07-21MdeModulePkg/GptLib: Extract shareable GPT parser into a libraryRichard Lyu2-0/+597
As reported in CVE-2024-13745 via oss-sec, DxeTpm2MeasureBootLib can measure a partition table that differs from the one parsed by the PartitionDxe driver. To address this, the more complete GPT parsing logic from PartitionDxe is extracted into a standalone GptLib library so it can be shared between PartitionDxe and DxeTpm2MeasureBootLib. This ensures that the exact same partition table measured into PCR[5] is the one parsed and used by the system. PartitionDxe behavior is unchanged. Ref: https://seclists.org/oss-sec/2026/q2/727 Signed-off-by: Richard Lyu <richard.lyu@suse.com>
2026-07-20MdePkg,MdeModulePkg: ArmFfaLib: Expand to include first 4 registersKun Qin1-3/+9
The direct message arguments stripped off the header, making the underlying FF-A function interface to lose information when it comes to certain return code, i.e. FFA_YIELD and FFA_INTERRUPT. This change adds back the header field for this purpose so that the callers can decide how to act on the corresponding return codes. It then populates the header field for this purpose in FFA direct message functions so that the callers can decide how to act on the corresponding return codes. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2026-07-08MdeModulePkg/ArmFfaLib: Use EFI_PAGES_TO_SIZEMingjie Shen3-10/+10
Replace manual page-size multiplication with EFI_PAGES_TO_SIZE in the ArmFfaLib sources. This commit mimics 3457388 and is generated by the following coccinelle scipt: ```smpl @pages_to_size@ expression PAGE_COUNT; @@ - PcdGet64 (PAGE_COUNT) * EFI_PAGE_SIZE + EFI_PAGES_TO_SIZE (PcdGet64 (PAGE_COUNT)) ``` Tested: - stuart_ci_build -c .pytool/CISettings.py -p MdeModulePkg -a AARCH64 -t DEBUG TOOL_CHAIN_TAG=GCC - stuart_ci_build -c .pytool/CISettings.py -p MdeModulePkg -a AARCH64 -t RELEASE,NO-TARGET TOOL_CHAIN_TAG=GCC Signed-off-by: Mingjie Shen <shen497@purdue.edu>
2026-05-29MdeModulePkg/ArmFfaLib: return error when CurrentVersion is NULLYeoreum Yun1-3/+9
Output parameter CurrentVersion of ArmFfaLibGetVersion() is not optional parameter. That means it should return error when CurrentVersion is NULL. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-05-29MdeModulePkg/ArmFfaLib: Fix VM ID handling for RX release and RXTX unmapShenghu Liu4-12/+43
According to the FFA specification, when FFA_RX_RELEASE or FFA_RXTX_UNMAP is invoked from UEFI as a non-secure virtual instance, the w1 register must be zero (MBZ). Supplying a non-zero value causes the SPMC to return FFA_INVALID_PARAMETER. When these interfaces are invoked from UEFI as a non-secure physical instance, FFA_ID_GET always returns a VM ID of zero. Therefore, providing a non-zero VM ID in this context is unnecessary and may be invalid. Update ArmFfaLib to always set w1 (VM ID / partition ID) to zero when invoking FFA_RX_RELEASE and FFA_RXTX_UNMAP, ensuring compliance with the FFA specification. Signed-off-by: Shenghu Liu <shenghul@qti.qualcomm.com>
2026-05-06MdeModulePkg: Cleanup debug print readabilityBenjamin Doron1-1/+1
All debug prints should end in a newline character. Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com>
2026-04-30MdeModulePkg/DxeCapsuleLibFmp: Tolerate EFI_ALREADY_STARTED in LockVariableAnandh Krishna U1-1/+1
When multiple DXE drivers link DxeCapsuleLib, each driver's constructor calls InitCapsuleVariable() which attempts to lock capsule-related variables. The second instance fails with EFI_ALREADY_STARTED because the policy is already registered, triggering a false ASSERT. EFI_ALREADY_STARTED from RegisterBasicVariablePolicy means the variable is already locked, which is the desired state. Treat it as success. Signed-off-by: default avatarAnandh krishna U <anandhkrishnau@ami.com>
2026-04-29MdeModulePkg: Remove duplicate procotols guid in INF filesQihang Gao1-2/+1
In PciSioSerialDxe driver, gEfiDevicePathProtocolGuid appears twice in [Procotols] section. In PiSmmCore driver, gEfiSmmSxDispatch2ProtocolGuid appears twice in [Procotols] section. In PiSmmIpl driver, gEfiEventReadyToBootGuid appears twice in [Procotols] section. In DxeCapsuleLib driver, gEfiCapsuleVendorGuid appears twice in [Guids] section. The duplicate ones should be removed. Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
2026-04-28ArmPkg,MdePkg,MdeModulePkg: change ArmFfaLibGetVersion() with whole versionYeoreum Yun1-30/+14
Current ArmFfaLibGetVersion()'s arguments receive two arguments -- major version and minor version. However, This gives some impression treating major and minor version of the ABI as two unrelated 16-bit variables as opposed to the upper and lower 16-bits of a 32-bit version variable. Therefore, change the arguments with whole version and let user to get major/minor version via ARM_FFA_MAJOR/MINOR_VERSION_GET macros. Also, add some useful helper to check version compatibility and mimimum require ABI version. Continuous-integration-options: PatchCheck.ignore-multi-package Suggested-by: Leif Lindholm <quic_llindhol@quicinc.com> Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-04-24MdeModulePkg/Library: introduce ArmFfaConsoleDebugLibMohamed Gamal Morsy3-0/+575
This patch adds ArmFfaConsoleDebugLib. A debug library that utilizes FF-A Console Log API to print debug messages to the console. This is useful in context of running the StandaloneMm payload as a S-EL0 SP on top of SPMC where StandaloneMm isn't allowed to access console device or no console device (e.x) Hafnium. NOTE: FFA_CONSOLE_LOG* could be used by secure partition only. Signed-off-by: Mohamed Gamal Morsy <mohamed.morsy@arm.com>
2026-04-23MdeModulePkg/Library: ArmFfaLib: add mapping ARM_FFA_RET_RETRYYeoreum Yun1-0/+4
There is no mapping ARM_FFA_RET_RETRY with EFI_STATUS but it falls to EFI_UNSUPPORTED. Map ARM_FFA_RET_RETRY with EFI_TIMEOUT so that don't make it fall to EFI_UNSUPPORTED. Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-03-19MdeModulePkg: : revert EndofDxeEvent TPLs to TPL_NOTIFY for FPDTYeoreum Yun1-1/+1
commit aa02571 ("MdeModulePkg: Change EndofDxeEvent TPLs to TPL_CALLBACK") changed EndOfDxeEvent TPLs from TPL_NOFIY to TPL_CALLBACK. However this commit makes a boot failure on the FVP platform when FPDT ACPI table generation is enabled: [FirmwarePerformanceDxe] Error when lock variable FirmwarePerformance, Status = Write Protected ASSERT_EFI_ERROR (Status = Write Protected) ASSERT [FirmwarePerformanceDxe] FirmwarePerformanceDxe.c(405): !(((RETURN_STATUS)(Status)) >= 0x8000000000000000ULL) Currently, EVT_NOTIFY_SIGNAL events are managed in FILO order, as new events are inserted using InsertHeadList(). The sequence is as follows: 1. DxeCore initializes DxeCorePerformanceLib, whose constructor creates an EndOfDxe event (gEfiEndOfDxeEventGroupGuid) with the ReportFpdtRecordBuffer() callback. 2. MmCommunicationDxe (in ArmPkg) creates another EndOfDxe event to notify StandaloneMm. This event is inserted ahead of the one created in (1). 3. PlatformBootManagerBeforeConsole() signals EndOfDxe, which triggers the event created in (2) first. 4. When the callback from (2) runs, StandaloneMm calls LockVariablePolicy(). 5. The callback from (1) is then invoked and attempts to update FPDT via InstallFirmwarePerformanceDataTable(). During this process, it tries to register a variable policy for the FirmwarePerformance variable. However, since the Variable Policy interface was locked in (4), the operation fails with EFI_WRITE_PROTECTED. To resolve this issue, revert EndofDxeEvent TPLs to TPL_NOTIFY for FPDT. Fixes: aa02571 ("MdeModulePkg: Change EndofDxeEvent TPLs to TPL_CALLBACK") Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
2026-03-17MdeModulePkg: Change EndofDxeEvent TPLs to TPL_CALLBACKSherry Fan1-1/+1
Change FPDT events at EndOfDxe to TPL_CALLBACK as TPL_NOTIFY is not necessary. Signed-off-by: Sherry Fan <sherryfan@microsoft.com>
2026-03-17MdeModulePkg: Update performance measurements to use new perf macrosSherry Fan3-3/+4
Updates BmBoot and dispatcher to use new perf macros. Signed-off-by: Sherry Fan <sherryfan@microsoft.com>
2026-03-09MdeModulePkg: Add library class SafeIntLib where ArmFfaCommon.c is usedMike Beaton5-0/+5
Required by implementation of ArmFfaLibYield. Fixes: 6479778e6b3890f65580bfbd50426046533b85a8 Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
2026-03-07MdePkg,MdeModulePkg: Add FFA_YIELD commandRaymond-MS1-0/+41
Add the FF-A YIELD command to the FF-A library. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
2026-03-05MdeModulePkg: fix mdlint issuesSherry Fan2-86/+94
Fix markdownlint formatting issues in READMEs. Signed-off-by: Sherry Fan <sherryfan@microsoft.com>
2026-03-04MdeModulePkg: Add FFA_NS_RES_INFO_GET to ArmFfaCommonrdiaz2-0/+68
Add FFA_NS_RES_INFO_GET implementation to ArmFfaCommon Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
2026-02-28MdeModulePkg HobPrintLib: Also print EFI_HOB_TYPE_UNUSED type HOBStar Zeng1-3/+6
EFI_HOB_TYPE_UNUSED is not unknown HOB type, instead of printing "Unknown Hob type, ...", this patch updates code to also print EFI_HOB_TYPE_UNUSED type HOB. Signed-off-by: Star Zeng <star.zeng@intel.com>
2026-02-27MdeModulePkg/PeiDxeDebugLibReportStatusCode: Fix comma parsingRay Ni1-1/+1
The DebugPrintMarker function in PeiDxeDebugLibReportStatusCode/DebugLib.c does not recognize the comma (`,`) flag in printf-style format strings. When a driver uses format strings with thousand separators like "%,ld" to format large numbers (e.g., 1234567 as "1,234,567"), the DebugPrintMarker parser fails to recognize the comma flag and causes incorrect argument extraction when building the BASE_LIST for status code reporting, leading to unexpected or corrupted debug output in status code reports. The change is to add the missing comma flag check to align with BasePrintLib's format parsing logic, ensuring consistent behavior across all print library implementations. Signed-off-by: Ray Ni <ray.ni@intel.com>
2026-02-27MdeModulePkg/PeiDebugLibDebugPpi: Fix comma parsing in VaListToBaseListRay Ni1-1/+1
The VaListToBaseList function in PeiDebugLibDebugPpi/DebugLib.c does not recognize the comma (`,`) flag in printf-style format strings. When a driver uses format strings with thousand separators like "%,ld" to format large numbers (e.g., 1234567 as "1,234,567"), the VaListToBaseList parser fails to recognize the comma flag and causes incorrect argument extraction from the VA_LIST, leading to unexpected or corrupted debug output. The change is to add a check for the comma character in the format string parsing logic to align with BasePrintLib's format parsing logic, ensuring consistent behavior across all print library implementations. Signed-off-by: Ray Ni <ray.ni@intel.com>
2026-02-24MdeModulePkg: Replace include guards with #pragma onceMichael Kubacki48-192/+48
Replace traditional `#ifndef`/`#define`/`#endif` include guards with `#pragma` once. `#pragma once` is a widely supported preprocessor directive that prevents header files from being included multiple times. It is supported by all toolchains used to build edk2: GCC, Clang/LLVM, and MSVC. Compared to macro-based include guards, `#pragma once`: - Eliminates the risk of macro name collisions or copy/paste errors where two headers inadvertently use the same guard macro. - Eliminate inconsistency in the way include guard macros are named (e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.). - Reduces boilerplate (three lines replaced by one). - Avoids polluting the macro namespace with guard symbols. - Can improve build times as the preprocessor can skip re-opening the file entirely, rather than re-reading it to find the matching `#endif` ("multiple-include optimization"). - Note that some compilers may already optimize traditional include guards, by recognzining the idiomatic pattern. This change is made acknowledging that overall portability of the code will technically be reduced, as `#pragma once` is not part of the C/C++ standards. However, this is considered acceptable given: 1. edk2 already defines a subset of supported compilers in BaseTools/Conf/tools_def.template, all of which have supported `#pragma once` for over two decades. 2. There have been concerns raised to the project about inconsistent include guard naming and potential macro collisions. Approximate compiler support dates: - MSVC: Supported since Visual C++ 4.2 (1996) - GCC: Supported since 3.4 (2004) (http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html) - Clang (LLVM based): Since initial release in 2007 Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2026-02-13MdeModulePkg: Add Unmap Callbackedk2-stable202602rdiaz7-0/+103
Add Unmap callback for when PEI and SEC need to invalidate the Rx/Tx buffer HOB on a call to Unmap. Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
2026-02-13MdeModulePkg: Code/Comment cleanuprdiaz6-29/+21
Cleaned various comments and debug messages as well as headers to either fix typos or for readability. Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
2026-02-13MdeModulePkg: Use EFI_PAGES_TO_SIZE macro in ArmFfaSecRxTxMaprdiaz1-9/+9
Replaced all instances of PcdGet64 (PcdFfaTxRxPageCount) * EFI_PAGE_SIZE, with EFI_PAGES_TO_SIZE macro. Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
2026-02-13MdeModulePkg: Remove global usage from ArmFfaSecRxTxMaprdiaz2-80/+125
Removed the global variables in ArmFfaSecRxTxMap. Rx/Tx buffer HOB is now created within the Map function rather than in the constructor of ArmFfaSecLib. This allows for the use of the HOB to find the Rx/Tx buffer information. Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
2026-02-13MdeModulePkg: Remove global usage in ArmFfaCommonrdiaz9-87/+289
Removed global variables in ArmFfaCommon. Moved the globals to locals in each phase's ArmFfaLib implementation. SEC and PEI will query when necessary to avoid setting globals when memory is unavailable. Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
2026-02-13MdeModulePkg: Add helper to check if FF-A is supportedrdiaz2-0/+57
Added ArmFfaLibIsFfaSupported to ArmFfaCommon to allow for queries of FF-A support outside of ArmFfaCommonInit. Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
2026-02-01MdeModulePkg/VarCheckHiiLib: fix gcc 16 warningGerd Hoffmann1-2/+1
MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGenFromFv.c: In function ‘ParseFv’: MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGenFromFv.c:263:34: error: variable ‘FfsIndex’ set but not used [-Werror=unused-but-set-variable=] 263 | UINTN FfsIndex; | ^~~~~~~~ Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>