]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/NvmExpressPassthru.h
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Include / Protocol / NvmExpressPassthru.h
index 7a90c633ec7ea89012907bc187470bee1384168a..a6cba98e719c801965259b58743cec90272dd9e3 100644 (file)
@@ -3,14 +3,11 @@
   NVM Express controller or to a specific namespace in a NVM Express controller.\r
   This protocol interface is optimized for storage.\r
 \r
-  Copyright (c) 2013 - 2015, 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
+  Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\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
+  @par Revision Reference:\r
+  This Protocol was introduced in UEFI Specification 2.5.\r
 \r
 **/\r
 \r
 typedef struct _EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL;\r
 \r
 typedef struct {\r
-  UINT32          Attributes;\r
-  UINT32          IoAlign;\r
-  UINT32          NvmeVersion;\r
+  UINT32    Attributes;\r
+  UINT32    IoAlign;\r
+  UINT32    NvmeVersion;\r
 } EFI_NVM_EXPRESS_PASS_THRU_MODE;\r
 \r
 //\r
 // If this bit is set, then the EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL interface is\r
 // for directly addressable namespaces.\r
 //\r
-#define EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_PHYSICAL        0x0001\r
+#define EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_PHYSICAL  0x0001\r
 //\r
 // If this bit is set, then the EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL interface is\r
 // for a single volume logical namespace comprised of multiple namespaces.\r
 //\r
-#define EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_LOGICAL         0x0002\r
+#define EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_LOGICAL  0x0002\r
 //\r
 // If this bit is set, then the EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL interface\r
 // supports non-blocking I/O.\r
 //\r
-#define EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_NONBLOCKIO      0x0004\r
+#define EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_NONBLOCKIO  0x0004\r
 //\r
 // If this bit is set, then the EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL interface\r
 // supports NVM command set.\r
 //\r
-#define EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_CMD_SET_NVM     0x0008\r
+#define EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_CMD_SET_NVM  0x0008\r
 \r
 //\r
 // FusedOperation\r
 //\r
-#define NORMAL_CMD                  0x00\r
-#define FUSED_FIRST_CMD             0x01\r
-#define FUSED_SECOND_CMD            0x02\r
+#define NORMAL_CMD        0x00\r
+#define FUSED_FIRST_CMD   0x01\r
+#define FUSED_SECOND_CMD  0x02\r
 \r
 typedef struct {\r
-  UINT32                            Opcode:8;\r
-  UINT32                            FusedOperation:2;\r
-  UINT32                            Reserved:22;\r
+  UINT32    Opcode         : 8;\r
+  UINT32    FusedOperation : 2;\r
+  UINT32    Reserved       : 22;\r
 } NVME_CDW0;\r
 \r
 //\r
 // Flags\r
 //\r
-#define CDW2_VALID                  0x01\r
-#define CDW3_VALID                  0x02\r
-#define CDW10_VALID                 0x04\r
-#define CDW11_VALID                 0x08\r
-#define CDW12_VALID                 0x10\r
-#define CDW13_VALID                 0x20\r
-#define CDW14_VALID                 0x40\r
-#define CDW15_VALID                 0x80\r
+#define CDW2_VALID   0x01\r
+#define CDW3_VALID   0x02\r
+#define CDW10_VALID  0x04\r
+#define CDW11_VALID  0x08\r
+#define CDW12_VALID  0x10\r
+#define CDW13_VALID  0x20\r
+#define CDW14_VALID  0x40\r
+#define CDW15_VALID  0x80\r
 \r
 //\r
 // Queue Type\r
 //\r
-#define NVME_ADMIN_QUEUE            0x00\r
-#define NVME_IO_QUEUE               0x01\r
+#define NVME_ADMIN_QUEUE  0x00\r
+#define NVME_IO_QUEUE     0x01\r
 \r
 typedef struct {\r
-  NVME_CDW0                         Cdw0;\r
-  UINT8                             Flags;\r
-  UINT32                            Nsid;\r
-  UINT32                            Cdw2;\r
-  UINT32                            Cdw3;\r
-  UINT32                            Cdw10;\r
-  UINT32                            Cdw11;\r
-  UINT32                            Cdw12;\r
-  UINT32                            Cdw13;\r
-  UINT32                            Cdw14;\r
-  UINT32                            Cdw15;\r
+  NVME_CDW0    Cdw0;\r
+  UINT8        Flags;\r
+  UINT32       Nsid;\r
+  UINT32       Cdw2;\r
+  UINT32       Cdw3;\r
+  UINT32       Cdw10;\r
+  UINT32       Cdw11;\r
+  UINT32       Cdw12;\r
+  UINT32       Cdw13;\r
+  UINT32       Cdw14;\r
+  UINT32       Cdw15;\r
 } EFI_NVM_EXPRESS_COMMAND;\r
 \r
 typedef struct {\r
-  UINT32                            DW0;\r
-  UINT32                            DW1;\r
-  UINT32                            DW2;\r
-  UINT32                            DW3;\r
+  UINT32    DW0;\r
+  UINT32    DW1;\r
+  UINT32    DW2;\r
+  UINT32    DW3;\r
 } EFI_NVM_EXPRESS_COMPLETION;\r
 \r
 typedef struct {\r
-  UINT64                            CommandTimeout;\r
-  VOID                              *TransferBuffer;\r
-  UINT32                            TransferLength;\r
-  VOID                              *MetadataBuffer;\r
-  UINT32                            MetadataLength;\r
-  UINT8                             QueueType;\r
-  EFI_NVM_EXPRESS_COMMAND           *NvmeCmd;\r
-  EFI_NVM_EXPRESS_COMPLETION        *NvmeCompletion;\r
+  UINT64                        CommandTimeout;\r
+  VOID                          *TransferBuffer;\r
+  UINT32                        TransferLength;\r
+  VOID                          *MetadataBuffer;\r
+  UINT32                        MetadataLength;\r
+  UINT8                         QueueType;\r
+  EFI_NVM_EXPRESS_COMMAND       *NvmeCmd;\r
+  EFI_NVM_EXPRESS_COMPLETION    *NvmeCompletion;\r
 } EFI_NVM_EXPRESS_PASS_THRU_COMMAND_PACKET;\r
 \r
 //\r
 // Protocol function prototypes\r
 //\r
