xref: /illumos-gate/usr/src/boot/efi/include/Protocol/IdeControllerInit.h (revision 08855964b9970604433f7b19dcd71cf5af5e5f14)
1 /** @file
2   This file declares EFI IDE Controller Init Protocol
3 
4   The EFI_IDE_CONTROLLER_INIT_PROTOCOL provides the chipset-specific information
5   to the driver entity. This protocol is mandatory for IDE controllers if the
6   IDE devices behind the controller are to be enumerated by a driver entity.
7 
8   There can only be one instance of EFI_IDE_CONTROLLER_INIT_PROTOCOL for each IDE
9   controller in a system. It is installed on the handle that corresponds to the
10   IDE controller. A driver entity that wishes to manage an IDE bus and possibly
11   IDE devices in a system will have to retrieve the EFI_IDE_CONTROLLER_INIT_PROTOCOL
12   instance that is associated with the controller to be managed.
13 
14   A device handle for an IDE controller must contain an EFI_DEVICE_PATH_PROTOCOL.
15 
16 Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
17 SPDX-License-Identifier: BSD-2-Clause-Patent
18 
19   @par Revision Reference:
20   This Protocol is defined in UEFI Platform Initialization Specification 1.2
21   Volume 5: Standards.
22 
23 **/
24 
25 #ifndef _EFI_IDE_CONTROLLER_INIT_PROTOCOL_H_
26 #define _EFI_IDE_CONTROLLER_INIT_PROTOCOL_H_
27 
28 #include <IndustryStandard/Atapi.h>
29 
30 ///
31 /// Global ID for the EFI_IDE_CONTROLLER_INIT_PROTOCOL.
32 ///
33 #define EFI_IDE_CONTROLLER_INIT_PROTOCOL_GUID \
34   { \
35     0xa1e37052, 0x80d9, 0x4e65, {0xa3, 0x17, 0x3e, 0x9a, 0x55, 0xc4, 0x3e, 0xc9 } \
36   }
37 
38 ///
39 /// Forward declaration for EFI_IDE_CONTROLLER_INIT_PROTOCOL.
40 ///
41 typedef struct _EFI_IDE_CONTROLLER_INIT_PROTOCOL EFI_IDE_CONTROLLER_INIT_PROTOCOL;
42 
43 ///
44 /// The phase of the IDE Controller enumeration.
45 ///
46 typedef enum {
47   ///
48   /// The driver entity is about to begin enumerating the devices
49   /// behind the specified channel. This notification can be used to
50   /// perform any chipset-specific programming.
51   ///
52   EfiIdeBeforeChannelEnumeration,
53   ///
54   /// The driver entity has completed enumerating the devices
55   /// behind the specified channel. This notification can be used to
56   /// perform any chipset-specific programming.
57   ///
58   EfiIdeAfterChannelEnumeration,
59   ///
60   /// The driver entity is about to reset the devices behind the
61   /// specified channel. This notification can be used to perform any
62   /// chipset-specific programming.
63   ///
64   EfiIdeBeforeChannelReset,
65   ///
66   /// The driver entity has completed resetting the devices behind
67   /// the specified channel. This notification can be used to perform
68   /// any chipset-specific programming.
69   ///
70   EfiIdeAfterChannelReset,
71   ///
72   /// The driver entity is about to detect the presence of devices
73   /// behind the specified channel. This notification can be used to
74   /// set up the bus signals to default levels or for implementing
75   /// predelays.
76   ///
77   EfiIdeBusBeforeDevicePresenceDetection,
78   ///
79   /// The driver entity is done with detecting the presence of
80   /// devices behind the specified channel. This notification can be
81   /// used to perform any chipset-specific programming.
82   ///
83   EfiIdeBusAfterDevicePresenceDetection,
84   ///
85   /// The IDE bus is requesting the IDE controller driver to
86   /// reprogram the IDE controller hardware and thereby reset all
87   /// the mode and timing settings to default settings.
88   ///
89   EfiIdeResetMode,
90   EfiIdeBusPhaseMaximum
91 } EFI_IDE_CONTROLLER_ENUM_PHASE;
92 
93 ///
94 /// This extended mode describes the SATA physical protocol.
95 /// SATA physical layers can operate at different speeds.
96 /// These speeds are defined below. Various PATA protocols
97 /// and associated modes are not applicable to SATA devices.
98 ///
99 typedef enum {
100   EfiAtaSataTransferProtocol
101 } EFI_ATA_EXT_TRANSFER_PROTOCOL;
102 
103 ///
104 /// Automatically detects the optimum SATA speed.
105 ///
106 #define  EFI_SATA_AUTO_SPEED  0
107 
108 ///
109 /// Indicates a first-generation (Gen1) SATA speed.
110 ///
111 #define  EFI_SATA_GEN1_SPEED  1
112 
113 ///
114 /// Indicates a second-generation (Gen2) SATA speed.
115 ///
116 #define  EFI_SATA_GEN2_SPEED  2
117 
118 ///
119 /// EFI_ATA_MODE structure.
120 ///
121 typedef struct {
122   BOOLEAN    Valid;     ///< TRUE if Mode is valid.
123   UINT32     Mode;      ///< The actual ATA mode. This field is not a bit map.
124 } EFI_ATA_MODE;
125 
126 ///
127 /// EFI_ATA_EXTENDED_MODE structure
128 ///
129 typedef struct {
130   ///
131   /// An enumeration defining various transfer protocols other than the protocols
132   /// that exist at the time this specification was developed (i.e., PIO, single
133   /// word DMA, multiword DMA, and UDMA). Each transfer protocol is associated
134   /// with a mode. The various transfer protocols are defined by the ATA/ATAPI
135   /// specification. This enumeration makes the interface extensible because we
136   /// can support new transport protocols beyond UDMA. Type EFI_ATA_EXT_TRANSFER_PROTOCOL
137   /// is defined below.
138   ///
139   EFI_ATA_EXT_TRANSFER_PROTOCOL    TransferProtocol;
140   ///
141   /// The mode for operating the transfer protocol that is identified by TransferProtocol.
142   ///
143   UINT32                           Mode;
144 } EFI_ATA_EXTENDED_MODE;
145 
146 ///
147 /// EFI_ATA_COLLECTIVE_MODE structure.
148 ///
149 typedef struct {
150   ///
151   /// This field specifies the PIO mode. PIO modes are defined in the ATA/ATAPI
152   /// specification. The ATA/ATAPI specification defines the enumeration.  In
153   /// other words, a value of 1 in this field means PIO mode 1. The actual meaning
154   /// of PIO mode 1 is governed by the ATA/ATAPI specification. Type EFI_ATA_MODE
155   /// is defined below.
156   ///
157   EFI_ATA_MODE    PioMode;
158   ///
159   /// This field specifies the single word DMA mode. Single word DMA modes are defined
160   /// in the ATA/ATAPI specification, versions 1 and 2. Single word DMA support was
161   /// obsoleted in the ATA/ATAPI specification, version 3. Therefore, most devices and
162   /// controllers will not support this transfer mode. The ATA/ATAPI specification defines
163   /// the enumeration. In other words, a value of 1 in this field means single word DMA
164   /// mode 1. The actual meaning of single word DMA mode 1 is governed by the ATA/
165   /// ATAPI specification.
166   ///
167   EFI_ATA_MODE             SingleWordDmaMode;
168   ///
169   /// This field specifies the multiword DMA mode. Various multiword DMA modes are
170   /// defined in the ATA/ATAPI specification. A value of 1 in this field means multiword
171   /// DMA mode 1. The actual meaning of multiword DMA mode 1 is governed by the
172   /// ATA/ATAPI specification.
173   ///
174   EFI_ATA_MODE             MultiWordDmaMode;
175   ///
176   /// This field specifies the ultra DMA (UDMA) mode. UDMA modes are defined in the
177   /// ATA/ATAPI specification. A value of 1 in this field means UDMA mode 1. The
178   /// actual meaning of UDMA mode 1 is governed by the ATA/ATAPI specification.
179   ///
180   EFI_ATA_MODE             UdmaMode;
181   ///
182   /// The number of extended-mode bitmap entries. Extended modes describe transfer
183   /// protocols beyond PIO, single word DMA, multiword DMA, and UDMA. This field
184   /// can be zero and provides extensibility.
185   ///
186   UINT32                   ExtModeCount;
187   ///
188   /// ExtModeCount number of entries. Each entry represents a transfer protocol other
189   /// than the ones defined above (i.e., PIO, single word DMA, multiword DMA, and
190   /// UDMA). This field is defined for extensibility. At this time, only one extended
191   /// transfer protocol is defined to cover SATA transfers. Type
192   /// EFI_ATA_EXTENDED_MODE is defined below.
193   ///
194   EFI_ATA_EXTENDED_MODE    ExtMode[1];
195 } EFI_ATA_COLLECTIVE_MODE;
196 
197 ///
198 /// EFI_ATA_IDENTIFY_DATA & EFI_ATAPI_IDENTIFY_DATA structure
199 ///
200 /// The definition of these two structures is not part of the protocol
201 /// definition because the ATA/ATAPI Specification controls the definition
202 /// of all the fields. The ATA/ATAPI Specification can obsolete old fields
203 /// or redefine existing fields.
204 typedef ATA_IDENTIFY_DATA   EFI_ATA_IDENTIFY_DATA;
205 typedef ATAPI_IDENTIFY_DATA EFI_ATAPI_IDENTIFY_DATA;
206 
207 ///
208 /// This flag indicates whether the IDENTIFY data is a response from an ATA device
209 /// (EFI_ATA_IDENTIFY_DATA) or response from an ATAPI device
210 /// (EFI_ATAPI_IDENTIFY_DATA).  According to the ATA/ATAPI specification,
211 /// EFI_IDENTIFY_DATA is for an ATA device if bit 15 of the Config field is zero.
212 /// The Config field is common to both EFI_ATA_IDENTIFY_DATA and
213 /// EFI_ATAPI_IDENTIFY_DATA.
214 ///
215 #define   EFI_ATAPI_DEVICE_IDENTIFY_DATA  0x8000
216 
217 ///
218 /// EFI_IDENTIFY_DATA structure.
219 ///
220 typedef union {
221   ///
222   /// The data that is returned by an ATA device upon successful completion
223   /// of the ATA IDENTIFY_DEVICE command.
224   ///
225   EFI_ATA_IDENTIFY_DATA      AtaData;
226   ///
227   /// The data that is returned by an ATAPI device upon successful completion
228   /// of the ATA IDENTIFY_PACKET_DEVICE command.
229   ///
230   EFI_ATAPI_IDENTIFY_DATA    AtapiData;
231 } EFI_IDENTIFY_DATA;
232 
233 /**
234   Returns the information about the specified IDE channel.
235 
236   This function can be used to obtain information about a particular IDE channel.
237   The driver entity uses this information during the enumeration process.
238 
239   If Enabled is set to FALSE, the driver entity will not scan the channel. Note
240   that it will not prevent an operating system driver from scanning the channel.
241 
242   For most of today's controllers, MaxDevices will either be 1 or 2. For SATA
243   controllers, this value will always be 1. SATA configurations can contain SATA
244   port multipliers. SATA port multipliers behave like SATA bridges and can support
245   up to 16 devices on the other side. If a SATA port out of the IDE controller
246   is connected to a port multiplier, MaxDevices will be set to the number of SATA
247   devices that the port multiplier supports. Because today's port multipliers
248   support up to fifteen SATA devices, this number can be as large as fifteen. The IDE
249   bus driver is required to scan for the presence of port multipliers behind an SATA
250   controller and enumerate up to MaxDevices number of devices behind the port
251   multiplier.
252 
253   In this context, the devices behind a port multiplier constitute a channel.
254 
255   @param[in]  This         The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
256   @param[in]  Channel      Zero-based channel number.
257   @param[out] Enabled      TRUE if this channel is enabled.  Disabled channels
258                            are not scanned to see if any devices are present.
259   @param[out] MaxDevices   The maximum number of IDE devices that the bus driver
260                            can expect on this channel.  For the ATA/ATAPI
261                            specification, version 6, this number will either be
262                            one or two. For Serial ATA (SATA) configurations with a
263                            port multiplier, this number can be as large as fifteen.
264 
265   @retval EFI_SUCCESS             Information was returned without any errors.
266   @retval EFI_INVALID_PARAMETER   Channel is invalid (Channel >= ChannelCount).
267 
268 **/
269 typedef
270 EFI_STATUS
271 (EFIAPI *EFI_IDE_CONTROLLER_GET_CHANNEL_INFO)(
272   IN  EFI_IDE_CONTROLLER_INIT_PROTOCOL  *This,
273   IN  UINT8                             Channel,
274   OUT BOOLEAN                           *Enabled,
275   OUT UINT8                             *MaxDevices
276   );
277 
278 /**
279   The notifications from the driver entity that it is about to enter a certain
280   phase of the IDE channel enumeration process.
281 
282   This function can be used to notify the IDE controller driver to perform
283   specific actions, including any chipset-specific initialization, so that the
284   chipset is ready to enter the next phase. Seven notification points are defined
285   at this time.
286 
287   More synchronization points may be added as required in the future.
288 
289   @param[in] This      The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
290   @param[in] Phase     The phase during enumeration.
291   @param[in] Channel   Zero-based channel number.
292 
293   @retval EFI_SUCCESS             The notification was accepted without any errors.
294   @retval EFI_UNSUPPORTED         Phase is not supported.
295   @retval EFI_INVALID_PARAMETER   Channel is invalid (Channel >= ChannelCount).
296   @retval EFI_NOT_READY           This phase cannot be entered at this time; for
297                                   example, an attempt was made to enter a Phase
298                                   without having entered one or more previous
299                                   Phase.
300 
301 **/
302 typedef
303 EFI_STATUS
304 (EFIAPI *EFI_IDE_CONTROLLER_NOTIFY_PHASE)(
305   IN EFI_IDE_CONTROLLER_INIT_PROTOCOL  *This,
306   IN EFI_IDE_CONTROLLER_ENUM_PHASE     Phase,
307   IN UINT8                             Channel
308   );
309 
310 /**
311   Submits the device information to the IDE controller driver.
312 
313   This function is used by the driver entity to pass detailed information about
314   a particular device to the IDE controller driver. The driver entity obtains
315   this information by issuing an ATA or ATAPI IDENTIFY_DEVICE command. IdentifyData
316   is the pointer to the response data buffer. The IdentifyData buffer is owned
317   by the driver entity, and the IDE controller driver must make a local copy
318   of the entire buffer or parts of the buffer as needed. The original IdentifyData
319   buffer pointer may not be valid when
320 
321     - EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() or
322     - EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() is called at a later point.
323 
324   The IDE controller driver may consult various fields of EFI_IDENTIFY_DATA to
325   compute the optimum mode for the device. These fields are not limited to the
326   timing information. For example, an implementation of the IDE controller driver
327   may examine the vendor and type/mode field to match known bad drives.
328 
329   The driver entity may submit drive information in any order, as long as it
330   submits information for all the devices belonging to the enumeration group
331   before EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() is called for any device
332   in that enumeration group. If a device is absent, EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData()
333   should be called with IdentifyData set to NULL.  The IDE controller driver may
334   not have any other mechanism to know whether a device is present or not. Therefore,
335   setting IdentifyData to NULL does not constitute an error condition.
336   EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() can be called only once for a
337   given (Channel, Device) pair.
338 
339   @param[in] This           A pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
340   @param[in] Channel        Zero-based channel number.
341   @param[in] Device         Zero-based device number on the Channel.
342   @param[in] IdentifyData   The device's response to the ATA IDENTIFY_DEVICE command.
343 
344   @retval EFI_SUCCESS             The information was accepted without any errors.
345   @retval EFI_INVALID_PARAMETER   Channel is invalid (Channel >= ChannelCount).
346   @retval EFI_INVALID_PARAMETER   Device is invalid.
347 
348 **/
349 typedef
350 EFI_STATUS
351 (EFIAPI *EFI_IDE_CONTROLLER_SUBMIT_DATA)(
352   IN EFI_IDE_CONTROLLER_INIT_PROTOCOL  *This,
353   IN UINT8                             Channel,
354   IN UINT8                             Device,
355   IN EFI_IDENTIFY_DATA                 *IdentifyData
356   );
357 
358 /**
359   Disqualifies specific modes for an IDE device.
360 
361   This function allows the driver entity or other drivers (such as platform
362   drivers) to reject certain timing modes and request the IDE controller driver
363   to recalculate modes. This function allows the driver entity and the IDE
364   controller driver to negotiate the timings on a per-device basis. This function
365   is useful in the case of drives that lie about their capabilities. An example
366   is when the IDE device fails to accept the timing modes that are calculated
367   by the IDE controller driver based on the response to the Identify Drive command.
368 
369   If the driver entity does not want to limit the ATA timing modes and leave that
370   decision to the IDE controller driver, it can either not call this function for
371   the given device or call this function and set the Valid flag to FALSE for all
372   modes that are listed in EFI_ATA_COLLECTIVE_MODE.
373 
374   The driver entity may disqualify modes for a device in any order and any number
375   of times.
376 
377   This function can be called multiple times to invalidate multiple modes of the
378   same type (e.g., Programmed Input/Output [PIO] modes 3 and 4). See the ATA/ATAPI
379   specification for more information on PIO modes.
380 
381   For Serial ATA (SATA) controllers, this member function can be used to disqualify
382   a higher transfer rate mode on a given channel. For example, a platform driver
383   may inform the IDE controller driver to not use second-generation (Gen2) speeds
384   for a certain SATA drive.
385 
386   @param[in] This       The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
387   @param[in] Channel    The zero-based channel number.
388   @param[in] Device     The zero-based device number on the Channel.
389   @param[in] BadModes   The modes that the device does not support and that
390                         should be disqualified.
391 
392   @retval EFI_SUCCESS             The modes were accepted without any errors.
393   @retval EFI_INVALID_PARAMETER   Channel is invalid (Channel >= ChannelCount).
394   @retval EFI_INVALID_PARAMETER   Device is invalid.
395   @retval EFI_INVALID_PARAMETER   IdentifyData is NULL.
396 
397 **/
398 typedef
399 EFI_STATUS
400 (EFIAPI *EFI_IDE_CONTROLLER_DISQUALIFY_MODE)(
401   IN EFI_IDE_CONTROLLER_INIT_PROTOCOL  *This,
402   IN UINT8                             Channel,
403   IN UINT8                             Device,
404   IN EFI_ATA_COLLECTIVE_MODE           *BadModes
405   );
406 
407 /**
408   Returns the information about the optimum modes for the specified IDE device.
409 
410   This function is used by the driver entity to obtain the optimum ATA modes for
411   a specific device.  The IDE controller driver takes into account the following
412   while calculating the mode:
413     - The IdentifyData inputs to EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData()
414     - The BadModes inputs to EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode()
415 
416   The driver entity is required to call EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData()
417   for all the devices that belong to an enumeration group before calling
418   EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() for any device in the same group.
419 
420   The IDE controller driver will use controller- and possibly platform-specific
421   algorithms to arrive at SupportedModes.  The IDE controller may base its
422   decision on user preferences and other considerations as well. This function
423   may be called multiple times because the driver entity may renegotiate the mode
424   with the IDE controller driver using EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode().
425 
426   The driver entity may collect timing information for various devices in any
427   order. The driver entity is responsible for making sure that all the dependencies
428   are satisfied. For example, the SupportedModes information for device A that
429   was previously returned may become stale after a call to
430   EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() for device B.
431 
432   The buffer SupportedModes is allocated by the callee because the caller does
433   not necessarily know the size of the buffer. The type EFI_ATA_COLLECTIVE_MODE
434   is defined in a way that allows for future extensibility and can be of variable
435   length. This memory pool should be deallocated by the caller when it is no
436   longer necessary.
437 
438   The IDE controller driver for a Serial ATA (SATA) controller can use this
439   member function to force a lower speed (first-generation [Gen1] speeds on a
440   second-generation [Gen2]-capable hardware).  The IDE controller driver can
441   also allow the driver entity to stay with the speed that has been negotiated
442   by the physical layer.
443 
444   @param[in]  This             The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
445   @param[in]  Channel          A zero-based channel number.
446   @param[in]  Device           A zero-based device number on the Channel.
447   @param[out] SupportedModes   The optimum modes for the device.
448 
449   @retval EFI_SUCCESS             SupportedModes was returned.
450   @retval EFI_INVALID_PARAMETER   Channel is invalid (Channel >= ChannelCount).
451   @retval EFI_INVALID_PARAMETER   Device is invalid.
452   @retval EFI_INVALID_PARAMETER   SupportedModes is NULL.
453   @retval EFI_NOT_READY           Modes cannot be calculated due to a lack of
454                                   data.  This error may happen if
455                                   EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData()
456                                   and EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyData()
457                                   were not called for at least one drive in the
458                                   same enumeration group.
459 
460 **/
461 typedef
462 EFI_STATUS
463 (EFIAPI *EFI_IDE_CONTROLLER_CALCULATE_MODE)(
464   IN  EFI_IDE_CONTROLLER_INIT_PROTOCOL  *This,
465   IN  UINT8                             Channel,
466   IN  UINT8                             Device,
467   OUT EFI_ATA_COLLECTIVE_MODE           **SupportedModes
468   );
469 
470 /**
471   Commands the IDE controller driver to program the IDE controller hardware
472   so that the specified device can operate at the specified mode.
473 
474   This function is used by the driver entity to instruct the IDE controller
475   driver to program the IDE controller hardware to the specified modes. This
476   function can be called only once for a particular device. For a Serial ATA
477   (SATA) Advanced Host Controller Interface (AHCI) controller, no controller-
478   specific programming may be required.
479 
480   @param[in] This      Pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.
481   @param[in] Channel   Zero-based channel number.
482   @param[in] Device    Zero-based device number on the Channel.
483   @param[in] Modes     The modes to set.
484 
485   @retval EFI_SUCCESS             The command was accepted without any errors.
486   @retval EFI_INVALID_PARAMETER   Channel is invalid (Channel >= ChannelCount).
487   @retval EFI_INVALID_PARAMETER   Device is invalid.
488   @retval EFI_NOT_READY           Modes cannot be set at this time due to lack of data.
489   @retval EFI_DEVICE_ERROR        Modes cannot be set due to hardware failure.
490                                   The driver entity should not use this device.
491 
492 **/
493 typedef
494 EFI_STATUS
495 (EFIAPI *EFI_IDE_CONTROLLER_SET_TIMING)(
496   IN EFI_IDE_CONTROLLER_INIT_PROTOCOL  *This,
497   IN UINT8                             Channel,
498   IN UINT8                             Device,
499   IN EFI_ATA_COLLECTIVE_MODE           *Modes
500   );
501 
502 ///
503 /// Provides the basic interfaces to abstract an IDE controller.
504 ///
505 struct _EFI_IDE_CONTROLLER_INIT_PROTOCOL {
506   ///
507   /// Returns the information about a specific channel.
508   ///
509   EFI_IDE_CONTROLLER_GET_CHANNEL_INFO    GetChannelInfo;
510 
511   ///
512   /// The notification that the driver entity is about to enter the
513   /// specified phase during the enumeration process.
514   ///
515   EFI_IDE_CONTROLLER_NOTIFY_PHASE        NotifyPhase;
516 
517   ///
518   /// Submits the Drive Identify data that was returned by the device.
519   ///
520   EFI_IDE_CONTROLLER_SUBMIT_DATA         SubmitData;
521 
522   ///
523   /// Submits information about modes that should be disqualified.  The specified
524   /// IDE device does not support these modes and these modes should not be
525   /// returned by EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode()
526   ///
527   EFI_IDE_CONTROLLER_DISQUALIFY_MODE     DisqualifyMode;
528 
529   ///
530   /// Calculates and returns the optimum mode for a particular IDE device.
531   ///
532   EFI_IDE_CONTROLLER_CALCULATE_MODE      CalculateMode;
533 
534   ///
535   /// Programs the IDE controller hardware to the default timing or per the modes
536   /// that were returned by the last call to EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode().
537   ///
538   EFI_IDE_CONTROLLER_SET_TIMING          SetTiming;
539 
540   ///
541   /// Set to TRUE if the enumeration group includes all the channels that are
542   /// produced by this controller. Set to FALSE if an enumeration group consists of
543   /// only one channel.
544   ///
545   BOOLEAN                                EnumAll;
546 
547   ///
548   /// The number of channels that are produced by this controller. Parallel ATA
549   /// (PATA) controllers can support up to two channels. Advanced Host Controller
550   /// Interface (AHCI) Serial ATA (SATA) controllers can support up to 32 channels,
551   /// each of which can have up to one device. In the presence of a multiplier,
552   /// each channel can have fifteen devices.
553   ///
554   UINT8    ChannelCount;
555 };
556 
557 extern EFI_GUID  gEfiIdeControllerInitProtocolGuid;
558 
559 #endif
560