Branch: refs/heads/master Home: https://github.com/tianocore/edk2 Commit: 1428b94fc0727dea94ac05a162857f4a97fb21c8 https://github.com/tianocore/edk2/commit/1428b94fc0727dea94ac05a162857f4a97fb21c8 Author: Michael Kubacki <michael.kuba...@microsoft.com> Date: 2025-02-25 (Tue, 25 Feb 2025)
Changed paths: M MdeModulePkg/Universal/Variable/RuntimeDxe/VariablePolicySmmDxe.c M MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c Log Message: ----------- MdeModulePkg/Variable: Init var policy after SMM variable is ready On a MM system, the main UEFI variable logic resides in MMRAM. In that case, the variable policy logic in `VarCheckPolicyLib`, such as `VarCheckPolicyLibStandaloneMm` is linked against the MM driver also in that case `VariableStandaloneMm`. The MM variable driver indicates its presence to the RT DXE driver via `gEfiSmmVariableProtocolGuid` to indicate variable read support is available from MM. This triggers installation of the variable architectural protocol in DXE. Today, variable policy is initialized by calling `VariablePolicySmmDxeMain()` in `VariableSmmRuntimeInitialize()`. In turn, this installs `gEdkiiVariablePolicyProtocolGuid`. Functions in `gEdkiiVariablePolicyProtocolGuid` may trigger MMIs. However, it is possible that the MM variable driver which is linked against the code with the variable policy MMI handlers (i.e. `VarCheckPolicyLib`) is not loaded yet. Therefore, this change moves invocation of `VariablePolicySmmDxeMain()` to `SmmVariableReady()` which is called on installation of `gEfiSmmVariableProtocolGuid` indicating variable MM services are ready. `gEdkiiVariablePolicyProtocolGuid` is still installed prior to the variable architectural protocol being installed. Signed-off-by: Michael Kubacki <michael.kuba...@microsoft.com> To unsubscribe from these emails, change your notification settings at https://github.com/tianocore/edk2/settings/notifications _______________________________________________ edk2-commits mailing list edk2-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-commits