]> 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 251c6183df004f1e89da1ac4a419a0fdce96b235..a6cba98e719c801965259b58743cec90272dd9e3 100644 (file)
@@ -4,13 +4,7 @@
   This protocol interface is optimized for storage.\r
 \r
   Copyright (c) 2013 - 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
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
   @par Revision Reference:\r
   This Protocol was introduced in UEFI Specification 2.5.\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
@@ -220,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
@@ -237,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
@@ -269,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