2 UEFI Component Name(2) protocol implementation for SCSI bus 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.
19 // EFI Component Name Protocol
21 GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gScsiBusComponentName
= {
22 ScsiBusComponentNameGetDriverName
,
23 ScsiBusComponentNameGetControllerName
,
28 // EFI Component Name 2 Protocol
30 GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gScsiBusComponentName2
= {
31 (EFI_COMPONENT_NAME2_GET_DRIVER_NAME
) ScsiBusComponentNameGetDriverName
,
32 (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME
) ScsiBusComponentNameGetControllerName
,
37 GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mScsiBusDriverNameTable
[] = {
38 { "eng;en", (CHAR16
*) L
"SCSI Bus Driver" },
43 Retrieves a Unicode string that is the user readable name of the driver.
45 This function retrieves the user readable name of a driver in the form of a
46 Unicode string. If the driver specified by This has a user readable name in
47 the language specified by Language, then a pointer to the driver name is
48 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
49 by This does not support the language specified by Language,
50 then EFI_UNSUPPORTED is returned.
52 @param This A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
53 EFI_COMPONENT_NAME_PROTOCOL instance.
55 @param Language A pointer to a Null-terminated ASCII string
56 array indicating the language. This is the
57 language of the driver name that the caller is
58 requesting, and it must match one of the
59 languages specified in SupportedLanguages. The
60 number of languages supported by a driver is up
61 to the driver writer. Language is specified
62 in RFC 4646 or ISO 639-2 language code format.
64 @param DriverName A pointer to the Unicode string to return.
65 This Unicode string is the name of the
66 driver specified by This in the language
67 specified by Language.
69 @retval EFI_SUCCESS The Unicode string for the Driver specified by
70 This and the language specified by Language was
71 returned in DriverName.
73 @retval EFI_INVALID_PARAMETER Language is NULL.
75 @retval EFI_INVALID_PARAMETER DriverName is NULL.
77 @retval EFI_UNSUPPORTED The driver specified by This does not support
78 the language specified by Language.
83 ScsiBusComponentNameGetDriverName (
84 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
86 OUT CHAR16
**DriverName
89 return LookupUnicodeString2 (
91 This
->SupportedLanguages
,
92 mScsiBusDriverNameTable
,
94 (BOOLEAN
)(This
== &gScsiBusComponentName
)
99 Retrieves a Unicode string that is the user readable name of the controller
100 that is being managed by a driver.
102 This function retrieves the user readable name of the controller specified by
103 ControllerHandle and ChildHandle in the form of a Unicode string. If the
104 driver specified by This has a user readable name in the language specified by
105 Language, then a pointer to the controller name is returned in ControllerName,
106 and EFI_SUCCESS is returned. If the driver specified by This is not currently
107 managing the controller specified by ControllerHandle and ChildHandle,
108 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
109 support the language specified by Language, then EFI_UNSUPPORTED is returned.
111 @param This A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
112 EFI_COMPONENT_NAME_PROTOCOL instance.
114 @param ControllerHandle The handle of a controller that the driver
115 specified by This is managing. This handle
116 specifies the controller whose name is to be
119 @param ChildHandle The handle of the child controller to retrieve
120 the name of. This is an optional parameter that
121 may be NULL. It will be NULL for device
122 drivers. It will also be NULL for a bus drivers
123 that wish to retrieve the name of the bus
124 controller. It will not be NULL for a bus
125 driver that wishes to retrieve the name of a
128 @param Language A pointer to a Null-terminated ASCII string
129 array indicating the language. This is the
130 language of the driver name that the caller is
131 requesting, and it must match one of the
132 languages specified in SupportedLanguages. The
133 number of languages supported by a driver is up
134 to the driver writer. Language is specified in
135 RFC 4646 or ISO 639-2 language code format.
137 @param ControllerName A pointer to the Unicode string to return.
138 This Unicode string is the name of the
139 controller specified by ControllerHandle and
140 ChildHandle in the language specified by
141 Language from the point of view of the driver
144 @retval EFI_SUCCESS The Unicode string for the user readable name in
145 the language specified by Language for the
146 driver specified by This was returned in
149 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
151 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
154 @retval EFI_INVALID_PARAMETER Language is NULL.
156 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
158 @retval EFI_UNSUPPORTED The driver specified by This is not currently
159 managing the controller specified by
160 ControllerHandle and ChildHandle.
162 @retval EFI_UNSUPPORTED The driver specified by This does not support
163 the language specified by Language.
168 ScsiBusComponentNameGetControllerName (
169 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
170 IN EFI_HANDLE ControllerHandle
,
171 IN EFI_HANDLE ChildHandle OPTIONAL
,
173 OUT CHAR16
**ControllerName
176 return EFI_UNSUPPORTED
;