SignedCapsulePkg[all]  0.1
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Pages
PlatformFlashAccessLib.h File Reference

Enumerations

enum  FLASH_ADDRESS_TYPE { FlashAddressTypeRelativeAddress, FlashAddressTypeAbsoluteAddress }
 
enum  PLATFORM_FIRMWARE_TYPE { PlatformFirmwareTypeSystemFirmware, PlatformFirmwareTypeNvRam }
 

Functions

EFI_STATUS EFIAPI PerformFlashWrite (IN PLATFORM_FIRMWARE_TYPE FirmwareType, IN EFI_PHYSICAL_ADDRESS FlashAddress, IN FLASH_ADDRESS_TYPE FlashAddressType, IN VOID *Buffer, IN UINTN Length)
 
EFI_STATUS EFIAPI PerformFlashWriteWithProgress (IN PLATFORM_FIRMWARE_TYPE FirmwareType, IN EFI_PHYSICAL_ADDRESS FlashAddress, IN FLASH_ADDRESS_TYPE FlashAddressType, IN VOID *Buffer, IN UINTN Length, IN EFI_FIRMWARE_MANAGEMENT_UPDATE_IMAGE_PROGRESS Progress, IN UINTN StartPercentage, IN UINTN EndPercentage)
 

Detailed Description

Platform flash device access library.

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

Enumeration Type Documentation

Enumerator
FlashAddressTypeRelativeAddress 
FlashAddressTypeAbsoluteAddress 
Enumerator
PlatformFirmwareTypeSystemFirmware 
PlatformFirmwareTypeNvRam 

Function Documentation

EFI_STATUS EFIAPI PerformFlashWrite ( IN PLATFORM_FIRMWARE_TYPE  FirmwareType,
IN EFI_PHYSICAL_ADDRESS  FlashAddress,
IN FLASH_ADDRESS_TYPE  FlashAddressType,
IN VOID *  Buffer,
IN UINTN  Length 
)

Perform flash write operation.

Parameters
[in]FirmwareTypeThe type of firmware.
[in]FlashAddressThe address of flash device to be accessed.
[in]FlashAddressTypeThe type of flash device address.
[in]BufferThe pointer to the data buffer.
[in]LengthThe length of data buffer in bytes.
Return values
EFI_SUCCESSThe operation returns successfully.
EFI_WRITE_PROTECTEDThe flash device is read only.
EFI_UNSUPPORTEDThe flash device access is unsupported.
EFI_INVALID_PARAMETERThe input parameter is not valid.
EFI_STATUS EFIAPI PerformFlashWriteWithProgress ( IN PLATFORM_FIRMWARE_TYPE  FirmwareType,
IN EFI_PHYSICAL_ADDRESS  FlashAddress,
IN FLASH_ADDRESS_TYPE  FlashAddressType,
IN VOID *  Buffer,
IN UINTN  Length,
IN EFI_FIRMWARE_MANAGEMENT_UPDATE_IMAGE_PROGRESS  Progress,
IN UINTN  StartPercentage,
IN UINTN  EndPercentage 
)

Perform flash write operation with progress indicator. The start and end completion percentage values are passed into this function. If the requested flash write operation is broken up, then completion percentage between the start and end values may be passed to the provided Progress function. The caller of this function is required to call the Progress function for the start and end completion percentage values. This allows the Progress, StartPercentage, and EndPercentage parameters to be ignored if the requested flash write operation can not be broken up

Parameters
[in]FirmwareTypeThe type of firmware.
[in]FlashAddressThe address of flash device to be accessed.
[in]FlashAddressTypeThe type of flash device address.
[in]BufferThe pointer to the data buffer.
[in]LengthThe length of data buffer in bytes.
[in]ProgressA function used report the progress of the firmware update. This is an optional parameter that may be NULL.
[in]StartPercentageThe start completion percentage value that may be used to report progress during the flash write operation.
[in]EndPercentageThe end completion percentage value that may be used to report progress during the flash write operation.
Return values
EFI_SUCCESSThe operation returns successfully.
EFI_WRITE_PROTECTEDThe flash device is read only.
EFI_UNSUPPORTEDThe flash device access is unsupported.
EFI_INVALID_PARAMETERThe input parameter is not valid.