TianoCore EDK2 master
Loading...
Searching...
No Matches
FaultTolerantWrite.h File Reference

Go to the source code of this file.

Data Structures

struct  _EFI_FAULT_TOLERANT_WRITE_PROTOCOL
 

Macros

#define EFI_FAULT_TOLERANT_WRITE_PROTOCOL_GUID
 

Typedefs

typedef struct _EFI_FAULT_TOLERANT_WRITE_PROTOCOL EFI_FAULT_TOLERANT_WRITE_PROTOCOL
 
typedef EFI_STATUS(EFIAPI * EFI_FAULT_TOLERANT_WRITE_GET_MAX_BLOCK_SIZE) (IN EFI_FAULT_TOLERANT_WRITE_PROTOCOL *This, OUT UINTN *BlockSize)
 
typedef EFI_STATUS(EFIAPI * EFI_FAULT_TOLERANT_WRITE_ALLOCATE) (IN EFI_FAULT_TOLERANT_WRITE_PROTOCOL *This, IN EFI_GUID *CallerId, IN UINTN PrivateDataSize, IN UINTN NumberOfWrites)
 
typedef EFI_STATUS(EFIAPI * EFI_FAULT_TOLERANT_WRITE_WRITE) (IN EFI_FAULT_TOLERANT_WRITE_PROTOCOL *This, IN EFI_LBA Lba, IN UINTN Offset, IN UINTN Length, IN VOID *PrivateData, IN EFI_HANDLE FvbHandle, IN VOID *Buffer)
 
typedef EFI_STATUS(EFIAPI * EFI_FAULT_TOLERANT_WRITE_RESTART) (IN EFI_FAULT_TOLERANT_WRITE_PROTOCOL *This, IN EFI_HANDLE FvbHandle)
 
typedef EFI_STATUS(EFIAPI * EFI_FAULT_TOLERANT_WRITE_ABORT) (IN EFI_FAULT_TOLERANT_WRITE_PROTOCOL *This)
 
typedef EFI_STATUS(EFIAPI * EFI_FAULT_TOLERANT_WRITE_GET_LAST_WRITE) (IN EFI_FAULT_TOLERANT_WRITE_PROTOCOL *This, OUT EFI_GUID *CallerId, OUT EFI_LBA *Lba, OUT UINTN *Offset, OUT UINTN *Length, IN OUT UINTN *PrivateDataSize, OUT VOID *PrivateData, OUT BOOLEAN *Complete)
 

Variables

EFI_GUID gEfiFaultTolerantWriteProtocolGuid
 

Detailed Description

Fault Tolerant Write protocol provides boot-time service for fault tolerant write capability for block devices. The protocol provides for non-volatile storage of the intermediate data and private information a caller would need to recover from a critical fault, such as a power failure.

Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file FaultTolerantWrite.h.

Macro Definition Documentation

◆ EFI_FAULT_TOLERANT_WRITE_PROTOCOL_GUID

#define EFI_FAULT_TOLERANT_WRITE_PROTOCOL_GUID
Value:
{ \
0x3ebd9e82, 0x2c78, 0x4de6, {0x97, 0x86, 0x8d, 0x4b, 0xfc, 0xb7, 0xc8, 0x81 } \
}

Definition at line 15 of file FaultTolerantWrite.h.

Typedef Documentation

◆ EFI_FAULT_TOLERANT_WRITE_ABORT

typedef EFI_STATUS(EFIAPI * EFI_FAULT_TOLERANT_WRITE_ABORT) (IN EFI_FAULT_TOLERANT_WRITE_PROTOCOL *This)

Aborts all previously allocated writes.

Parameters
ThisThe calling context.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_ABORTEDThe function could not complete successfully.
EFI_NOT_FOUNDNo allocated writes exist.

Definition at line 144 of file FaultTolerantWrite.h.

◆ EFI_FAULT_TOLERANT_WRITE_ALLOCATE

typedef EFI_STATUS(EFIAPI * EFI_FAULT_TOLERANT_WRITE_ALLOCATE) (IN EFI_FAULT_TOLERANT_WRITE_PROTOCOL *This, IN EFI_GUID *CallerId, IN UINTN PrivateDataSize, IN UINTN NumberOfWrites)

Allocates space for the protocol to maintain information about writes. Since writes must be completed in a fault-tolerant manner and multiple writes require more resources to be successful, this function enables the protocol to ensure that enough space exists to track information about upcoming writes.

