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