@@ -521,6 +521,7 @@ [Components.common]
MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
<LibraryClasses>
+ NULL|EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormattedLib.inf
AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
@@ -493,6 +493,7 @@ [Components.common]
MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
<LibraryClasses>
+ NULL|EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormattedLib.inf
AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
@@ -53,6 +53,7 @@ [LibraryClasses]
UefiRuntimeServicesTableLib
[Guids]
+ gEdkiiNvVarStoreFormattedGuid
gEfiAuthenticatedVariableGuid
gEfiEventVirtualAddressChangeGuid
gEfiSystemNvDataFvGuid
@@ -75,7 +76,4 @@ [FixedPcd]
gFip006DxeTokenSpaceGuid.PcdFip006DxeMemBaseAddress
[Depex]
- #
- # NorFlashDxe must be loaded before VariableRuntimeDxe in case empty flash needs populating with default values
- #
- BEFORE gVariableRuntimeDxeFileGuid
+ gEfiCpuArchProtocolGuid
@@ -813,6 +813,21 @@ NorFlashFvbInitialize (
}
}
+ //
+ // The driver implementing the variable read service can now be dispatched;
+ // the varstore headers are in place.
+ //
+ Status = gBS->InstallProtocolInterface (&gImageHandle,
+ &gEdkiiNvVarStoreFormattedGuid,
+ EFI_NATIVE_INTERFACE,
+ NULL);
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR,
+ "%a: Failed to install gEdkiiNvVarStoreFormattedGuid\n",
+ __FUNCTION__));
+ return Status;
+ }
+
//
// Declare the Non-Volatile storage as EFI_MEMORY_RUNTIME
//
Laszlo kindly implemented support for correctly sequencing the load order of the various DXE drivers involved in persistent variable support so that we can ensure that an empty or corrupted varstore in NOR flash is reinitialized before the variable runtime driver attempts to access it. So incorporate this into the SynQuacar platforms. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 1 + Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc | 1 + Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/Fip006Dxe.inf | 6 ++---- Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashFvbDxe.c | 15 +++++++++++++++ 4 files changed, 19 insertions(+), 4 deletions(-) -- 2.17.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel