X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FFirmwareVolume2.h;h=07767f3c701413e6b190364bc5626cb635bfaa7b;hb=992f22b99a90d1b217b1e6f702b238f1ff319753;hp=5961c8b74126f30eb76b9eaa2524d5b5d955e3dd;hpb=a4e0b060c6484fd2576fcd906a7b0d4519053c52;p=mirror_edk2.git diff --git a/MdePkg/Include/Protocol/FirmwareVolume2.h b/MdePkg/Include/Protocol/FirmwareVolume2.h index 5961c8b741..07767f3c70 100644 --- a/MdePkg/Include/Protocol/FirmwareVolume2.h +++ b/MdePkg/Include/Protocol/FirmwareVolume2.h @@ -85,7 +85,8 @@ typedef UINT64 EFI_FV_ATTRIBUTES; #define EFI_FV2_ALIGNMENT_2G 0x00000000001F0000ULL /** - + Returns the attributes and current settings of the firmware volume. + Because of constraints imposed by the underlying firmware storage, an instance of the Firmware Volume Protocol may not be to able to support all possible variations of this @@ -116,6 +117,8 @@ EFI_STATUS /** + Modifies the current settings of the firmware volume according to the input parameter. + The SetVolumeAttributes() function is used to set configurable firmware volume attributes. Only EFI_FV_READ_STATUS, EFI_FV_WRITE_STATUS, and EFI_FV_LOCK_STATUS may be modified, and @@ -209,11 +212,13 @@ EFI_STATUS /** + Retrieves a file and/or file information from the firmware volume. + ReadFile() is used to retrieve any file from a firmware volume during the DXE phase. The actual binary encoding of the file in the firmware volume media may be in any arbitrary format as long - as it does the following: ?It is accessed using the Firmware - Volume Protocol. ?The image that is returned follows the image + as it does the following: It is accessed using the Firmware + Volume Protocol. The image that is returned follows the image format defined in Code Definitions: PI Firmware File Format. If the input value of Buffer==NULL, it indicates the caller is requesting only that the type, attributes, and size of the @@ -308,12 +313,12 @@ EFI_STATUS /** + Locates the requested section within a file and returns it in a buffer. + ReadSection() is used to retrieve a specific section from a file within a firmware volume. The section returned is determined using a depth-first, left-to-right search algorithm through all - sections found in the specified file. See - ????Firmware File Sections???? on page 9 for more details about - sections. The output buffer is specified by a double indirection + sections found in the specified file. The output buffer is specified by a double indirection of the Buffer parameter. The input value of Buffer is used to determine if the output buffer is caller allocated or is dynamically allocated by ReadSection(). If the input value of @@ -413,9 +418,9 @@ EFI_STATUS OUT UINT32 *AuthenticationStatus ); -// -// EFI_FV_WRITE_POLICY -// +/// +/// EFI_FV_WRITE_POLICY, two policies (unreliable write and reliable write) are defined. +/// typedef UINT32 EFI_FV_WRITE_POLICY; #define EFI_FV_UNRELIABLE_WRITE 0x00000000 #define EFI_FV_RELIABLE_WRITE 0x00000001 @@ -424,14 +429,31 @@ typedef UINT32 EFI_FV_WRITE_POLICY; // EFI_FV_WRITE_FILE_DATA // typedef struct { + /// + /// Pointer to a GUID, which is the file name to be written. + /// EFI_GUID *NameGuid; + /// + /// Indicates the type of file to be written. + /// EFI_FV_FILETYPE Type; + /// + /// Indicates the attributes for the file to be written. + /// EFI_FV_FILE_ATTRIBUTES FileAttributes; + /// + /// Pointer to a buffer containing the file to be written. + /// VOID *Buffer; + /// + /// Indicates the size of the file image contained in Buffer. + /// UINT32 BufferSize; } EFI_FV_WRITE_FILE_DATA; /** + Locates the requested section within a file and returns it in a buffer. + WriteFile() is used to write one or more files to a firmware volume. Each file to be written is described by an EFI_FV_WRITE_FILE_DATA structure. The caller must ensure that @@ -506,6 +528,9 @@ EFI_STATUS /** + Retrieves information about the next file in the firmware volume store + that matches the search criteria. + GetNextFile() is the interface that is used to search a firmware volume for a particular file. It is called successively until the desired file is located or the function returns @@ -589,6 +614,8 @@ EFI_STATUS ); /** + Return information about a firmware volume. + The GetInfo() function returns information of type InformationType for the requested firmware volume. If the volume does not support the requested information type, then @@ -644,6 +671,7 @@ EFI_STATUS /** + Sets information about a firmware volume. The SetInfo() function sets information of type InformationType on the requested firmware volume. @@ -692,20 +720,19 @@ EFI_STATUS ); -/** - @par Protocol Description: - The Firmware Volume Protocol contains the file-level - abstraction to the firmware volume as well as some firmware - volume attribute reporting and configuration services. The - Firmware Volume Protocol is the interface used by all parts of - DXE that are not directly involved with managing the firmware - volume itself. This abstraction allows many varied types of - firmware volume implementations. A firmware volume may be a - flash device or it may be a file in the UEFI system partition, - for example. This level of firmware volume implementation - detail is not visible to the consumers of the Firmware Volume - Protocol. -**/ +/// +/// The Firmware Volume Protocol contains the file-level +/// abstraction to the firmware volume as well as some firmware +/// volume attribute reporting and configuration services. The +/// Firmware Volume Protocol is the interface used by all parts of +/// DXE that are not directly involved with managing the firmware +/// volume itself. This abstraction allows many varied types of +/// firmware volume implementations. A firmware volume may be a +/// flash device or it may be a file in the UEFI system partition, +/// for example. This level of firmware volume implementation +/// detail is not visible to the consumers of the Firmware Volume +/// Protocol. +/// struct _EFI_FIRMWARE_VOLUME2_PROTOCOL { EFI_FV_GET_ATTRIBUTES GetVolumeAttributes; EFI_FV_SET_ATTRIBUTES SetVolumeAttributes;