TianoCore EDK2 master
Loading...
Searching...
No Matches
Reclaim.c File Reference
#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)
 

Detailed Description

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.

Function Documentation

◆ FtwVariableSpace()

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.

Parameters
VariableBaseBase address of variable to write
VariableBufferPoint to the variable data buffer.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_NOT_FOUNDFail to locate Fault Tolerant Write protocol.
EFI_ABORTEDThe function could not complete successfully.

Definition at line 104 of file Reclaim.c.

◆ GetLbaAndOffsetByAddress()

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.

Parameters
AddressAddress which should be contained by returned FVB handle.
LbaPointer to LBA for output.
OffsetPointer to offset for output.
Return values
EFI_SUCCESSLBA and offset successfully returned.
EFI_NOT_FOUNDFail to find FVB handle by address.
EFI_ABORTEDFail to find valid LBA and offset.

Definition at line 30 of file Reclaim.c.