]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Header file for IDE Bus Driver.\r | |
3 | \r | |
4 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef _IDE_BUS_H_\r | |
16 | #define _IDE_BUS_H_\r | |
17 | \r | |
18 | \r | |
19 | \r | |
20 | #include <FrameworkDxe.h>\r | |
21 | \r | |
22 | #include <Protocol/IdeControllerInit.h>\r | |
23 | #include <Protocol/BlockIo.h>\r | |
24 | #include <Protocol/PciIo.h>\r | |
25 | #include <Protocol/DiskInfo.h>\r | |
26 | #include <Protocol/DevicePath.h>\r | |
27 | \r | |
28 | #include <Library/DebugLib.h>\r | |
29 | #include <Library/UefiDriverEntryPoint.h>\r | |
30 | #include <Library/BaseLib.h>\r | |
31 | #include <Library/UefiLib.h>\r | |
32 | #include <Library/BaseMemoryLib.h>\r | |
33 | #include <Library/ReportStatusCodeLib.h>\r | |
34 | #include <Library/MemoryAllocationLib.h>\r | |
35 | #include <Library/PerformanceLib.h>\r | |
36 | #include <Library/UefiBootServicesTableLib.h>\r | |
37 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
38 | #include <Library/DevicePathLib.h>\r | |
39 | \r | |
40 | #include <Guid/EventGroup.h>\r | |
41 | \r | |
42 | #include <IndustryStandard/Pci.h>\r | |
43 | #include "IdeData.h"\r | |
44 | \r | |
45 | //\r | |
46 | // Global Variables\r | |
47 | //\r | |
48 | extern EFI_DRIVER_BINDING_PROTOCOL gIDEBusDriverBinding;\r | |
49 | extern EFI_DRIVER_DIAGNOSTICS_PROTOCOL gIDEBusDriverDiagnostics;\r | |
50 | extern EFI_DRIVER_DIAGNOSTICS2_PROTOCOL gIDEBusDriverDiagnostics2;\r | |
51 | \r | |
52 | //\r | |
53 | // Extra Definition to porting\r | |
54 | //\r | |
55 | #define MAX_IDE_DEVICE 4\r | |
56 | #define MAX_IDE_CHANNELS 2\r | |
57 | #define MAX_IDE_DRIVES 2\r | |
58 | \r | |
59 | #define INVALID_DEVICE_TYPE 0xff\r | |
60 | #define ATA_DEVICE_TYPE 0x00\r | |
61 | #define ATAPI_DEVICE_TYPE 0x01\r | |
62 | \r | |
63 | typedef struct {\r | |
64 | BOOLEAN HaveScannedDevice[MAX_IDE_DEVICE];\r | |
65 | BOOLEAN DeviceFound[MAX_IDE_DEVICE];\r | |
66 | BOOLEAN DeviceProcessed[MAX_IDE_DEVICE];\r | |
67 | } IDE_BUS_DRIVER_PRIVATE_DATA;\r | |
68 | \r | |
69 | #define IDE_BLK_IO_DEV_SIGNATURE SIGNATURE_32 ('i', 'b', 'i', 'd')\r | |
70 | \r | |
71 | typedef struct {\r | |
72 | UINT32 Signature;\r | |
73 | \r | |
74 | EFI_HANDLE Handle;\r | |
75 | EFI_BLOCK_IO_PROTOCOL BlkIo;\r | |
76 | EFI_BLOCK_IO_MEDIA BlkMedia;\r | |
77 | EFI_DISK_INFO_PROTOCOL DiskInfo;\r | |
78 | EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r | |
79 | EFI_PCI_IO_PROTOCOL *PciIo;\r | |
80 | IDE_BUS_DRIVER_PRIVATE_DATA *IdeBusDriverPrivateData;\r | |
81 | \r | |
82 | //\r | |
83 | // Local Data for IDE interface goes here\r | |
84 | //\r | |
85 | EFI_IDE_CHANNEL Channel;\r | |
86 | EFI_IDE_DEVICE Device;\r | |
87 | UINT16 Lun;\r | |
88 | IDE_DEVICE_TYPE Type;\r | |
89 | \r | |
90 | IDE_BASE_REGISTERS *IoPort;\r | |
91 | UINT16 AtapiError;\r | |
92 | \r | |
93 | ATAPI_INQUIRY_DATA *InquiryData;\r | |
94 | EFI_IDENTIFY_DATA *IdData;\r | |
95 | ATA_PIO_MODE PioMode;\r | |
96 | EFI_ATA_MODE UdmaMode;\r | |
97 | CHAR8 ModelName[41];\r | |
98 | ATAPI_REQUEST_SENSE_DATA *SenseData;\r | |
99 | UINT8 SenseDataNumber;\r | |
100 | UINT8 *Cache;\r | |
101 | \r | |
102 | //\r | |
103 | // ExitBootService Event, it is used to clear pending IDE interrupt\r | |
104 | //\r | |
105 | EFI_EVENT ExitBootServiceEvent;\r | |
106 | \r | |
107 | EFI_UNICODE_STRING_TABLE *ControllerNameTable;\r | |
108 | } IDE_BLK_IO_DEV;\r | |
109 | \r | |
110 | #include "ComponentName.h"\r | |
111 | \r | |
112 | #define IDE_BLOCK_IO_DEV_FROM_THIS(a) CR (a, IDE_BLK_IO_DEV, BlkIo, IDE_BLK_IO_DEV_SIGNATURE)\r | |
113 | #define IDE_BLOCK_IO_DEV_FROM_DISK_INFO_THIS(a) CR (a, IDE_BLK_IO_DEV, DiskInfo, IDE_BLK_IO_DEV_SIGNATURE)\r | |
114 | \r | |
115 | #include "Ide.h"\r | |
116 | \r | |
117 | \r | |
118 | /**\r | |
119 | Supported function of Driver Binding protocol for this driver.\r | |
120 | \r | |
121 | @param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r | |
122 | @param ControllerHandle The handle of the controller to test.\r | |
123 | @param RemainingDevicePath A pointer to the remaining portion of a device path.\r | |
124 | \r | |
125 | @retval EFI_SUCCESS Driver loaded.\r | |
126 | @retval other Driver not loaded.\r | |
127 | \r | |
128 | **/\r | |
129 | EFI_STATUS\r | |
130 | EFIAPI\r | |
131 | IDEBusDriverBindingSupported (\r | |
132 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
133 | IN EFI_HANDLE Controller,\r | |
134 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
135 | );\r | |
136 | \r | |
137 | /**\r | |
138 | Start function of Driver binding protocol which start this driver on Controller\r | |
139 | by detecting all disks and installing BlockIo protocol on them.\r | |
140 | \r | |
141 | @param This Protocol instance pointer.\r | |
142 | @param Controller Handle of device to bind driver to.\r | |
143 | @param RemainingDevicePath produce all possible children.\r | |
144 | \r | |
145 | @retval EFI_SUCCESS This driver is added to ControllerHandle.\r | |
146 | @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle.\r | |
147 | @retval other This driver does not support this device.\r | |
148 | \r | |
149 | **/\r | |
150 | EFI_STATUS\r | |
151 | EFIAPI\r | |
152 | IDEBusDriverBindingStart (\r | |
153 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
154 | IN EFI_HANDLE Controller,\r | |
155 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
156 | );\r | |
157 | \r | |
158 | /**\r | |
159 | Stop function of Driver Binding Protocol which is to stop the driver on Controller Handle and all\r | |
160 | child handle attached to the controller handle if there are.\r | |
161 | \r | |
162 | @param This Protocol instance pointer.\r | |
163 | @param Controller Handle of device to stop driver on\r | |
164 | @param NumberOfChildren Not used\r | |
165 | @param ChildHandleBuffer Not used\r | |
166 | \r | |
167 | @retval EFI_SUCCESS This driver is removed DeviceHandle\r | |
168 | @retval other This driver was not removed from this device\r | |
169 | \r | |
170 | **/\r | |
171 | EFI_STATUS\r | |
172 | EFIAPI\r | |
173 | IDEBusDriverBindingStop (\r | |
174 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
175 | IN EFI_HANDLE Controller,\r | |
176 | IN UINTN NumberOfChildren,\r | |
177 | IN EFI_HANDLE *ChildHandleBuffer\r | |
178 | );\r | |
179 | \r | |
180 | //\r | |
181 | // EFI Driver Configuration Functions\r | |
182 | //\r | |
183 | /**\r | |
184 | Allows the user to set controller specific options for a controller that a\r | |
185 | driver is currently managing.\r | |
186 | \r | |
187 | @param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.\r | |
188 | @param ControllerHandle The handle of the controller to set options on.\r | |
189 | @param ChildHandle The handle of the child controller to set options on.\r | |
190 | This is an optional parameter that may be NULL.\r | |
191 | It will be NULL for device drivers, and for a bus drivers\r | |
192 | that wish to set options for the bus controller.\r | |
193 | It will not be NULL for a bus driver that wishes to set\r | |
194 | options for one of its child controllers.\r | |
195 | @param Language A pointer to a three character ISO 639-2 language identifier.\r | |
196 | This is the language of the user interface that should be presented\r | |
197 | to the user, and it must match one of the languages specified in\r | |
198 | SupportedLanguages. The number of languages supported by a driver is up to\r | |
199 | the driver writer.\r | |
200 | @param ActionRequired A pointer to the action that the calling agent is required\r | |
201 | to perform when this function returns.\r | |
202 | \r | |
203 | \r | |
204 | @retval EFI_SUCCESS The driver specified by This successfully set the configuration\r | |
205 | options for the controller specified by ControllerHandle..\r | |
206 | @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r | |
207 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r | |
208 | @retval EFI_INVALID_PARAMETER ActionRequired is NULL.\r | |
209 | @retval EFI_UNSUPPORTED The driver specified by This does not support setting configuration options for\r | |
210 | the controller specified by ControllerHandle and ChildHandle.\r | |
211 | @retval EFI_UNSUPPORTED The driver specified by This does not support the language specified by Language.\r | |
212 | @retval EFI_DEVICE_ERROR A device error occurred while attempt to set the configuration options for the\r | |
213 | controller specified by ControllerHandle and ChildHandle.\r | |
214 | @retval EFI_OUT_RESOURCES There are not enough resources available to set the configuration options for the\r | |
215 | controller specified by ControllerHandle and ChildHandle\r | |
216 | **/\r | |
217 | EFI_STATUS\r | |
218 | EFIAPI\r | |
219 | IDEBusDriverConfigurationSetOptions (\r | |
220 | IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This,\r | |
221 | IN EFI_HANDLE ControllerHandle,\r | |
222 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
223 | IN CHAR8 *Language,\r | |
224 | OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired\r | |
225 | );\r | |
226 | \r | |
227 | /**\r | |
228 | Tests to see if a controller's current configuration options are valid.\r | |
229 | \r | |
230 | @param This A pointer to the EFI_DRIVER_CONFIGURATION_PROTOCOL instance.\r | |
231 | @param ControllerHandle The handle of the controller to test if it's current configuration options\r | |
232 | are valid.\r | |
233 | @param ChildHandle The handle of the child controller to test if it's current configuration\r | |
234 | options are valid. This is an optional parameter that may be NULL. It will\r | |
235 | be NULL for device drivers. It will also be NULL for a bus drivers that\r | |
236 | wish to test the configuration options for the bus controller. It will\r | |
237 | not be NULL for a bus driver that wishes to test configuration options for\r | |
238 | one of its child controllers.\r | |
239 | @retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle that is being\r | |
240 | managed by the driver specified by This has a valid set of configuration\r | |
241 | options.\r | |
242 | @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r | |
243 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r | |
244 | @retval EFI_UNSUPPORTED The driver specified by This is not currently managing the controller\r | |
245 | specified by ControllerHandle and ChildHandle.\r | |
246 | @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle that is being\r | |
247 | managed by the driver specified by This has an invalid set of configuration\r | |
248 | options.\r | |
249 | **/\r | |
250 | EFI_STATUS\r | |
251 | EFIAPI\r | |
252 | IDEBusDriverConfigurationOptionsValid (\r | |
253 | IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This,\r | |
254 | IN EFI_HANDLE ControllerHandle,\r | |
255 | IN EFI_HANDLE ChildHandle OPTIONAL\r | |
256 | );\r | |
257 | \r | |
258 | /**\r | |
259 | Forces a driver to set the default configuration options for a controller.\r | |
260 | \r | |
261 | @param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.\r | |
262 | @param ControllerHandle The handle of the controller to force default configuration options on.\r | |
263 | @param ChildHandle The handle of the child controller to force default configuration\r | |
264 | options on This is an optional parameter that may be NULL. It\r | |
265 | will be NULL for device drivers. It will also be NULL for a bus\r | |
266 | drivers that wish to force default configuration options for the bus\r | |
267 | controller. It will not be NULL for a bus driver that wishes to force\r | |
268 | default configuration options for one of its child controllers.\r | |
269 | @param DefaultType The type of default configuration options to force on the controller\r | |
270 | specified by ControllerHandle and ChildHandle.\r | |
271 | @param ActionRequired A pointer to the action that the calling agent is required to perform\r | |
272 | when this function returns.\r | |
273 | \r | |
274 | @retval EFI_SUCCESS The driver specified by This successfully forced the\r | |
275 | default configuration options on the controller specified by\r | |
276 | ControllerHandle and ChildHandle.\r | |
277 | @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r | |
278 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r | |
279 | @retval EFI_INVALID_PARAMETER ActionRequired is NULL.\r | |
280 | @retval EFI_UNSUPPORTED The driver specified by This does not support forcing the default\r | |
281 | configuration options on the controller specified by ControllerHandle\r | |
282 | and ChildHandle.\r | |
283 | @retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type\r | |
284 | specified by DefaultType.\r | |
285 | @retval EFI_DEVICE_ERROR A device error occurred while attempt to force the default configuration\r | |
286 | options on the controller specified by ControllerHandle and ChildHandle.\r | |
287 | @retval EFI_OUT_RESOURCES There are not enough resources available to force the default configuration\r | |
288 | options on the controller specified by ControllerHandle and ChildHandle.\r | |
289 | **/\r | |
290 | EFI_STATUS\r | |
291 | EFIAPI\r | |
292 | IDEBusDriverConfigurationForceDefaults (\r | |
293 | IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This,\r | |
294 | IN EFI_HANDLE ControllerHandle,\r | |
295 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
296 | IN UINT32 DefaultType,\r | |
297 | OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired\r | |
298 | );\r | |
299 | \r | |
300 | //\r | |
301 | // EFI Driver Diagnostics Functions\r | |
302 | //\r | |
303 | /**\r | |
304 | Runs diagnostics on a controller.\r | |
305 | \r | |
306 | @param This A pointer to the EFI_DRIVER_DIAGNOSTICS_PROTOCOLinstance.\r | |
307 | @param ControllerHandle The handle of the controller to run diagnostics on.\r | |
308 | @param ChildHandle The handle of the child controller to run diagnostics on\r | |
309 | This is an optional parameter that may be NULL. It will\r | |
310 | be NULL for device drivers. It will also be NULL for a\r | |
311 | bus drivers that wish to run diagnostics on the bus controller.\r | |
312 | It will not be NULL for a bus driver that wishes to run\r | |
313 | diagnostics on one of its child controllers.\r | |
314 | @param DiagnosticType Indicates type of diagnostics to perform on the controller\r | |
315 | specified by ControllerHandle and ChildHandle.\r | |
316 | @param Language A pointer to a three character ISO 639-2 language identifier.\r | |
317 | This is the language in which the optional error message should\r | |
318 | be returned in Buffer, and it must match one of the languages\r | |
319 | specified in SupportedLanguages. The number of languages supported by\r | |
320 | a driver is up to the driver writer.\r | |
321 | @param ErrorType A GUID that defines the format of the data returned in Buffer.\r | |
322 | @param BufferSize The size, in bytes, of the data returned in Buffer.\r | |
323 | @param Buffer A buffer that contains a Null-terminated Unicode string\r | |
324 | plus some additional data whose format is defined by ErrorType.\r | |
325 | Buffer is allocated by this function with AllocatePool(), and\r | |
326 | it is the caller's responsibility to free it with a call to FreePool().\r | |
327 | \r | |
328 | @retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle passed\r | |
329 | the diagnostic.\r | |
330 | @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r | |
331 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r | |
332 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
333 | @retval EFI_INVALID_PARAMETER ErrorType is NULL.\r | |
334 | @retval EFI_INVALID_PARAMETER BufferType is NULL.\r | |
335 | @retval EFI_INVALID_PARAMETER Buffer is NULL.\r | |
336 | @retval EFI_UNSUPPORTED The driver specified by This does not support running\r | |
337 | diagnostics for the controller specified by ControllerHandle\r | |
338 | and ChildHandle.\r | |
339 | @retval EFI_UNSUPPORTED The driver specified by This does not support the\r | |
340 | type of diagnostic specified by DiagnosticType.\r | |
341 | @retval EFI_UNSUPPORTED The driver specified by This does not support the language\r | |
342 | specified by Language.\r | |
343 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete the\r | |
344 | diagnostics.\r | |
345 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to return the\r | |
346 | status information in ErrorType, BufferSize,and Buffer.\r | |
347 | @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle\r | |
348 | did not pass the diagnostic.\r | |
349 | **/\r | |
350 | EFI_STATUS\r | |
351 | EFIAPI\r | |
352 | IDEBusDriverDiagnosticsRunDiagnostics (\r | |
353 | IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL *This,\r | |
354 | IN EFI_HANDLE ControllerHandle,\r | |
355 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
356 | IN EFI_DRIVER_DIAGNOSTIC_TYPE DiagnosticType,\r | |
357 | IN CHAR8 *Language,\r | |
358 | OUT EFI_GUID **ErrorType,\r | |
359 | OUT UINTN *BufferSize,\r | |
360 | OUT CHAR16 **Buffer\r | |
361 | );\r | |
362 | \r | |
363 | /**\r | |
364 | issue ATA or ATAPI command to reset a block IO device.\r | |
365 | @param This Block IO protocol instance pointer.\r | |
366 | @param ExtendedVerification If FALSE,for ATAPI device, driver will only invoke ATAPI reset method\r | |
367 | If TRUE, for ATAPI device, driver need invoke ATA reset method after\r | |
368 | invoke ATAPI reset method\r | |
369 | \r | |
370 | @retval EFI_DEVICE_ERROR When the device is neighther ATA device or ATAPI device.\r | |
371 | @retval EFI_SUCCESS The device reset successfully\r | |
372 | \r | |
373 | **/\r | |
374 | EFI_STATUS\r | |
375 | EFIAPI\r | |
376 | IDEBlkIoReset (\r | |
377 | IN EFI_BLOCK_IO_PROTOCOL *This,\r | |
378 | IN BOOLEAN ExtendedVerification\r | |
379 | );\r | |
380 | \r | |
381 | /**\r | |
382 | Read data from a block IO device.\r | |
383 | \r | |
384 | @param This Block IO protocol instance pointer.\r | |
385 | @param MediaId The media ID of the device\r | |
386 | @param Lba Starting LBA address to read data\r | |
387 | @param BufferSize The size of data to be read\r | |
388 | @param Buffer Caller supplied buffer to save data\r | |
389 | \r | |
390 | @retval EFI_DEVICE_ERROR unknown device type\r | |
391 | @retval EFI_SUCCESS read the data successfully.\r | |
392 | \r | |
393 | **/\r | |
394 | EFI_STATUS\r | |
395 | EFIAPI\r | |
396 | IDEBlkIoReadBlocks (\r | |
397 | IN EFI_BLOCK_IO_PROTOCOL *This,\r | |
398 | IN UINT32 MediaId,\r | |
399 | IN EFI_LBA Lba,\r | |
400 | IN UINTN BufferSize,\r | |
401 | OUT VOID *Buffer\r | |
402 | );\r | |
403 | \r | |
404 | /**\r | |
405 | Write data to block io device\r | |
406 | \r | |
407 | @param This Protocol instance pointer.\r | |
408 | @param MediaId The media ID of the device\r | |
409 | @param Lba Starting LBA address to write data\r | |
410 | @param BufferSize The size of data to be written\r | |
411 | @param Buffer Caller supplied buffer to save data\r | |
412 | \r | |
413 | @retval EFI_DEVICE_ERROR unknown device type\r | |
414 | @retval other write data status\r | |
415 | \r | |
416 | **/\r | |
417 | EFI_STATUS\r | |
418 | EFIAPI\r | |
419 | IDEBlkIoWriteBlocks (\r | |
420 | IN EFI_BLOCK_IO_PROTOCOL *This,\r | |
421 | IN UINT32 MediaId,\r | |
422 | IN EFI_LBA Lba,\r | |
423 | IN UINTN BufferSize,\r | |
424 | IN VOID *Buffer\r | |
425 | );\r | |
426 | \r | |
427 | /**\r | |
428 | Flushes all modified data to a physical block devices\r | |
429 | \r | |
430 | @param This Indicates a pointer to the calling context which to sepcify a\r | |
431 | sepcific block device\r | |
432 | \r | |
433 | @retval EFI_SUCCESS Always return success.\r | |
434 | **/\r | |
435 | EFI_STATUS\r | |
436 | EFIAPI\r | |
437 | IDEBlkIoFlushBlocks (\r | |
438 | IN EFI_BLOCK_IO_PROTOCOL *This\r | |
439 | );\r | |
440 | /**\r | |
441 | This function is used by the IDE bus driver to get inquiry data.\r | |
442 | Data format of Identify data is defined by the Interface GUID.\r | |
443 | \r | |
444 | @param This Pointer to the EFI_DISK_INFO_PROTOCOL instance.\r | |
445 | @param InquiryData Pointer to a buffer for the inquiry data.\r | |
446 | @param InquiryDataSize Pointer to the value for the inquiry data size.\r | |
447 | \r | |
448 | @retval EFI_SUCCESS The command was accepted without any errors.\r | |
449 | @retval EFI_NOT_FOUND Device does not support this data class\r | |
450 | @retval EFI_DEVICE_ERROR Error reading InquiryData from device\r | |
451 | @retval EFI_BUFFER_TOO_SMALL IntquiryDataSize not big enough\r | |
452 | \r | |
453 | **/\r | |
454 | EFI_STATUS\r | |
455 | EFIAPI\r | |
456 | IDEDiskInfoInquiry (\r | |
457 | IN EFI_DISK_INFO_PROTOCOL *This,\r | |
458 | IN OUT VOID *InquiryData,\r | |
459 | IN OUT UINT32 *InquiryDataSize\r | |
460 | );\r | |
461 | \r | |
462 | /**\r | |
463 | This function is used by the IDE bus driver to get identify data.\r | |
464 | Data format of Identify data is defined by the Interface GUID.\r | |
465 | \r | |
466 | @param This Pointer to the EFI_DISK_INFO_PROTOCOL instance.\r | |
467 | @param IdentifyData Pointer to a buffer for the identify data.\r | |
468 | @param IdentifyDataSize Pointer to the value for the identify data size.\r | |
469 | \r | |
470 | @retval EFI_SUCCESS The command was accepted without any errors.\r | |
471 | @retval EFI_NOT_FOUND Device does not support this data class\r | |
472 | @retval EFI_DEVICE_ERROR Error reading IdentifyData from device\r | |
473 | @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough\r | |
474 | \r | |
475 | **/\r | |
476 | EFI_STATUS\r | |
477 | EFIAPI\r | |
478 | IDEDiskInfoIdentify (\r | |
479 | IN EFI_DISK_INFO_PROTOCOL *This,\r | |
480 | IN OUT VOID *IdentifyData,\r | |
481 | IN OUT UINT32 *IdentifyDataSize\r | |
482 | );\r | |
483 | \r | |
484 | /**\r | |
485 | This function is used by the IDE bus driver to get sense data.\r | |
486 | Data format of Sense data is defined by the Interface GUID.\r | |
487 | \r | |
488 | @param This Pointer to the EFI_DISK_INFO_PROTOCOL instance.\r | |
489 | @param SenseData Pointer to the SenseData.\r | |
490 | @param SenseDataSize Size of SenseData in bytes.\r | |
491 | @param SenseDataNumber Pointer to the value for the identify data size.\r | |
492 | \r | |
493 | @retval EFI_SUCCESS The command was accepted without any errors.\r | |
494 | @retval EFI_NOT_FOUND Device does not support this data class\r | |
495 | @retval EFI_DEVICE_ERROR Error reading InquiryData from device\r | |
496 | @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough\r | |
497 | \r | |
498 | **/\r | |
499 | EFI_STATUS\r | |
500 | EFIAPI\r | |
501 | IDEDiskInfoSenseData (\r | |
502 | IN EFI_DISK_INFO_PROTOCOL *This,\r | |
503 | IN OUT VOID *SenseData,\r | |
504 | IN OUT UINT32 *SenseDataSize,\r | |
505 | OUT UINT8 *SenseDataNumber\r | |
506 | );\r | |
507 | \r | |
508 | /**\r | |
509 | This function is used by the IDE bus driver to get controller information.\r | |
510 | \r | |
511 | @param This Pointer to the EFI_DISK_INFO_PROTOCOL instance.\r | |
512 | @param IdeChannel Pointer to the Ide Channel number. Primary or secondary.\r | |
513 | @param IdeDevice Pointer to the Ide Device number. Master or slave.\r | |
514 | \r | |
515 | @retval EFI_SUCCESS IdeChannel and IdeDevice are valid\r | |
516 | @retval EFI_UNSUPPORTED This is not an IDE device\r | |
517 | \r | |
518 | **/\r | |
519 | EFI_STATUS\r | |
520 | EFIAPI\r | |
521 | IDEDiskInfoWhichIde (\r | |
522 | IN EFI_DISK_INFO_PROTOCOL *This,\r | |
523 | OUT UINT32 *IdeChannel,\r | |
524 | OUT UINT32 *IdeDevice\r | |
525 | );\r | |
526 | /**\r | |
527 | The is an event(generally the event is exitBootService event) call back function.\r | |
528 | Clear pending IDE interrupt before OS loader/kernel take control of the IDE device.\r | |
529 | \r | |
530 | @param Event Pointer to this event\r | |
531 | @param Context Event handler private data\r | |
532 | \r | |
533 | **/\r | |
534 | VOID\r | |
535 | EFIAPI\r | |
536 | ClearInterrupt (\r | |
537 | IN EFI_EVENT Event,\r | |
538 | IN VOID *Context\r | |
539 | );\r | |
540 | #endif\r |