]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/BlockIo.h
Formalize comments for Protocols and PPIs.
[mirror_edk2.git] / MdePkg / Include / Protocol / BlockIo.h
index a3077b5ecab3c77c49343d2c6abd7db9cbfc548b..adbeedc2895c24949a03dcc92f79617009fe9d1a 100644 (file)
@@ -1,10 +1,10 @@
 /** @file\r
-  Block IO protocol as defined in the EFI 1.0 specification.\r
+  Block IO protocol as defined in the UEFI 2.0 specification.\r
 \r
   The Block IO protocol is used to abstract block devices like hard drives,\r
   DVD-ROMs and floppy drives.\r
 \r
-  Copyright (c) 2006, Intel Corporation                                                         \r
+  Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
   All rights reserved. This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
   which accompanies this distribution.  The full text of the license may be found at        \r
@@ -13,8 +13,6 @@
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-  Module Name:  BlockIo.h\r
-\r
 **/\r
 \r
 #ifndef __BLOCK_IO_H__\r
 \r
 typedef struct _EFI_BLOCK_IO_PROTOCOL  EFI_BLOCK_IO_PROTOCOL;\r
 \r
-//\r
-// Protocol GUID name defined in EFI1.1.\r
-// \r
+///\r
+/// Protocol GUID name defined in EFI1.1.\r
+/// \r
 #define BLOCK_IO_PROTOCOL       EFI_BLOCK_IO_PROTOCOL_GUID\r
 \r
-//\r
-// Protocol defined in EFI1.1.\r
-// \r
+///\r
+/// Protocol defined in EFI1.1.\r
+/// \r
 typedef EFI_BLOCK_IO_PROTOCOL   EFI_BLOCK_IO;\r
 \r
 /**\r
@@ -50,11 +48,10 @@ typedef EFI_BLOCK_IO_PROTOCOL   EFI_BLOCK_IO;
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_BLOCK_RESET) (\r
+(EFIAPI *EFI_BLOCK_RESET)(\r
   IN EFI_BLOCK_IO_PROTOCOL          *This,\r
   IN BOOLEAN                        ExtendedVerification\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Read BufferSize bytes from Lba into Buffer.\r
@@ -76,14 +73,13 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_BLOCK_READ) (\r
+(EFIAPI *EFI_BLOCK_READ)(\r
   IN EFI_BLOCK_IO_PROTOCOL          *This,\r
   IN UINT32                         MediaId,\r
   IN EFI_LBA                        Lba,\r
   IN UINTN                          BufferSize,\r
   OUT VOID                          *Buffer\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Write BufferSize bytes from Lba into Buffer.\r
@@ -106,14 +102,13 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_BLOCK_WRITE) (\r
+(EFIAPI *EFI_BLOCK_WRITE)(\r
   IN EFI_BLOCK_IO_PROTOCOL          *This,\r
   IN UINT32                         MediaId,\r
   IN EFI_LBA                        Lba,\r
   IN UINTN                          BufferSize,\r
   IN VOID                           *Buffer\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Flush the Block Device.\r
@@ -127,49 +122,86 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_BLOCK_FLUSH) (\r
+(EFIAPI *EFI_BLOCK_FLUSH)(\r
   IN EFI_BLOCK_IO_PROTOCOL  *This\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Block IO read only mode data and updated only via members of BlockIO\r
-\r
 **/\r
 typedef struct {\r
-  UINT32  MediaId;    ///< The curent media Id. If the media changes, this value is changed.\r
-  BOOLEAN RemovableMedia;  ///< TRUE if the media is removable; otherwise, FALSE.\r
-  BOOLEAN MediaPresent;    /**< TRUE if there is a media currently present in the device;\r
-             othersise, FALSE. THis field shows the media present status\r
-             as of the most recent ReadBlocks() or WriteBlocks() call.\r
-        **/\r
-  BOOLEAN LogicalPartition;  /**< TRUE if LBA 0 is the first block of a partition; otherwise\r
-             FALSE. For media with only one partition this would be TRUE.\r
-        **/\r
-  BOOLEAN ReadOnly;    /**< TRUE if the media is marked read-only otherwise, FALSE.\r
-             This field shows the read-only status as of the most recent WriteBlocks () call.\r
-        **/\r
-  BOOLEAN WriteCaching;    ///< TRUE if the WriteBlock () function caches write data.\r
-\r
-  UINT32  BlockSize;    /**< The intrinsic block size of the device. If the media changes, then\r
-             this field is updated.\r
-        **/\r
-  UINT32  IoAlign;    ///< Supplies the alignment requirement for any buffer to read or write block(s).\r
-\r
-  EFI_LBA LastBlock;    /**< The last logical block address on the device.\r
-             If the media changes, then this field is updated.\r
-        **/\r
+  ///\r
+  /// The curent media Id. If the media changes, this value is changed.\r
+  ///\r
+  UINT32  MediaId;         \r
+   \r
+  ///\r
+  /// TRUE if the media is removable; otherwise, FALSE.\r
+  ///    \r
+  BOOLEAN RemovableMedia;\r
+  \r
+  ///\r
+  /// TRUE if there is a media currently present in the device;\r
+  /// othersise, FALSE. THis field shows the media present status\r
+  /// as of the most recent ReadBlocks() or WriteBlocks() call.  \r
+  ///\r
+  BOOLEAN MediaPresent;\r
+\r
+  ///\r
+  /// TRUE if LBA 0 is the first block of a partition; otherwise\r
+  /// FALSE. For media with only one partition this would be TRUE.\r
+  ///\r
+  BOOLEAN LogicalPartition;\r
+  \r
+  ///\r
+  /// TRUE if the media is marked read-only otherwise, FALSE.\r
+  /// This field shows the read-only status as of the most recent WriteBlocks () call.\r
+  ///\r
+  BOOLEAN ReadOnly;\r
+  \r
+  ///\r
+  /// TRUE if the WriteBlock () function caches write data.\r
+  ///\r
+  BOOLEAN WriteCaching; \r
+  \r
+  ///\r
+  /// The intrinsic block size of the device. If the media changes, then\r
+  /// this field is updated.  \r
+  ///\r
+  UINT32  BlockSize; \r
+  \r
+  ///\r
+  /// Supplies the alignment requirement for any buffer to read or write block(s).\r
+  ///\r
+  UINT32  IoAlign; \r
+  \r
+  ///\r
+  /// The last logical block address on the device.\r
+  /// If the media changes, then this field is updated. \r
+  ///\r
+  EFI_LBA LastBlock; \r
 } EFI_BLOCK_IO_MEDIA;\r
 \r
 #define EFI_BLOCK_IO_PROTOCOL_REVISION  0x00010000\r
-//\r
-// Revision defined in EFI1.1.\r
-// \r
+\r
+///\r
+/// Revision defined in EFI1.1.\r
+/// \r
 #define EFI_BLOCK_IO_INTERFACE_REVISION   EFI_BLOCK_IO_PROTOCOL_REVISION\r
 \r
+///\r
+///  This protocol provides control over block devices.\r
+///\r
 struct _EFI_BLOCK_IO_PROTOCOL {\r
+  ///\r
+  /// The revision to which the block IO interface adheres. All future\r
+  /// revisions must be backwards compatible. If a future version is not\r
+  /// back wards compatible, it is not the same GUID.\r
+  ///\r
   UINT64              Revision;\r
-\r
+  ///\r
+  /// Pointer to the EFI_BLOCK_IO_MEDIA data for this device.\r
+  ///\r
   EFI_BLOCK_IO_MEDIA  *Media;\r
 \r
   EFI_BLOCK_RESET     Reset;\r