]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.h
34f5f40d274fecb9746a7f319f1aa5da13686550
[mirror_edk2.git] / MdeModulePkg / Bus / Ata / AtaBusDxe / AtaBus.h
1 /** @file
2 Master header file for ATA Bus Driver.
3
4 This file defines common data structures, macro definitions and some module
5 internal function header files.
6
7 Copyright (c) 2009 - 2010 Intel Corporation. <BR>
8 All rights reserved. This program and the accompanying materials
9 are licensed and made available under the terms and conditions of the BSD License
10 which accompanies this distribution. The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php
12
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15
16 **/
17
18 #ifndef _ATA_BUS_H_
19 #define _ATA_BUS_H_
20
21 #include <PiDxe.h>
22
23 #include <Protocol/AtaPassThru.h>
24 #include <Protocol/BlockIo.h>
25 #include <Protocol/DiskInfo.h>
26 #include <Protocol/DevicePath.h>
27
28 #include <Library/DebugLib.h>
29 #include <Library/UefiDriverEntryPoint.h>
30 #include <Library/BaseLib.h>
31 #include <Library/UefiLib.h>
32 #include <Library/BaseMemoryLib.h>
33 #include <Library/MemoryAllocationLib.h>
34 #include <Library/UefiBootServicesTableLib.h>
35 #include <Library/DevicePathLib.h>
36
37 #include <IndustryStandard/Atapi.h>
38
39 //
40 // Time out value for ATA pass through protocol
41 //
42 #define ATA_TIMEOUT EFI_TIMER_PERIOD_SECONDS (1)
43
44 //
45 // Maximum number of times to retry ATA command
46 //
47 #define MAX_RETRY_TIMES 3
48
49 //
50 // The maximum total sectors count in 28 bit addressing mode
51 //
52 #define MAX_28BIT_ADDRESSING_CAPACITY 0xfffffff
53
54 //
55 // The maximum ATA transaction sector count in 28 bit addressing mode.
56 //
57 #define MAX_28BIT_TRANSFER_BLOCK_NUM 0x100
58
59 //
60 // The maximum ATA transaction sector count in 48 bit addressing mode.
61 //
62 #define MAX_48BIT_TRANSFER_BLOCK_NUM 0x10000
63
64 //
65 // The maximum model name in ATA identify data
66 //
67 #define MAX_MODEL_NAME_LEN 40
68
69
70 //
71 // ATA bus data structure for ATA controller
72 //
73 typedef struct {
74 EFI_ATA_PASS_THRU_PROTOCOL *AtaPassThru;
75 EFI_HANDLE Controller;
76 EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
77 EFI_HANDLE DriverBindingHandle;
78 } ATA_BUS_DRIVER_DATA;
79
80 #define ATA_DEVICE_SIGNATURE SIGNATURE_32 ('A', 'B', 'I', 'D')
81
82 //
83 // ATA device data structure for each child device
84 //
85 typedef struct {
86 UINT32 Signature;
87
88 EFI_HANDLE Handle;
89 EFI_BLOCK_IO_PROTOCOL BlockIo;
90 EFI_BLOCK_IO_MEDIA BlockMedia;
91 EFI_DISK_INFO_PROTOCOL DiskInfo;
92 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
93
94 ATA_BUS_DRIVER_DATA *AtaBusDriverData;
95 UINT16 Port;
96 UINT16 PortMultiplierPort;
97
98 //
99 // Buffer for the execution of ATA pass through protocol
100 //
101 EFI_ATA_PASS_THRU_COMMAND_PACKET Packet;
102 EFI_ATA_COMMAND_BLOCK Acb;
103 EFI_ATA_STATUS_BLOCK *Asb;
104
105 BOOLEAN UdmaValid;
106 BOOLEAN Lba48Bit;
107
108 //
109 // Cached data for ATA identify data
110 //
111 ATA_IDENTIFY_DATA *IdentifyData;
112
113 EFI_UNICODE_STRING_TABLE *ControllerNameTable;
114 CHAR16 ModelName[MAX_MODEL_NAME_LEN + 1];
115
116 } ATA_DEVICE;
117
118 #define ATA_DEVICE_FROM_BLOCK_IO(a) CR (a, ATA_DEVICE, BlockIo, ATA_DEVICE_SIGNATURE)
119 #define ATA_DEVICE_FROM_DISK_INFO(a) CR (a, ATA_DEVICE, DiskInfo, ATA_DEVICE_SIGNATURE)
120
121 //
122 // Global Variables
123 //
124 extern EFI_DRIVER_BINDING_PROTOCOL gAtaBusDriverBinding;
125 extern EFI_COMPONENT_NAME_PROTOCOL gAtaBusComponentName;
126 extern EFI_COMPONENT_NAME2_PROTOCOL gAtaBusComponentName2;
127
128
129 /**
130 Wrapper for EFI_ATA_PASS_THRU_PROTOCOL.ResetDevice().
131
132 This function wraps the ResetDevice() invocation for ATA pass through function
133 for an ATA device.
134
135 @param AtaDevice The ATA child device involved for the operation.
136
137 @return The return status from EFI_ATA_PASS_THRU_PROTOCOL.PassThru().
138
139 **/
140 EFI_STATUS
141 ResetAtaDevice (
142 IN ATA_DEVICE *AtaDevice
143 );
144
145
146 /**
147 Discovers whether it is a valid ATA device.
148
149 This function issues ATA_CMD_IDENTIFY_DRIVE command to the ATA device to identify it.
150 If the command is executed successfully, it then identifies it and initializes
151 the Media information in Block IO protocol interface.
152
153 @param AtaDevice The ATA child device involved for the operation.
154
155 @retval EFI_SUCCESS The device is successfully identified and Media information
156 is correctly initialized.
157 @return others Some error occurs when discovering the ATA device.
158
159 **/
160 EFI_STATUS
161 DiscoverAtaDevice (
162 IN OUT ATA_DEVICE *AtaDevice
163 );
164
165
166 /**
167 Read or write a number of blocks from ATA device.
168
169 This function performs ATA pass through transactions to read/write data from/to
170 ATA device. It may separate the read/write request into several ATA pass through
171 transactions.
172
173 @param AtaDevice The ATA child device involved for the operation.
174 @param Buffer The pointer to the current transaction buffer.
175 @param StartLba The starting logical block address to be accessed.
176 @param NumberOfBlocks The block number or sector count of the transfer.
177 @param IsWrite Indicates whether it is a write operation.
178
179 @retval EFI_SUCCESS The data transfer is complete successfully.
180 @return others Some error occurs when transferring data.
181
182 **/
183 EFI_STATUS
184 AccessAtaDevice(
185 IN OUT ATA_DEVICE *AtaDevice,
186 IN OUT UINT8 *Buffer,
187 IN EFI_LBA StartLba,
188 IN UINTN NumberOfBlocks,
189 IN BOOLEAN IsWrite
190 );
191
192 //
193 // Protocol interface prototypes
194 //
195 /**
196 Tests to see if this driver supports a given controller. If a child device is provided,
197 it further tests to see if this driver supports creating a handle for the specified child device.
198
199 This function checks to see if the driver specified by This supports the device specified by
200 ControllerHandle. Drivers will typically use the device path attached to
201 ControllerHandle and/or the services from the bus I/O abstraction attached to
202 ControllerHandle to determine if the driver supports ControllerHandle. This function
203 may be called many times during platform initialization. In order to reduce boot times, the tests
204 performed by this function must be very small, and take as little time as possible to execute. This
205 function must not change the state of any hardware devices, and this function must be aware that the
206 device specified by ControllerHandle may already be managed by the same driver or a
207 different driver. This function must match its calls to AllocatePages() with FreePages(),
208 AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().
209 Since ControllerHandle may have been previously started by the same driver, if a protocol is
210 already in the opened state, then it must not be closed with CloseProtocol(). This is required
211 to guarantee the state of ControllerHandle is not modified by this function.
212
213 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
214 @param[in] ControllerHandle The handle of the controller to test. This handle
215 must support a protocol interface that supplies
216 an I/O abstraction to the driver.
217 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
218 parameter is ignored by device drivers, and is optional for bus
219 drivers. For bus drivers, if this parameter is not NULL, then
220 the bus driver must determine if the bus controller specified
221 by ControllerHandle and the child controller specified
222 by RemainingDevicePath are both supported by this
223 bus driver.
224
225 @retval EFI_SUCCESS The device specified by ControllerHandle and
226 RemainingDevicePath is supported by the driver specified by This.
227 @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and
228 RemainingDevicePath is already being managed by the driver
229 specified by This.
230 @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and
231 RemainingDevicePath is already being managed by a different
232 driver or an application that requires exclusive access.
233 Currently not implemented.
234 @retval EFI_UNSUPPORTED The device specified by ControllerHandle and
235 RemainingDevicePath is not supported by the driver specified by This.
236 **/
237 EFI_STATUS
238 EFIAPI
239 AtaBusDriverBindingSupported (
240 IN EFI_DRIVER_BINDING_PROTOCOL *This,
241 IN EFI_HANDLE Controller,
242 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
243 );
244
245 /**
246 Starts a device controller or a bus controller.
247
248 The Start() function is designed to be invoked from the EFI boot service ConnectController().
249 As a result, much of the error checking on the parameters to Start() has been moved into this
250 common boot service. It is legal to call Start() from other locations,
251 but the following calling restrictions must be followed or the system behavior will not be deterministic.
252 1. ControllerHandle must be a valid EFI_HANDLE.
253 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
254 EFI_DEVICE_PATH_PROTOCOL.
255 3. Prior to calling Start(), the Supported() function for the driver specified by This must
256 have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
257
258 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
259 @param[in] ControllerHandle The handle of the controller to start. This handle
260 must support a protocol interface that supplies
261 an I/O abstraction to the driver.
262 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
263 parameter is ignored by device drivers, and is optional for bus
264 drivers. For a bus driver, if this parameter is NULL, then handles
265 for all the children of Controller are created by this driver.
266 If this parameter is not NULL and the first Device Path Node is
267 not the End of Device Path Node, then only the handle for the
268 child device specified by the first Device Path Node of
269 RemainingDevicePath is created by this driver.
270 If the first Device Path Node of RemainingDevicePath is
271 the End of Device Path Node, no child handle is created by this
272 driver.
273
274 @retval EFI_SUCCESS The device was started.
275 @retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.
276 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
277 @retval Others The driver failded to start the device.
278
279 **/
280 EFI_STATUS
281 EFIAPI
282 AtaBusDriverBindingStart (
283 IN EFI_DRIVER_BINDING_PROTOCOL *This,
284 IN EFI_HANDLE Controller,
285 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
286 );
287
288 /**
289 Stops a device controller or a bus controller.
290
291 The Stop() function is designed to be invoked from the EFI boot service DisconnectController().
292 As a result, much of the error checking on the parameters to Stop() has been moved
293 into this common boot service. It is legal to call Stop() from other locations,
294 but the following calling restrictions must be followed or the system behavior will not be deterministic.
295 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
296 same driver's Start() function.
297 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid
298 EFI_HANDLE. In addition, all of these handles must have been created in this driver's
299 Start() function, and the Start() function must have called OpenProtocol() on
300 ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
301
302 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
303 @param[in] ControllerHandle A handle to the device being stopped. The handle must
304 support a bus specific I/O protocol for the driver
305 to use to stop the device.
306 @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
307 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
308 if NumberOfChildren is 0.
309
310 @retval EFI_SUCCESS The device was stopped.
311 @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.
312
313 **/
314 EFI_STATUS
315 EFIAPI
316 AtaBusDriverBindingStop (
317 IN EFI_DRIVER_BINDING_PROTOCOL *This,
318 IN EFI_HANDLE Controller,
319 IN UINTN NumberOfChildren,
320 IN EFI_HANDLE *ChildHandleBuffer
321 );
322
323
324 /**
325 Retrieves a Unicode string that is the user readable name of the driver.
326
327 This function retrieves the user readable name of a driver in the form of a
328 Unicode string. If the driver specified by This has a user readable name in
329 the language specified by Language, then a pointer to the driver name is
330 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
331 by This does not support the language specified by Language,
332 then EFI_UNSUPPORTED is returned.
333
334 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
335 EFI_COMPONENT_NAME_PROTOCOL instance.
336
337 @param Language[in] A pointer to a Null-terminated ASCII string
338 array indicating the language. This is the
339 language of the driver name that the caller is
340 requesting, and it must match one of the
341 languages specified in SupportedLanguages. The
342 number of languages supported by a driver is up
343 to the driver writer. Language is specified
344 in RFC 4646 or ISO 639-2 language code format.
345
346 @param DriverName[out] A pointer to the Unicode string to return.
347 This Unicode string is the name of the
348 driver specified by This in the language
349 specified by Language.
350
351 @retval EFI_SUCCESS The Unicode string for the Driver specified by
352 This and the language specified by Language was
353 returned in DriverName.
354
355 @retval EFI_INVALID_PARAMETER Language is NULL.
356
357 @retval EFI_INVALID_PARAMETER DriverName is NULL.
358
359 @retval EFI_UNSUPPORTED The driver specified by This does not support
360 the language specified by Language.
361
362 **/
363 EFI_STATUS
364 EFIAPI
365 AtaBusComponentNameGetDriverName (
366 IN EFI_COMPONENT_NAME_PROTOCOL *This,
367 IN CHAR8 *Language,
368 OUT CHAR16 **DriverName
369 );
370
371
372 /**
373 Retrieves a Unicode string that is the user readable name of the controller
374 that is being managed by a driver.
375
376 This function retrieves the user readable name of the controller specified by
377 ControllerHandle and ChildHandle in the form of a Unicode string. If the
378 driver specified by This has a user readable name in the language specified by
379 Language, then a pointer to the controller name is returned in ControllerName,
380 and EFI_SUCCESS is returned. If the driver specified by This is not currently
381 managing the controller specified by ControllerHandle and ChildHandle,
382 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
383 support the language specified by Language, then EFI_UNSUPPORTED is returned.
384
385 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
386 EFI_COMPONENT_NAME_PROTOCOL instance.
387
388 @param ControllerHandle[in] The handle of a controller that the driver
389 specified by This is managing. This handle
390 specifies the controller whose name is to be
391 returned.
392
393 @param ChildHandle[in] The handle of the child controller to retrieve
394 the name of. This is an optional parameter that
395 may be NULL. It will be NULL for device
396 drivers. It will also be NULL for a bus drivers
397 that wish to retrieve the name of the bus
398 controller. It will not be NULL for a bus
399 driver that wishes to retrieve the name of a
400 child controller.
401
402 @param Language[in] A pointer to a Null-terminated ASCII string
403 array indicating the language. This is the
404 language of the driver name that the caller is
405 requesting, and it must match one of the
406 languages specified in SupportedLanguages. The
407 number of languages supported by a driver is up
408 to the driver writer. Language is specified in
409 RFC 4646 or ISO 639-2 language code format.
410
411 @param ControllerName[out] A pointer to the Unicode string to return.
412 This Unicode string is the name of the
413 controller specified by ControllerHandle and
414 ChildHandle in the language specified by
415 Language from the point of view of the driver
416 specified by This.
417
418 @retval EFI_SUCCESS The Unicode string for the user readable name in
419 the language specified by Language for the
420 driver specified by This was returned in
421 DriverName.
422
423 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
424
425 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
426 EFI_HANDLE.
427
428 @retval EFI_INVALID_PARAMETER Language is NULL.
429
430 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
431
432 @retval EFI_UNSUPPORTED The driver specified by This is not currently
433 managing the controller specified by
434 ControllerHandle and ChildHandle.
435
436 @retval EFI_UNSUPPORTED The driver specified by This does not support
437 the language specified by Language.
438
439 **/
440 EFI_STATUS
441 EFIAPI
442 AtaBusComponentNameGetControllerName (
443 IN EFI_COMPONENT_NAME_PROTOCOL *This,
444 IN EFI_HANDLE ControllerHandle,
445 IN EFI_HANDLE ChildHandle OPTIONAL,
446 IN CHAR8 *Language,
447 OUT CHAR16 **ControllerName
448 );
449
450
451 /**
452 Reset the Block Device.
453
454 @param This Indicates a pointer to the calling context.
455 @param ExtendedVerification Driver may perform diagnostics on reset.
456
457 @retval EFI_SUCCESS The device was reset.
458 @retval EFI_DEVICE_ERROR The device is not functioning properly and could
459 not be reset.
460
461 **/
462 EFI_STATUS
463 EFIAPI
464 AtaBlockIoReset (
465 IN EFI_BLOCK_IO_PROTOCOL *This,
466 IN BOOLEAN ExtendedVerification
467 );
468
469
470 /**
471 Read BufferSize bytes from Lba into Buffer.
472
473 @param This Indicates a pointer to the calling context.
474 @param MediaId Id of the media, changes every time the media is replaced.
475 @param Lba The starting Logical Block Address to read from
476 @param BufferSize Size of Buffer, must be a multiple of device block size.
477 @param Buffer A pointer to the destination buffer for the data. The caller is
478 responsible for either having implicit or explicit ownership of the buffer.
479
480 @retval EFI_SUCCESS The data was read correctly from the device.
481 @retval EFI_DEVICE_ERROR The device reported an error while performing the read.
482 @retval EFI_NO_MEDIA There is no media in the device.
483 @retval EFI_MEDIA_CHANGED The MediaId does not matched the current device.
484 @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.
485 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid,
486 or the buffer is not on proper alignment.
487
488 **/
489 EFI_STATUS
490 EFIAPI
491 AtaBlockIoReadBlocks (
492 IN EFI_BLOCK_IO_PROTOCOL *This,
493 IN UINT32 MediaId,
494 IN EFI_LBA Lba,
495 IN UINTN BufferSize,
496 OUT VOID *Buffer
497 );
498
499
500 /**
501 Write BufferSize bytes from Lba into Buffer.
502
503 @param This Indicates a pointer to the calling context.
504 @param MediaId The media ID that the write request is for.
505 @param Lba The starting logical block address to be written. The caller is
506 responsible for writing to only legitimate locations.
507 @param BufferSize Size of Buffer, must be a multiple of device block size.
508 @param Buffer A pointer to the source buffer for the data.
509
510 @retval EFI_SUCCESS The data was written correctly to the device.
511 @retval EFI_WRITE_PROTECTED The device can not be written to.
512 @retval EFI_DEVICE_ERROR The device reported an error while performing the write.
513 @retval EFI_NO_MEDIA There is no media in the device.
514 @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.
515 @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.
516 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,
517 or the buffer is not on proper alignment.
518
519 **/
520 EFI_STATUS
521 EFIAPI
522 AtaBlockIoWriteBlocks (
523 IN EFI_BLOCK_IO_PROTOCOL *This,
524 IN UINT32 MediaId,
525 IN EFI_LBA Lba,
526 IN UINTN BufferSize,
527 IN VOID *Buffer
528 );
529
530
531 /**
532 Flush the Block Device.
533
534 @param This Indicates a pointer to the calling context.
535
536 @retval EFI_SUCCESS All outstanding data was written to the device
537 @retval EFI_DEVICE_ERROR The device reported an error while writing back the data
538 @retval EFI_NO_MEDIA There is no media in the device.
539
540 **/
541 EFI_STATUS
542 EFIAPI
543 AtaBlockIoFlushBlocks (
544 IN EFI_BLOCK_IO_PROTOCOL *This
545 );
546
547
548 /**
549 Provides inquiry information for the controller type.
550
551 This function is used by the IDE bus driver to get inquiry data. Data format
552 of Identify data is defined by the Interface GUID.
553
554 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
555 @param[in, out] InquiryData Pointer to a buffer for the inquiry data.
556 @param[in, out] InquiryDataSize Pointer to the value for the inquiry data size.
557
558 @retval EFI_SUCCESS The command was accepted without any errors.
559 @retval EFI_NOT_FOUND Device does not support this data class
560 @retval EFI_DEVICE_ERROR Error reading InquiryData from device
561 @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough
562
563 **/
564 EFI_STATUS
565 EFIAPI
566 AtaDiskInfoInquiry (
567 IN EFI_DISK_INFO_PROTOCOL *This,
568 IN OUT VOID *InquiryData,
569 IN OUT UINT32 *InquiryDataSize
570 );
571
572
573 /**
574 Provides identify information for the controller type.
575
576 This function is used by the IDE bus driver to get identify data. Data format
577 of Identify data is defined by the Interface GUID.
578
579 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL
580 instance.
581 @param[in, out] IdentifyData Pointer to a buffer for the identify data.
582 @param[in, out] IdentifyDataSize Pointer to the value for the identify data
583 size.
584
585 @retval EFI_SUCCESS The command was accepted without any errors.
586 @retval EFI_NOT_FOUND Device does not support this data class
587 @retval EFI_DEVICE_ERROR Error reading IdentifyData from device
588 @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough
589
590 **/
591 EFI_STATUS
592 EFIAPI
593 AtaDiskInfoIdentify (
594 IN EFI_DISK_INFO_PROTOCOL *This,
595 IN OUT VOID *IdentifyData,
596 IN OUT UINT32 *IdentifyDataSize
597 );
598
599
600 /**
601 Provides sense data information for the controller type.
602
603 This function is used by the IDE bus driver to get sense data.
604 Data format of Sense data is defined by the Interface GUID.
605
606 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
607 @param[in, out] SenseData Pointer to the SenseData.
608 @param[in, out] SenseDataSize Size of SenseData in bytes.
609 @param[out] SenseDataNumber Pointer to the value for the sense data size.
610
611 @retval EFI_SUCCESS The command was accepted without any errors.
612 @retval EFI_NOT_FOUND Device does not support this data class.
613 @retval EFI_DEVICE_ERROR Error reading SenseData from device.
614 @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough.
615
616 **/
617 EFI_STATUS
618 EFIAPI
619 AtaDiskInfoSenseData (
620 IN EFI_DISK_INFO_PROTOCOL *This,
621 IN OUT VOID *SenseData,
622 IN OUT UINT32 *SenseDataSize,
623 OUT UINT8 *SenseDataNumber
624 );
625
626
627 /**
628 This function is used by the IDE bus driver to get controller information.
629
630 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
631 @param[out] IdeChannel Pointer to the Ide Channel number. Primary or secondary.
632 @param[out] IdeDevice Pointer to the Ide Device number. Master or slave.
633
634 @retval EFI_SUCCESS IdeChannel and IdeDevice are valid.
635 @retval EFI_UNSUPPORTED This is not an IDE device.
636
637 **/
638 EFI_STATUS
639 EFIAPI
640 AtaDiskInfoWhichIde (
641 IN EFI_DISK_INFO_PROTOCOL *This,
642 OUT UINT32 *IdeChannel,
643 OUT UINT32 *IdeDevice
644 );
645
646 #endif