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