Ftw working block format
ftw_working_block_format ¶
Module contains helper classes for working with FaultTolerant Working block content.
EfiFtwWorkingBlockHeader ¶
Object representing a EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER struct.
The EDKII Fault tolerant working block header. The header is immediately followed by the write queue data.
typedef struct { EFI_GUID Signature; UINT32 Crc; UINT8 WorkingBlockValid : 1; UINT8 WorkingBlockInvalid : 1; UINT8 Reserved : 6; UINT8 Reserved3[3]; UINT64 WriteQueueSize; } EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER;
load_from_file ¶
load_from_file(file: IO) -> EfiFtwWorkingBlockHeader
Loads an EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file |
obj
|
An already opened file. |
required |
Returns:
Type | Description |
---|---|
EfiFtwWorkingBlockHeader
|
self |
Raises:
Type | Description |
---|---|
Exception
|
unknown signature |
serialize ¶
serialize() -> bytes
Serializes the EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER.
Returns:
Type | Description |
---|---|
str
|
string representing packed data as bytes (i.e. b'\x01\x00\x03') |
EfiFtwWriteHeader ¶
Object representing a EFI_FAULT_TOLERANT_WRITE_HEADER struct.
EFI Fault tolerant block update write queue entry.
typedef struct { UINT8 HeaderAllocated : 1; UINT8 WritesAllocated : 1; UINT8 Complete : 1; UINT8 Reserved : 5; EFI_GUID CallerId; UINT64 NumberOfWrites; UINT64 PrivateDataSize; } EFI_FAULT_TOLERANT_WRITE_HEADER;
load_from_file ¶
load_from_file(file: IO) -> EfiFtwWriteHeader
Loads an EFI_FAULT_TOLERANT_WRITE_HEADER from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file |
obj
|
An already opened file. |
required |
Returns:
Type | Description |
---|---|
EfiFtwWriteHeader
|
self |
serialize ¶
serialize() -> bytes
Serializes the EFI_FAULT_TOLERANT_WRITE_HEADER.
Returns:
Type | Description |
---|---|
str
|
string representing packed data as bytes (i.e. b'\x01\x00\x03') |
EfiFtwWriteRecord ¶
Object representing a EFI_FAULT_TOLERANT_WRITE_RECORD struct.
EFI Fault tolerant block update write queue record.
typedef struct { UINT8 BootBlockUpdate : 1; UINT8 SpareComplete : 1; UINT8 DestinationComplete : 1; UINT8 Reserved : 5; EFI_LBA Lba; UINT64 Offset; UINT64 Length; INT64 RelativeOffset; } EFI_FAULT_TOLERANT_WRITE_RECORD;
load_from_file ¶
load_from_file(file: IO) -> EfiFtwWriteRecord
Loads an EFI_FAULT_TOLERANT_WRITE_RECORD from a file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file |
obj
|
An already opened file. |
required |
Returns:
Type | Description |
---|---|
EfiFtwWriteRecord
|
self |
serialize ¶
serialize() -> bytes
Serializes the EFI_FAULT_TOLERANT_WRITE_RECORD.
Returns:
Type | Description |
---|---|
str
|
string representing packed data as bytes (i.e. b'\x01\x00\x03') |