X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=IntelFrameworkPkg%2FInclude%2FProtocol%2FFrameworkFirmwareVolumeBlock.h;h=8de76ef19f6ba01ac745629cf9941d9cef9e2af2;hb=aa7fc1c11c3d57d82842dbede50d064639671a98;hp=1404e0583c007586ce5f361e3d878b650d7180a6;hpb=5259c97d7ac7f464c134c3a15186b30e8e8eadff;p=mirror_edk2.git diff --git a/IntelFrameworkPkg/Include/Protocol/FrameworkFirmwareVolumeBlock.h b/IntelFrameworkPkg/Include/Protocol/FrameworkFirmwareVolumeBlock.h index 1404e0583c..8de76ef19f 100644 --- a/IntelFrameworkPkg/Include/Protocol/FrameworkFirmwareVolumeBlock.h +++ b/IntelFrameworkPkg/Include/Protocol/FrameworkFirmwareVolumeBlock.h @@ -1,39 +1,35 @@ /** @file This file provides control over block-oriented firmware devices. - Copyright (c) 2006 - 2008, Intel Corporation - All rights reserved. This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - - @par Revision Reference: - This protocol is defined in framework spec: Firmware Volume Block specification + @par Revision Reference: + This protocol is defined in framework spec: Firmware Volume Block Specification. **/ #ifndef __FRAMEWORK_FIRMWARE_VOLUME_BLOCK_H__ #define __FRAMEWORK_FIRMWARE_VOLUME_BLOCK_H__ +#define FRAMEWORK_EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL_GUID \ +{ 0xDE28BC59, 0x6228, 0x41BD, {0xBD, 0xF6, 0xA3, 0xB9, 0xAD,0xB5, 0x8D, 0xA1 } } typedef struct _FRAMEWORK_EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL FRAMEWORK_EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL; /// -/// type of EFI FVB attribute per Frameowrk spec -/// +/// The type of EFI FVB attribute per the Framework specification. +/// typedef UINT32 EFI_FVB_ATTRIBUTES; /** The GetAttributes() function retrieves the attributes and - current settings of the block. + current settings of the block. @param This Indicates the FRAMEWORK_EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL instance. @param Attributes Pointer to EFI_FVB_ATTRIBUTES in which the attributes and current settings are - returned. + returned. @retval EFI_SUCCESS The firmware volume attributes were returned. @@ -57,8 +53,8 @@ EFI_STATUS EFI_FVB_ATTRIBUTES that contains the desired firmware volume settings. On successful return, it contains the new - settings of the firmware volume. - + settings of the firmware volume. + @retval EFI_SUCCESS The firmware volume attributes were returned. @retval EFI_INVALID_PARAMETER The attributes requested are in @@ -81,14 +77,14 @@ EFI_STATUS only for memory-mapped firmware volumes. @param This Indicates the FRAMEWORK_EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL instance. - + @param Address Pointer to a caller-allocated EFI_PHYSICAL_ADDRESS that, on successful return from GetPhysicalAddress(), contains the base address of the firmware volume. - + @retval EFI_SUCCESS The firmware volume base address is returned. - + @retval EFI_NOT_SUPPORTED The firmware volume is not memory mapped. **/ @@ -110,18 +106,18 @@ EFI_STATUS @param Lba Indicates the block for which to return the size. - @param BlockSize Pointer to a caller-allocated UINTN in which + @param BlockSize The pointer to a caller-allocated UINTN in which the size of the block is returned. - @param NumberOfBlocks Pointer to a caller-allocated UINTN in + @param NumberOfBlocks The pointer to a caller-allocated UINTN in which the number of consecutive blocks, starting with Lba, is returned. All blocks in this range have a size of BlockSize. - - @retval EFI_SUCCESS The firmware volume base address is returned. - + + @retval EFI_SUCCESS The firmware volume base address was returned. + @retval EFI_INVALID_PARAMETER The requested LBA is out of range. **/ @@ -152,31 +148,31 @@ EFI_STATUS aware that a read may be partially completed. @param This Indicates the FRAMEWORK_EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL instance. - + @param Lba The starting logical block index from which to read. @param Offset Offset into the block at which to begin reading. - @param NumBytes Pointer to a UINTN. At entry, *NumBytes + @param NumBytes The pointer to a UINTN. At entry, *NumBytes contains the total size of the buffer. At exit, *NumBytes contains the total number of bytes read. - @param Buffer Pointer to a caller-allocated buffer that will + @param Buffer The pointer to a caller-allocated buffer that will be used to hold the data that is read. @retval EFI_SUCCESS The firmware volume was read successfully and contents are in Buffer. - - @retval EFI_BAD_BUFFER_SIZE Read attempted across an LBA + + @retval EFI_BAD_BUFFER_SIZE A read was attempted across an LBA boundary. On output, NumBytes contains the total number of bytes returned in Buffer. - + @retval EFI_ACCESS_DENIED The firmware volume is in the ReadDisabled state. - + @retval EFI_DEVICE_ERROR The block device is not functioning correctly and could not be read. @@ -208,8 +204,8 @@ EFI_STATUS EraseBlocks() function first to erase the specified block to write. A block erase cycle will transition bits from the (NOT)EFI_FVB_ERASE_POLARITY state back to the - EFI_FVB_ERASE_POLARITY state. Implementations should be - mindful that the firmware volume might be in the WriteDisabled + EFI_FVB_ERASE_POLARITY state. Implementors should note + that the firmware volume might be in the WriteDisabled state. If it is in this state, the Write() function must return the status code EFI_ACCESS_DENIED without modifying the contents of the firmware volume. The Write() function must @@ -223,27 +219,27 @@ EFI_STATUS returns. @param This Indicates the FRAMEWORK_EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL instance. - + @param Lba The starting logical block index to write to. - + @param Offset Offset into the block at which to begin writing. - - @param NumBytes Pointer to a UINTN. Input: the total size of the buffer. + + @param NumBytes The pointer to a UINTN. Input: the total size of the buffer. Output: the total number of bytes actually written. - - @param Buffer Pointer to a caller-allocated buffer that + + @param Buffer The pointer to a caller-allocated buffer that contains the source for the write. - + @retval EFI_SUCCESS The firmware volume was written successfully. - + @retval EFI_BAD_BUFFER_SIZE The write was attempted across an LBA boundary. On output, NumBytes contains the total number of bytes actually written. - + @retval EFI_ACCESS_DENIED The firmware volume is in the WriteDisabled state. - + @retval EFI_DEVICE_ERROR The block device is malfunctioning and could not be written. @@ -263,7 +259,7 @@ EFI_STATUS /// -/// EFI_LBA_LIST_TERMINATOR +/// EFI_LBA_LIST_TERMINATOR. /// #define FRAMEWORK_EFI_LBA_LIST_TERMINATOR 0xFFFFFFFFFFFFFFFFULL @@ -278,7 +274,7 @@ EFI_STATUS volume (it has a larger index than the last block of the firmware volume), the EraseBlocks() function must return the status code EFI_INVALID_PARAMETER without modifying the contents - of the firmware volume. Implementations should be mindful that + of the firmware volume. Implementors should note that the firmware volume might be in the WriteDisabled state. If it is in this state, the EraseBlocks() function must return the status code EFI_ACCESS_DENIED without modifying the contents of @@ -302,9 +298,9 @@ EFI_STATUS (5-7 and 10-11) are to be erased: EraseBlocks (This, 5, 3, 10, 2, EFI_LBA_LIST_TERMINATOR); - @retval EFI_SUCCESS The erase request was successfully + @retval EFI_SUCCESS The erase request successfully completed. - + @retval EFI_ACCESS_DENIED The firmware volume is in the WriteDisabled state. @retval EFI_DEVICE_ERROR The block device is not functioning @@ -313,7 +309,7 @@ EFI_STATUS partially erased. @retval EFI_INVALID_PARAMETER One or more of the LBAs listed in the variable argument list do - not exist in the firmware volume. + not exist in the firmware volume. **/ typedef @@ -341,11 +337,11 @@ struct _FRAMEWORK_EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL { FRAMEWORK_EFI_FVB_WRITE Write; FRAMEWORK_EFI_FVB_ERASE_BLOCKS EraseBlocks; /// - /// Handle of the parent firmware volume. - /// + /// The handle of the parent firmware volume. + /// EFI_HANDLE ParentHandle; }; - +extern EFI_GUID gFramerworkEfiFirmwareVolumeBlockProtocolGuid; #endif