2 UEFI Component Name(2) protocol implementation for IsaAcpi driver.
4 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 #include "PcatIsaAcpi.h"
17 // EFI Component Name Functions
20 Retrieves a Unicode string that is the user readable name of the driver.
22 This function retrieves the user readable name of a driver in the form of a
23 Unicode string. If the driver specified by This has a user readable name in
24 the language specified by Language, then a pointer to the driver name is
25 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
26 by This does not support the language specified by Language,
27 then EFI_UNSUPPORTED is returned.
29 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
30 EFI_COMPONENT_NAME_PROTOCOL instance.
32 @param Language[in] A pointer to a Null-terminated ASCII string
33 array indicating the language. This is the
34 language of the driver name that the caller is
35 requesting, and it must match one of the
36 languages specified in SupportedLanguages. The
37 number of languages supported by a driver is up
38 to the driver writer. Language is specified
39 in RFC 4646 or ISO 639-2 language code format.
41 @param DriverName[out] A pointer to the Unicode string to return.
42 This Unicode string is the name of the
43 driver specified by This in the language
44 specified by Language.
46 @retval EFI_SUCCESS The Unicode string for the Driver specified by
47 This and the language specified by Language was
48 returned in DriverName.
50 @retval EFI_INVALID_PARAMETER Language is NULL.
52 @retval EFI_INVALID_PARAMETER DriverName is NULL.
54 @retval EFI_UNSUPPORTED The driver specified by This does not support
55 the language specified by Language.
60 PcatIsaAcpiComponentNameGetDriverName (
61 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
63 OUT CHAR16
**DriverName
67 Retrieves a Unicode string that is the user readable name of the controller
68 that is being managed by a driver.
70 This function retrieves the user readable name of the controller specified by
71 ControllerHandle and ChildHandle in the form of a Unicode string. If the
72 driver specified by This has a user readable name in the language specified by
73 Language, then a pointer to the controller name is returned in ControllerName,
74 and EFI_SUCCESS is returned. If the driver specified by This is not currently
75 managing the controller specified by ControllerHandle and ChildHandle,
76 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
77 support the language specified by Language, then EFI_UNSUPPORTED is returned.
79 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
80 EFI_COMPONENT_NAME_PROTOCOL instance.
82 @param ControllerHandle[in] The handle of a controller that the driver
83 specified by This is managing. This handle
84 specifies the controller whose name is to be
87 @param ChildHandle[in] The handle of the child controller to retrieve
88 the name of. This is an optional parameter that
89 may be NULL. It will be NULL for device
90 drivers. It will also be NULL for a bus drivers
91 that wish to retrieve the name of the bus
92 controller. It will not be NULL for a bus
93 driver that wishes to retrieve the name of a
96 @param Language[in] A pointer to a Null-terminated ASCII string
97 array indicating the language. This is the
98 language of the driver name that the caller is
99 requesting, and it must match one of the
100 languages specified in SupportedLanguages. The
101 number of languages supported by a driver is up
102 to the driver writer. Language is specified in
103 RFC 4646 or ISO 639-2 language code format.
105 @param ControllerName[out] A pointer to the Unicode string to return.
106 This Unicode string is the name of the
107 controller specified by ControllerHandle and
108 ChildHandle in the language specified by
109 Language from the point of view of the driver
112 @retval EFI_SUCCESS The Unicode string for the user readable name in
113 the language specified by Language for the
114 driver specified by This was returned in
117 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
119 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
122 @retval EFI_INVALID_PARAMETER Language is NULL.
124 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
126 @retval EFI_UNSUPPORTED The driver specified by This is not currently
127 managing the controller specified by
128 ControllerHandle and ChildHandle.
130 @retval EFI_UNSUPPORTED The driver specified by This does not support
131 the language specified by Language.
136 PcatIsaAcpiComponentNameGetControllerName (
137 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
138 IN EFI_HANDLE ControllerHandle
,
139 IN EFI_HANDLE ChildHandle OPTIONAL
,
141 OUT CHAR16
**ControllerName
145 // EFI Component Name Protocol
148 EFI_COMPONENT_NAME2_PROTOCOL gPcatIsaAcpiComponentName2
= {
149 (EFI_COMPONENT_NAME2_GET_DRIVER_NAME
) PcatIsaAcpiComponentNameGetDriverName
,
150 (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME
) PcatIsaAcpiComponentNameGetControllerName
,
154 EFI_COMPONENT_NAME_PROTOCOL gPcatIsaAcpiComponentName
= {
155 PcatIsaAcpiComponentNameGetDriverName
,
156 PcatIsaAcpiComponentNameGetControllerName
,
161 EFI_UNICODE_STRING_TABLE mPcatIsaAcpiDriverNameTable
[] = {
164 L
"PC-AT ISA Device Enumeration Driver"
173 Retrieves a Unicode string that is the user readable name of the driver.
175 This function retrieves the user readable name of a driver in the form of a
176 Unicode string. If the driver specified by This has a user readable name in
177 the language specified by Language, then a pointer to the driver name is
178 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
179 by This does not support the language specified by Language,
180 then EFI_UNSUPPORTED is returned.
182 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
183 EFI_COMPONENT_NAME_PROTOCOL instance.
185 @param Language[in] A pointer to a Null-terminated ASCII string
186 array indicating the language. This is the
187 language of the driver name that the caller is
188 requesting, and it must match one of the
189 languages specified in SupportedLanguages. The
190 number of languages supported by a driver is up
191 to the driver writer. Language is specified
192 in RFC 4646 or ISO 639-2 language code format.
194 @param DriverName[out] A pointer to the Unicode string to return.
195 This Unicode string is the name of the
196 driver specified by This in the language
197 specified by Language.
199 @retval EFI_SUCCESS The Unicode string for the Driver specified by
200 This and the language specified by Language was
201 returned in DriverName.
203 @retval EFI_INVALID_PARAMETER Language is NULL.
205 @retval EFI_INVALID_PARAMETER DriverName is NULL.
207 @retval EFI_UNSUPPORTED The driver specified by This does not support
208 the language specified by Language.
213 PcatIsaAcpiComponentNameGetDriverName (
214 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
216 OUT CHAR16
**DriverName
219 return LookupUnicodeString2 (
221 This
->SupportedLanguages
,
222 mPcatIsaAcpiDriverNameTable
,
224 (BOOLEAN
)(This
== &gPcatIsaAcpiComponentName
)
229 Retrieves a Unicode string that is the user readable name of the controller
230 that is being managed by a driver.
232 This function retrieves the user readable name of the controller specified by
233 ControllerHandle and ChildHandle in the form of a Unicode string. If the
234 driver specified by This has a user readable name in the language specified by
235 Language, then a pointer to the controller name is returned in ControllerName,
236 and EFI_SUCCESS is returned. If the driver specified by This is not currently
237 managing the controller specified by ControllerHandle and ChildHandle,
238 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
239 support the language specified by Language, then EFI_UNSUPPORTED is returned.
241 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
242 EFI_COMPONENT_NAME_PROTOCOL instance.
244 @param ControllerHandle[in] The handle of a controller that the driver
245 specified by This is managing. This handle
246 specifies the controller whose name is to be
249 @param ChildHandle[in] The handle of the child controller to retrieve
250 the name of. This is an optional parameter that
251 may be NULL. It will be NULL for device
252 drivers. It will also be NULL for a bus drivers
253 that wish to retrieve the name of the bus
254 controller. It will not be NULL for a bus
255 driver that wishes to retrieve the name of a
258 @param Language[in] A pointer to a Null-terminated ASCII string
259 array indicating the language. This is the
260 language of the driver name that the caller is
261 requesting, and it must match one of the
262 languages specified in SupportedLanguages. The
263 number of languages supported by a driver is up
264 to the driver writer. Language is specified in
265 RFC 4646 or ISO 639-2 language code format.
267 @param ControllerName[out] A pointer to the Unicode string to return.
268 This Unicode string is the name of the
269 controller specified by ControllerHandle and
270 ChildHandle in the language specified by
271 Language from the point of view of the driver
274 @retval EFI_SUCCESS The Unicode string for the user readable name in
275 the language specified by Language for the
276 driver specified by This was returned in
279 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
281 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
284 @retval EFI_INVALID_PARAMETER Language is NULL.
286 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
288 @retval EFI_UNSUPPORTED The driver specified by This is not currently
289 managing the controller specified by
290 ControllerHandle and ChildHandle.
292 @retval EFI_UNSUPPORTED The driver specified by This does not support
293 the language specified by Language.
298 PcatIsaAcpiComponentNameGetControllerName (
299 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
300 IN EFI_HANDLE ControllerHandle
,
301 IN EFI_HANDLE ChildHandle OPTIONAL
,
303 OUT CHAR16
**ControllerName
306 return EFI_UNSUPPORTED
;