]>
Commit | Line | Data |
---|---|---|
12e92a23 RJ |
1 | /** @file\r |
2 | Header file for Sata Controller driver.\r | |
3 | \r | |
4 | Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef _SATA_CONTROLLER_H_\r | |
16 | #define _SATA_CONTROLLER_H_\r | |
17 | \r | |
18 | #include <Uefi.h>\r | |
19 | #include <Protocol/ComponentName.h>\r | |
20 | #include <Protocol/DriverBinding.h>\r | |
21 | #include <Protocol/PciIo.h>\r | |
22 | #include <Protocol/IdeControllerInit.h>\r | |
23 | #include <Library/UefiDriverEntryPoint.h>\r | |
24 | #include <Library/DebugLib.h>\r | |
25 | #include <Library/UefiLib.h>\r | |
26 | #include <Library/BaseLib.h>\r | |
27 | #include <Library/BaseMemoryLib.h>\r | |
28 | #include <Library/MemoryAllocationLib.h>\r | |
29 | #include <Library/UefiBootServicesTableLib.h>\r | |
30 | #include <IndustryStandard/Pci.h>\r | |
31 | \r | |
32 | //\r | |
33 | // Global Variables definitions\r | |
34 | //\r | |
35 | extern EFI_DRIVER_BINDING_PROTOCOL gSataControllerDriverBinding;\r | |
36 | extern EFI_COMPONENT_NAME_PROTOCOL gSataControllerComponentName;\r | |
37 | extern EFI_COMPONENT_NAME2_PROTOCOL gSataControllerComponentName2;\r | |
38 | \r | |
39 | #define AHCI_BAR_INDEX 0x05\r | |
40 | #define R_AHCI_CAP 0x0\r | |
41 | #define B_AHCI_CAP_NPS (BIT4 | BIT3 | BIT2 | BIT1 | BIT0) // Number of Ports\r | |
42 | #define B_AHCI_CAP_SPM BIT17 // Supports Port Multiplier\r | |
43 | \r | |
44 | ///\r | |
45 | /// AHCI each channel can have up to 1 device\r | |
46 | ///\r | |
47 | #define AHCI_MAX_DEVICES 0x01\r | |
48 | \r | |
49 | ///\r | |
50 | /// AHCI each channel can have 15 devices in the presence of a multiplier\r | |
51 | ///\r | |
52 | #define AHCI_MULTI_MAX_DEVICES 0x0F\r | |
53 | \r | |
54 | ///\r | |
55 | /// IDE supports 2 channel max\r | |
56 | ///\r | |
57 | #define IDE_MAX_CHANNEL 0x02\r | |
58 | \r | |
59 | ///\r | |
60 | /// IDE supports 2 devices max\r | |
61 | ///\r | |
62 | #define IDE_MAX_DEVICES 0x02\r | |
63 | \r | |
64 | #define SATA_ENUMER_ALL FALSE\r | |
65 | \r | |
66 | //\r | |
67 | // Sata Controller driver private data structure\r | |
68 | //\r | |
69 | \r | |
70 | #define SATA_CONTROLLER_SIGNATURE SIGNATURE_32('S','A','T','A')\r | |
71 | \r | |
72 | typedef struct _EFI_SATA_CONTROLLER_PRIVATE_DATA {\r | |
73 | //\r | |
74 | // Standard signature used to identify Sata Controller private data\r | |
75 | //\r | |
76 | UINT32 Signature;\r | |
77 | \r | |
78 | //\r | |
79 | // Protocol instance of IDE_CONTROLLER_INIT produced by this driver\r | |
80 | //\r | |
81 | EFI_IDE_CONTROLLER_INIT_PROTOCOL IdeInit;\r | |
82 | \r | |
83 | //\r | |
84 | // Copy of protocol pointers used by this driver\r | |
85 | //\r | |
86 | EFI_PCI_IO_PROTOCOL *PciIo;\r | |
87 | \r | |
bcab7141 LE |
88 | //\r |
89 | // Original PCI attributes\r | |
90 | //\r | |
91 | UINT64 OriginalPciAttributes;\r | |
92 | \r | |
12e92a23 RJ |
93 | //\r |
94 | // The number of devices that are supported by this channel\r | |
95 | //\r | |
96 | UINT8 DeviceCount;\r | |
97 | \r | |
98 | //\r | |
99 | // The highest disqulified mode for each attached device,\r | |
100 | // From ATA/ATAPI spec, if a mode is not supported,\r | |
101 | // the modes higher than it is also not supported\r | |
102 | //\r | |
103 | EFI_ATA_COLLECTIVE_MODE *DisqualifiedModes;\r | |
104 | \r | |
105 | //\r | |
106 | // A copy of EFI_IDENTIFY_DATA data for each attached SATA device and its flag\r | |
107 | //\r | |
108 | EFI_IDENTIFY_DATA *IdentifyData;\r | |
109 | BOOLEAN *IdentifyValid;\r | |
110 | } EFI_SATA_CONTROLLER_PRIVATE_DATA;\r | |
111 | \r | |
112 | #define SATA_CONTROLLER_PRIVATE_DATA_FROM_THIS(a) CR(a, EFI_SATA_CONTROLLER_PRIVATE_DATA, IdeInit, SATA_CONTROLLER_SIGNATURE)\r | |
113 | \r | |
114 | //\r | |
115 | // Driver binding functions declaration\r | |
116 | //\r | |
117 | /**\r | |
118 | Supported function of Driver Binding protocol for this driver.\r | |
119 | Test to see if this driver supports ControllerHandle.\r | |
120 | \r | |
121 | @param This Protocol instance pointer.\r | |
122 | @param Controller Handle of device to test.\r | |
123 | @param RemainingDevicePath A pointer to the device path. Should be ignored by\r | |
124 | device driver.\r | |
125 | \r | |
126 | @retval EFI_SUCCESS This driver supports this device.\r | |
127 | @retval EFI_ALREADY_STARTED This driver is already running on this device.\r | |
128 | @retval other This driver does not support this device.\r | |
129 | \r | |
130 | **/\r | |
131 | EFI_STATUS\r | |
132 | EFIAPI\r | |
133 | SataControllerSupported (\r | |
134 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
135 | IN EFI_HANDLE Controller,\r | |
136 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
137 | )\r | |
138 | ;\r | |
139 | \r | |
140 | /**\r | |
141 | This routine is called right after the .Supported() called and \r | |
142 | Start this driver on ControllerHandle.\r | |
143 | \r | |
144 | @param This Protocol instance pointer.\r | |
145 | @param Controller Handle of device to bind driver to.\r | |
146 | @param RemainingDevicePath A pointer to the device path. Should be ignored by\r | |
147 | device driver.\r | |
148 | \r | |
149 | @retval EFI_SUCCESS This driver is added to this device.\r | |
150 | @retval EFI_ALREADY_STARTED This driver is already running on this device.\r | |
151 | @retval other Some error occurs when binding this driver to this device.\r | |
152 | \r | |
153 | **/\r | |
154 | EFI_STATUS\r | |
155 | EFIAPI\r | |
156 | SataControllerStart (\r | |
157 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
158 | IN EFI_HANDLE Controller,\r | |
159 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
160 | )\r | |
161 | ;\r | |
162 | \r | |
163 | /**\r | |
164 | Stop this driver on ControllerHandle.\r | |
165 | \r | |
166 | @param This Protocol instance pointer.\r | |
167 | @param Controller Handle of device to stop driver on.\r | |
168 | @param NumberOfChildren Not used.\r | |
169 | @param ChildHandleBuffer Not used.\r | |
170 | \r | |
171 | @retval EFI_SUCCESS This driver is removed from this device.\r | |
172 | @retval other Some error occurs when removing this driver from this device.\r | |
173 | \r | |
174 | **/\r | |
175 | EFI_STATUS\r | |
176 | EFIAPI\r | |
177 | SataControllerStop (\r | |
178 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
179 | IN EFI_HANDLE Controller,\r | |
180 | IN UINTN NumberOfChildren,\r | |
181 | IN EFI_HANDLE *ChildHandleBuffer\r | |
182 | )\r | |
183 | ;\r | |
184 | \r | |
185 | //\r | |
186 | // IDE controller init functions declaration\r | |
187 | //\r | |
188 | /**\r | |
189 | Returns the information about the specified IDE channel.\r | |
190 | \r | |
191 | This function can be used to obtain information about a particular IDE channel.\r | |
192 | The driver entity uses this information during the enumeration process. \r | |
193 | \r | |
194 | If Enabled is set to FALSE, the driver entity will not scan the channel. Note \r | |
195 | that it will not prevent an operating system driver from scanning the channel.\r | |
196 | \r | |
197 | For most of today's controllers, MaxDevices will either be 1 or 2. For SATA \r | |
198 | controllers, this value will always be 1. SATA configurations can contain SATA \r | |
199 | port multipliers. SATA port multipliers behave like SATA bridges and can support\r | |
200 | up to 16 devices on the other side. If a SATA port out of the IDE controller \r | |
201 | is connected to a port multiplier, MaxDevices will be set to the number of SATA \r | |
202 | devices that the port multiplier supports. Because today's port multipliers \r | |
203 | support up to fifteen SATA devices, this number can be as large as fifteen. The IDE \r | |
204 | bus driver is required to scan for the presence of port multipliers behind an SATA \r | |
205 | controller and enumerate up to MaxDevices number of devices behind the port \r | |
206 | multiplier. \r | |
207 | \r | |
208 | In this context, the devices behind a port multiplier constitute a channel. \r | |
209 | \r | |
210 | @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r | |
211 | @param[in] Channel Zero-based channel number.\r | |
212 | @param[out] Enabled TRUE if this channel is enabled. Disabled channels \r | |
213 | are not scanned to see if any devices are present.\r | |
214 | @param[out] MaxDevices The maximum number of IDE devices that the bus driver\r | |
215 | can expect on this channel. For the ATA/ATAPI \r | |
216 | specification, version 6, this number will either be \r | |
217 | one or two. For Serial ATA (SATA) configurations with a \r | |
218 | port multiplier, this number can be as large as fifteen.\r | |
219 | \r | |
220 | @retval EFI_SUCCESS Information was returned without any errors.\r | |
221 | @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).\r | |
222 | \r | |
223 | **/\r | |
224 | EFI_STATUS\r | |
225 | EFIAPI\r | |
226 | IdeInitGetChannelInfo (\r | |
227 | IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This,\r | |
228 | IN UINT8 Channel,\r | |
229 | OUT BOOLEAN *Enabled,\r | |
230 | OUT UINT8 *MaxDevices\r | |
231 | )\r | |
232 | ;\r | |
233 | \r | |
234 | /**\r | |
235 | The notifications from the driver entity that it is about to enter a certain\r | |
236 | phase of the IDE channel enumeration process.\r | |
237 | \r | |
238 | This function can be used to notify the IDE controller driver to perform \r | |
239 | specific actions, including any chipset-specific initialization, so that the \r | |
240 | chipset is ready to enter the next phase. Seven notification points are defined \r | |
241 | at this time. \r | |
242 | \r | |
243 | More synchronization points may be added as required in the future. \r | |
244 | \r | |
245 | @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r | |
246 | @param[in] Phase The phase during enumeration.\r | |
247 | @param[in] Channel Zero-based channel number.\r | |
248 | \r | |
249 | @retval EFI_SUCCESS The notification was accepted without any errors.\r | |
250 | @retval EFI_UNSUPPORTED Phase is not supported.\r | |
251 | @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).\r | |
252 | @retval EFI_NOT_READY This phase cannot be entered at this time; for \r | |
253 | example, an attempt was made to enter a Phase \r | |
254 | without having entered one or more previous \r | |
255 | Phase.\r | |
256 | \r | |
257 | **/\r | |
258 | EFI_STATUS\r | |
259 | EFIAPI\r | |
260 | IdeInitNotifyPhase (\r | |
261 | IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This,\r | |
262 | IN EFI_IDE_CONTROLLER_ENUM_PHASE Phase,\r | |
263 | IN UINT8 Channel\r | |
264 | )\r | |
265 | ;\r | |
266 | \r | |
267 | /**\r | |
268 | Submits the device information to the IDE controller driver.\r | |
269 | \r | |
270 | This function is used by the driver entity to pass detailed information about \r | |
271 | a particular device to the IDE controller driver. The driver entity obtains \r | |
272 | this information by issuing an ATA or ATAPI IDENTIFY_DEVICE command. IdentifyData\r | |
273 | is the pointer to the response data buffer. The IdentifyData buffer is owned \r | |
274 | by the driver entity, and the IDE controller driver must make a local copy \r | |
275 | of the entire buffer or parts of the buffer as needed. The original IdentifyData \r | |
276 | buffer pointer may not be valid when\r | |
277 | \r | |
278 | - EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() or\r | |
279 | - EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() is called at a later point.\r | |
280 | \r | |
281 | The IDE controller driver may consult various fields of EFI_IDENTIFY_DATA to \r | |
282 | compute the optimum mode for the device. These fields are not limited to the \r | |
283 | timing information. For example, an implementation of the IDE controller driver \r | |
284 | may examine the vendor and type/mode field to match known bad drives. \r | |
285 | \r | |
286 | The driver entity may submit drive information in any order, as long as it \r | |
287 | submits information for all the devices belonging to the enumeration group \r | |
288 | before EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() is called for any device\r | |
289 | in that enumeration group. If a device is absent, EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData()\r | |
290 | should be called with IdentifyData set to NULL. The IDE controller driver may \r | |
291 | not have any other mechanism to know whether a device is present or not. Therefore, \r | |
292 | setting IdentifyData to NULL does not constitute an error condition. \r | |
293 | EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() can be called only once for a \r | |
294 | given (Channel, Device) pair. \r | |
295 | \r | |
296 | @param[in] This A pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r | |
297 | @param[in] Channel Zero-based channel number.\r | |
298 | @param[in] Device Zero-based device number on the Channel.\r | |
299 | @param[in] IdentifyData The device's response to the ATA IDENTIFY_DEVICE command.\r | |
300 | \r | |
301 | @retval EFI_SUCCESS The information was accepted without any errors.\r | |
302 | @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).\r | |
303 | @retval EFI_INVALID_PARAMETER Device is invalid.\r | |
304 | \r | |
305 | **/\r | |
306 | EFI_STATUS\r | |
307 | EFIAPI\r | |
308 | IdeInitSubmitData (\r | |
309 | IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This,\r | |
310 | IN UINT8 Channel,\r | |
311 | IN UINT8 Device,\r | |
312 | IN EFI_IDENTIFY_DATA *IdentifyData\r | |
313 | )\r | |
314 | ;\r | |
315 | \r | |
316 | /**\r | |
317 | Disqualifies specific modes for an IDE device.\r | |
318 | \r | |
319 | This function allows the driver entity or other drivers (such as platform \r | |
320 | drivers) to reject certain timing modes and request the IDE controller driver\r | |
321 | to recalculate modes. This function allows the driver entity and the IDE \r | |
322 | controller driver to negotiate the timings on a per-device basis. This function \r | |
323 | is useful in the case of drives that lie about their capabilities. An example \r | |
324 | is when the IDE device fails to accept the timing modes that are calculated \r | |
325 | by the IDE controller driver based on the response to the Identify Drive command.\r | |
326 | \r | |
327 | If the driver entity does not want to limit the ATA timing modes and leave that \r | |
328 | decision to the IDE controller driver, it can either not call this function for \r | |
329 | the given device or call this function and set the Valid flag to FALSE for all \r | |
330 | modes that are listed in EFI_ATA_COLLECTIVE_MODE.\r | |
331 | \r | |
332 | The driver entity may disqualify modes for a device in any order and any number \r | |
333 | of times.\r | |
334 | \r | |
335 | This function can be called multiple times to invalidate multiple modes of the \r | |
336 | same type (e.g., Programmed Input/Output [PIO] modes 3 and 4). See the ATA/ATAPI \r | |
337 | specification for more information on PIO modes. \r | |
338 | \r | |
339 | For Serial ATA (SATA) controllers, this member function can be used to disqualify\r | |
340 | a higher transfer rate mode on a given channel. For example, a platform driver\r | |
341 | may inform the IDE controller driver to not use second-generation (Gen2) speeds \r | |
342 | for a certain SATA drive.\r | |
343 | \r | |
344 | @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r | |
345 | @param[in] Channel The zero-based channel number.\r | |
346 | @param[in] Device The zero-based device number on the Channel.\r | |
347 | @param[in] BadModes The modes that the device does not support and that\r | |
348 | should be disqualified.\r | |
349 | \r | |
350 | @retval EFI_SUCCESS The modes were accepted without any errors.\r | |
351 | @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).\r | |
352 | @retval EFI_INVALID_PARAMETER Device is invalid.\r | |
353 | @retval EFI_INVALID_PARAMETER IdentifyData is NULL.\r | |
354 | \r | |
355 | **/\r | |
356 | EFI_STATUS\r | |
357 | EFIAPI\r | |
358 | IdeInitDisqualifyMode (\r | |
359 | IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This,\r | |
360 | IN UINT8 Channel,\r | |
361 | IN UINT8 Device,\r | |
362 | IN EFI_ATA_COLLECTIVE_MODE *BadModes\r | |
363 | )\r | |
364 | ;\r | |
365 | \r | |
366 | /**\r | |
367 | Returns the information about the optimum modes for the specified IDE device.\r | |
368 | \r | |
369 | This function is used by the driver entity to obtain the optimum ATA modes for\r | |
370 | a specific device. The IDE controller driver takes into account the following \r | |
371 | while calculating the mode:\r | |
372 | - The IdentifyData inputs to EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData()\r | |
373 | - The BadModes inputs to EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode()\r | |
374 | \r | |
375 | The driver entity is required to call EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() \r | |
376 | for all the devices that belong to an enumeration group before calling \r | |
377 | EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() for any device in the same group. \r | |
378 | \r | |
379 | The IDE controller driver will use controller- and possibly platform-specific \r | |
380 | algorithms to arrive at SupportedModes. The IDE controller may base its \r | |
381 | decision on user preferences and other considerations as well. This function \r | |
382 | may be called multiple times because the driver entity may renegotiate the mode \r | |
383 | with the IDE controller driver using EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode().\r | |
384 | \r | |
385 | The driver entity may collect timing information for various devices in any \r | |
386 | order. The driver entity is responsible for making sure that all the dependencies\r | |
387 | are satisfied. For example, the SupportedModes information for device A that \r | |
388 | was previously returned may become stale after a call to \r | |
389 | EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() for device B.\r | |
390 | \r | |
391 | The buffer SupportedModes is allocated by the callee because the caller does \r | |
392 | not necessarily know the size of the buffer. The type EFI_ATA_COLLECTIVE_MODE \r | |
393 | is defined in a way that allows for future extensibility and can be of variable \r | |
394 | length. This memory pool should be deallocated by the caller when it is no \r | |
395 | longer necessary. \r | |
396 | \r | |
397 | The IDE controller driver for a Serial ATA (SATA) controller can use this \r | |
398 | member function to force a lower speed (first-generation [Gen1] speeds on a \r | |
399 | second-generation [Gen2]-capable hardware). The IDE controller driver can \r | |
400 | also allow the driver entity to stay with the speed that has been negotiated \r | |
401 | by the physical layer.\r | |
402 | \r | |
403 | @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r | |
404 | @param[in] Channel A zero-based channel number.\r | |
405 | @param[in] Device A zero-based device number on the Channel.\r | |
406 | @param[out] SupportedModes The optimum modes for the device.\r | |
407 | \r | |
408 | @retval EFI_SUCCESS SupportedModes was returned.\r | |
409 | @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).\r | |
410 | @retval EFI_INVALID_PARAMETER Device is invalid. \r | |
411 | @retval EFI_INVALID_PARAMETER SupportedModes is NULL.\r | |
412 | @retval EFI_NOT_READY Modes cannot be calculated due to a lack of \r | |
413 | data. This error may happen if \r | |
414 | EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() \r | |
415 | and EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyData() \r | |
416 | were not called for at least one drive in the \r | |
417 | same enumeration group.\r | |
418 | \r | |
419 | **/\r | |
420 | EFI_STATUS\r | |
421 | EFIAPI\r | |
422 | IdeInitCalculateMode (\r | |
423 | IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This,\r | |
424 | IN UINT8 Channel,\r | |
425 | IN UINT8 Device,\r | |
426 | OUT EFI_ATA_COLLECTIVE_MODE **SupportedModes\r | |
427 | )\r | |
428 | ;\r | |
429 | \r | |
430 | /**\r | |
431 | Commands the IDE controller driver to program the IDE controller hardware\r | |
432 | so that the specified device can operate at the specified mode.\r | |
433 | \r | |
434 | This function is used by the driver entity to instruct the IDE controller \r | |
435 | driver to program the IDE controller hardware to the specified modes. This \r | |
436 | function can be called only once for a particular device. For a Serial ATA \r | |
437 | (SATA) Advanced Host Controller Interface (AHCI) controller, no controller-\r | |
438 | specific programming may be required.\r | |
439 | \r | |
440 | @param[in] This Pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r | |
441 | @param[in] Channel Zero-based channel number.\r | |
442 | @param[in] Device Zero-based device number on the Channel.\r | |
443 | @param[in] Modes The modes to set.\r | |
444 | \r | |
445 | @retval EFI_SUCCESS The command was accepted without any errors.\r | |
446 | @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).\r | |
447 | @retval EFI_INVALID_PARAMETER Device is invalid.\r | |
448 | @retval EFI_NOT_READY Modes cannot be set at this time due to lack of data.\r | |
449 | @retval EFI_DEVICE_ERROR Modes cannot be set due to hardware failure.\r | |
450 | The driver entity should not use this device.\r | |
451 | \r | |
452 | **/\r | |
453 | EFI_STATUS\r | |
454 | EFIAPI\r | |
455 | IdeInitSetTiming (\r | |
456 | IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This,\r | |
457 | IN UINT8 Channel,\r | |
458 | IN UINT8 Device,\r | |
459 | IN EFI_ATA_COLLECTIVE_MODE *Modes\r | |
460 | )\r | |
461 | ;\r | |
462 | \r | |
463 | //\r | |
464 | // Forward reference declaration\r | |
465 | //\r | |
466 | /**\r | |
467 | Retrieves a Unicode string that is the user readable name of the UEFI Driver.\r | |
468 | \r | |
469 | @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
470 | @param Language A pointer to a three character ISO 639-2 language identifier.\r | |
471 | This is the language of the driver name that that the caller\r | |
472 | is requesting, and it must match one of the languages specified\r | |
473 | in SupportedLanguages. The number of languages supported by a\r | |
474 | driver is up to the driver writer.\r | |
475 | @param DriverName A pointer to the Unicode string to return. This Unicode string\r | |
476 | is the name of the driver specified by This in the language\r | |
477 | specified by Language.\r | |
478 | \r | |
479 | @retval EFI_SUCCESS The Unicode string for the Driver specified by This\r | |
480 | and the language specified by Language was returned\r | |
481 | in DriverName.\r | |
482 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
483 | @retval EFI_INVALID_PARAMETER DriverName is NULL.\r | |
484 | @retval EFI_UNSUPPORTED The driver specified by This does not support the\r | |
485 | language specified by Language.\r | |
486 | **/\r | |
487 | EFI_STATUS\r | |
488 | EFIAPI\r | |
489 | SataControllerComponentNameGetDriverName (\r | |
490 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
491 | IN CHAR8 *Language,\r | |
492 | OUT CHAR16 **DriverName\r | |
493 | )\r | |
494 | ;\r | |
495 | \r | |
496 | /**\r | |
497 | Retrieves a Unicode string that is the user readable name of the controller\r | |
498 | that is being managed by an UEFI Driver.\r | |
499 | \r | |
500 | @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
501 | @param ControllerHandle The handle of a controller that the driver specified by\r | |
502 | This is managing. This handle specifies the controller\r | |
503 | whose name is to be returned.\r | |
504 | @param OPTIONAL ChildHandle The handle of the child controller to retrieve the name\r | |
505 | of. This is an optional parameter that may be NULL. It\r | |
506 | will be NULL for device drivers. It will also be NULL\r | |
507 | for a bus drivers that wish to retrieve the name of the\r | |
508 | bus controller. It will not be NULL for a bus driver\r | |
509 | that wishes to retrieve the name of a child controller.\r | |
510 | @param Language A pointer to a three character ISO 639-2 language\r | |
511 | identifier. This is the language of the controller name\r | |
512 | that that the caller is requesting, and it must match one\r | |
513 | of the languages specified in SupportedLanguages. The\r | |
514 | number of languages supported by a driver is up to the\r | |
515 | driver writer.\r | |
516 | @param ControllerName A pointer to the Unicode string to return. This Unicode\r | |
517 | string is the name of the controller specified by\r | |
518 | ControllerHandle and ChildHandle in the language\r | |
519 | specified by Language from the point of view of the\r | |
520 | driver specified by This.\r | |
521 | \r | |
522 | @retval EFI_SUCCESS The Unicode string for the user readable name in the\r | |
523 | language specified by Language for the driver\r | |
524 | specified by This was returned in DriverName.\r | |
525 | @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r | |
526 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r | |
527 | EFI_HANDLE.\r | |
528 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
529 | @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r | |
530 | @retval EFI_UNSUPPORTED The driver specified by This is not currently\r | |
531 | managing the controller specified by\r | |
532 | ControllerHandle and ChildHandle.\r | |
533 | @retval EFI_UNSUPPORTED The driver specified by This does not support the\r | |
534 | language specified by Language.\r | |
535 | **/\r | |
536 | EFI_STATUS\r | |
537 | EFIAPI\r | |
538 | SataControllerComponentNameGetControllerName (\r | |
539 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
540 | IN EFI_HANDLE ControllerHandle,\r | |
541 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
542 | IN CHAR8 *Language,\r | |
543 | OUT CHAR16 **ControllerName\r | |
544 | )\r | |
545 | ;\r | |
546 | \r | |
547 | #endif\r |