]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/BlockIo.h
MdePkg: Clean up source files
[mirror_edk2.git] / MdePkg / Include / Protocol / BlockIo.h
index ba3cae208201370e3df7de2ad9b0704bb1dde3f5..213c897e7497330cf095f4a7c3092a063287f8e1 100644 (file)
@@ -4,14 +4,14 @@
   The Block IO protocol is used to abstract block devices like hard drives,\r
   DVD-ROMs and floppy drives.\r
 \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
-  http://opensource.org/licenses/bsd-license.php                                            \r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  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
+  http://opensource.org/licenses/bsd-license.php\r
 \r
-  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
+  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
 **/\r
 \r
@@ -27,12 +27,12 @@ typedef struct _EFI_BLOCK_IO_PROTOCOL  EFI_BLOCK_IO_PROTOCOL;
 \r
 ///\r
 /// Protocol GUID name defined in EFI1.1.\r
-/// \r
+///\r
 #define BLOCK_IO_PROTOCOL       EFI_BLOCK_IO_PROTOCOL_GUID\r
 \r
 ///\r
 /// Protocol defined in EFI1.1.\r
-/// \r
+///\r
 typedef EFI_BLOCK_IO_PROTOCOL   EFI_BLOCK_IO;\r
 \r
 /**\r
@@ -68,7 +68,7 @@ EFI_STATUS
   @retval EFI_NO_MEDIA          There is no media in the device.\r
   @retval EFI_MEDIA_CHANGED     The MediaId does not matched the current device.\r
   @retval EFI_BAD_BUFFER_SIZE   The Buffer was not a multiple of the block size of the device.\r
-  @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, \r
+  @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid,\r
                                 or the buffer is not on proper alignment.\r
 \r
 **/\r
@@ -98,7 +98,7 @@ EFI_STATUS
   @retval EFI_NO_MEDIA          There is no media in the device.\r
   @retval EFI_MEDIA_CHNAGED     The MediaId does not matched the current device.\r
   @retval EFI_BAD_BUFFER_SIZE   The Buffer was not a multiple of the block size of the device.\r
-  @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, \r
+  @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,\r
                                 or the buffer is not on proper alignment.\r
 \r
 **/\r
@@ -135,17 +135,17 @@ typedef struct {
   ///\r
   /// The curent media Id. If the media changes, this value is changed.\r
   ///\r
-  UINT32  MediaId;         \r
-   \r
+  UINT32  MediaId;\r
+\r
   ///\r
   /// TRUE if the media is removable; otherwise, FALSE.\r
-  ///    \r
+  ///\r
   BOOLEAN RemovableMedia;\r
-  \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
+  /// as of the most recent ReadBlocks() or WriteBlocks() call.\r
   ///\r
   BOOLEAN MediaPresent;\r
 \r
@@ -154,41 +154,64 @@ typedef struct {
   /// FALSE. For media with only one partition this would be TRUE.\r
   ///\r
   BOOLEAN LogicalPartition;\r
-  \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
   ///\r
   /// TRUE if the WriteBlock () function caches write data.\r
   ///\r
-  BOOLEAN WriteCaching; \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
+  /// this field is updated.\r
   ///\r
-  UINT32  BlockSize; \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
+  UINT32  IoAlign;\r
+\r
   ///\r
   /// The last logical block address on the device.\r
-  /// If the media changes, then this field is updated. \r
+  /// If the media changes, then this field is updated.\r
   ///\r
-  EFI_LBA LastBlock; \r
+  EFI_LBA LastBlock;\r
+\r
+  ///\r
+  /// Only present if EFI_BLOCK_IO_PROTOCOL.Revision is greater than or equal to\r
+  /// EFI_BLOCK_IO_PROTOCOL_REVISION2. Returns the first LBA is aligned to\r
+  /// a physical block boundary.\r
+  ///\r
+  EFI_LBA LowestAlignedLba;\r
+\r
+  ///\r
+  /// Only present if EFI_BLOCK_IO_PROTOCOL.Revision is greater than or equal to\r
+  /// EFI_BLOCK_IO_PROTOCOL_REVISION2. Returns the number of logical blocks\r
+  /// per physical block.\r
+  ///\r
+  UINT32 LogicalBlocksPerPhysicalBlock;\r
+\r
+  ///\r
+  /// Only present if EFI_BLOCK_IO_PROTOCOL.Revision is greater than or equal to\r
+  /// EFI_BLOCK_IO_PROTOCOL_REVISION3. Returns the optimal transfer length\r
+  /// granularity as a number of logical blocks.\r
+  ///\r
+  UINT32 OptimalTransferLengthGranularity;\r
 } EFI_BLOCK_IO_MEDIA;\r
 \r
 #define EFI_BLOCK_IO_PROTOCOL_REVISION  0x00010000\r
+#define EFI_BLOCK_IO_PROTOCOL_REVISION2 0x00020001\r
+#define EFI_BLOCK_IO_PROTOCOL_REVISION3 0x00020031\r
 \r
 ///\r
 /// Revision defined in EFI1.1.\r
-/// \r
+///\r
 #define EFI_BLOCK_IO_INTERFACE_REVISION   EFI_BLOCK_IO_PROTOCOL_REVISION\r
 \r
 ///\r