2 Platform flash device access library.
4 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef __PLATFORM_FLASH_ACCESS_LIB_H__
17 #define __PLATFORM_FLASH_ACCESS_LIB_H__
20 FlashAddressTypeRelativeAddress
,
21 FlashAddressTypeAbsoluteAddress
,
25 // Type 0 ~ 0x7FFFFFFF is defined in this library.
26 // Type 0x80000000 ~ 0xFFFFFFFF is reserved for OEM.
29 PlatformFirmwareTypeSystemFirmware
,
30 PlatformFirmwareTypeNvRam
,
31 } PLATFORM_FIRMWARE_TYPE
;
34 Perform flash write opreation.
36 @param[in] FirmwareType The type of firmware.
37 @param[in] FlashAddress The address of flash device to be accessed.
38 @param[in] FlashAddressType The type of flash device address.
39 @param[in] Buffer The pointer to the data buffer.
40 @param[in] Length The length of data buffer in bytes.
42 @retval EFI_SUCCESS The operation returns successfully.
43 @retval EFI_WRITE_PROTECTED The flash device is read only.
44 @retval EFI_UNSUPPORTED The flash device access is unsupported.
45 @retval EFI_INVALID_PARAMETER The input parameter is not valid.
50 IN PLATFORM_FIRMWARE_TYPE FirmwareType
,
51 IN EFI_PHYSICAL_ADDRESS FlashAddress
,
52 IN FLASH_ADDRESS_TYPE FlashAddressType
,