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