]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Guid/SystemNvDataGuid.h
Move MdeModuleHii.h into Include\Guid directory
[mirror_edk2.git] / MdeModulePkg / Include / Guid / SystemNvDataGuid.h
index 1f9e5e7987fd5df69dbc8a6e8f14adb80c2ee965..048ea651da49140b8a2ceaab62f18d4ba999193e 100644 (file)
@@ -1,9 +1,10 @@
-/** @file\r
-  This file defines NvDataHob GUIDs for System Non Volatile HOB entries \r
-  in the HOB list and NV system hob entry structure. \r
-  It also defines NvDataFv GUID used as the signature of FTW working block header.\r
+/** @file  \r
+  This file defines NvDataFv GUID and FTW working block structure header.\r
+  This guid can be used as FileSystemGuid in EFI_FIRMWARE_VOLUME_HEADER if \r
+  this FV image contains NV data, such as NV variable data.\r
+  This guid can also be used as the signature of FTW working block header.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2009, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -20,27 +21,42 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define EFI_SYSTEM_NV_DATA_FV_GUID \\r
   {0xfff12b8d, 0x7696, 0x4c8b, {0xa9, 0x85, 0x27, 0x47, 0x7, 0x5b, 0x4f, 0x50} }\r
 \r
-#define EFI_SYSTEM_NV_DATA_HOB_GUID \\r
-  {0xd6e5092d, 0xc7b2, 0x4872, {0xaf, 0x66, 0xfd, 0xc0, 0xe6, 0xf9, 0x5e, 0x78} }\r
-\r
 ///\r
-/// Hob entry for NV data region\r
+/// NvDataFv GUID used as the signature of FTW working block header.\r
 ///\r
-typedef struct {\r
-  EFI_GUID                  SystemNvDataHobGuid; /// EFI_SYSTEM_NV_DATA_HOB_GUID\r
-  EFI_GUID                  SystemNvDataFvGuid;  /// Guid specifies the NvData Fv for the specific purpose, such as FTW, Error Log.\r
-  EFI_LBA                   StartLba;            /// The starting logical block index.\r
-  UINTN                     StartLbaOffset;      /// Offset into the starting block at which to the start of NvData region.\r
-  EFI_LBA                   EndLba;              /// The last logical block index.\r
-  UINTN                     EndLbaOffset;        /// Offset into the last block at which to the end of Nvdata region.\r
-  UINT32                    DataTypeSignature;   /// NvData type in the specified NV range.\r
-} NV_SYSTEM_DATA_GUID_TYPE;\r
+extern EFI_GUID gEfiSystemNvDataFvGuid;\r
 \r
-extern EFI_GUID gEfiSystemNvDataHobGuid;\r
+#define WORKING_BLOCK_VALID   0x1\r
+#define WORKING_BLOCK_INVALID 0x2\r
 \r
 ///\r
-/// NvDataFv GUID used as the signature of FTW working block header.\r
+/// EDKII Fault tolerant working block header\r
+/// The header is immediately followed by the write queue data.\r
 ///\r
-extern EFI_GUID gEfiSystemNvDataFvGuid;\r
+typedef struct {\r
+  ///\r
+  /// System Non Volatile FV Guid\r
+  ///\r
+  EFI_GUID  Signature;\r
+  ///\r
+  /// 32bit CRC caculated for this header\r
+  ///\r
+  UINT32    Crc;\r
+  ///\r
+  /// Working block valid bit\r
+  ///\r
+  UINT8     WorkingBlockValid : 1;\r
+  UINT8     WorkingBlockInvalid : 1;\r
+  UINT8     Reserved : 6;\r
+  UINT8     Reserved3[3];\r
+  ///\r
+  /// Total size of the following write queue range.\r
+  ///\r
+  UINT64    WriteQueueSize;\r
+  ///\r
+  /// Write Queue data\r
+  /// UINT8                WriteQueue[WriteQueueSize];\r
+  ///\r
+} EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER;\r
 \r
 #endif\r