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