TianoCore EDK2 master
Loading...
Searching...
No Matches
FaultTolerantWritePei.c File Reference

Go to the source code of this file.

Functions

EFI_STATUS FtwGetLastWriteHeader (IN EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER *FtwWorkSpaceHeader, IN UINTN FtwWorkSpaceSize, OUT EFI_FAULT_TOLERANT_WRITE_HEADER **FtwWriteHeader)
 
EFI_STATUS FtwGetLastWriteRecord (IN EFI_FAULT_TOLERANT_WRITE_HEADER *FtwWriteHeader, OUT EFI_FAULT_TOLERANT_WRITE_RECORD **FtwWriteRecord)
 
BOOLEAN IsValidWorkSpace (IN EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER *WorkingHeader, IN UINTN WorkingLength)
 
EFI_STATUS EFIAPI PeimFaultTolerantWriteInitialize (IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices)
 

Variables

EFI_PEI_PPI_DESCRIPTOR mPpiListVariable
 

Detailed Description

This driver installs gEdkiiFaultTolerantWriteGuid PPI to inform the check for FTW last write data has been done.

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

Definition in file FaultTolerantWritePei.c.

Function Documentation

◆ FtwGetLastWriteHeader()

EFI_STATUS FtwGetLastWriteHeader ( IN EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER FtwWorkSpaceHeader,
IN UINTN  FtwWorkSpaceSize,
OUT EFI_FAULT_TOLERANT_WRITE_HEADER **  FtwWriteHeader 
)

Get the last Write Header pointer. The last write header is the header whose 'complete' state hasn't been set. After all, this header may be a EMPTY header entry for next Allocate.

Parameters
FtwWorkSpaceHeaderPointer of the working block header
FtwWorkSpaceSizeSize of the work space
FtwWriteHeaderPointer to retrieve the last write header
Return values
EFI_SUCCESSGet the last write record successfully
EFI_ABORTEDThe FTW work space is damaged

Definition at line 43 of file FaultTolerantWritePei.c.

◆ FtwGetLastWriteRecord()

EFI_STATUS FtwGetLastWriteRecord ( IN EFI_FAULT_TOLERANT_WRITE_HEADER FtwWriteHeader,
OUT EFI_FAULT_TOLERANT_WRITE_RECORD **  FtwWriteRecord 
)

Get the last Write Record pointer. The last write Record is the Record whose DestinationCompleted state hasn't been set. After all, this Record may be a EMPTY record entry for next write.

Parameters
FtwWriteHeaderPointer to the write record header
FtwWriteRecordPointer to retrieve the last write record
Return values
EFI_SUCCESSGet the last write record successfully
EFI_ABORTEDThe FTW work space is damaged

Definition at line 91 of file FaultTolerantWritePei.c.

◆ IsValidWorkSpace()

BOOLEAN IsValidWorkSpace ( IN EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER WorkingHeader,
IN UINTN  WorkingLength 
)

Check to see if it is a valid work space.

Parameters
WorkingHeaderPointer of working block header
WorkingLengthWorking block length
Return values
TRUEThe work space is valid.
FALSEThe work space is invalid.

Definition at line 147 of file FaultTolerantWritePei.c.

◆ PeimFaultTolerantWriteInitialize()

EFI_STATUS EFIAPI PeimFaultTolerantWriteInitialize ( IN EFI_PEI_FILE_HANDLE  FileHandle,
IN CONST EFI_PEI_SERVICES **  PeiServices 
)

Main entry for Fault Tolerant Write PEIM.

Parameters
[in]FileHandleHandle of the file being invoked.
[in]PeiServicesPointer to PEI Services table.
Return values
EFI_SUCCESSIf the interface could be successfully installed
OthersReturned from PeiServicesInstallPpi()

Definition at line 203 of file FaultTolerantWritePei.c.

Variable Documentation

◆ mPpiListVariable

EFI_PEI_PPI_DESCRIPTOR mPpiListVariable
Initial value:
= {
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
&gEdkiiFaultTolerantWriteGuid,
}
#define NULL
Definition: Base.h:319

Definition at line 22 of file FaultTolerantWritePei.c.