summaryrefslogtreecommitdiff
path: root/UefiPayloadPkg/Include
diff options
context:
space:
mode:
authorGuo Dong <guo.dong@intel.com>2021-09-22 14:42:50 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-10-25 17:28:21 +0000
commitae8acce8ae515545f6b206561e0ebf2a66a1d8f6 (patch)
treeafdef6afdc281915e22b505e7e24827053e269f3 /UefiPayloadPkg/Include
parent04714cef461cf9a8924839682292b0df9789b42d (diff)
downloadedk2-ae8acce8ae515545f6b206561e0ebf2a66a1d8f6.zip
edk2-ae8acce8ae515545f6b206561e0ebf2a66a1d8f6.tar.gz
edk2-ae8acce8ae515545f6b206561e0ebf2a66a1d8f6.tar.bz2
UefiPayloadPkg: Add a common FVB SMM module
This FVB module is used to initialize NV variable region and provide SMM FVB protocol to read/write SPI variable region. This module consume HOB gNvVariableInfoGuid and depends on FlashDeviceLib for the actual SPI device operate. During FVB initialization, it will initialize the variable region if the variable region is not valid. And it support to write initial variable data from FFS file if it is found. Signed-off-by: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Benjamin You <benjamin.you@intel.com>
Diffstat (limited to 'UefiPayloadPkg/Include')
-rw-r--r--UefiPayloadPkg/Include/Guid/NvVariableInfoGuid.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/UefiPayloadPkg/Include/Guid/NvVariableInfoGuid.h b/UefiPayloadPkg/Include/Guid/NvVariableInfoGuid.h
new file mode 100644
index 0000000..f22e4e6
--- /dev/null
+++ b/UefiPayloadPkg/Include/Guid/NvVariableInfoGuid.h
@@ -0,0 +1,24 @@
+/** @file
+ This file defines the hob structure for the SPI flash variable info.
+
+ Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef NV_VARIABLE_INFO_GUID_H_
+#define NV_VARIABLE_INFO_GUID_H_
+
+//
+// NV variable hob info GUID
+//
+extern EFI_GUID gNvVariableInfoGuid;
+
+typedef struct {
+ UINT8 Revision;
+ UINT8 Reserved[3];
+ UINT32 VariableStoreBase;
+ UINT32 VariableStoreSize;
+} NV_VARIABLE_INFO;
+
+#endif