Parameters
ThisA pointer to the calling context.
CallerIdThe GUID identifying the write.
PrivateDataSizeThe size of the caller's private data that must be recorded for each write.
NumberOfWritesThe number of fault tolerant block writes that will need to occur.
Return values
EFI_SUCCESSThe function completed successfully
EFI_ABORTEDThe function could not complete successfully.
EFI_ACCESS_DENIEDNot all allocated writes have been completed. All writes must be completed or aborted before another fault tolerant write can occur.

Definition at line 66 of file FaultTolerantWrite.h.

◆ EFI_FAULT_TOLERANT_WRITE_GET_LAST_WRITE

typedef EFI_STATUS(EFIAPI * EFI_FAULT_TOLERANT_WRITE_GET_LAST_WRITE) (IN EFI_FAULT_TOLERANT_WRITE_PROTOCOL *This, OUT EFI_GUID *CallerId, OUT EFI_LBA *Lba, OUT UINTN *Offset, OUT UINTN *Length, IN OUT UINTN *PrivateDataSize, OUT VOID *PrivateData, OUT BOOLEAN *Complete)

Starts a target block update. This function records information about the write in fault-tolerant storage and completes the write in a recoverable manner, ensuring at all times that either the original contents or the modified contents are available.

Parameters
ThisIndicates a pointer to the calling context.
CallerIdThe GUID identifying the last write.
LbaThe logical block address of the last write.
OffsetThe offset within the block of the last write.
LengthThe length of the last write.
PrivateDataSizeOn input, the size of the PrivateData buffer. On output, the size of the private data stored for this write.
PrivateDataA pointer to a buffer. The function will copy PrivateDataSize bytes from the private data stored for this write.
CompleteA Boolean value with TRUE indicating that the write was completed.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_ABORTEDThe function could not complete successfully.
EFI_NOT_FOUNDNo allocated writes exist.

Definition at line 175 of file FaultTolerantWrite.h.

◆ EFI_FAULT_TOLERANT_WRITE_GET_MAX_BLOCK_SIZE

typedef EFI_STATUS(EFIAPI * EFI_FAULT_TOLERANT_WRITE_GET_MAX_BLOCK_SIZE) (IN EFI_FAULT_TOLERANT_WRITE_PROTOCOL *This, OUT UINTN *BlockSize)

Get the size of the largest block that can be updated in a fault-tolerant manner.

Parameters
ThisIndicates a pointer to the calling context.
BlockSizeA pointer to a caller-allocated UINTN that is updated to indicate the size of the largest block that can be updated.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_ABORTEDThe function could not complete successfully.

Definition at line 38 of file FaultTolerantWrite.h.

◆ EFI_FAULT_TOLERANT_WRITE_PROTOCOL

◆ EFI_FAULT_TOLERANT_WRITE_RESTART

typedef EFI_STATUS(EFIAPI * EFI_FAULT_TOLERANT_WRITE_RESTART) (IN EFI_FAULT_TOLERANT_WRITE_PROTOCOL *This, IN EFI_HANDLE FvbHandle)

Restarts a previously interrupted write. The caller must provide the block protocol needed to complete the interrupted write.

Parameters
ThisThe calling context.
FvBlockProtocolThe handle of FVB protocol that provides services. for reading, writing, and erasing the target block.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_ABORTEDThe function could not complete successfully.
EFI_ACCESS_DENIEDNo pending writes exist.

Definition at line 127 of file FaultTolerantWrite.h.

◆ EFI_FAULT_TOLERANT_WRITE_WRITE

typedef EFI_STATUS(EFIAPI * EFI_FAULT_TOLERANT_WRITE_WRITE) (IN EFI_FAULT_TOLERANT_WRITE_PROTOCOL *This, IN EFI_LBA Lba, IN UINTN Offset, IN UINTN Length, IN VOID *PrivateData, IN EFI_HANDLE FvbHandle, IN VOID *Buffer)

Starts a target block update. This records information about the write in fault tolerant storage, and will complete the write in a recoverable manner, ensuring at all times that either the original contents or the modified contents are available.

Parameters
ThisThe calling context.
LbaThe logical block address of the target block.
OffsetThe offset within the target block to place the data.
LengthThe number of bytes to write to the target block.
PrivateDataA pointer to private data that the caller requires to complete any pending writes in the event of a fault.
FvBlockHandleThe handle of FVB protocol that provides services for reading, writing, and erasing the target block.
BufferThe data to write.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_ABORTEDThe function could not complete successfully.
EFI_BAD_BUFFER_SIZEThe write would span a block boundary, which is not a valid action.
EFI_ACCESS_DENIEDNo writes have been allocated.
EFI_NOT_READYThe last write has not been completed. Restart() must be called to complete it.

Definition at line 102 of file FaultTolerantWrite.h.