]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/DiskInfo.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdePkg / Include / Protocol / DiskInfo.h
CommitLineData
1e22c4d9 1/** @file\r
9095d37b
LG
2 Provides the basic interfaces to abstract platform information regarding an\r
3 IDE controller.\r
1e22c4d9 4\r
9095d37b 5 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
9344f092 6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
1e22c4d9 7\r
8 @par Revision Reference:\r
c6fe481f 9 This Protocol is defined in UEFI Platform Initialization Specification 1.6\r
1e22c4d9 10 Volume 5: Standards\r
9095d37b 11\r
1e22c4d9 12**/\r
13\r
14#ifndef __DISK_INFO_H__\r
15#define __DISK_INFO_H__\r
16\r
17///\r
18/// Global ID for EFI_DISK_INFO_PROTOCOL\r
19///\r
20#define EFI_DISK_INFO_PROTOCOL_GUID \\r
21 { \\r
22 0xd432a67f, 0x14dc, 0x484b, {0xb3, 0xbb, 0x3f, 0x2, 0x91, 0x84, 0x93, 0x27 } \\r
23 }\r
24\r
25///\r
26/// Forward declaration for EFI_DISK_INFO_PROTOCOL\r
27///\r
2f88bd3a 28typedef struct _EFI_DISK_INFO_PROTOCOL EFI_DISK_INFO_PROTOCOL;\r
1e22c4d9 29\r
30///\r
31/// Global ID for an IDE interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface\r
32///\r
33#define EFI_DISK_INFO_IDE_INTERFACE_GUID \\r
34 { \\r
35 0x5e948fe3, 0x26d3, 0x42b5, {0xaf, 0x17, 0x61, 0x2, 0x87, 0x18, 0x8d, 0xec } \\r
36 }\r
37\r
38///\r
39/// Global ID for a SCSI interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface\r
40///\r
41#define EFI_DISK_INFO_SCSI_INTERFACE_GUID \\r
42 { \\r
43 0x8f74baa, 0xea36, 0x41d9, {0x95, 0x21, 0x21, 0xa7, 0xf, 0x87, 0x80, 0xbc } \\r
44 }\r
45\r
46///\r
47/// Global ID for a USB interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface\r
48///\r
49#define EFI_DISK_INFO_USB_INTERFACE_GUID \\r
50 { \\r
51 0xcb871572, 0xc11a, 0x47b5, {0xb4, 0x92, 0x67, 0x5e, 0xaf, 0xa7, 0x77, 0x27 } \\r
52 }\r
53\r
54///\r
55/// Global ID for an AHCI interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface\r
56///\r
57#define EFI_DISK_INFO_AHCI_INTERFACE_GUID \\r
58 { \\r
17625930
FT
59 0x9e498932, 0x4abc, 0x45af, {0xa3, 0x4d, 0x2, 0x47, 0x78, 0x7b, 0xe7, 0xc6 } \\r
60 }\r
61\r
62///\r
63/// Global ID for a NVME interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface\r
64///\r
65#define EFI_DISK_INFO_NVME_INTERFACE_GUID \\r
66 { \\r
67 0x3ab14680, 0x5d3f, 0x4a4d, {0xbc, 0xdc, 0xcc, 0x38, 0x0, 0x18, 0xc7, 0xf7 } \\r
1e22c4d9 68 }\r
69\r
52306166
FT
70///\r
71/// Global ID for a UFS interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface\r
72///\r
73#define EFI_DISK_INFO_UFS_INTERFACE_GUID \\r
74 { \\r
75 0x4b3029cc, 0x6b98, 0x47fb, { 0xbc, 0x96, 0x76, 0xdc, 0xb8, 0x4, 0x41, 0xf0 } \\r
76 }\r
77\r
c6fe481f
HW
78///\r
79/// Global ID for an SD/MMC interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface\r
80///\r
81#define EFI_DISK_INFO_SD_MMC_INTERFACE_GUID \\r
82 { \\r
83 0x8deec992, 0xd39c, 0x4a5c, { 0xab, 0x6b, 0x98, 0x6e, 0x14, 0x24, 0x2b, 0x9d } \\r
84 }\r
85\r
1e22c4d9 86/**\r
87 Provides inquiry information for the controller type.\r
9095d37b 88\r
1e22c4d9 89 This function is used by the IDE bus driver to get inquiry data. Data format\r
90 of Identify data is defined by the Interface GUID.\r
91\r
92 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.\r
93 @param[in,out] InquiryData Pointer to a buffer for the inquiry data.\r
94 @param[in,out] InquiryDataSize Pointer to the value for the inquiry data size.\r
95\r
96 @retval EFI_SUCCESS The command was accepted without any errors.\r
9095d37b
LG
97 @retval EFI_NOT_FOUND Device does not support this data class\r
98 @retval EFI_DEVICE_ERROR Error reading InquiryData from device\r
99 @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough\r
1e22c4d9 100\r
101**/\r
102typedef\r
103EFI_STATUS\r
104(EFIAPI *EFI_DISK_INFO_INQUIRY)(\r
105 IN EFI_DISK_INFO_PROTOCOL *This,\r
106 IN OUT VOID *InquiryData,\r
107 IN OUT UINT32 *InquiryDataSize\r
108 );\r
109\r
110/**\r
111 Provides identify information for the controller type.\r
112\r
113 This function is used by the IDE bus driver to get identify data. Data format\r
114 of Identify data is defined by the Interface GUID.\r
115\r
9095d37b 116 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL\r
1e22c4d9 117 instance.\r
118 @param[in,out] IdentifyData Pointer to a buffer for the identify data.\r
119 @param[in,out] IdentifyDataSize Pointer to the value for the identify data\r
120 size.\r
121\r
122 @retval EFI_SUCCESS The command was accepted without any errors.\r
9095d37b
LG
123 @retval EFI_NOT_FOUND Device does not support this data class\r
124 @retval EFI_DEVICE_ERROR Error reading IdentifyData from device\r
125 @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough\r
1e22c4d9 126\r
127**/\r
128typedef\r
129EFI_STATUS\r
130(EFIAPI *EFI_DISK_INFO_IDENTIFY)(\r
131 IN EFI_DISK_INFO_PROTOCOL *This,\r
132 IN OUT VOID *IdentifyData,\r
133 IN OUT UINT32 *IdentifyDataSize\r
134 );\r
135\r
136/**\r
137 Provides sense data information for the controller type.\r
9095d37b
LG
138\r
139 This function is used by the IDE bus driver to get sense data.\r
1e22c4d9 140 Data format of Sense data is defined by the Interface GUID.\r
141\r
142 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.\r
143 @param[in,out] SenseData Pointer to the SenseData.\r
144 @param[in,out] SenseDataSize Size of SenseData in bytes.\r
145 @param[out] SenseDataNumber Pointer to the value for the sense data size.\r
146\r
147 @retval EFI_SUCCESS The command was accepted without any errors.\r
148 @retval EFI_NOT_FOUND Device does not support this data class.\r
149 @retval EFI_DEVICE_ERROR Error reading SenseData from device.\r
150 @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough.\r
151\r
152**/\r
153typedef\r
154EFI_STATUS\r
155(EFIAPI *EFI_DISK_INFO_SENSE_DATA)(\r
156 IN EFI_DISK_INFO_PROTOCOL *This,\r
157 IN OUT VOID *SenseData,\r
158 IN OUT UINT32 *SenseDataSize,\r
159 OUT UINT8 *SenseDataNumber\r
160 );\r
161\r
162/**\r
163 This function is used by the IDE bus driver to get controller information.\r
164\r
9095d37b 165 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.\r
1e22c4d9 166 @param[out] IdeChannel Pointer to the Ide Channel number. Primary or secondary.\r
167 @param[out] IdeDevice Pointer to the Ide Device number. Master or slave.\r
168\r
169 @retval EFI_SUCCESS IdeChannel and IdeDevice are valid.\r
170 @retval EFI_UNSUPPORTED This is not an IDE device.\r
171\r
172**/\r
173typedef\r
174EFI_STATUS\r
175(EFIAPI *EFI_DISK_INFO_WHICH_IDE)(\r
176 IN EFI_DISK_INFO_PROTOCOL *This,\r
177 OUT UINT32 *IdeChannel,\r
178 OUT UINT32 *IdeDevice\r
179 );\r
180\r
181///\r
182/// The EFI_DISK_INFO_PROTOCOL provides controller specific information.\r
183///\r
184struct _EFI_DISK_INFO_PROTOCOL {\r
185 ///\r
9095d37b 186 /// A GUID that defines the format of buffers for the other member functions\r
1e22c4d9 187 /// of this protocol.\r
188 ///\r
2f88bd3a 189 EFI_GUID Interface;\r
1e22c4d9 190 ///\r
191 /// Return the results of the Inquiry command to a drive in InquiryData. Data\r
192 /// format of Inquiry data is defined by the Interface GUID.\r
193 ///\r
2f88bd3a 194 EFI_DISK_INFO_INQUIRY Inquiry;\r
1e22c4d9 195 ///\r
196 /// Return the results of the Identify command to a drive in IdentifyData. Data\r
197 /// format of Identify data is defined by the Interface GUID.\r
198 ///\r
2f88bd3a 199 EFI_DISK_INFO_IDENTIFY Identify;\r
1e22c4d9 200 ///\r
201 /// Return the results of the Request Sense command to a drive in SenseData. Data\r
202 /// format of Sense data is defined by the Interface GUID.\r
203 ///\r
2f88bd3a 204 EFI_DISK_INFO_SENSE_DATA SenseData;\r
1e22c4d9 205 ///\r
9095d37b 206 /// Specific controller.\r
1e22c4d9 207 ///\r
2f88bd3a 208 EFI_DISK_INFO_WHICH_IDE WhichIde;\r
1e22c4d9 209};\r
210\r
2f88bd3a 211extern EFI_GUID gEfiDiskInfoProtocolGuid;\r
1e22c4d9 212\r
2f88bd3a
MK
213extern EFI_GUID gEfiDiskInfoIdeInterfaceGuid;\r
214extern EFI_GUID gEfiDiskInfoScsiInterfaceGuid;\r
215extern EFI_GUID gEfiDiskInfoUsbInterfaceGuid;\r
216extern EFI_GUID gEfiDiskInfoAhciInterfaceGuid;\r
217extern EFI_GUID gEfiDiskInfoNvmeInterfaceGuid;\r
218extern EFI_GUID gEfiDiskInfoUfsInterfaceGuid;\r
219extern EFI_GUID gEfiDiskInfoSdMmcInterfaceGuid;\r
1e22c4d9 220\r
221#endif\r