]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/DiskInfo.h
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Include / Protocol / DiskInfo.h
1 /** @file
2 Provides the basic interfaces to abstract platform information regarding an
3 IDE controller.
4
5 Copyright (c) 2006 - 2009, 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
10
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.
13
14 @par Revision Reference:
15 This Protocol is defined in UEFI Platform Initialization Specification 1.2
16 Volume 5: Standards
17
18 **/
19
20 #ifndef __DISK_INFO_H__
21 #define __DISK_INFO_H__
22
23 ///
24 /// Global ID for EFI_DISK_INFO_PROTOCOL
25 ///
26 #define EFI_DISK_INFO_PROTOCOL_GUID \
27 { \
28 0xd432a67f, 0x14dc, 0x484b, {0xb3, 0xbb, 0x3f, 0x2, 0x91, 0x84, 0x93, 0x27 } \
29 }
30
31 ///
32 /// Forward declaration for EFI_DISK_INFO_PROTOCOL
33 ///
34 typedef struct _EFI_DISK_INFO_PROTOCOL EFI_DISK_INFO_PROTOCOL;
35
36 ///
37 /// Global ID for an IDE interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface
38 ///
39 #define EFI_DISK_INFO_IDE_INTERFACE_GUID \
40 { \
41 0x5e948fe3, 0x26d3, 0x42b5, {0xaf, 0x17, 0x61, 0x2, 0x87, 0x18, 0x8d, 0xec } \
42 }
43
44 ///
45 /// Global ID for a SCSI interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface
46 ///
47 #define EFI_DISK_INFO_SCSI_INTERFACE_GUID \
48 { \
49 0x8f74baa, 0xea36, 0x41d9, {0x95, 0x21, 0x21, 0xa7, 0xf, 0x87, 0x80, 0xbc } \
50 }
51
52 ///
53 /// Global ID for a USB interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface
54 ///
55 #define EFI_DISK_INFO_USB_INTERFACE_GUID \
56 { \
57 0xcb871572, 0xc11a, 0x47b5, {0xb4, 0x92, 0x67, 0x5e, 0xaf, 0xa7, 0x77, 0x27 } \
58 }
59
60 ///
61 /// Global ID for an AHCI interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface
62 ///
63 #define EFI_DISK_INFO_AHCI_INTERFACE_GUID \
64 { \
65 0x9e498932, 0x4abc, 0x45af, {0xa3, 0x4d, 0x2, 0x47, 0x78, 0x7b, 0xe7, 0xc6} \
66 }
67
68 /**
69 Provides inquiry information for the controller type.
70
71 This function is used by the IDE bus driver to get inquiry data. Data format
72 of Identify data is defined by the Interface GUID.
73
74 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
75 @param[in,out] InquiryData Pointer to a buffer for the inquiry data.
76 @param[in,out] InquiryDataSize Pointer to the value for the inquiry data size.
77
78 @retval EFI_SUCCESS The command was accepted without any errors.
79 @retval EFI_NOT_FOUND Device does not support this data class
80 @retval EFI_DEVICE_ERROR Error reading InquiryData from device
81 @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough
82
83 **/
84 typedef
85 EFI_STATUS
86 (EFIAPI *EFI_DISK_INFO_INQUIRY)(
87 IN EFI_DISK_INFO_PROTOCOL *This,
88 IN OUT VOID *InquiryData,
89 IN OUT UINT32 *InquiryDataSize
90 );
91
92 /**
93 Provides identify information for the controller type.
94
95 This function is used by the IDE bus driver to get identify data. Data format
96 of Identify data is defined by the Interface GUID.
97
98 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL
99 instance.
100 @param[in,out] IdentifyData Pointer to a buffer for the identify data.
101 @param[in,out] IdentifyDataSize Pointer to the value for the identify data
102 size.
103
104 @retval EFI_SUCCESS The command was accepted without any errors.
105 @retval EFI_NOT_FOUND Device does not support this data class
106 @retval EFI_DEVICE_ERROR Error reading IdentifyData from device
107 @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough
108
109 **/
110 typedef
111 EFI_STATUS
112 (EFIAPI *EFI_DISK_INFO_IDENTIFY)(
113 IN EFI_DISK_INFO_PROTOCOL *This,
114 IN OUT VOID *IdentifyData,
115 IN OUT UINT32 *IdentifyDataSize
116 );
117
118 /**
119 Provides sense data information for the controller type.
120
121 This function is used by the IDE bus driver to get sense data.
122 Data format of Sense data is defined by the Interface GUID.
123
124 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
125 @param[in,out] SenseData Pointer to the SenseData.
126 @param[in,out] SenseDataSize Size of SenseData in bytes.
127 @param[out] SenseDataNumber Pointer to the value for the sense data size.
128
129 @retval EFI_SUCCESS The command was accepted without any errors.
130 @retval EFI_NOT_FOUND Device does not support this data class.
131 @retval EFI_DEVICE_ERROR Error reading SenseData from device.
132 @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough.
133
134 **/
135 typedef
136 EFI_STATUS
137 (EFIAPI *EFI_DISK_INFO_SENSE_DATA)(
138 IN EFI_DISK_INFO_PROTOCOL *This,
139 IN OUT VOID *SenseData,
140 IN OUT UINT32 *SenseDataSize,
141 OUT UINT8 *SenseDataNumber
142 );
143
144 /**
145 This function is used by the IDE bus driver to get controller information.
146
147 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
148 @param[out] IdeChannel Pointer to the Ide Channel number. Primary or secondary.
149 @param[out] IdeDevice Pointer to the Ide Device number. Master or slave.
150
151 @retval EFI_SUCCESS IdeChannel and IdeDevice are valid.
152 @retval EFI_UNSUPPORTED This is not an IDE device.
153
154 **/
155 typedef
156 EFI_STATUS
157 (EFIAPI *EFI_DISK_INFO_WHICH_IDE)(
158 IN EFI_DISK_INFO_PROTOCOL *This,
159 OUT UINT32 *IdeChannel,
160 OUT UINT32 *IdeDevice
161 );
162
163 ///
164 /// The EFI_DISK_INFO_PROTOCOL provides controller specific information.
165 ///
166 struct _EFI_DISK_INFO_PROTOCOL {
167 ///
168 /// A GUID that defines the format of buffers for the other member functions
169 /// of this protocol.
170 ///
171 EFI_GUID Interface;
172 ///
173 /// Return the results of the Inquiry command to a drive in InquiryData. Data
174 /// format of Inquiry data is defined by the Interface GUID.
175 ///
176 EFI_DISK_INFO_INQUIRY Inquiry;
177 ///
178 /// Return the results of the Identify command to a drive in IdentifyData. Data
179 /// format of Identify data is defined by the Interface GUID.
180 ///
181 EFI_DISK_INFO_IDENTIFY Identify;
182 ///
183 /// Return the results of the Request Sense command to a drive in SenseData. Data
184 /// format of Sense data is defined by the Interface GUID.
185 ///
186 EFI_DISK_INFO_SENSE_DATA SenseData;
187 ///
188 /// Specific controller.
189 ///
190 EFI_DISK_INFO_WHICH_IDE WhichIde;
191 };
192
193 extern EFI_GUID gEfiDiskInfoProtocolGuid;
194
195 extern EFI_GUID gEfiDiskInfoIdeInterfaceGuid;
196 extern EFI_GUID gEfiDiskInfoScsiInterfaceGuid;
197 extern EFI_GUID gEfiDiskInfoUsbInterfaceGuid;
198 extern EFI_GUID gEfiDiskInfoAhciInterfaceGuid;
199
200 #endif