]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / NvmExpressDxe / NvmExpressHci.h
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 SPDX-License-Identifier: BSD-2-Clause-Patent
8
9 **/
10
11 #ifndef _NVME_HCI_H_
12 #define _NVME_HCI_H_
13
14 #define NVME_BAR 0
15
16 //
17 // Offset from the beginning of private data queue buffer
18 //
19 #define NVME_ASQ_BUF_OFFSET EFI_PAGE_SIZE
20
21 /**
22 Initialize the Nvm Express controller.
23
24 @param[in] Private The pointer to the NVME_CONTROLLER_PRIVATE_DATA data structure.
25
26 @retval EFI_SUCCESS The NVM Express Controller is initialized successfully.
27 @retval Others A device error occurred while initializing the controller.
28
29 **/
30 EFI_STATUS
31 NvmeControllerInit (
32 IN NVME_CONTROLLER_PRIVATE_DATA *Private
33 );
34
35 /**
36 Get identify controller data.
37
38 @param Private The pointer to the NVME_CONTROLLER_PRIVATE_DATA data structure.
39 @param Buffer The buffer used to store the identify controller data.
40
41 @return EFI_SUCCESS Successfully get the identify controller data.
42 @return EFI_DEVICE_ERROR Fail to get the identify controller data.
43
44 **/
45 EFI_STATUS
46 NvmeIdentifyController (
47 IN NVME_CONTROLLER_PRIVATE_DATA *Private,
48 IN VOID *Buffer
49 );
50
51 /**
52 Get specified identify namespace data.
53
54 @param Private The pointer to the NVME_CONTROLLER_PRIVATE_DATA data structure.
55 @param NamespaceId The specified namespace identifier.
56 @param Buffer The buffer used to store the identify namespace data.
57
58 @return EFI_SUCCESS Successfully get the identify namespace data.
59 @return EFI_DEVICE_ERROR Fail to get the identify namespace data.
60
61 **/
62 EFI_STATUS
63 NvmeIdentifyNamespace (
64 IN NVME_CONTROLLER_PRIVATE_DATA *Private,
65 IN UINT32 NamespaceId,
66 IN VOID *Buffer
67 );
68
69 #endif
70