]> git.proxmox.com Git - mirror_edk2.git/blob - EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormattedLib.c
EmbeddedPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / EmbeddedPkg / Library / NvVarStoreFormattedLib / NvVarStoreFormattedLib.c
1 /** @file
2 A hook-in library for:
3 - MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
4 - MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
5 - MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf
6
7 Plugging this library instance into one of the above modules makes that
8 variable service backend wait for another platform module to dynamically
9 initialize or verify EFI_FIRMWARE_VOLUME_HEADER and VARIABLE_STORE_HEADER in
10 the non-volatile variable store FVB device. The initialization / verification
11 is signaled by installing gEdkiiNvVarStoreFormattedGuid into the
12 phase-matching PPI or protocol database, with a NULL interface. (Note that
13 installing gEdkiiNvVarStoreFormattedGuid into either the DXE or the MM
14 protocol database will unblock VariableSmm -- refer to EFI_SECTION_MM_DEPEX
15 in the PI spec.)
16
17 Copyright (C) 2018, Red Hat, Inc.
18
19 SPDX-License-Identifier: BSD-2-Clause-Patent
20 **/
21
22 #include <Base.h>
23
24 RETURN_STATUS
25 EFIAPI
26 NvVarStoreFormattedInitialize (
27 VOID
28 )
29 {
30 //
31 // Do nothing, just imbue VariablePei / VariableRuntimeDxe / VariableSmm with
32 // a PPI or protocol dependency on EDKII_NV_VAR_STORE_FORMATTED_GUID.
33 //
34 return RETURN_SUCCESS;
35 }