TianoCore EDK2 master
|
#include <PiPei.h>
#include <Guid/SystemNvDataGuid.h>
#include <Guid/FaultTolerantWrite.h>
#include <Library/PeiServicesLib.h>
#include <Library/PcdLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/HobLib.h>
#include <Library/SafeIntLib.h>
#include <Library/VariableFlashInfoLib.h>
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 |
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.
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.
FtwWorkSpaceHeader | Pointer of the working block header |
FtwWorkSpaceSize | Size of the work space |
FtwWriteHeader | Pointer to retrieve the last write header |
EFI_SUCCESS | Get the last write record successfully |
EFI_ABORTED | The FTW work space is damaged |
Definition at line 43 of file FaultTolerantWritePei.c.
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.
FtwWriteHeader | Pointer to the write record header |
FtwWriteRecord | Pointer to retrieve the last write record |
EFI_SUCCESS | Get the last write record successfully |
EFI_ABORTED | The FTW work space is damaged |
Definition at line 91 of file FaultTolerantWritePei.c.
BOOLEAN IsValidWorkSpace | ( | IN EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER * | WorkingHeader, |
IN UINTN | WorkingLength | ||
) |
Check to see if it is a valid work space.
WorkingHeader | Pointer of working block header |
WorkingLength | Working block length |
TRUE | The work space is valid. |
FALSE | The work space is invalid. |
Definition at line 147 of file FaultTolerantWritePei.c.
EFI_STATUS EFIAPI PeimFaultTolerantWriteInitialize | ( | IN EFI_PEI_FILE_HANDLE | FileHandle, |
IN CONST EFI_PEI_SERVICES ** | PeiServices | ||
) |
Main entry for Fault Tolerant Write PEIM.
[in] | FileHandle | Handle of the file being invoked. |
[in] | PeiServices | Pointer to PEI Services table. |
EFI_SUCCESS | If the interface could be successfully installed |
Others | Returned from PeiServicesInstallPpi() |
Definition at line 203 of file FaultTolerantWritePei.c.
EFI_PEI_PPI_DESCRIPTOR mPpiListVariable |
Definition at line 22 of file FaultTolerantWritePei.c.