+\r
 /**\r
   Sends an NVM Express Command Packet to an NVM Express controller or namespace. This function supports\r
   both blocking I/O and non-blocking I/O. The blocking I/O functionality is required, and the non-blocking\r
@@ -132,7 +130,7 @@ typedef struct {
   @param[in]     Event               If non-blocking I/O is not supported then Event is ignored, and blocking I/O is performed.\r
                                      If Event is NULL, then blocking I/O is performed. If Event is not NULL and non-blocking I/O\r
                                      is supported, then non-blocking I/O is performed, and Event will be signaled when the NVM\r
-                                     Express Command Packet completes. \r
+                                     Express Command Packet completes.\r
 \r
   @retval EFI_SUCCESS                The NVM Express Command Packet was sent by the host. TransferLength bytes were transferred\r
                                      to, or from DataBuffer.\r
@@ -162,7 +160,7 @@ EFI_STATUS
   Used to retrieve the next namespace ID for this NVM Express controller.\r
 \r
   The EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL.GetNextNamespace() function retrieves the next valid\r
-  namespace ID on this NVM Express controller. \r
+  namespace ID on this NVM Express controller.\r
 \r
   If on input the value pointed to by NamespaceId is 0xFFFFFFFF, then the first valid namespace\r
   ID defined on the NVM Express controller is returned in the location pointed to by NamespaceId\r
@@ -206,7 +204,7 @@ EFI_STATUS
 \r
   If the NamespaceId is not valid, then EFI_NOT_FOUND is returned.\r
 \r
-  If DevicePath is NULL, then EFI_INVALID_PARAMETER is returned. \r
+  If DevicePath is NULL, then EFI_INVALID_PARAMETER is returned.\r
 \r
   If there are not enough resources to allocate the device path node, then EFI_OUT_OF_RESOURCES is returned.\r
 \r
@@ -217,7 +215,7 @@ EFI_STATUS
   @param[in]     NamespaceId         The NVM Express namespace ID  for which a device path node is to be\r
                                      allocated and built. Caller must set the NamespaceId to zero if the\r
                                      device path node will contain a valid UUID.\r
-  @param[in,out] DevicePath          A pointer to a single device path node that describes the NVM Express\r
+  @param[out]    DevicePath          A pointer to a single device path node that describes the NVM Express\r
                                      namespace specified by NamespaceId. This function is responsible for\r
                                      allocating the buffer DevicePath with the boot service AllocatePool().\r
                                      It is the caller's responsibility to free DevicePath when the caller\r
@@ -234,7 +232,7 @@ EFI_STATUS
 (EFIAPI *EFI_NVM_EXPRESS_PASS_THRU_BUILD_DEVICE_PATH)(\r
   IN     EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL          *This,\r
   IN     UINT32                                      NamespaceId,\r
-  IN OUT EFI_DEVICE_PATH_PROTOCOL                    **DevicePath\r
+  OUT    EFI_DEVICE_PATH_PROTOCOL                    **DevicePath\r
   );\r
 \r
 /**\r
@@ -266,21 +264,20 @@ EFI_STATUS
 (EFIAPI *EFI_NVM_EXPRESS_PASS_THRU_GET_NAMESPACE)(\r
   IN     EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL          *This,\r
   IN     EFI_DEVICE_PATH_PROTOCOL                    *DevicePath,\r
-     OUT UINT32                                      *NamespaceId\r
+  OUT UINT32                                      *NamespaceId\r
   );\r
 \r
 //\r
 // Protocol Interface Structure\r
 //\r
 struct _EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL {\r
-  EFI_NVM_EXPRESS_PASS_THRU_MODE                     *Mode;\r
-  EFI_NVM_EXPRESS_PASS_THRU_PASSTHRU                 PassThru;\r
-  EFI_NVM_EXPRESS_PASS_THRU_GET_NEXT_NAMESPACE       GetNextNamespace;\r
-  EFI_NVM_EXPRESS_PASS_THRU_BUILD_DEVICE_PATH        BuildDevicePath;\r
-  EFI_NVM_EXPRESS_PASS_THRU_GET_NAMESPACE            GetNamespace;\r
+  EFI_NVM_EXPRESS_PASS_THRU_MODE                  *Mode;\r
+  EFI_NVM_EXPRESS_PASS_THRU_PASSTHRU              PassThru;\r
+  EFI_NVM_EXPRESS_PASS_THRU_GET_NEXT_NAMESPACE    GetNextNamespace;\r
+  EFI_NVM_EXPRESS_PASS_THRU_BUILD_DEVICE_PATH     BuildDevicePath;\r
+  EFI_NVM_EXPRESS_PASS_THRU_GET_NAMESPACE         GetNamespace;\r
 };\r
 \r
-extern EFI_GUID gEfiNvmExpressPassThruProtocolGuid;\r
+extern EFI_GUID  gEfiNvmExpressPassThruProtocolGuid;\r
 \r
 #endif\r
-\r