\r
\r
\r
+/**\r
+ This routine is the driver initialization entry point. It initializes the\r
+ libraries, consumes FV hobs and NT_NON_MM_FV environment variable and\r
+ produces instances of FW_VOL_BLOCK_PROTOCOL as appropriate.\r
+\r
+ @param ImageHandle The image handle. \r
+ @param SystemTable The system table. \r
+\r
+ @retval EFI_SUCCESS Successfully initialized firmware volume block \r
+ driver.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FwVolBlockDriverInit (\r
IN EFI_HANDLE ImageHandle,\r
IN EFI_SYSTEM_TABLE *SystemTable\r
)\r
-/*++\r
-\r
-Routine Description:\r
- This routine is the driver initialization entry point. It initializes the\r
- libraries, consumes FV hobs and NT_NON_MM_FV environment variable and\r
- produces instances of FW_VOL_BLOCK_PROTOCOL as appropriate.\r
-Arguments:\r
- ImageHandle - The image handle.\r
- SystemTable - The system table.\r
-Returns:\r
- EFI_SUCCESS - Successfully initialized firmware volume block driver.\r
---*/\r
;\r
\r
\r
+\r
+/**\r
+ Retrieves Volume attributes. No polarity translations are done.\r
+\r
+ @param This Calling context \r
+ @param Attributes output buffer which contains attributes \r
+\r
+ @retval EFI_SUCCESS The firmware volume attributes were returned.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FwVolBlockGetAttributes (\r
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,\r
OUT EFI_FVB_ATTRIBUTES *Attributes\r
)\r
-/*++\r
+;\r
\r
-Routine Description:\r
- Retrieves Volume attributes. No polarity translations are done.\r
\r
-Arguments:\r
- This - Calling context\r
- Attributes - output buffer which contains attributes\r
\r
-Returns:\r
- EFI_SUCCESS - The firmware volume attributes were returned.\r
+/**\r
+ Modifies the current settings of the firmware volume according to the input parameter.\r
\r
---*/\r
-;\r
+ @param This Calling context \r
+ @param Attributes input buffer which contains attributes \r
\r
+ @retval EFI_SUCCESS The firmware volume attributes were returned. \r
+ @retval EFI_INVALID_PARAMETER The attributes requested are in conflict with \r
+ the capabilities as declared in the firmware \r
+ volume header. \r
+ @retval EFI_UNSUPPORTED Not supported.\r
\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FwVolBlockSetAttributes (\r
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,\r
IN CONST EFI_FVB_ATTRIBUTES *Attributes\r
)\r
-/*++\r
+;\r
\r
-Routine Description:\r
- Modifies the current settings of the firmware volume according to the input parameter.\r
\r
-Arguments:\r
- This - Calling context\r
- Attributes - input buffer which contains attributes\r
\r
-Returns:\r
- EFI_SUCCESS - The firmware volume attributes were returned.\r
- EFI_INVALID_PARAMETER - The attributes requested are in conflict with the capabilities as\r
- declared in the firmware volume header.\r
- EFI_UNSUPPORTED - Not supported.\r
---*/\r
-;\r
+/**\r
+ The EraseBlock() function erases one or more blocks as denoted by the\r
+ variable argument list. The entire parameter list of blocks must be verified\r
+ prior to erasing any blocks. If a block is requested that does not exist\r
+ within the associated firmware volume (it has a larger index than the last\r
+ block of the firmware volume), the EraseBlock() function must return\r
+ EFI_INVALID_PARAMETER without modifying the contents of the firmware volume.\r
+\r
+ @param This Calling context \r
+ @param ... Starting LBA followed by Number of Lba to erase. \r
+ a -1 to terminate the list. \r
\r
+ @retval EFI_SUCCESS The erase request was successfully completed. \r
+ @retval EFI_ACCESS_DENIED The firmware volume is in the WriteDisabled \r
+ state. \r
+ @retval EFI_DEVICE_ERROR The block device is not functioning correctly \r
+ and could not be written. The firmware device \r
+ may have been partially erased. \r
+ @retval EFI_INVALID_PARAMETER One or more of the LBAs listed in the variable \r
+ argument list do \r
+ @retval EFI_UNSUPPORTED Not supported.\r
\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FwVolBlockEraseBlock (\r
IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,\r
...\r
)\r
-/*++\r
-\r
-Routine Description:\r
- The EraseBlock() function erases one or more blocks as denoted by the \r
-variable argument list. The entire parameter list of blocks must be verified\r
-prior to erasing any blocks. If a block is requested that does not exist \r
-within the associated firmware volume (it has a larger index than the last \r
-block of the firmware volume), the EraseBlock() function must return\r
-EFI_INVALID_PARAMETER without modifying the contents of the firmware volume.\r
-\r
-Arguments:\r
- This - Calling context\r
- ... - Starting LBA followed by Number of Lba to erase. a -1 to terminate\r
- the list.\r
- \r
-Returns:\r
- EFI_SUCCESS - The erase request was successfully completed.\r
- EFI_ACCESS_DENIED - The firmware volume is in the WriteDisabled state.\r
- EFI_DEVICE_ERROR - The block device is not functioning correctly and could not be\r
- written. The firmware device may have been partially erased.\r
- EFI_INVALID_PARAMETER - One or more of the LBAs listed in the variable argument list do\r
- EFI_UNSUPPORTED - Not supported.\r
- \r
---*/\r
;\r
\r
\r
+\r
+/**\r
+ Read the specified number of bytes from the block to the input buffer.\r
+\r
+ @param This Indicates the calling context. \r
+ @param Lba The starting logical block index to read. \r
+ @param Offset Offset into the block at which to begin reading. \r
+ @param NumBytes Pointer to a UINT32. At entry, *NumBytes \r
+ contains the total size of the buffer. At exit, \r
+ *NumBytes contains the total number of bytes \r
+ actually read. \r
+ @param Buffer Pinter to a caller-allocated buffer that \r
+ contains the destine for the read. \r
+\r
+ @retval EFI_SUCCESS The firmware volume was read successfully. \r
+ @retval EFI_BAD_BUFFER_SIZE The read was attempted across an LBA boundary. \r
+ @retval EFI_ACCESS_DENIED Access denied. \r
+ @retval EFI_DEVICE_ERROR The block device is malfunctioning and could not \r
+ be read.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FwVolBlockReadBlock (\r
IN OUT UINTN *NumBytes,\r
IN OUT UINT8 *Buffer\r
)\r
-/*++\r
-\r
-Routine Description:\r
- Read the specified number of bytes from the block to the input buffer.\r
-\r
-Arguments:\r
- This - Indicates the calling context.\r
- Lba - The starting logical block index to read.\r
- Offset - Offset into the block at which to begin reading.\r
- NumBytes - Pointer to a UINT32. At entry, *NumBytes contains the\r
- total size of the buffer. At exit, *NumBytes contains the\r
- total number of bytes actually read.\r
- Buffer - Pinter to a caller-allocated buffer that contains the destine\r
- for the read. \r
-\r
-Returns: \r
- EFI_SUCCESS - The firmware volume was read successfully.\r
- EFI_BAD_BUFFER_SIZE - The read was attempted across an LBA boundary.\r
- EFI_ACCESS_DENIED - Access denied.\r
- EFI_DEVICE_ERROR - The block device is malfunctioning and could not be read.\r
---*/\r
;\r
\r
\r
+\r
+/**\r
+ Writes the specified number of bytes from the input buffer to the block.\r
+\r
+ @param This Indicates the calling context. \r
+ @param Lba The starting logical block index to write to. \r
+ @param Offset Offset into the block at which to begin writing. \r
+ @param NumBytes Pointer to a UINT32. At entry, *NumBytes \r
+ contains the total size of the buffer. At exit, \r
+ *NumBytes contains the total number of bytes \r
+ actually written. \r
+ @param Buffer Pinter to a caller-allocated buffer that \r
+ contains the source for the write. \r
+\r
+ @retval EFI_SUCCESS The firmware volume was written successfully. \r
+ @retval EFI_BAD_BUFFER_SIZE The write was attempted across an LBA boundary. \r
+ On output, NumBytes contains the total number of \r
+ bytes actually written. \r
+ @retval EFI_ACCESS_DENIED The firmware volume is in the WriteDisabled \r
+ state. \r
+ @retval EFI_DEVICE_ERROR The block device is malfunctioning and could not \r
+ be written. \r
+ @retval EFI_UNSUPPORTED Not supported.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FwVolBlockWriteBlock (\r
IN OUT UINTN *NumBytes,\r
IN UINT8 *Buffer\r
)\r
-/*++\r
-\r
-Routine Description:\r
- Writes the specified number of bytes from the input buffer to the block.\r
-\r
-Arguments:\r
- This - Indicates the calling context.\r
- Lba - The starting logical block index to write to.\r
- Offset - Offset into the block at which to begin writing.\r
- NumBytes - Pointer to a UINT32. At entry, *NumBytes contains the\r
- total size of the buffer. At exit, *NumBytes contains the\r
- total number of bytes actually written.\r
- Buffer - Pinter to a caller-allocated buffer that contains the source\r
- for the write. \r
-\r
-Returns: \r
- EFI_SUCCESS - The firmware volume was written successfully.\r
- EFI_BAD_BUFFER_SIZE - The write was attempted across an LBA boundary. On output,\r
- NumBytes contains the total number of bytes actually written.\r
- EFI_ACCESS_DENIED - The firmware volume is in the WriteDisabled state.\r
- EFI_DEVICE_ERROR - The block device is malfunctioning and could not be written.\r
- EFI_UNSUPPORTED - Not supported.\r
---*/\r
;\r
\r
\r
+\r
+/**\r
+ Get Fvb's base address.\r
+\r
+ @param This Indicates the calling context. \r
+ @param Address Fvb device base address. \r
+\r
+ @retval EFI_SUCCESS Successfully got Fvb's base address. \r
+ @retval EFI_UNSUPPORTED Not supported.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FwVolBlockGetPhysicalAddress (\r
IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This,\r
OUT EFI_PHYSICAL_ADDRESS *Address\r
)\r
-/*++\r
+;\r
\r
-Routine Description:\r
- Get Fvb's base address.\r
\r
-Arguments:\r
- This - Indicates the calling context.\r
- Address - Fvb device base address.\r
\r
-Returns: \r
- EFI_SUCCESS - Successfully got Fvb's base address.\r
- EFI_UNSUPPORTED - Not supported.\r
---*/\r
-;\r
+/**\r
+ Retrieves the size in bytes of a specific block within a firmware volume.\r
+\r
+ @param This Indicates the calling context. \r
+ @param Lba Indicates the block for which to return the \r
+ size. \r
+ @param BlockSize Pointer to a caller-allocated UINTN in which the \r
+ size of the block is returned. \r
+ @param NumberOfBlocks Pointer to a caller-allocated UINTN in which the \r
+ number of consecutive blocks starting with Lba \r
+ is returned. All blocks in this range have a \r
+ size of BlockSize. \r
\r
+ @retval EFI_SUCCESS The firmware volume base address is returned. \r
+ @retval EFI_INVALID_PARAMETER The requested LBA is out of range.\r
\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FwVolBlockGetBlockSize (\r
OUT UINTN *BlockSize,\r
OUT UINTN *NumberOfBlocks\r
)\r
-/*++\r
+;\r
\r
-Routine Description:\r
- Retrieves the size in bytes of a specific block within a firmware volume.\r
+/**\r
+ This routine is the driver initialization entry point. It initializes the\r
+ libraries, consumes FV hobs and NT_NON_MM_FV environment variable and\r
+ produces instances of FW_VOL_BLOCK_PROTOCOL as appropriate.\r
\r
-Arguments:\r
- This - Indicates the calling context.\r
- Lba - Indicates the block for which to return the size.\r
- BlockSize - Pointer to a caller-allocated UINTN in which the size of the\r
- block is returned.\r
- NumberOfBlocks - Pointer to a caller-allocated UINTN in which the number of\r
- consecutive blocks starting with Lba is returned. All blocks\r
- in this range have a size of BlockSize. \r
-Returns:\r
- EFI_SUCCESS - The firmware volume base address is returned.\r
- EFI_INVALID_PARAMETER - The requested LBA is out of range.\r
---*/\r
-;\r
+ @param ImageHandle The image handle. \r
+ @param SystemTable The system table. \r
+\r
+ @retval EFI_SUCCESS Successfully initialized firmware volume block \r
+ driver.\r
+\r
+**/\r
EFI_STATUS\r
FwVolBlockDriverInit (\r
IN EFI_HANDLE ImageHandle,\r
IN EFI_SYSTEM_TABLE *SystemTable\r
)\r
-/*++\r
-\r
-Routine Description:\r
- This routine is the driver initialization entry point. It initializes the\r
- libraries, consumes FV hobs and NT_NON_MM_FV environment variable and\r
- produces instances of FW_VOL_BLOCK_PROTOCOL as appropriate.\r
-Arguments:\r
- ImageHandle - The image handle.\r
- SystemTable - The system table.\r
-Returns:\r
- Status code\r
-\r
---*/\r
;\r
\r
+\r
+/**\r
+ This routine produces a firmware volume block protocol on a given\r
+ buffer.\r
+\r
+ @param BaseAddress base address of the firmware volume image \r
+ @param Length length of the firmware volume image \r
+ @param ParentHandle handle of parent firmware volume, if this image \r
+ came from an FV image file in another firmware \r
+ volume (ala capsules) \r
+ @param FvProtocol Firmware volume block protocol produced. \r
+\r
+ @retval EFI_VOLUME_CORRUPTED Volume corrupted. \r
+ @retval EFI_OUT_OF_RESOURCES No enough buffer to be allocated. \r
+ @retval EFI_SUCCESS Successfully produced a FVB protocol on given \r
+ buffer.\r
+\r
+**/\r
EFI_STATUS\r
ProduceFVBProtocolOnBuffer (\r
IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
IN UINT64 Length,\r
IN EFI_HANDLE ParentHandle,\r
- OUT EFI_HANDLE *FvProtocolHandle OPTIONAL\r
+ OUT EFI_HANDLE *FvProtocol OPTIONAL\r
)\r
-/*++\r
-\r
-Routine Description:\r
- This routine produces a firmware volume block protocol on a given\r
- buffer. \r
-\r
-Arguments:\r
- BaseAddress - base address of the firmware volume image\r
- Length - length of the firmware volume image\r
- ParentHandle - handle of parent firmware volume, if this\r
- image came from an FV image file in another\r
- firmware volume (ala capsules)\r
- FvProtocolHandle - Firmware volume block protocol produced.\r
- \r
-Returns:\r
- EFI_VOLUME_CORRUPTED - Volume corrupted.\r
- EFI_OUT_OF_RESOURCES - No enough buffer to be allocated.\r
- EFI_SUCCESS - Successfully produced a FVB protocol on given buffer.\r
- \r
---*/\r
;\r
\r
#endif\r