]>
Commit | Line | Data |
---|---|---|
a1f11f75 | 1 | /** @file\r |
2 | Header file for IDE controller driver.\r | |
3 | \r | |
5a702acd | 4 | Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r |
e1d302e5 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
a1f11f75 | 6 | \r |
7 | **/\r | |
8 | \r | |
24115e44 ED |
9 | #ifndef _IDE_CONTROLLER_H_\r |
10 | #define _IDE_CONTROLLER_H_\r | |
a1f11f75 | 11 | \r |
12 | #include <Uefi.h>\r | |
13 | #include <Protocol/ComponentName.h>\r | |
14 | #include <Protocol/DriverBinding.h>\r | |
15 | #include <Protocol/PciIo.h>\r | |
16 | #include <Protocol/IdeControllerInit.h>\r | |
17 | #include <Library/UefiDriverEntryPoint.h>\r | |
18 | #include <Library/DebugLib.h>\r | |
19 | #include <Library/UefiLib.h>\r | |
20 | #include <Library/BaseLib.h>\r | |
21 | #include <Library/BaseMemoryLib.h>\r | |
22 | #include <Library/MemoryAllocationLib.h>\r | |
23 | #include <Library/UefiBootServicesTableLib.h>\r | |
24 | #include <IndustryStandard/Pci.h>\r | |
25 | \r | |
26 | //\r | |
27 | // Global Variables definitions\r | |
28 | //\r | |
29 | extern EFI_DRIVER_BINDING_PROTOCOL gIdeControllerDriverBinding;\r | |
30 | extern EFI_COMPONENT_NAME_PROTOCOL gIdeControllerComponentName;\r | |
31 | extern EFI_COMPONENT_NAME2_PROTOCOL gIdeControllerComponentName2;\r | |
32 | \r | |
3ea80ba2 | 33 | ///\r |
34 | /// Supports 2 channel max\r | |
35 | ///\r | |
a1f11f75 | 36 | #define ICH_IDE_MAX_CHANNEL 0x02\r |
3ea80ba2 | 37 | \r |
38 | ///\r | |
39 | /// Supports 2 devices max\r | |
40 | ///\r | |
a1f11f75 | 41 | #define ICH_IDE_MAX_DEVICES 0x02\r |
42 | #define ICH_IDE_ENUMER_ALL FALSE\r | |
43 | \r | |
44 | //\r | |
45 | // Driver binding functions declaration\r | |
46 | //\r | |
20c1e33f | 47 | /**\r |
48 | Register Driver Binding protocol for this driver.\r | |
49 | \r | |
50 | @param This A pointer points to the Binding Protocol instance\r | |
3ea80ba2 | 51 | @param Controller The handle of controller to be tested.\r |
20c1e33f | 52 | @param RemainingDevicePath A pointer to the device path. Ignored by device\r |
53 | driver but used by bus driver\r | |
3ea80ba2 | 54 | \r |
55 | @retval EFI_SUCCESS Driver loaded.\r | |
619ad10f | 56 | @retval !EFI_SUCCESS Driver not loaded.\r |
20c1e33f | 57 | **/\r |
a1f11f75 | 58 | EFI_STATUS\r |
59 | EFIAPI\r | |
60 | IdeControllerSupported (\r | |
61 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
62 | IN EFI_HANDLE Controller,\r | |
63 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
64 | )\r | |
a1f11f75 | 65 | ;\r |
66 | \r | |
20c1e33f | 67 | /**\r |
3ea80ba2 | 68 | This routine is called right after the .Supported() called and return\r |
20c1e33f | 69 | EFI_SUCCESS. Notes: The supported protocols are checked but the Protocols\r |
3ea80ba2 | 70 | are closed.\r |
20c1e33f | 71 | \r |
72 | @param This A pointer points to the Binding Protocol instance\r | |
73 | @param Controller The handle of controller to be tested. Parameter\r | |
74 | passed by the caller\r | |
75 | @param RemainingDevicePath A pointer to the device path. Should be ignored by\r | |
76 | device driver\r | |
3ea80ba2 | 77 | \r |
20c1e33f | 78 | @return EFI_STATUS Status of InstallMultipleProtocolInterfaces()\r |
79 | **/\r | |
a1f11f75 | 80 | EFI_STATUS\r |
81 | EFIAPI\r | |
82 | IdeControllerStart (\r | |
83 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
84 | IN EFI_HANDLE Controller,\r | |
85 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
86 | )\r | |
a1f11f75 | 87 | ;\r |
88 | \r | |
20c1e33f | 89 | /**\r |
3ea80ba2 | 90 | Stop this driver on Controller Handle.\r |
20c1e33f | 91 | \r |
92 | @param This Protocol instance pointer.\r | |
3ea80ba2 | 93 | @param Controller Handle of device to stop driver on\r |
20c1e33f | 94 | @param NumberOfChildren Not used\r |
95 | @param ChildHandleBuffer Not used\r | |
3ea80ba2 | 96 | \r |
619ad10f | 97 | @retval EFI_SUCCESS This driver is removed DeviceHandle\r |
3ea80ba2 | 98 | @retval !EFI_SUCCESS This driver was not removed from this device\r |
20c1e33f | 99 | **/\r |
a1f11f75 | 100 | EFI_STATUS\r |
101 | EFIAPI\r | |
102 | IdeControllerStop (\r | |
103 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
104 | IN EFI_HANDLE Controller,\r | |
105 | IN UINTN NumberOfChildren,\r | |
106 | IN EFI_HANDLE *ChildHandleBuffer\r | |
107 | )\r | |
a1f11f75 | 108 | ;\r |
109 | \r | |
110 | //\r | |
111 | // IDE controller init functions declaration\r | |
112 | //\r | |
20c1e33f | 113 | /**\r |
95717b94 | 114 | Returns the information about the specified IDE channel.\r |
5a702acd | 115 | \r |
95717b94 | 116 | This function can be used to obtain information about a particular IDE channel.\r |
5a702acd LG |
117 | The driver entity uses this information during the enumeration process.\r |
118 | \r | |
119 | If Enabled is set to FALSE, the driver entity will not scan the channel. Note\r | |
95717b94 | 120 | that it will not prevent an operating system driver from scanning the channel.\r |
5a702acd LG |
121 | \r |
122 | For most of today's controllers, MaxDevices will either be 1 or 2. For SATA\r | |
123 | controllers, this value will always be 1. SATA configurations can contain SATA\r | |
95717b94 | 124 | port multipliers. SATA port multipliers behave like SATA bridges and can support\r |
5a702acd LG |
125 | up to 16 devices on the other side. If a SATA port out of the IDE controller\r |
126 | is connected to a port multiplier, MaxDevices will be set to the number of SATA\r | |
127 | devices that the port multiplier supports. Because today's port multipliers\r | |
128 | support up to fifteen SATA devices, this number can be as large as fifteen. The IDE\r | |
129 | bus driver is required to scan for the presence of port multipliers behind an SATA\r | |
130 | controller and enumerate up to MaxDevices number of devices behind the port\r | |
131 | multiplier.\r | |
132 | \r | |
133 | In this context, the devices behind a port multiplier constitute a channel.\r | |
134 | \r | |
95717b94 | 135 | @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r |
136 | @param[in] Channel Zero-based channel number.\r | |
5a702acd | 137 | @param[out] Enabled TRUE if this channel is enabled. Disabled channels\r |
95717b94 | 138 | are not scanned to see if any devices are present.\r |
139 | @param[out] MaxDevices The maximum number of IDE devices that the bus driver\r | |
5a702acd LG |
140 | can expect on this channel. For the ATA/ATAPI\r |
141 | specification, version 6, this number will either be\r | |
142 | one or two. For Serial ATA (SATA) configurations with a\r | |
95717b94 | 143 | port multiplier, this number can be as large as fifteen.\r |
144 | \r | |
145 | @retval EFI_SUCCESS Information was returned without any errors.\r | |
146 | @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).\r | |
147 | \r | |
20c1e33f | 148 | **/\r |
a1f11f75 | 149 | EFI_STATUS\r |
150 | EFIAPI\r | |
151 | IdeInitGetChannelInfo (\r | |
152 | IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This,\r | |
153 | IN UINT8 Channel,\r | |
154 | OUT BOOLEAN *Enabled,\r | |
155 | OUT UINT8 *MaxDevices\r | |
156 | )\r | |
a1f11f75 | 157 | ;\r |
158 | \r | |
20c1e33f | 159 | /**\r |
95717b94 | 160 | The notifications from the driver entity that it is about to enter a certain\r |
161 | phase of the IDE channel enumeration process.\r | |
5a702acd LG |
162 | \r |
163 | This function can be used to notify the IDE controller driver to perform\r | |
164 | specific actions, including any chipset-specific initialization, so that the\r | |
165 | chipset is ready to enter the next phase. Seven notification points are defined\r | |
166 | at this time.\r | |
167 | \r | |
168 | More synchronization points may be added as required in the future.\r | |
95717b94 | 169 | \r |
170 | @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r | |
171 | @param[in] Phase The phase during enumeration.\r | |
172 | @param[in] Channel Zero-based channel number.\r | |
173 | \r | |
174 | @retval EFI_SUCCESS The notification was accepted without any errors.\r | |
175 | @retval EFI_UNSUPPORTED Phase is not supported.\r | |
176 | @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).\r | |
5a702acd LG |
177 | @retval EFI_NOT_READY This phase cannot be entered at this time; for\r |
178 | example, an attempt was made to enter a Phase\r | |
179 | without having entered one or more previous\r | |
95717b94 | 180 | Phase.\r |
3ea80ba2 | 181 | \r |
20c1e33f | 182 | **/\r |
a1f11f75 | 183 | EFI_STATUS\r |
184 | EFIAPI\r | |
185 | IdeInitNotifyPhase (\r | |
186 | IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This,\r | |
187 | IN EFI_IDE_CONTROLLER_ENUM_PHASE Phase,\r | |
24115e44 | 188 | IN UINT8 Channel\r |
a1f11f75 | 189 | )\r |
a1f11f75 | 190 | ;\r |
191 | \r | |
20c1e33f | 192 | /**\r |
95717b94 | 193 | Submits the device information to the IDE controller driver.\r |
194 | \r | |
5a702acd LG |
195 | This function is used by the driver entity to pass detailed information about\r |
196 | a particular device to the IDE controller driver. The driver entity obtains\r | |
95717b94 | 197 | this information by issuing an ATA or ATAPI IDENTIFY_DEVICE command. IdentifyData\r |
5a702acd LG |
198 | is the pointer to the response data buffer. The IdentifyData buffer is owned\r |
199 | by the driver entity, and the IDE controller driver must make a local copy\r | |
200 | of the entire buffer or parts of the buffer as needed. The original IdentifyData\r | |
95717b94 | 201 | buffer pointer may not be valid when\r |
5a702acd | 202 | \r |
95717b94 | 203 | - EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() or\r |
204 | - EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() is called at a later point.\r | |
5a702acd LG |
205 | \r |
206 | The IDE controller driver may consult various fields of EFI_IDENTIFY_DATA to\r | |
207 | compute the optimum mode for the device. These fields are not limited to the\r | |
208 | timing information. For example, an implementation of the IDE controller driver\r | |
209 | may examine the vendor and type/mode field to match known bad drives.\r | |
210 | \r | |
211 | The driver entity may submit drive information in any order, as long as it\r | |
212 | submits information for all the devices belonging to the enumeration group\r | |
95717b94 | 213 | before EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() is called for any device\r |
214 | in that enumeration group. If a device is absent, EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData()\r | |
5a702acd LG |
215 | should be called with IdentifyData set to NULL. The IDE controller driver may\r |
216 | not have any other mechanism to know whether a device is present or not. Therefore,\r | |
217 | setting IdentifyData to NULL does not constitute an error condition.\r | |
218 | EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() can be called only once for a\r | |
219 | given (Channel, Device) pair.\r | |
220 | \r | |
95717b94 | 221 | @param[in] This A pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r |
222 | @param[in] Channel Zero-based channel number.\r | |
223 | @param[in] Device Zero-based device number on the Channel.\r | |
224 | @param[in] IdentifyData The device's response to the ATA IDENTIFY_DEVICE command.\r | |
225 | \r | |
226 | @retval EFI_SUCCESS The information was accepted without any errors.\r | |
227 | @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).\r | |
228 | @retval EFI_INVALID_PARAMETER Device is invalid.\r | |
20c1e33f | 229 | \r |
20c1e33f | 230 | **/\r |
a1f11f75 | 231 | EFI_STATUS\r |
232 | EFIAPI\r | |
233 | IdeInitSubmitData (\r | |
234 | IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This,\r | |
235 | IN UINT8 Channel,\r | |
236 | IN UINT8 Device,\r | |
237 | IN EFI_IDENTIFY_DATA *IdentifyData\r | |
238 | )\r | |
a1f11f75 | 239 | ;\r |
240 | \r | |
20c1e33f | 241 | /**\r |
95717b94 | 242 | Disqualifies specific modes for an IDE device.\r |
243 | \r | |
5a702acd | 244 | This function allows the driver entity or other drivers (such as platform\r |
95717b94 | 245 | drivers) to reject certain timing modes and request the IDE controller driver\r |
5a702acd LG |
246 | to recalculate modes. This function allows the driver entity and the IDE\r |
247 | controller driver to negotiate the timings on a per-device basis. This function\r | |
248 | is useful in the case of drives that lie about their capabilities. An example\r | |
249 | is when the IDE device fails to accept the timing modes that are calculated\r | |
95717b94 | 250 | by the IDE controller driver based on the response to the Identify Drive command.\r |
251 | \r | |
5a702acd LG |
252 | If the driver entity does not want to limit the ATA timing modes and leave that\r |
253 | decision to the IDE controller driver, it can either not call this function for\r | |
254 | the given device or call this function and set the Valid flag to FALSE for all\r | |
95717b94 | 255 | modes that are listed in EFI_ATA_COLLECTIVE_MODE.\r |
5a702acd LG |
256 | \r |
257 | The driver entity may disqualify modes for a device in any order and any number\r | |
95717b94 | 258 | of times.\r |
5a702acd LG |
259 | \r |
260 | This function can be called multiple times to invalidate multiple modes of the\r | |
261 | same type (e.g., Programmed Input/Output [PIO] modes 3 and 4). See the ATA/ATAPI\r | |
262 | specification for more information on PIO modes.\r | |
263 | \r | |
95717b94 | 264 | For Serial ATA (SATA) controllers, this member function can be used to disqualify\r |
265 | a higher transfer rate mode on a given channel. For example, a platform driver\r | |
5a702acd | 266 | may inform the IDE controller driver to not use second-generation (Gen2) speeds\r |
95717b94 | 267 | for a certain SATA drive.\r |
5a702acd | 268 | \r |
95717b94 | 269 | @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r |
270 | @param[in] Channel The zero-based channel number.\r | |
271 | @param[in] Device The zero-based device number on the Channel.\r | |
272 | @param[in] BadModes The modes that the device does not support and that\r | |
273 | should be disqualified.\r | |
274 | \r | |
275 | @retval EFI_SUCCESS The modes were accepted without any errors.\r | |
276 | @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).\r | |
277 | @retval EFI_INVALID_PARAMETER Device is invalid.\r | |
278 | @retval EFI_INVALID_PARAMETER IdentifyData is NULL.\r | |
5a702acd | 279 | \r |
20c1e33f | 280 | **/\r |
a1f11f75 | 281 | EFI_STATUS\r |
282 | EFIAPI\r | |
283 | IdeInitDisqualifyMode (\r | |
284 | IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This,\r | |
285 | IN UINT8 Channel,\r | |
286 | IN UINT8 Device,\r | |
287 | IN EFI_ATA_COLLECTIVE_MODE *BadModes\r | |
288 | )\r | |
a1f11f75 | 289 | ;\r |
290 | \r | |
20c1e33f | 291 | /**\r |
95717b94 | 292 | Returns the information about the optimum modes for the specified IDE device.\r |
293 | \r | |
294 | This function is used by the driver entity to obtain the optimum ATA modes for\r | |
5a702acd | 295 | a specific device. The IDE controller driver takes into account the following\r |
95717b94 | 296 | while calculating the mode:\r |
297 | - The IdentifyData inputs to EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData()\r | |
298 | - The BadModes inputs to EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode()\r | |
299 | \r | |
5a702acd LG |
300 | The driver entity is required to call EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData()\r |
301 | for all the devices that belong to an enumeration group before calling\r | |
302 | EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() for any device in the same group.\r | |
303 | \r | |
304 | The IDE controller driver will use controller- and possibly platform-specific\r | |
305 | algorithms to arrive at SupportedModes. The IDE controller may base its\r | |
306 | decision on user preferences and other considerations as well. This function\r | |
307 | may be called multiple times because the driver entity may renegotiate the mode\r | |
95717b94 | 308 | with the IDE controller driver using EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode().\r |
5a702acd LG |
309 | \r |
310 | The driver entity may collect timing information for various devices in any\r | |
95717b94 | 311 | order. The driver entity is responsible for making sure that all the dependencies\r |
5a702acd LG |
312 | are satisfied. For example, the SupportedModes information for device A that\r |
313 | was previously returned may become stale after a call to\r | |
95717b94 | 314 | EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() for device B.\r |
5a702acd LG |
315 | \r |
316 | The buffer SupportedModes is allocated by the callee because the caller does\r | |
317 | not necessarily know the size of the buffer. The type EFI_ATA_COLLECTIVE_MODE\r | |
318 | is defined in a way that allows for future extensibility and can be of variable\r | |
319 | length. This memory pool should be deallocated by the caller when it is no\r | |
320 | longer necessary.\r | |
321 | \r | |
322 | The IDE controller driver for a Serial ATA (SATA) controller can use this\r | |
323 | member function to force a lower speed (first-generation [Gen1] speeds on a\r | |
324 | second-generation [Gen2]-capable hardware). The IDE controller driver can\r | |
325 | also allow the driver entity to stay with the speed that has been negotiated\r | |
95717b94 | 326 | by the physical layer.\r |
5a702acd | 327 | \r |
95717b94 | 328 | @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r |
329 | @param[in] Channel A zero-based channel number.\r | |
330 | @param[in] Device A zero-based device number on the Channel.\r | |
331 | @param[out] SupportedModes The optimum modes for the device.\r | |
332 | \r | |
333 | @retval EFI_SUCCESS SupportedModes was returned.\r | |
334 | @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).\r | |
5a702acd | 335 | @retval EFI_INVALID_PARAMETER Device is invalid.\r |
95717b94 | 336 | @retval EFI_INVALID_PARAMETER SupportedModes is NULL.\r |
5a702acd LG |
337 | @retval EFI_NOT_READY Modes cannot be calculated due to a lack of\r |
338 | data. This error may happen if\r | |
339 | EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData()\r | |
340 | and EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyData()\r | |
341 | were not called for at least one drive in the\r | |
95717b94 | 342 | same enumeration group.\r |
3ea80ba2 | 343 | \r |
20c1e33f | 344 | **/\r |
a1f11f75 | 345 | EFI_STATUS\r |
346 | EFIAPI\r | |
347 | IdeInitCalculateMode (\r | |
348 | IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This,\r | |
349 | IN UINT8 Channel,\r | |
350 | IN UINT8 Device,\r | |
24115e44 | 351 | OUT EFI_ATA_COLLECTIVE_MODE **SupportedModes\r |
a1f11f75 | 352 | )\r |
a1f11f75 | 353 | ;\r |
354 | \r | |
20c1e33f | 355 | /**\r |
95717b94 | 356 | Commands the IDE controller driver to program the IDE controller hardware\r |
357 | so that the specified device can operate at the specified mode.\r | |
358 | \r | |
5a702acd LG |
359 | This function is used by the driver entity to instruct the IDE controller\r |
360 | driver to program the IDE controller hardware to the specified modes. This\r | |
361 | function can be called only once for a particular device. For a Serial ATA\r | |
95717b94 | 362 | (SATA) Advanced Host Controller Interface (AHCI) controller, no controller-\r |
363 | specific programming may be required.\r | |
364 | \r | |
365 | @param[in] This Pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance.\r | |
366 | @param[in] Channel Zero-based channel number.\r | |
367 | @param[in] Device Zero-based device number on the Channel.\r | |
368 | @param[in] Modes The modes to set.\r | |
369 | \r | |
370 | @retval EFI_SUCCESS The command was accepted without any errors.\r | |
371 | @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount).\r | |
372 | @retval EFI_INVALID_PARAMETER Device is invalid.\r | |
373 | @retval EFI_NOT_READY Modes cannot be set at this time due to lack of data.\r | |
374 | @retval EFI_DEVICE_ERROR Modes cannot be set due to hardware failure.\r | |
375 | The driver entity should not use this device.\r | |
3ea80ba2 | 376 | \r |
20c1e33f | 377 | **/\r |
a1f11f75 | 378 | EFI_STATUS\r |
379 | EFIAPI\r | |
380 | IdeInitSetTiming (\r | |
381 | IN EFI_IDE_CONTROLLER_INIT_PROTOCOL *This,\r | |
382 | IN UINT8 Channel,\r | |
383 | IN UINT8 Device,\r | |
384 | IN EFI_ATA_COLLECTIVE_MODE *Modes\r | |
385 | )\r | |
a1f11f75 | 386 | ;\r |
387 | \r | |
388 | //\r | |
389 | // Forward reference declaration\r | |
390 | //\r | |
20c1e33f | 391 | /**\r |
392 | Retrieves a Unicode string that is the user readable name of the EFI Driver.\r | |
393 | \r | |
394 | @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
395 | @param Language A pointer to a three character ISO 639-2 language identifier.\r | |
396 | This is the language of the driver name that that the caller\r | |
397 | is requesting, and it must match one of the languages specified\r | |
398 | in SupportedLanguages. The number of languages supported by a\r | |
399 | driver is up to the driver writer.\r | |
400 | @param DriverName A pointer to the Unicode string to return. This Unicode string\r | |
401 | is the name of the driver specified by This in the language\r | |
402 | specified by Language.\r | |
3ea80ba2 | 403 | \r |
20c1e33f | 404 | @retval EFI_SUCCESS The Unicode string for the Driver specified by This\r |
405 | and the language specified by Language was returned\r | |
406 | in DriverName.\r | |
407 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
408 | @retval EFI_INVALID_PARAMETER DriverName is NULL.\r | |
409 | @retval EFI_UNSUPPORTED The driver specified by This does not support the\r | |
410 | language specified by Language.\r | |
411 | **/\r | |
a1f11f75 | 412 | EFI_STATUS\r |
413 | EFIAPI\r | |
414 | IdeControllerComponentNameGetDriverName (\r | |
415 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
416 | IN CHAR8 *Language,\r | |
417 | OUT CHAR16 **DriverName\r | |
418 | )\r | |
a1f11f75 | 419 | ;\r |
420 | \r | |
20c1e33f | 421 | /**\r |
422 | Retrieves a Unicode string that is the user readable name of the controller\r | |
3ea80ba2 | 423 | that is being managed by an EFI Driver.\r |
20c1e33f | 424 | \r |
425 | @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
426 | @param ControllerHandle The handle of a controller that the driver specified by\r | |
427 | This is managing. This handle specifies the controller\r | |
428 | whose name is to be returned.\r | |
24115e44 | 429 | @param OPTIONAL ChildHandle The handle of the child controller to retrieve the name\r |
20c1e33f | 430 | of. This is an optional parameter that may be NULL. It\r |
431 | will be NULL for device drivers. It will also be NULL\r | |
432 | for a bus drivers that wish to retrieve the name of the\r | |
433 | bus controller. It will not be NULL for a bus driver\r | |
434 | that wishes to retrieve the name of a child controller.\r | |
435 | @param Language A pointer to a three character ISO 639-2 language\r | |
436 | identifier. This is the language of the controller name\r | |
437 | that that the caller is requesting, and it must match one\r | |
438 | of the languages specified in SupportedLanguages. The\r | |
439 | number of languages supported by a driver is up to the\r | |
440 | driver writer.\r | |
441 | @param ControllerName A pointer to the Unicode string to return. This Unicode\r | |
442 | string is the name of the controller specified by\r | |
443 | ControllerHandle and ChildHandle in the language\r | |
444 | specified by Language from the point of view of the\r | |
445 | driver specified by This.\r | |
3ea80ba2 | 446 | \r |
20c1e33f | 447 | @retval EFI_SUCCESS The Unicode string for the user readable name in the\r |
448 | language specified by Language for the driver\r | |
449 | specified by This was returned in DriverName.\r | |
69cb32fc | 450 | @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r |
20c1e33f | 451 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r |
452 | EFI_HANDLE.\r | |
453 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
454 | @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r | |
455 | @retval EFI_UNSUPPORTED The driver specified by This is not currently\r | |
456 | managing the controller specified by\r | |
457 | ControllerHandle and ChildHandle.\r | |
458 | @retval EFI_UNSUPPORTED The driver specified by This does not support the\r | |
459 | language specified by Language.\r | |
460 | **/\r | |
a1f11f75 | 461 | EFI_STATUS\r |
462 | EFIAPI\r | |
463 | IdeControllerComponentNameGetControllerName (\r | |
464 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
465 | IN EFI_HANDLE ControllerHandle,\r | |
466 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
467 | IN CHAR8 *Language,\r | |
468 | OUT CHAR16 **ControllerName\r | |
469 | )\r | |
a1f11f75 | 470 | ;\r |
471 | \r | |
472 | #endif\r |