TianoCore EDK2 master
Loading...
Searching...
No Matches
SystemNvDataGuid.h
Go to the documentation of this file.
1
12#ifndef __SYSTEM_NV_DATA_GUID_H__
13#define __SYSTEM_NV_DATA_GUID_H__
14
15#define EFI_SYSTEM_NV_DATA_FV_GUID \
16 {0xfff12b8d, 0x7696, 0x4c8b, {0xa9, 0x85, 0x27, 0x47, 0x7, 0x5b, 0x4f, 0x50} }
17
18#define EDKII_WORKING_BLOCK_SIGNATURE_GUID \
19 {0x9e58292b, 0x7c68, 0x497d, {0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0x1b, 0x95} }
20
21extern EFI_GUID gEfiSystemNvDataFvGuid;
22extern EFI_GUID gEdkiiWorkingBlockSignatureGuid;
23
24#define WORKING_BLOCK_VALID 0x1
25#define WORKING_BLOCK_INVALID 0x2
26
31typedef struct {
41 UINT32 Crc;
46 UINT8 WorkingBlockInvalid : 1;
47 UINT8 Reserved : 6;
48 UINT8 Reserved3[3];
63
64#define FTW_VALID_STATE 0
65#define FTW_INVALID_STATE 1
66
67//
68// EFI Fault tolerant block update write queue entry.
69//
70typedef struct {
71 UINT8 HeaderAllocated : 1;
72 UINT8 WritesAllocated : 1;
73 UINT8 Complete : 1;
74 UINT8 Reserved : 5;
75 EFI_GUID CallerId;
76 UINT64 NumberOfWrites;
77 UINT64 PrivateDataSize;
79
80//
81// EFI Fault tolerant block update write queue record.
82//
83typedef struct {
84 UINT8 BootBlockUpdate : 1;
85 UINT8 SpareComplete : 1;
86 UINT8 DestinationComplete : 1;
87 UINT8 Reserved : 5;
88 EFI_LBA Lba;
89 UINT64 Offset;
90 UINT64 Length;
91 //
92 // Relative offset to spare block.
93 //
94 INT64 RelativeOffset;
95 //
96 // UINT8 PrivateData[PrivateDataSize]
97 //
99
100#define FTW_RECORD_SIZE(PrivateDataSize) (sizeof (EFI_FAULT_TOLERANT_WRITE_RECORD) + (UINTN) PrivateDataSize)
101
102#define FTW_RECORD_TOTAL_SIZE(NumberOfWrites, PrivateDataSize) \
103 ((UINTN) (NumberOfWrites) * (sizeof (EFI_FAULT_TOLERANT_WRITE_RECORD) + (UINTN) PrivateDataSize))
104
105#define FTW_WRITE_TOTAL_SIZE(NumberOfWrites, PrivateDataSize) \
106 ( \
107 sizeof (EFI_FAULT_TOLERANT_WRITE_HEADER) + (UINTN) (NumberOfWrites) * \
108 (sizeof (EFI_FAULT_TOLERANT_WRITE_RECORD) + (UINTN) PrivateDataSize) \
109 )
110
111#endif
UINT64 EFI_LBA
Definition: UefiBaseType.h:45
Definition: Base.h:213