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