]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDiskInfo.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / NvmExpressDxe / NvmExpressDiskInfo.h
CommitLineData
4b738c76
HT
1/** @file\r
2 Header file for EFI_DISK_INFO_PROTOCOL interface.\r
3\r
4Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>\r
9d510e61 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
4b738c76
HT
6\r
7**/\r
8\r
9#ifndef _NVME_DISKINFO_H_\r
10#define _NVME_DISKINFO_H_\r
11\r
12/**\r
13 Initialize the installation of DiskInfo protocol.\r
14\r
15 This function prepares for the installation of DiskInfo protocol on the child handle.\r
16 By default, it installs DiskInfo protocol with NVME interface GUID.\r
17\r
18 @param[in] Device The pointer of NVME_DEVICE_PRIVATE_DATA.\r
19\r
20**/\r
21VOID\r
22InitializeDiskInfo (\r
23 IN NVME_DEVICE_PRIVATE_DATA *Device\r
24 );\r
25\r
26\r
27/**\r
28 Provides inquiry information for the controller type.\r
29\r
30 This function is used to get inquiry data. Data format\r
31 of Identify data is defined by the Interface GUID.\r
32\r
33 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.\r
34 @param[in, out] InquiryData Pointer to a buffer for the inquiry data.\r
35 @param[in, out] InquiryDataSize Pointer to the value for the inquiry data size.\r
36\r
37 @retval EFI_SUCCESS The command was accepted without any errors.\r
38 @retval EFI_NOT_FOUND Device does not support this data class\r
39 @retval EFI_DEVICE_ERROR Error reading InquiryData from device\r
40 @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough\r
41\r
42**/\r
43EFI_STATUS\r
44EFIAPI\r
45NvmExpressDiskInfoInquiry (\r
46 IN EFI_DISK_INFO_PROTOCOL *This,\r
47 IN OUT VOID *InquiryData,\r
48 IN OUT UINT32 *InquiryDataSize\r
49 );\r
50\r
51/**\r
52 Provides identify information for the controller type.\r
53\r
54 This function is used to get identify data. Data format\r
55 of Identify data is defined by the Interface GUID.\r
56\r
57 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL\r
58 instance.\r
59 @param[in, out] IdentifyData Pointer to a buffer for the identify data.\r
60 @param[in, out] IdentifyDataSize Pointer to the value for the identify data\r
61 size.\r
62\r
63 @retval EFI_SUCCESS The command was accepted without any errors.\r
64 @retval EFI_NOT_FOUND Device does not support this data class\r
65 @retval EFI_DEVICE_ERROR Error reading IdentifyData from device\r
66 @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough\r
67\r
68**/\r
69EFI_STATUS\r
70EFIAPI\r
71NvmExpressDiskInfoIdentify (\r
72 IN EFI_DISK_INFO_PROTOCOL *This,\r
73 IN OUT VOID *IdentifyData,\r
74 IN OUT UINT32 *IdentifyDataSize\r
75 );\r
76\r
77/**\r
78 Provides sense data information for the controller type.\r
79\r
80 This function is used to get sense data.\r
81 Data format of Sense data is defined by the Interface GUID.\r
82\r
83 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.\r
84 @param[in, out] SenseData Pointer to the SenseData.\r
85 @param[in, out] SenseDataSize Size of SenseData in bytes.\r
86 @param[out] SenseDataNumber Pointer to the value for the sense data size.\r
87\r
88 @retval EFI_SUCCESS The command was accepted without any errors.\r
89 @retval EFI_NOT_FOUND Device does not support this data class.\r
90 @retval EFI_DEVICE_ERROR Error reading SenseData from device.\r
91 @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough.\r
92\r
93**/\r
94EFI_STATUS\r
95EFIAPI\r
96NvmExpressDiskInfoSenseData (\r
97 IN EFI_DISK_INFO_PROTOCOL *This,\r
98 IN OUT VOID *SenseData,\r
99 IN OUT UINT32 *SenseDataSize,\r
100 OUT UINT8 *SenseDataNumber\r
101 );\r
102\r
103\r
104/**\r
105 This function is used to get controller information.\r
106\r
107 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.\r
108 @param[out] IdeChannel Pointer to the Ide Channel number. Primary or secondary.\r
109 @param[out] IdeDevice Pointer to the Ide Device number. Master or slave.\r
110\r
111 @retval EFI_SUCCESS IdeChannel and IdeDevice are valid.\r
112 @retval EFI_UNSUPPORTED This is not an IDE device.\r
113\r
114**/\r
115EFI_STATUS\r
116EFIAPI\r
117NvmExpressDiskInfoWhichIde (\r
118 IN EFI_DISK_INFO_PROTOCOL *This,\r
119 OUT UINT32 *IdeChannel,\r
120 OUT UINT32 *IdeDevice\r
121 );\r
122\r
123#endif\r