2 UEFI Component Name(2) protocol implementation for IsaAcpi driver.
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
8 #include "PcatIsaAcpi.h"
11 // EFI Component Name Functions
14 Retrieves a Unicode string that is the user readable name of the driver.
16 This function retrieves the user readable name of a driver in the form of a
17 Unicode string. If the driver specified by This has a user readable name in
18 the language specified by Language, then a pointer to the driver name is
19 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
20 by This does not support the language specified by Language,
21 then EFI_UNSUPPORTED is returned.
23 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
24 EFI_COMPONENT_NAME_PROTOCOL instance.
26 @param Language[in] A pointer to a Null-terminated ASCII string
27 array indicating the language. This is the
28 language of the driver name that the caller is
29 requesting, and it must match one of the
30 languages specified in SupportedLanguages. The
31 number of languages supported by a driver is up
32 to the driver writer. Language is specified
33 in RFC 4646 or ISO 639-2 language code format.
35 @param DriverName[out] A pointer to the Unicode string to return.
36 This Unicode string is the name of the
37 driver specified by This in the language
38 specified by Language.
40 @retval EFI_SUCCESS The Unicode string for the Driver specified by
41 This and the language specified by Language was
42 returned in DriverName.
44 @retval EFI_INVALID_PARAMETER Language is NULL.
46 @retval EFI_INVALID_PARAMETER DriverName is NULL.
48 @retval EFI_UNSUPPORTED The driver specified by This does not support
49 the language specified by Language.
54 PcatIsaAcpiComponentNameGetDriverName (
55 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
57 OUT CHAR16
**DriverName
61 Retrieves a Unicode string that is the user readable name of the controller
62 that is being managed by a driver.
64 This function retrieves the user readable name of the controller specified by
65 ControllerHandle and ChildHandle in the form of a Unicode string. If the
66 driver specified by This has a user readable name in the language specified by
67 Language, then a pointer to the controller name is returned in ControllerName,
68 and EFI_SUCCESS is returned. If the driver specified by This is not currently
69 managing the controller specified by ControllerHandle and ChildHandle,
70 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
71 support the language specified by Language, then EFI_UNSUPPORTED is returned.
73 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
74 EFI_COMPONENT_NAME_PROTOCOL instance.
76 @param ControllerHandle[in] The handle of a controller that the driver
77 specified by This is managing. This handle
78 specifies the controller whose name is to be
81 @param ChildHandle[in] The handle of the child controller to retrieve
82 the name of. This is an optional parameter that
83 may be NULL. It will be NULL for device
84 drivers. It will also be NULL for a bus drivers
85 that wish to retrieve the name of the bus
86 controller. It will not be NULL for a bus
87 driver that wishes to retrieve the name of a
90 @param Language[in] A pointer to a Null-terminated ASCII string
91 array indicating the language. This is the
92 language of the driver name that the caller is
93 requesting, and it must match one of the
94 languages specified in SupportedLanguages. The
95 number of languages supported by a driver is up
96 to the driver writer. Language is specified in
97 RFC 4646 or ISO 639-2 language code format.
99 @param ControllerName[out] A pointer to the Unicode string to return.
100 This Unicode string is the name of the
101 controller specified by ControllerHandle and
102 ChildHandle in the language specified by
103 Language from the point of view of the driver
106 @retval EFI_SUCCESS The Unicode string for the user readable name in
107 the language specified by Language for the
108 driver specified by This was returned in
111 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
113 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
116 @retval EFI_INVALID_PARAMETER Language is NULL.
118 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
120 @retval EFI_UNSUPPORTED The driver specified by This is not currently
121 managing the controller specified by
122 ControllerHandle and ChildHandle.
124 @retval EFI_UNSUPPORTED The driver specified by This does not support
125 the language specified by Language.
130 PcatIsaAcpiComponentNameGetControllerName (
131 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
132 IN EFI_HANDLE ControllerHandle
,
133 IN EFI_HANDLE ChildHandle OPTIONAL
,
135 OUT CHAR16
**ControllerName
139 // EFI Component Name Protocol
142 EFI_COMPONENT_NAME2_PROTOCOL gPcatIsaAcpiComponentName2
= {
143 (EFI_COMPONENT_NAME2_GET_DRIVER_NAME
) PcatIsaAcpiComponentNameGetDriverName
,
144 (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME
) PcatIsaAcpiComponentNameGetControllerName
,
148 EFI_COMPONENT_NAME_PROTOCOL gPcatIsaAcpiComponentName
= {
149 PcatIsaAcpiComponentNameGetDriverName
,
150 PcatIsaAcpiComponentNameGetControllerName
,
155 EFI_UNICODE_STRING_TABLE mPcatIsaAcpiDriverNameTable
[] = {
158 L
"PC-AT ISA Device Enumeration Driver"
167 Retrieves a Unicode string that is the user readable name of the driver.
169 This function retrieves the user readable name of a driver in the form of a
170 Unicode string. If the driver specified by This has a user readable name in
171 the language specified by Language, then a pointer to the driver name is
172 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
173 by This does not support the language specified by Language,
174 then EFI_UNSUPPORTED is returned.
176 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
177 EFI_COMPONENT_NAME_PROTOCOL instance.
179 @param Language[in] A pointer to a Null-terminated ASCII string
180 array indicating the language. This is the
181 language of the driver name that the caller is
182 requesting, and it must match one of the
183 languages specified in SupportedLanguages. The
184 number of languages supported by a driver is up
185 to the driver writer. Language is specified
186 in RFC 4646 or ISO 639-2 language code format.
188 @param DriverName[out] A pointer to the Unicode string to return.
189 This Unicode string is the name of the
190 driver specified by This in the language
191 specified by Language.
193 @retval EFI_SUCCESS The Unicode string for the Driver specified by
194 This and the language specified by Language was
195 returned in DriverName.
197 @retval EFI_INVALID_PARAMETER Language is NULL.
199 @retval EFI_INVALID_PARAMETER DriverName is NULL.
201 @retval EFI_UNSUPPORTED The driver specified by This does not support
202 the language specified by Language.
207 PcatIsaAcpiComponentNameGetDriverName (
208 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
210 OUT CHAR16
**DriverName
213 return LookupUnicodeString2 (
215 This
->SupportedLanguages
,
216 mPcatIsaAcpiDriverNameTable
,
218 (BOOLEAN
)(This
== &gPcatIsaAcpiComponentName
)
223 Retrieves a Unicode string that is the user readable name of the controller
224 that is being managed by a driver.
226 This function retrieves the user readable name of the controller specified by
227 ControllerHandle and ChildHandle in the form of a Unicode string. If the
228 driver specified by This has a user readable name in the language specified by
229 Language, then a pointer to the controller name is returned in ControllerName,
230 and EFI_SUCCESS is returned. If the driver specified by This is not currently
231 managing the controller specified by ControllerHandle and ChildHandle,
232 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
233 support the language specified by Language, then EFI_UNSUPPORTED is returned.
235 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
236 EFI_COMPONENT_NAME_PROTOCOL instance.
238 @param ControllerHandle[in] The handle of a controller that the driver
239 specified by This is managing. This handle
240 specifies the controller whose name is to be
243 @param ChildHandle[in] The handle of the child controller to retrieve
244 the name of. This is an optional parameter that
245 may be NULL. It will be NULL for device
246 drivers. It will also be NULL for a bus drivers
247 that wish to retrieve the name of the bus
248 controller. It will not be NULL for a bus
249 driver that wishes to retrieve the name of a
252 @param Language[in] A pointer to a Null-terminated ASCII string
253 array indicating the language. This is the
254 language of the driver name that the caller is
255 requesting, and it must match one of the
256 languages specified in SupportedLanguages. The
257 number of languages supported by a driver is up
258 to the driver writer. Language is specified in
259 RFC 4646 or ISO 639-2 language code format.
261 @param ControllerName[out] A pointer to the Unicode string to return.
262 This Unicode string is the name of the
263 controller specified by ControllerHandle and
264 ChildHandle in the language specified by
265 Language from the point of view of the driver
268 @retval EFI_SUCCESS The Unicode string for the user readable name in
269 the language specified by Language for the
270 driver specified by This was returned in
273 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
275 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
278 @retval EFI_INVALID_PARAMETER Language is NULL.
280 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
282 @retval EFI_UNSUPPORTED The driver specified by This is not currently
283 managing the controller specified by
284 ControllerHandle and ChildHandle.
286 @retval EFI_UNSUPPORTED The driver specified by This does not support
287 the language specified by Language.
292 PcatIsaAcpiComponentNameGetControllerName (
293 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
294 IN EFI_HANDLE ControllerHandle
,
295 IN EFI_HANDLE ChildHandle OPTIONAL
,
297 OUT CHAR16
**ControllerName
300 return EFI_UNSUPPORTED
;