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