TianoCore EDK2 master
|
#include "Variable.h"
Go to the source code of this file.
Functions | |
EFI_STATUS | GetLbaAndOffsetByAddress (IN EFI_PHYSICAL_ADDRESS Address, OUT EFI_LBA *Lba, OUT UINTN *Offset) |
EFI_STATUS | FtwVariableSpace (IN EFI_PHYSICAL_ADDRESS VariableBase, IN VARIABLE_STORE_HEADER *VariableBuffer) |
Handles non-volatile variable store garbage collection, using FTW (Fault Tolerant Write) protocol.
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Reclaim.c.
EFI_STATUS FtwVariableSpace | ( | IN EFI_PHYSICAL_ADDRESS | VariableBase, |
IN VARIABLE_STORE_HEADER * | VariableBuffer | ||
) |
Writes a buffer to variable storage space, in the working block.
This function writes a buffer to variable storage space into a firmware volume block device. The destination is specified by parameter VariableBase. Fault Tolerant Write protocol is used for writing.
VariableBase | Base address of variable to write |
VariableBuffer | Point to the variable data buffer. |
EFI_SUCCESS | The function completed successfully. |
EFI_NOT_FOUND | Fail to locate Fault Tolerant Write protocol. |
EFI_ABORTED | The function could not complete successfully. |
EFI_STATUS GetLbaAndOffsetByAddress | ( | IN EFI_PHYSICAL_ADDRESS | Address, |
OUT EFI_LBA * | Lba, | ||
OUT UINTN * | Offset | ||
) |
Gets LBA of block and offset by given address.
This function gets the Logical Block Address (LBA) of a firmware volume block containing the given address, and the offset of the address on the block.
Address | Address which should be contained by returned FVB handle. |
Lba | Pointer to LBA for output. |
Offset | Pointer to offset for output. |
EFI_SUCCESS | LBA and offset successfully returned. |
EFI_NOT_FOUND | Fail to find FVB handle by address. |
EFI_ABORTED | Fail to find valid LBA and offset. |