• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /** @file
2   NvmExpressDxe driver is used to manage non-volatile memory subsystem which follows
3   NVM Express specification.
4 
5   (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
6   Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>
7   This program and the accompanying materials
8   are licensed and made available under the terms and conditions of the BSD License
9   which accompanies this distribution.  The full text of the license may be found at
10   http://opensource.org/licenses/bsd-license.php.
11 
12   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 
15 **/
16 
17 #ifndef _NVME_HCI_H_
18 #define _NVME_HCI_H_
19 
20 #define NVME_BAR                 0
21 
22 //
23 // Offset from the beginning of private data queue buffer
24 //
25 #define NVME_ASQ_BUF_OFFSET                  EFI_PAGE_SIZE
26 
27 /**
28   Initialize the Nvm Express controller.
29 
30   @param[in] Private                 The pointer to the NVME_CONTROLLER_PRIVATE_DATA data structure.
31 
32   @retval EFI_SUCCESS                The NVM Express Controller is initialized successfully.
33   @retval Others                     A device error occurred while initializing the controller.
34 
35 **/
36 EFI_STATUS
37 NvmeControllerInit (
38   IN NVME_CONTROLLER_PRIVATE_DATA    *Private
39   );
40 
41 /**
42   Get identify controller data.
43 
44   @param  Private          The pointer to the NVME_CONTROLLER_PRIVATE_DATA data structure.
45   @param  Buffer           The buffer used to store the identify controller data.
46 
47   @return EFI_SUCCESS      Successfully get the identify controller data.
48   @return EFI_DEVICE_ERROR Fail to get the identify controller data.
49 
50 **/
51 EFI_STATUS
52 NvmeIdentifyController (
53   IN NVME_CONTROLLER_PRIVATE_DATA       *Private,
54   IN VOID                               *Buffer
55   );
56 
57 /**
58   Get specified identify namespace data.
59 
60   @param  Private          The pointer to the NVME_CONTROLLER_PRIVATE_DATA data structure.
61   @param  NamespaceId      The specified namespace identifier.
62   @param  Buffer           The buffer used to store the identify namespace data.
63 
64   @return EFI_SUCCESS      Successfully get the identify namespace data.
65   @return EFI_DEVICE_ERROR Fail to get the identify namespace data.
66 
67 **/
68 EFI_STATUS
69 NvmeIdentifyNamespace (
70   IN NVME_CONTROLLER_PRIVATE_DATA      *Private,
71   IN UINT32                            NamespaceId,
72   IN VOID                              *Buffer
73   );
74 
75 #endif
76 
77