2 Provides the basic interfaces to abstract platform information regarding an
5 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 @par Revision Reference:
15 This Protocol is defined in UEFI Platform Initialization Specification 1.6
20 #ifndef __DISK_INFO_H__
21 #define __DISK_INFO_H__
24 /// Global ID for EFI_DISK_INFO_PROTOCOL
26 #define EFI_DISK_INFO_PROTOCOL_GUID \
28 0xd432a67f, 0x14dc, 0x484b, {0xb3, 0xbb, 0x3f, 0x2, 0x91, 0x84, 0x93, 0x27 } \
32 /// Forward declaration for EFI_DISK_INFO_PROTOCOL
34 typedef struct _EFI_DISK_INFO_PROTOCOL EFI_DISK_INFO_PROTOCOL
;
37 /// Global ID for an IDE interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface
39 #define EFI_DISK_INFO_IDE_INTERFACE_GUID \
41 0x5e948fe3, 0x26d3, 0x42b5, {0xaf, 0x17, 0x61, 0x2, 0x87, 0x18, 0x8d, 0xec } \
45 /// Global ID for a SCSI interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface
47 #define EFI_DISK_INFO_SCSI_INTERFACE_GUID \
49 0x8f74baa, 0xea36, 0x41d9, {0x95, 0x21, 0x21, 0xa7, 0xf, 0x87, 0x80, 0xbc } \
53 /// Global ID for a USB interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface
55 #define EFI_DISK_INFO_USB_INTERFACE_GUID \
57 0xcb871572, 0xc11a, 0x47b5, {0xb4, 0x92, 0x67, 0x5e, 0xaf, 0xa7, 0x77, 0x27 } \
61 /// Global ID for an AHCI interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface
63 #define EFI_DISK_INFO_AHCI_INTERFACE_GUID \
65 0x9e498932, 0x4abc, 0x45af, {0xa3, 0x4d, 0x2, 0x47, 0x78, 0x7b, 0xe7, 0xc6 } \
69 /// Global ID for a NVME interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface
71 #define EFI_DISK_INFO_NVME_INTERFACE_GUID \
73 0x3ab14680, 0x5d3f, 0x4a4d, {0xbc, 0xdc, 0xcc, 0x38, 0x0, 0x18, 0xc7, 0xf7 } \
77 /// Global ID for a UFS interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface
79 #define EFI_DISK_INFO_UFS_INTERFACE_GUID \
81 0x4b3029cc, 0x6b98, 0x47fb, { 0xbc, 0x96, 0x76, 0xdc, 0xb8, 0x4, 0x41, 0xf0 } \
85 /// Global ID for an SD/MMC interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface
87 #define EFI_DISK_INFO_SD_MMC_INTERFACE_GUID \
89 0x8deec992, 0xd39c, 0x4a5c, { 0xab, 0x6b, 0x98, 0x6e, 0x14, 0x24, 0x2b, 0x9d } \
93 Provides inquiry information for the controller type.
95 This function is used by the IDE bus driver to get inquiry data. Data format
96 of Identify data is defined by the Interface GUID.
98 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
99 @param[in,out] InquiryData Pointer to a buffer for the inquiry data.
100 @param[in,out] InquiryDataSize Pointer to the value for the inquiry data size.
102 @retval EFI_SUCCESS The command was accepted without any errors.
103 @retval EFI_NOT_FOUND Device does not support this data class
104 @retval EFI_DEVICE_ERROR Error reading InquiryData from device
105 @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough
110 (EFIAPI
*EFI_DISK_INFO_INQUIRY
)(
111 IN EFI_DISK_INFO_PROTOCOL
*This
,
112 IN OUT VOID
*InquiryData
,
113 IN OUT UINT32
*InquiryDataSize
117 Provides identify information for the controller type.
119 This function is used by the IDE bus driver to get identify data. Data format
120 of Identify data is defined by the Interface GUID.
122 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL
124 @param[in,out] IdentifyData Pointer to a buffer for the identify data.
125 @param[in,out] IdentifyDataSize Pointer to the value for the identify data
128 @retval EFI_SUCCESS The command was accepted without any errors.
129 @retval EFI_NOT_FOUND Device does not support this data class
130 @retval EFI_DEVICE_ERROR Error reading IdentifyData from device
131 @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough
136 (EFIAPI
*EFI_DISK_INFO_IDENTIFY
)(
137 IN EFI_DISK_INFO_PROTOCOL
*This
,
138 IN OUT VOID
*IdentifyData
,
139 IN OUT UINT32
*IdentifyDataSize
143 Provides sense data information for the controller type.
145 This function is used by the IDE bus driver to get sense data.
146 Data format of Sense data is defined by the Interface GUID.
148 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
149 @param[in,out] SenseData Pointer to the SenseData.
150 @param[in,out] SenseDataSize Size of SenseData in bytes.
151 @param[out] SenseDataNumber Pointer to the value for the sense data size.
153 @retval EFI_SUCCESS The command was accepted without any errors.
154 @retval EFI_NOT_FOUND Device does not support this data class.
155 @retval EFI_DEVICE_ERROR Error reading SenseData from device.
156 @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough.
161 (EFIAPI
*EFI_DISK_INFO_SENSE_DATA
)(
162 IN EFI_DISK_INFO_PROTOCOL
*This
,
163 IN OUT VOID
*SenseData
,
164 IN OUT UINT32
*SenseDataSize
,
165 OUT UINT8
*SenseDataNumber
169 This function is used by the IDE bus driver to get controller information.
171 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
172 @param[out] IdeChannel Pointer to the Ide Channel number. Primary or secondary.
173 @param[out] IdeDevice Pointer to the Ide Device number. Master or slave.
175 @retval EFI_SUCCESS IdeChannel and IdeDevice are valid.
176 @retval EFI_UNSUPPORTED This is not an IDE device.
181 (EFIAPI
*EFI_DISK_INFO_WHICH_IDE
)(
182 IN EFI_DISK_INFO_PROTOCOL
*This
,
183 OUT UINT32
*IdeChannel
,
184 OUT UINT32
*IdeDevice
188 /// The EFI_DISK_INFO_PROTOCOL provides controller specific information.
190 struct _EFI_DISK_INFO_PROTOCOL
{
192 /// A GUID that defines the format of buffers for the other member functions
193 /// of this protocol.
197 /// Return the results of the Inquiry command to a drive in InquiryData. Data
198 /// format of Inquiry data is defined by the Interface GUID.
200 EFI_DISK_INFO_INQUIRY Inquiry
;
202 /// Return the results of the Identify command to a drive in IdentifyData. Data
203 /// format of Identify data is defined by the Interface GUID.
205 EFI_DISK_INFO_IDENTIFY Identify
;
207 /// Return the results of the Request Sense command to a drive in SenseData. Data
208 /// format of Sense data is defined by the Interface GUID.
210 EFI_DISK_INFO_SENSE_DATA SenseData
;
212 /// Specific controller.
214 EFI_DISK_INFO_WHICH_IDE WhichIde
;
217 extern EFI_GUID gEfiDiskInfoProtocolGuid
;
219 extern EFI_GUID gEfiDiskInfoIdeInterfaceGuid
;
220 extern EFI_GUID gEfiDiskInfoScsiInterfaceGuid
;
221 extern EFI_GUID gEfiDiskInfoUsbInterfaceGuid
;
222 extern EFI_GUID gEfiDiskInfoAhciInterfaceGuid
;
223 extern EFI_GUID gEfiDiskInfoNvmeInterfaceGuid
;
224 extern EFI_GUID gEfiDiskInfoUfsInterfaceGuid
;
225 extern EFI_GUID gEfiDiskInfoSdMmcInterfaceGuid
;