edk2/MdeModulePkg/Library
Yeoreum Yun 8c50e656c0 MdeModulePkg: : revert EndofDxeEvent TPLs to TPL_NOTIFY for FPDT
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-19 03:39:15 +00:00
..
ArmFfaLib MdeModulePkg: Add library class SafeIntLib where ArmFfaCommon.c is used 2026-03-09 03:35:31 +00:00
AuthVariableLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BaseBmpSupportLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BaseHobLibNull MdeModulePkg: Remove ARM32 Support 2025-09-25 22:04:10 +00:00
BaseIpmiCommandLibNull MdeModulePkg/IpmiCommandLib: Add NULL instance library 2023-01-19 03:57:32 +00:00
BaseIpmiLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BaseMemoryAllocationLibNull MdeModulePkg: Remove ARM32 Support 2025-09-25 22:04:10 +00:00
BasePlatformHookLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BaseResetSystemLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BaseRngLibTimerLib MdePkg/Rng: Add GetRngGuid() to RngLib 2023-09-08 09:48:55 +00:00
BaseSerialPortLib16550 MdeModulePkg: Fix definition typos 2025-06-11 17:20:20 +00:00
BaseSortLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BaseSpiHcPlatformLibNull MdeModulePkg:BaseSpiHcPlatformLib: Adding NULL lib instance 2024-05-08 04:43:58 +00:00
BaseVariableFlashInfoLib MdeModulePkg/VariableFlashInfoLib: Add initial library 2022-05-19 06:11:20 +00:00
BootDiscoveryPolicyUiLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
BootLogoLib MdeModulePkg: Remove UGA support 2025-07-08 15:42:03 +00:00
BootMaintenanceManagerUiLib MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
BootManagerUiLib MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
BrotliCustomDecompressLib MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
CpuExceptionHandlerLibNull MdeModulePkg: CpuExceptionHandlerLibNull: Return Success On Null Func 2025-10-23 00:57:59 +00:00
CustomizedDisplayLib MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
DebugAgentLibNull MdeModulePkg/DebugAgentLibNull: Indicate SMM Debug Agent support or not 2023-12-26 07:18:26 +00:00
DeviceManagerUiLib MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
DisplayUpdateProgressLibGraphics MdeModulePkg: Fix imbalanced debug macros 2022-09-09 01:42:39 +00:00
DisplayUpdateProgressLibText MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeCapsuleLibFmp MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
DxeCapsuleLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeCoreMemoryAllocationLib MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
DxeCorePerformanceLib MdeModulePkg: : revert EndofDxeEvent TPLs to TPL_NOTIFY for FPDT 2026-03-19 03:39:15 +00:00
DxeCrc32GuidedSectionExtractLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeDebugPrintErrorLevelLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeFileExplorerProtocol MdeModulePkg: Remove DXE_SAL_DRIVER 2025-10-30 10:00:32 +00:00
DxeIpmiLibIpmiProtocol MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxePerformanceLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxePrintLibPrint2Protocol MdeModulePkg: Remove DXE_SAL_DRIVER 2025-10-30 10:00:32 +00:00
DxeReportStatusCodeLib MdeModulePkg/Library: Fix property typos 2026-01-26 08:44:12 +00:00
DxeResetSystemLib MdeModulePkg: HOST_APPLICATION IA32/X64 only 2023-04-10 05:59:02 +00:00
DxeSecurityManagementLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
FileExplorerLib MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
FmpAuthenticationLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
FrameBufferBltLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HobPrintLib MdeModulePkg HobPrintLib: Also print EFI_HOB_TYPE_UNUSED type HOB 2026-02-28 03:56:45 +00:00
ImagePropertiesRecordLib MdeModulePkg/ImagePropertiesRecordLib: Reduce debug level 2024-06-26 12:40:30 +00:00
LockBoxNullLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
LzmaCustomDecompressLib MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
NonDiscoverableDeviceRegistrationLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
OemHookStatusCodeLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PciHostBridgeLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeiCrc32GuidedSectionExtractLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeiDebugLibDebugPpi MdeModulePkg/PeiDebugLibDebugPpi: Fix comma parsing in VaListToBaseList 2026-02-27 03:30:57 +00:00
PeiDebugPrintHobLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeiDxeDebugLibReportStatusCode MdeModulePkg/PeiDxeDebugLibReportStatusCode: Fix comma parsing 2026-02-27 03:30:57 +00:00
PeiIpmiLibIpmiPpi MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeiPerformanceLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeiReportStatusCodeLib MdeModulePkg/Library: Fix property typos 2026-01-26 08:44:12 +00:00
PeiResetSystemLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PiDxeS3BootScriptLib MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
PiSmmCoreMemoryAllocationLib MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
PiSmmCoreSmmServicesTableLib MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
PlatformBootManagerLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PlatformHookLibSerialPortPpi MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
PlatformVarCleanupLib MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
ResetUtilityLib MdeModulePkg: Update code to be more C11 compliant by using __func__ 2023-04-10 14:19:57 +00:00
RuntimeDxeReportStatusCodeLib MdeModulePkg/Library: Fix property typos 2026-01-26 08:44:12 +00:00
RuntimeResetSystemLib MdeModulePkg/RuntimeResetSystemLib: Make global static 2024-07-12 02:03:12 +00:00
SmmCorePerformanceLib MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
SmmCorePlatformHookLibNull MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmIpmiLibSmmIpmiProtocol MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmLockBoxLib MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
SmmMemoryAllocationProfileLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmPerformanceLib MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
SmmReportStatusCodeLib MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
SmmSmiHandlerProfileLib MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
TdxMeasurementLibNull MdeModulePkg: Move TdxMeasurementLib from UefiCpuPkg 2025-03-18 17:57:40 +00:00
TpmMeasurementLibNull MdeModulePkg/TpmMeasurementLibNull: Allow broader linking 2025-06-05 10:05:24 +08:00
TraceHubDebugSysTLib MdeModulePkg: fix mdlint issues 2026-03-04 22:02:33 +00:00
UefiBootManagerLib MdeModulePkg: Update performance measurements to use new perf macros 2026-03-17 02:38:07 +00:00
UefiHiiLib MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
UefiHiiServicesLib MdeModulePkg: Remove DXE_SAL_DRIVER 2025-10-30 10:00:32 +00:00
UefiMemoryAllocationProfileLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiSortLib MdeModulePkg: Apply uncrustify formatting to relevant files. 2023-10-27 00:50:49 +00:00
VarCheckHiiLib MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
VarCheckLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
VarCheckPcdLib MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
VarCheckPolicyLib MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
VarCheckUefiLib MdeModulePkg/Library: Fix property typos 2026-01-26 08:44:12 +00:00
VariablePolicyHelperLib MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
VariablePolicyLib MdeModulePkg: fix mdlint issues 2026-03-04 22:02:33 +00:00