mirror of https://github.com/acidanthera/audk.git
Update to support to produce Component Name and & Component Name 2 protocol based on Feature flag PcdComponentNameDisable & PcdComponentName2Disable.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4005 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
19f97f7e86
commit
5bca971e54
|
@ -27,15 +27,25 @@ Abstract:
|
||||||
//
|
//
|
||||||
// EFI Component Name Protocol
|
// EFI Component Name Protocol
|
||||||
//
|
//
|
||||||
EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName = {
|
EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName = {
|
||||||
ConPlatformComponentNameGetDriverName,
|
ConPlatformComponentNameGetDriverName,
|
||||||
ConPlatformComponentNameGetControllerName,
|
ConPlatformComponentNameGetControllerName,
|
||||||
"eng"
|
"eng"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
// EFI Component Name 2 Protocol
|
||||||
|
//
|
||||||
|
EFI_COMPONENT_NAME2_PROTOCOL gConPlatformComponentName2 = {
|
||||||
|
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME) ConPlatformComponentNameGetDriverName,
|
||||||
|
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) ConPlatformComponentNameGetControllerName,
|
||||||
|
"en"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
STATIC EFI_UNICODE_STRING_TABLE mConPlatformDriverNameTable[] = {
|
STATIC EFI_UNICODE_STRING_TABLE mConPlatformDriverNameTable[] = {
|
||||||
{
|
{
|
||||||
"eng",
|
"eng;en",
|
||||||
L"Platform Console Management Driver"
|
L"Platform Console Management Driver"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -44,6 +54,45 @@ STATIC EFI_UNICODE_STRING_TABLE mConPlatformDriverNameTable[] = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of a driver in the form of a
|
||||||
|
Unicode string. If the driver specified by This has a user readable name in
|
||||||
|
the language specified by Language, then a pointer to the driver name is
|
||||||
|
returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
|
||||||
|
by This does not support the language specified by Language,
|
||||||
|
then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified
|
||||||
|
in RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param DriverName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
driver specified by This in the language
|
||||||
|
specified by Language.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the Driver specified by
|
||||||
|
This and the language specified by Language was
|
||||||
|
returned in DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER DriverName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConPlatformComponentNameGetDriverName (
|
ConPlatformComponentNameGetDriverName (
|
||||||
|
@ -51,41 +100,84 @@ ConPlatformComponentNameGetDriverName (
|
||||||
IN CHAR8 *Language,
|
IN CHAR8 *Language,
|
||||||
OUT CHAR16 **DriverName
|
OUT CHAR16 **DriverName
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Retrieves a Unicode string that is the user readable name of the EFI Driver.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
|
||||||
Language - A pointer to a three character ISO 639-2 language identifier.
|
|
||||||
This is the language of the driver name that that the caller
|
|
||||||
is requesting, and it must match one of the languages specified
|
|
||||||
in SupportedLanguages. The number of languages supported by a
|
|
||||||
driver is up to the driver writer.
|
|
||||||
DriverName - A pointer to the Unicode string to return. This Unicode string
|
|
||||||
is the name of the driver specified by This in the language
|
|
||||||
specified by Language.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The Unicode string for the Driver specified by This
|
|
||||||
and the language specified by Language was returned
|
|
||||||
in DriverName.
|
|
||||||
EFI_INVALID_PARAMETER - Language is NULL.
|
|
||||||
EFI_INVALID_PARAMETER - DriverName is NULL.
|
|
||||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
|
||||||
language specified by Language.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
return LookupUnicodeString (
|
return LookupUnicodeString2 (
|
||||||
Language,
|
Language,
|
||||||
gConPlatformComponentName.SupportedLanguages,
|
This->SupportedLanguages,
|
||||||
mConPlatformDriverNameTable,
|
mConPlatformDriverNameTable,
|
||||||
DriverName
|
DriverName,
|
||||||
|
(BOOLEAN)(This == &gConPlatformComponentName)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the controller
|
||||||
|
that is being managed by a driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of the controller specified by
|
||||||
|
ControllerHandle and ChildHandle in the form of a Unicode string. If the
|
||||||
|
driver specified by This has a user readable name in the language specified by
|
||||||
|
Language, then a pointer to the controller name is returned in ControllerName,
|
||||||
|
and EFI_SUCCESS is returned. If the driver specified by This is not currently
|
||||||
|
managing the controller specified by ControllerHandle and ChildHandle,
|
||||||
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
|
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param ControllerHandle[in] The handle of a controller that the driver
|
||||||
|
specified by This is managing. This handle
|
||||||
|
specifies the controller whose name is to be
|
||||||
|
returned.
|
||||||
|
|
||||||
|
@param ChildHandle[in] The handle of the child controller to retrieve
|
||||||
|
the name of. This is an optional parameter that
|
||||||
|
may be NULL. It will be NULL for device
|
||||||
|
drivers. It will also be NULL for a bus drivers
|
||||||
|
that wish to retrieve the name of the bus
|
||||||
|
controller. It will not be NULL for a bus
|
||||||
|
driver that wishes to retrieve the name of a
|
||||||
|
child controller.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified in
|
||||||
|
RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param ControllerName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
controller specified by ControllerHandle and
|
||||||
|
ChildHandle in the language specified by
|
||||||
|
Language from the point of view of the driver
|
||||||
|
specified by This.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the user readable name in
|
||||||
|
the language specified by Language for the
|
||||||
|
driver specified by This was returned in
|
||||||
|
DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
|
||||||
|
EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This is not currently
|
||||||
|
managing the controller specified by
|
||||||
|
ControllerHandle and ChildHandle.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConPlatformComponentNameGetControllerName (
|
ConPlatformComponentNameGetControllerName (
|
||||||
|
@ -95,51 +187,6 @@ ConPlatformComponentNameGetControllerName (
|
||||||
IN CHAR8 *Language,
|
IN CHAR8 *Language,
|
||||||
OUT CHAR16 **ControllerName
|
OUT CHAR16 **ControllerName
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Retrieves a Unicode string that is the user readable name of the controller
|
|
||||||
that is being managed by an EFI Driver.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
|
||||||
ControllerHandle - The handle of a controller that the driver specified by
|
|
||||||
This is managing. This handle specifies the controller
|
|
||||||
whose name is to be returned.
|
|
||||||
ChildHandle - The handle of the child controller to retrieve the name
|
|
||||||
of. This is an optional parameter that may be NULL. It
|
|
||||||
will be NULL for device drivers. It will also be NULL
|
|
||||||
for a bus drivers that wish to retrieve the name of the
|
|
||||||
bus controller. It will not be NULL for a bus driver
|
|
||||||
that wishes to retrieve the name of a child controller.
|
|
||||||
Language - A pointer to a three character ISO 639-2 language
|
|
||||||
identifier. This is the language of the controller name
|
|
||||||
that that the caller is requesting, and it must match one
|
|
||||||
of the languages specified in SupportedLanguages. The
|
|
||||||
number of languages supported by a driver is up to the
|
|
||||||
driver writer.
|
|
||||||
ControllerName - A pointer to the Unicode string to return. This Unicode
|
|
||||||
string is the name of the controller specified by
|
|
||||||
ControllerHandle and ChildHandle in the language
|
|
||||||
specified by Language from the point of view of the
|
|
||||||
driver specified by This.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The Unicode string for the user readable name in the
|
|
||||||
language specified by Language for the driver
|
|
||||||
specified by This was returned in DriverName.
|
|
||||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
|
|
||||||
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
|
|
||||||
EFI_HANDLE.
|
|
||||||
EFI_INVALID_PARAMETER - Language is NULL.
|
|
||||||
EFI_INVALID_PARAMETER - ControllerName is NULL.
|
|
||||||
EFI_UNSUPPORTED - The driver specified by This is not currently
|
|
||||||
managing the controller specified by
|
|
||||||
ControllerHandle and ChildHandle.
|
|
||||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
|
||||||
language specified by Language.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,25 +60,23 @@ InitializeConPlatform(
|
||||||
//
|
//
|
||||||
// Install driver model protocol(s).
|
// Install driver model protocol(s).
|
||||||
//
|
//
|
||||||
Status = EfiLibInstallAllDriverProtocols (
|
Status = EfiLibInstallDriverBindingComponentName2 (
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
SystemTable,
|
SystemTable,
|
||||||
&gConPlatformTextInDriverBinding,
|
&gConPlatformTextInDriverBinding,
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
&gConPlatformComponentName,
|
&gConPlatformComponentName,
|
||||||
NULL,
|
&gConPlatformComponentName2
|
||||||
NULL
|
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
Status = EfiLibInstallAllDriverProtocols (
|
Status = EfiLibInstallDriverBindingComponentName2 (
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
SystemTable,
|
SystemTable,
|
||||||
&gConPlatformTextOutDriverBinding,
|
&gConPlatformTextOutDriverBinding,
|
||||||
NULL,
|
NULL,
|
||||||
&gConPlatformComponentName,
|
&gConPlatformComponentName,
|
||||||
NULL,
|
&gConPlatformComponentName2
|
||||||
NULL
|
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
|
|
@ -41,10 +41,12 @@ Abstract:
|
||||||
//
|
//
|
||||||
// Driver Binding Externs
|
// Driver Binding Externs
|
||||||
//
|
//
|
||||||
extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextInDriverBinding;
|
extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextInDriverBinding;
|
||||||
extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;
|
extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;
|
||||||
extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextOutDriverBinding;
|
extern EFI_COMPONENT_NAME2_PROTOCOL gConPlatformComponentName2;
|
||||||
extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;
|
extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextOutDriverBinding;
|
||||||
|
extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;
|
||||||
|
extern EFI_COMPONENT_NAME2_PROTOCOL gConPlatformComponentName2;
|
||||||
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -147,6 +149,45 @@ IsHotPlugDevice (
|
||||||
//
|
//
|
||||||
// EFI Component Name Functions
|
// EFI Component Name Functions
|
||||||
//
|
//
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of a driver in the form of a
|
||||||
|
Unicode string. If the driver specified by This has a user readable name in
|
||||||
|
the language specified by Language, then a pointer to the driver name is
|
||||||
|
returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
|
||||||
|
by This does not support the language specified by Language,
|
||||||
|
then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified
|
||||||
|
in RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param DriverName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
driver specified by This in the language
|
||||||
|
specified by Language.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the Driver specified by
|
||||||
|
This and the language specified by Language was
|
||||||
|
returned in DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER DriverName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConPlatformComponentNameGetDriverName (
|
ConPlatformComponentNameGetDriverName (
|
||||||
|
@ -155,6 +196,75 @@ ConPlatformComponentNameGetDriverName (
|
||||||
OUT CHAR16 **DriverName
|
OUT CHAR16 **DriverName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the controller
|
||||||
|
that is being managed by a driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of the controller specified by
|
||||||
|
ControllerHandle and ChildHandle in the form of a Unicode string. If the
|
||||||
|
driver specified by This has a user readable name in the language specified by
|
||||||
|
Language, then a pointer to the controller name is returned in ControllerName,
|
||||||
|
and EFI_SUCCESS is returned. If the driver specified by This is not currently
|
||||||
|
managing the controller specified by ControllerHandle and ChildHandle,
|
||||||
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
|
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param ControllerHandle[in] The handle of a controller that the driver
|
||||||
|
specified by This is managing. This handle
|
||||||
|
specifies the controller whose name is to be
|
||||||
|
returned.
|
||||||
|
|
||||||
|
@param ChildHandle[in] The handle of the child controller to retrieve
|
||||||
|
the name of. This is an optional parameter that
|
||||||
|
may be NULL. It will be NULL for device
|
||||||
|
drivers. It will also be NULL for a bus drivers
|
||||||
|
that wish to retrieve the name of the bus
|
||||||
|
controller. It will not be NULL for a bus
|
||||||
|
driver that wishes to retrieve the name of a
|
||||||
|
child controller.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified in
|
||||||
|
RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param ControllerName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
controller specified by ControllerHandle and
|
||||||
|
ChildHandle in the language specified by
|
||||||
|
Language from the point of view of the driver
|
||||||
|
specified by This.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the user readable name in
|
||||||
|
the language specified by Language for the
|
||||||
|
driver specified by This was returned in
|
||||||
|
DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
|
||||||
|
EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This is not currently
|
||||||
|
managing the controller specified by
|
||||||
|
ControllerHandle and ChildHandle.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConPlatformComponentNameGetControllerName (
|
ConPlatformComponentNameGetControllerName (
|
||||||
|
@ -165,4 +275,5 @@ ConPlatformComponentNameGetControllerName (
|
||||||
OUT CHAR16 **ControllerName
|
OUT CHAR16 **ControllerName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -22,33 +22,82 @@ Abstract:
|
||||||
//
|
//
|
||||||
// EFI Component Name Protocol
|
// EFI Component Name Protocol
|
||||||
//
|
//
|
||||||
EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName = {
|
EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName = {
|
||||||
ConSplitterComponentNameGetDriverName,
|
ConSplitterComponentNameGetDriverName,
|
||||||
ConSplitterConInComponentNameGetControllerName,
|
ConSplitterConInComponentNameGetControllerName,
|
||||||
"eng"
|
"eng"
|
||||||
};
|
};
|
||||||
|
|
||||||
EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName = {
|
//
|
||||||
|
// EFI Component Name 2 Protocol
|
||||||
|
//
|
||||||
|
EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConInComponentName2 = {
|
||||||
|
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME) ConSplitterComponentNameGetDriverName,
|
||||||
|
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) ConSplitterConInComponentNameGetControllerName,
|
||||||
|
"en"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// EFI Component Name Protocol
|
||||||
|
//
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName = {
|
||||||
ConSplitterComponentNameGetDriverName,
|
ConSplitterComponentNameGetDriverName,
|
||||||
ConSplitterSimplePointerComponentNameGetControllerName,
|
ConSplitterSimplePointerComponentNameGetControllerName,
|
||||||
"eng"
|
"eng"
|
||||||
};
|
};
|
||||||
|
|
||||||
EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName = {
|
//
|
||||||
|
// EFI Component Name 2 Protocol
|
||||||
|
//
|
||||||
|
EFI_COMPONENT_NAME2_PROTOCOL gConSplitterSimplePointerComponentName2 = {
|
||||||
|
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME) ConSplitterComponentNameGetDriverName,
|
||||||
|
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) ConSplitterSimplePointerComponentNameGetControllerName,
|
||||||
|
"en"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// EFI Component Name Protocol
|
||||||
|
//
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName = {
|
||||||
ConSplitterComponentNameGetDriverName,
|
ConSplitterComponentNameGetDriverName,
|
||||||
ConSplitterConOutComponentNameGetControllerName,
|
ConSplitterConOutComponentNameGetControllerName,
|
||||||
"eng"
|
"eng"
|
||||||
};
|
};
|
||||||
|
|
||||||
EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName = {
|
//
|
||||||
|
// EFI Component Name 2 Protocol
|
||||||
|
//
|
||||||
|
EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConOutComponentName2 = {
|
||||||
|
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME) ConSplitterComponentNameGetDriverName,
|
||||||
|
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) ConSplitterConOutComponentNameGetControllerName,
|
||||||
|
"en"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// EFI Component Name Protocol
|
||||||
|
//
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName = {
|
||||||
ConSplitterComponentNameGetDriverName,
|
ConSplitterComponentNameGetDriverName,
|
||||||
ConSplitterStdErrComponentNameGetControllerName,
|
ConSplitterStdErrComponentNameGetControllerName,
|
||||||
"eng"
|
"eng"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
// EFI Component Name 2 Protocol
|
||||||
|
//
|
||||||
|
EFI_COMPONENT_NAME2_PROTOCOL gConSplitterStdErrComponentName2 = {
|
||||||
|
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME) ConSplitterComponentNameGetDriverName,
|
||||||
|
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) ConSplitterStdErrComponentNameGetControllerName,
|
||||||
|
"en"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
static EFI_UNICODE_STRING_TABLE mConSplitterDriverNameTable[] = {
|
static EFI_UNICODE_STRING_TABLE mConSplitterDriverNameTable[] = {
|
||||||
{
|
{
|
||||||
"eng",
|
"eng;en",
|
||||||
(CHAR16 *) L"Console Splitter Driver"
|
(CHAR16 *) L"Console Splitter Driver"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -59,7 +108,7 @@ static EFI_UNICODE_STRING_TABLE mConSplitterDriverNameTable[] = {
|
||||||
|
|
||||||
static EFI_UNICODE_STRING_TABLE mConSplitterConInControllerNameTable[] = {
|
static EFI_UNICODE_STRING_TABLE mConSplitterConInControllerNameTable[] = {
|
||||||
{
|
{
|
||||||
"eng",
|
"eng;en",
|
||||||
(CHAR16 *) L"Primary Console Input Device"
|
(CHAR16 *) L"Primary Console Input Device"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -70,7 +119,7 @@ static EFI_UNICODE_STRING_TABLE mConSplitterConInControllerNameTable[] = {
|
||||||
|
|
||||||
static EFI_UNICODE_STRING_TABLE mConSplitterSimplePointerControllerNameTable[] = {
|
static EFI_UNICODE_STRING_TABLE mConSplitterSimplePointerControllerNameTable[] = {
|
||||||
{
|
{
|
||||||
"eng",
|
"eng;en",
|
||||||
(CHAR16 *) L"Primary Simple Pointer Device"
|
(CHAR16 *) L"Primary Simple Pointer Device"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -81,7 +130,7 @@ static EFI_UNICODE_STRING_TABLE mConSplitterSimplePointerControllerNameTable[] =
|
||||||
|
|
||||||
static EFI_UNICODE_STRING_TABLE mConSplitterConOutControllerNameTable[] = {
|
static EFI_UNICODE_STRING_TABLE mConSplitterConOutControllerNameTable[] = {
|
||||||
{
|
{
|
||||||
"eng",
|
"eng;en",
|
||||||
(CHAR16 *) L"Primary Console Output Device"
|
(CHAR16 *) L"Primary Console Output Device"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -92,7 +141,7 @@ static EFI_UNICODE_STRING_TABLE mConSplitterConOutControllerNameTable[] = {
|
||||||
|
|
||||||
static EFI_UNICODE_STRING_TABLE mConSplitterStdErrControllerNameTable[] = {
|
static EFI_UNICODE_STRING_TABLE mConSplitterStdErrControllerNameTable[] = {
|
||||||
{
|
{
|
||||||
"eng",
|
"eng;en",
|
||||||
(CHAR16 *) L"Primary Standard Error Device"
|
(CHAR16 *) L"Primary Standard Error Device"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -101,6 +150,45 @@ static EFI_UNICODE_STRING_TABLE mConSplitterStdErrControllerNameTable[] = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of a driver in the form of a
|
||||||
|
Unicode string. If the driver specified by This has a user readable name in
|
||||||
|
the language specified by Language, then a pointer to the driver name is
|
||||||
|
returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
|
||||||
|
by This does not support the language specified by Language,
|
||||||
|
then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified
|
||||||
|
in RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param DriverName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
driver specified by This in the language
|
||||||
|
specified by Language.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the Driver specified by
|
||||||
|
This and the language specified by Language was
|
||||||
|
returned in DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER DriverName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterComponentNameGetDriverName (
|
ConSplitterComponentNameGetDriverName (
|
||||||
|
@ -108,41 +196,84 @@ ConSplitterComponentNameGetDriverName (
|
||||||
IN CHAR8 *Language,
|
IN CHAR8 *Language,
|
||||||
OUT CHAR16 **DriverName
|
OUT CHAR16 **DriverName
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Retrieves a Unicode string that is the user readable name of the EFI Driver.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
|
||||||
Language - A pointer to a three character ISO 639-2 language identifier.
|
|
||||||
This is the language of the driver name that that the caller
|
|
||||||
is requesting, and it must match one of the languages specified
|
|
||||||
in SupportedLanguages. The number of languages supported by a
|
|
||||||
driver is up to the driver writer.
|
|
||||||
DriverName - A pointer to the Unicode string to return. This Unicode string
|
|
||||||
is the name of the driver specified by This in the language
|
|
||||||
specified by Language.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The Unicode string for the Driver specified by This
|
|
||||||
and the language specified by Language was returned
|
|
||||||
in DriverName.
|
|
||||||
EFI_INVALID_PARAMETER - Language is NULL.
|
|
||||||
EFI_INVALID_PARAMETER - DriverName is NULL.
|
|
||||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
|
||||||
language specified by Language.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
return LookupUnicodeString (
|
return LookupUnicodeString2 (
|
||||||
Language,
|
Language,
|
||||||
gConSplitterConInComponentName.SupportedLanguages,
|
This->SupportedLanguages,
|
||||||
mConSplitterDriverNameTable,
|
mConSplitterDriverNameTable,
|
||||||
DriverName
|
DriverName,
|
||||||
|
(BOOLEAN)(This == &gConSplitterConInComponentName)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the controller
|
||||||
|
that is being managed by a driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of the controller specified by
|
||||||
|
ControllerHandle and ChildHandle in the form of a Unicode string. If the
|
||||||
|
driver specified by This has a user readable name in the language specified by
|
||||||
|
Language, then a pointer to the controller name is returned in ControllerName,
|
||||||
|
and EFI_SUCCESS is returned. If the driver specified by This is not currently
|
||||||
|
managing the controller specified by ControllerHandle and ChildHandle,
|
||||||
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
|
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param ControllerHandle[in] The handle of a controller that the driver
|
||||||
|
specified by This is managing. This handle
|
||||||
|
specifies the controller whose name is to be
|
||||||
|
returned.
|
||||||
|
|
||||||
|
@param ChildHandle[in] The handle of the child controller to retrieve
|
||||||
|
the name of. This is an optional parameter that
|
||||||
|
may be NULL. It will be NULL for device
|
||||||
|
drivers. It will also be NULL for a bus drivers
|
||||||
|
that wish to retrieve the name of the bus
|
||||||
|
controller. It will not be NULL for a bus
|
||||||
|
driver that wishes to retrieve the name of a
|
||||||
|
child controller.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified in
|
||||||
|
RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param ControllerName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
controller specified by ControllerHandle and
|
||||||
|
ChildHandle in the language specified by
|
||||||
|
Language from the point of view of the driver
|
||||||
|
specified by This.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the user readable name in
|
||||||
|
the language specified by Language for the
|
||||||
|
driver specified by This was returned in
|
||||||
|
DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
|
||||||
|
EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This is not currently
|
||||||
|
managing the controller specified by
|
||||||
|
ControllerHandle and ChildHandle.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterConInComponentNameGetControllerName (
|
ConSplitterConInComponentNameGetControllerName (
|
||||||
|
@ -152,51 +283,6 @@ ConSplitterConInComponentNameGetControllerName (
|
||||||
IN CHAR8 *Language,
|
IN CHAR8 *Language,
|
||||||
OUT CHAR16 **ControllerName
|
OUT CHAR16 **ControllerName
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Retrieves a Unicode string that is the user readable name of the controller
|
|
||||||
that is being managed by an EFI Driver.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
|
||||||
ControllerHandle - The handle of a controller that the driver specified by
|
|
||||||
This is managing. This handle specifies the controller
|
|
||||||
whose name is to be returned.
|
|
||||||
ChildHandle - The handle of the child controller to retrieve the name
|
|
||||||
of. This is an optional parameter that may be NULL. It
|
|
||||||
will be NULL for device drivers. It will also be NULL
|
|
||||||
for a bus drivers that wish to retrieve the name of the
|
|
||||||
bus controller. It will not be NULL for a bus driver
|
|
||||||
that wishes to retrieve the name of a child controller.
|
|
||||||
Language - A pointer to a three character ISO 639-2 language
|
|
||||||
identifier. This is the language of the controller name
|
|
||||||
that that the caller is requesting, and it must match one
|
|
||||||
of the languages specified in SupportedLanguages. The
|
|
||||||
number of languages supported by a driver is up to the
|
|
||||||
driver writer.
|
|
||||||
ControllerName - A pointer to the Unicode string to return. This Unicode
|
|
||||||
string is the name of the controller specified by
|
|
||||||
ControllerHandle and ChildHandle in the language
|
|
||||||
specified by Language from the point of view of the
|
|
||||||
driver specified by This.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The Unicode string for the user readable name in the
|
|
||||||
language specified by Language for the driver
|
|
||||||
specified by This was returned in DriverName.
|
|
||||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
|
|
||||||
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
|
|
||||||
EFI_HANDLE.
|
|
||||||
EFI_INVALID_PARAMETER - Language is NULL.
|
|
||||||
EFI_INVALID_PARAMETER - ControllerName is NULL.
|
|
||||||
EFI_UNSUPPORTED - The driver specified by This is not currently
|
|
||||||
managing the controller specified by
|
|
||||||
ControllerHandle and ChildHandle.
|
|
||||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
|
||||||
language specified by Language.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn;
|
EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn;
|
||||||
|
@ -219,14 +305,83 @@ ConSplitterConInComponentNameGetControllerName (
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
return LookupUnicodeString (
|
return LookupUnicodeString2 (
|
||||||
Language,
|
Language,
|
||||||
gConSplitterConInComponentName.SupportedLanguages,
|
This->SupportedLanguages,
|
||||||
mConSplitterConInControllerNameTable,
|
mConSplitterConInControllerNameTable,
|
||||||
ControllerName
|
ControllerName,
|
||||||
|
(BOOLEAN)(This == &gConSplitterConInComponentName)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the controller
|
||||||
|
that is being managed by a driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of the controller specified by
|
||||||
|
ControllerHandle and ChildHandle in the form of a Unicode string. If the
|
||||||
|
driver specified by This has a user readable name in the language specified by
|
||||||
|
Language, then a pointer to the controller name is returned in ControllerName,
|
||||||
|
and EFI_SUCCESS is returned. If the driver specified by This is not currently
|
||||||
|
managing the controller specified by ControllerHandle and ChildHandle,
|
||||||
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
|
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param ControllerHandle[in] The handle of a controller that the driver
|
||||||
|
specified by This is managing. This handle
|
||||||
|
specifies the controller whose name is to be
|
||||||
|
returned.
|
||||||
|
|
||||||
|
@param ChildHandle[in] The handle of the child controller to retrieve
|
||||||
|
the name of. This is an optional parameter that
|
||||||
|
may be NULL. It will be NULL for device
|
||||||
|
drivers. It will also be NULL for a bus drivers
|
||||||
|
that wish to retrieve the name of the bus
|
||||||
|
controller. It will not be NULL for a bus
|
||||||
|
driver that wishes to retrieve the name of a
|
||||||
|
child controller.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified in
|
||||||
|
RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param ControllerName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
controller specified by ControllerHandle and
|
||||||
|
ChildHandle in the language specified by
|
||||||
|
Language from the point of view of the driver
|
||||||
|
specified by This.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the user readable name in
|
||||||
|
the language specified by Language for the
|
||||||
|
driver specified by This was returned in
|
||||||
|
DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
|
||||||
|
EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This is not currently
|
||||||
|
managing the controller specified by
|
||||||
|
ControllerHandle and ChildHandle.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterSimplePointerComponentNameGetControllerName (
|
ConSplitterSimplePointerComponentNameGetControllerName (
|
||||||
|
@ -236,51 +391,6 @@ ConSplitterSimplePointerComponentNameGetControllerName (
|
||||||
IN CHAR8 *Language,
|
IN CHAR8 *Language,
|
||||||
OUT CHAR16 **ControllerName
|
OUT CHAR16 **ControllerName
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Retrieves a Unicode string that is the user readable name of the controller
|
|
||||||
that is being managed by an EFI Driver.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
|
||||||
ControllerHandle - The handle of a controller that the driver specified by
|
|
||||||
This is managing. This handle specifies the controller
|
|
||||||
whose name is to be returned.
|
|
||||||
ChildHandle - The handle of the child controller to retrieve the name
|
|
||||||
of. This is an optional parameter that may be NULL. It
|
|
||||||
will be NULL for device drivers. It will also be NULL
|
|
||||||
for a bus drivers that wish to retrieve the name of the
|
|
||||||
bus controller. It will not be NULL for a bus driver
|
|
||||||
that wishes to retrieve the name of a child controller.
|
|
||||||
Language - A pointer to a three character ISO 639-2 language
|
|
||||||
identifier. This is the language of the controller name
|
|
||||||
that that the caller is requesting, and it must match one
|
|
||||||
of the languages specified in SupportedLanguages. The
|
|
||||||
number of languages supported by a driver is up to the
|
|
||||||
driver writer.
|
|
||||||
ControllerName - A pointer to the Unicode string to return. This Unicode
|
|
||||||
string is the name of the controller specified by
|
|
||||||
ControllerHandle and ChildHandle in the language
|
|
||||||
specified by Language from the point of view of the
|
|
||||||
driver specified by This.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The Unicode string for the user readable name in the
|
|
||||||
language specified by Language for the driver
|
|
||||||
specified by This was returned in DriverName.
|
|
||||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
|
|
||||||
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
|
|
||||||
EFI_HANDLE.
|
|
||||||
EFI_INVALID_PARAMETER - Language is NULL.
|
|
||||||
EFI_INVALID_PARAMETER - ControllerName is NULL.
|
|
||||||
EFI_UNSUPPORTED - The driver specified by This is not currently
|
|
||||||
managing the controller specified by
|
|
||||||
ControllerHandle and ChildHandle.
|
|
||||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
|
||||||
language specified by Language.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer;
|
EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer;
|
||||||
|
@ -303,14 +413,83 @@ ConSplitterSimplePointerComponentNameGetControllerName (
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
return LookupUnicodeString (
|
return LookupUnicodeString2 (
|
||||||
Language,
|
Language,
|
||||||
gConSplitterSimplePointerComponentName.SupportedLanguages,
|
This->SupportedLanguages,
|
||||||
mConSplitterSimplePointerControllerNameTable,
|
mConSplitterSimplePointerControllerNameTable,
|
||||||
ControllerName
|
ControllerName,
|
||||||
);
|
(BOOLEAN)(This == &gConSplitterSimplePointerComponentName)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the controller
|
||||||
|
that is being managed by a driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of the controller specified by
|
||||||
|
ControllerHandle and ChildHandle in the form of a Unicode string. If the
|
||||||
|
driver specified by This has a user readable name in the language specified by
|
||||||
|
Language, then a pointer to the controller name is returned in ControllerName,
|
||||||
|
and EFI_SUCCESS is returned. If the driver specified by This is not currently
|
||||||
|
managing the controller specified by ControllerHandle and ChildHandle,
|
||||||
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
|
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param ControllerHandle[in] The handle of a controller that the driver
|
||||||
|
specified by This is managing. This handle
|
||||||
|
specifies the controller whose name is to be
|
||||||
|
returned.
|
||||||
|
|
||||||
|
@param ChildHandle[in] The handle of the child controller to retrieve
|
||||||
|
the name of. This is an optional parameter that
|
||||||
|
may be NULL. It will be NULL for device
|
||||||
|
drivers. It will also be NULL for a bus drivers
|
||||||
|
that wish to retrieve the name of the bus
|
||||||
|
controller. It will not be NULL for a bus
|
||||||
|
driver that wishes to retrieve the name of a
|
||||||
|
child controller.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified in
|
||||||
|
RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param ControllerName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
controller specified by ControllerHandle and
|
||||||
|
ChildHandle in the language specified by
|
||||||
|
Language from the point of view of the driver
|
||||||
|
specified by This.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the user readable name in
|
||||||
|
the language specified by Language for the
|
||||||
|
driver specified by This was returned in
|
||||||
|
DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
|
||||||
|
EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This is not currently
|
||||||
|
managing the controller specified by
|
||||||
|
ControllerHandle and ChildHandle.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterConOutComponentNameGetControllerName (
|
ConSplitterConOutComponentNameGetControllerName (
|
||||||
|
@ -320,51 +499,6 @@ ConSplitterConOutComponentNameGetControllerName (
|
||||||
IN CHAR8 *Language,
|
IN CHAR8 *Language,
|
||||||
OUT CHAR16 **ControllerName
|
OUT CHAR16 **ControllerName
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Retrieves a Unicode string that is the user readable name of the controller
|
|
||||||
that is being managed by an EFI Driver.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
|
||||||
ControllerHandle - The handle of a controller that the driver specified by
|
|
||||||
This is managing. This handle specifies the controller
|
|
||||||
whose name is to be returned.
|
|
||||||
ChildHandle - The handle of the child controller to retrieve the name
|
|
||||||
of. This is an optional parameter that may be NULL. It
|
|
||||||
will be NULL for device drivers. It will also be NULL
|
|
||||||
for a bus drivers that wish to retrieve the name of the
|
|
||||||
bus controller. It will not be NULL for a bus driver
|
|
||||||
that wishes to retrieve the name of a child controller.
|
|
||||||
Language - A pointer to a three character ISO 639-2 language
|
|
||||||
identifier. This is the language of the controller name
|
|
||||||
that that the caller is requesting, and it must match one
|
|
||||||
of the languages specified in SupportedLanguages. The
|
|
||||||
number of languages supported by a driver is up to the
|
|
||||||
driver writer.
|
|
||||||
ControllerName - A pointer to the Unicode string to return. This Unicode
|
|
||||||
string is the name of the controller specified by
|
|
||||||
ControllerHandle and ChildHandle in the language
|
|
||||||
specified by Language from the point of view of the
|
|
||||||
driver specified by This.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The Unicode string for the user readable name in the
|
|
||||||
language specified by Language for the driver
|
|
||||||
specified by This was returned in DriverName.
|
|
||||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
|
|
||||||
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
|
|
||||||
EFI_HANDLE.
|
|
||||||
EFI_INVALID_PARAMETER - Language is NULL.
|
|
||||||
EFI_INVALID_PARAMETER - ControllerName is NULL.
|
|
||||||
EFI_UNSUPPORTED - The driver specified by This is not currently
|
|
||||||
managing the controller specified by
|
|
||||||
ControllerHandle and ChildHandle.
|
|
||||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
|
||||||
language specified by Language.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
|
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;
|
||||||
|
@ -387,14 +521,83 @@ ConSplitterConOutComponentNameGetControllerName (
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
return LookupUnicodeString (
|
return LookupUnicodeString2 (
|
||||||
Language,
|
Language,
|
||||||
gConSplitterConOutComponentName.SupportedLanguages,
|
This->SupportedLanguages,
|
||||||
mConSplitterConOutControllerNameTable,
|
mConSplitterConOutControllerNameTable,
|
||||||
ControllerName
|
ControllerName,
|
||||||
);
|
(BOOLEAN)(This == &gConSplitterConOutComponentName)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the controller
|
||||||
|
that is being managed by a driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of the controller specified by
|
||||||
|
ControllerHandle and ChildHandle in the form of a Unicode string. If the
|
||||||
|
driver specified by This has a user readable name in the language specified by
|
||||||
|
Language, then a pointer to the controller name is returned in ControllerName,
|
||||||
|
and EFI_SUCCESS is returned. If the driver specified by This is not currently
|
||||||
|
managing the controller specified by ControllerHandle and ChildHandle,
|
||||||
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
|
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param ControllerHandle[in] The handle of a controller that the driver
|
||||||
|
specified by This is managing. This handle
|
||||||
|
specifies the controller whose name is to be
|
||||||
|
returned.
|
||||||
|
|
||||||
|
@param ChildHandle[in] The handle of the child controller to retrieve
|
||||||
|
the name of. This is an optional parameter that
|
||||||
|
may be NULL. It will be NULL for device
|
||||||
|
drivers. It will also be NULL for a bus drivers
|
||||||
|
that wish to retrieve the name of the bus
|
||||||
|
controller. It will not be NULL for a bus
|
||||||
|
driver that wishes to retrieve the name of a
|
||||||
|
child controller.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified in
|
||||||
|
RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param ControllerName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
controller specified by ControllerHandle and
|
||||||
|
ChildHandle in the language specified by
|
||||||
|
Language from the point of view of the driver
|
||||||
|
specified by This.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the user readable name in
|
||||||
|
the language specified by Language for the
|
||||||
|
driver specified by This was returned in
|
||||||
|
DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
|
||||||
|
EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This is not currently
|
||||||
|
managing the controller specified by
|
||||||
|
ControllerHandle and ChildHandle.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterStdErrComponentNameGetControllerName (
|
ConSplitterStdErrComponentNameGetControllerName (
|
||||||
|
@ -404,51 +607,6 @@ ConSplitterStdErrComponentNameGetControllerName (
|
||||||
IN CHAR8 *Language,
|
IN CHAR8 *Language,
|
||||||
OUT CHAR16 **ControllerName
|
OUT CHAR16 **ControllerName
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Retrieves a Unicode string that is the user readable name of the controller
|
|
||||||
that is being managed by an EFI Driver.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
|
||||||
ControllerHandle - The handle of a controller that the driver specified by
|
|
||||||
This is managing. This handle specifies the controller
|
|
||||||
whose name is to be returned.
|
|
||||||
ChildHandle - The handle of the child controller to retrieve the name
|
|
||||||
of. This is an optional parameter that may be NULL. It
|
|
||||||
will be NULL for device drivers. It will also be NULL
|
|
||||||
for a bus drivers that wish to retrieve the name of the
|
|
||||||
bus controller. It will not be NULL for a bus driver
|
|
||||||
that wishes to retrieve the name of a child controller.
|
|
||||||
Language - A pointer to a three character ISO 639-2 language
|
|
||||||
identifier. This is the language of the controller name
|
|
||||||
that that the caller is requesting, and it must match one
|
|
||||||
of the languages specified in SupportedLanguages. The
|
|
||||||
number of languages supported by a driver is up to the
|
|
||||||
driver writer.
|
|
||||||
ControllerName - A pointer to the Unicode string to return. This Unicode
|
|
||||||
string is the name of the controller specified by
|
|
||||||
ControllerHandle and ChildHandle in the language
|
|
||||||
specified by Language from the point of view of the
|
|
||||||
driver specified by This.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The Unicode string for the user readable name in the
|
|
||||||
language specified by Language for the driver
|
|
||||||
specified by This was returned in DriverName.
|
|
||||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
|
|
||||||
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
|
|
||||||
EFI_HANDLE.
|
|
||||||
EFI_INVALID_PARAMETER - Language is NULL.
|
|
||||||
EFI_INVALID_PARAMETER - ControllerName is NULL.
|
|
||||||
EFI_UNSUPPORTED - The driver specified by This is not currently
|
|
||||||
managing the controller specified by
|
|
||||||
ControllerHandle and ChildHandle.
|
|
||||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
|
||||||
language specified by Language.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ErrOut;
|
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ErrOut;
|
||||||
|
@ -471,10 +629,11 @@ ConSplitterStdErrComponentNameGetControllerName (
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
return LookupUnicodeString (
|
return LookupUnicodeString2 (
|
||||||
Language,
|
Language,
|
||||||
gConSplitterStdErrComponentName.SupportedLanguages,
|
This->SupportedLanguages,
|
||||||
mConSplitterStdErrControllerNameTable,
|
mConSplitterStdErrControllerNameTable,
|
||||||
ControllerName
|
ControllerName,
|
||||||
);
|
(BOOLEAN)(This == &gConSplitterStdErrComponentName)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,47 +245,43 @@ InitializeConSplitter(
|
||||||
//
|
//
|
||||||
// Install driver model protocol(s).
|
// Install driver model protocol(s).
|
||||||
//
|
//
|
||||||
Status = EfiLibInstallAllDriverProtocols (
|
Status = EfiLibInstallDriverBindingComponentName2 (
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
SystemTable,
|
SystemTable,
|
||||||
&gConSplitterConInDriverBinding,
|
&gConSplitterConInDriverBinding,
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
&gConSplitterConInComponentName,
|
&gConSplitterConInComponentName,
|
||||||
NULL,
|
&gConSplitterConInComponentName2
|
||||||
NULL
|
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
Status = EfiLibInstallAllDriverProtocols (
|
Status = EfiLibInstallDriverBindingComponentName2 (
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
SystemTable,
|
SystemTable,
|
||||||
&gConSplitterSimplePointerDriverBinding,
|
&gConSplitterSimplePointerDriverBinding,
|
||||||
NULL,
|
NULL,
|
||||||
&gConSplitterSimplePointerComponentName,
|
&gConSplitterSimplePointerComponentName,
|
||||||
NULL,
|
&gConSplitterSimplePointerComponentName2
|
||||||
NULL
|
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
Status = EfiLibInstallAllDriverProtocols (
|
Status = EfiLibInstallDriverBindingComponentName2 (
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
SystemTable,
|
SystemTable,
|
||||||
&gConSplitterConOutDriverBinding,
|
&gConSplitterConOutDriverBinding,
|
||||||
NULL,
|
NULL,
|
||||||
&gConSplitterConOutComponentName,
|
&gConSplitterConOutComponentName,
|
||||||
NULL,
|
&gConSplitterConOutComponentName2
|
||||||
NULL
|
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
Status = EfiLibInstallAllDriverProtocols (
|
Status = EfiLibInstallDriverBindingComponentName2 (
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
SystemTable,
|
SystemTable,
|
||||||
&gConSplitterStdErrDriverBinding,
|
&gConSplitterStdErrDriverBinding,
|
||||||
NULL,
|
NULL,
|
||||||
&gConSplitterStdErrComponentName,
|
&gConSplitterStdErrComponentName,
|
||||||
NULL,
|
&gConSplitterStdErrComponentName2
|
||||||
NULL
|
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
|
|
@ -39,14 +39,18 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
//
|
//
|
||||||
// Driver Binding Externs
|
// Driver Binding Externs
|
||||||
//
|
//
|
||||||
extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding;
|
extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding;
|
||||||
extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName;
|
extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName;
|
||||||
extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding;
|
extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConInComponentName2;
|
||||||
extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName;
|
extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding;
|
||||||
extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding;
|
extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName;
|
||||||
extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName;
|
extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterSimplePointerComponentName2;
|
||||||
extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding;
|
extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding;
|
||||||
extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName;
|
extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName;
|
||||||
|
extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConOutComponentName2;
|
||||||
|
extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding;
|
||||||
|
extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName;
|
||||||
|
extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterStdErrComponentName2;
|
||||||
|
|
||||||
// These definitions were in the old Hii protocol, but are not in the new UEFI
|
// These definitions were in the old Hii protocol, but are not in the new UEFI
|
||||||
// version. So they are defined locally.
|
// version. So they are defined locally.
|
||||||
|
@ -323,6 +327,45 @@ ConSplitterStdErrDriverBindingStop (
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of a driver in the form of a
|
||||||
|
Unicode string. If the driver specified by This has a user readable name in
|
||||||
|
the language specified by Language, then a pointer to the driver name is
|
||||||
|
returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
|
||||||
|
by This does not support the language specified by Language,
|
||||||
|
then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified
|
||||||
|
in RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param DriverName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
driver specified by This in the language
|
||||||
|
specified by Language.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the Driver specified by
|
||||||
|
This and the language specified by Language was
|
||||||
|
returned in DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER DriverName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterComponentNameGetDriverName (
|
ConSplitterComponentNameGetDriverName (
|
||||||
|
@ -331,6 +374,75 @@ ConSplitterComponentNameGetDriverName (
|
||||||
OUT CHAR16 **DriverName
|
OUT CHAR16 **DriverName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the controller
|
||||||
|
that is being managed by a driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of the controller specified by
|
||||||
|
ControllerHandle and ChildHandle in the form of a Unicode string. If the
|
||||||
|
driver specified by This has a user readable name in the language specified by
|
||||||
|
Language, then a pointer to the controller name is returned in ControllerName,
|
||||||
|
and EFI_SUCCESS is returned. If the driver specified by This is not currently
|
||||||
|
managing the controller specified by ControllerHandle and ChildHandle,
|
||||||
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
|
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param ControllerHandle[in] The handle of a controller that the driver
|
||||||
|
specified by This is managing. This handle
|
||||||
|
specifies the controller whose name is to be
|
||||||
|
returned.
|
||||||
|
|
||||||
|
@param ChildHandle[in] The handle of the child controller to retrieve
|
||||||
|
the name of. This is an optional parameter that
|
||||||
|
may be NULL. It will be NULL for device
|
||||||
|
drivers. It will also be NULL for a bus drivers
|
||||||
|
that wish to retrieve the name of the bus
|
||||||
|
controller. It will not be NULL for a bus
|
||||||
|
driver that wishes to retrieve the name of a
|
||||||
|
child controller.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified in
|
||||||
|
RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param ControllerName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
controller specified by ControllerHandle and
|
||||||
|
ChildHandle in the language specified by
|
||||||
|
Language from the point of view of the driver
|
||||||
|
specified by This.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the user readable name in
|
||||||
|
the language specified by Language for the
|
||||||
|
driver specified by This was returned in
|
||||||
|
DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
|
||||||
|
EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This is not currently
|
||||||
|
managing the controller specified by
|
||||||
|
ControllerHandle and ChildHandle.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterConInComponentNameGetControllerName (
|
ConSplitterConInComponentNameGetControllerName (
|
||||||
|
@ -341,6 +453,75 @@ ConSplitterConInComponentNameGetControllerName (
|
||||||
OUT CHAR16 **ControllerName
|
OUT CHAR16 **ControllerName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the controller
|
||||||
|
that is being managed by a driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of the controller specified by
|
||||||
|
ControllerHandle and ChildHandle in the form of a Unicode string. If the
|
||||||
|
driver specified by This has a user readable name in the language specified by
|
||||||
|
Language, then a pointer to the controller name is returned in ControllerName,
|
||||||
|
and EFI_SUCCESS is returned. If the driver specified by This is not currently
|
||||||
|
managing the controller specified by ControllerHandle and ChildHandle,
|
||||||
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
|
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param ControllerHandle[in] The handle of a controller that the driver
|
||||||
|
specified by This is managing. This handle
|
||||||
|
specifies the controller whose name is to be
|
||||||
|
returned.
|
||||||
|
|
||||||
|
@param ChildHandle[in] The handle of the child controller to retrieve
|
||||||
|
the name of. This is an optional parameter that
|
||||||
|
may be NULL. It will be NULL for device
|
||||||
|
drivers. It will also be NULL for a bus drivers
|
||||||
|
that wish to retrieve the name of the bus
|
||||||
|
controller. It will not be NULL for a bus
|
||||||
|
driver that wishes to retrieve the name of a
|
||||||
|
child controller.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified in
|
||||||
|
RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param ControllerName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
controller specified by ControllerHandle and
|
||||||
|
ChildHandle in the language specified by
|
||||||
|
Language from the point of view of the driver
|
||||||
|
specified by This.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the user readable name in
|
||||||
|
the language specified by Language for the
|
||||||
|
driver specified by This was returned in
|
||||||
|
DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
|
||||||
|
EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This is not currently
|
||||||
|
managing the controller specified by
|
||||||
|
ControllerHandle and ChildHandle.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterSimplePointerComponentNameGetControllerName (
|
ConSplitterSimplePointerComponentNameGetControllerName (
|
||||||
|
@ -351,6 +532,75 @@ ConSplitterSimplePointerComponentNameGetControllerName (
|
||||||
OUT CHAR16 **ControllerName
|
OUT CHAR16 **ControllerName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the controller
|
||||||
|
that is being managed by a driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of the controller specified by
|
||||||
|
ControllerHandle and ChildHandle in the form of a Unicode string. If the
|
||||||
|
driver specified by This has a user readable name in the language specified by
|
||||||
|
Language, then a pointer to the controller name is returned in ControllerName,
|
||||||
|
and EFI_SUCCESS is returned. If the driver specified by This is not currently
|
||||||
|
managing the controller specified by ControllerHandle and ChildHandle,
|
||||||
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
|
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param ControllerHandle[in] The handle of a controller that the driver
|
||||||
|
specified by This is managing. This handle
|
||||||
|
specifies the controller whose name is to be
|
||||||
|
returned.
|
||||||
|
|
||||||
|
@param ChildHandle[in] The handle of the child controller to retrieve
|
||||||
|
the name of. This is an optional parameter that
|
||||||
|
may be NULL. It will be NULL for device
|
||||||
|
drivers. It will also be NULL for a bus drivers
|
||||||
|
that wish to retrieve the name of the bus
|
||||||
|
controller. It will not be NULL for a bus
|
||||||
|
driver that wishes to retrieve the name of a
|
||||||
|
child controller.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified in
|
||||||
|
RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param ControllerName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
controller specified by ControllerHandle and
|
||||||
|
ChildHandle in the language specified by
|
||||||
|
Language from the point of view of the driver
|
||||||
|
specified by This.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the user readable name in
|
||||||
|
the language specified by Language for the
|
||||||
|
driver specified by This was returned in
|
||||||
|
DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
|
||||||
|
EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This is not currently
|
||||||
|
managing the controller specified by
|
||||||
|
ControllerHandle and ChildHandle.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterConOutComponentNameGetControllerName (
|
ConSplitterConOutComponentNameGetControllerName (
|
||||||
|
@ -361,6 +611,75 @@ ConSplitterConOutComponentNameGetControllerName (
|
||||||
OUT CHAR16 **ControllerName
|
OUT CHAR16 **ControllerName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the controller
|
||||||
|
that is being managed by a driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of the controller specified by
|
||||||
|
ControllerHandle and ChildHandle in the form of a Unicode string. If the
|
||||||
|
driver specified by This has a user readable name in the language specified by
|
||||||
|
Language, then a pointer to the controller name is returned in ControllerName,
|
||||||
|
and EFI_SUCCESS is returned. If the driver specified by This is not currently
|
||||||
|
managing the controller specified by ControllerHandle and ChildHandle,
|
||||||
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
|
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param ControllerHandle[in] The handle of a controller that the driver
|
||||||
|
specified by This is managing. This handle
|
||||||
|
specifies the controller whose name is to be
|
||||||
|
returned.
|
||||||
|
|
||||||
|
@param ChildHandle[in] The handle of the child controller to retrieve
|
||||||
|
the name of. This is an optional parameter that
|
||||||
|
may be NULL. It will be NULL for device
|
||||||
|
drivers. It will also be NULL for a bus drivers
|
||||||
|
that wish to retrieve the name of the bus
|
||||||
|
controller. It will not be NULL for a bus
|
||||||
|
driver that wishes to retrieve the name of a
|
||||||
|
child controller.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified in
|
||||||
|
RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param ControllerName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
controller specified by ControllerHandle and
|
||||||
|
ChildHandle in the language specified by
|
||||||
|
Language from the point of view of the driver
|
||||||
|
specified by This.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the user readable name in
|
||||||
|
the language specified by Language for the
|
||||||
|
driver specified by This was returned in
|
||||||
|
DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
|
||||||
|
EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This is not currently
|
||||||
|
managing the controller specified by
|
||||||
|
ControllerHandle and ChildHandle.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ConSplitterStdErrComponentNameGetControllerName (
|
ConSplitterStdErrComponentNameGetControllerName (
|
||||||
|
@ -371,6 +690,7 @@ ConSplitterStdErrComponentNameGetControllerName (
|
||||||
OUT CHAR16 **ControllerName
|
OUT CHAR16 **ControllerName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// TextIn Constructor/Destructor functions
|
// TextIn Constructor/Destructor functions
|
||||||
//
|
//
|
||||||
|
|
|
@ -22,15 +22,25 @@ Abstract:
|
||||||
//
|
//
|
||||||
// EFI Component Name Protocol
|
// EFI Component Name Protocol
|
||||||
//
|
//
|
||||||
EFI_COMPONENT_NAME_PROTOCOL gGraphicsConsoleComponentName = {
|
EFI_COMPONENT_NAME_PROTOCOL gGraphicsConsoleComponentName = {
|
||||||
GraphicsConsoleComponentNameGetDriverName,
|
GraphicsConsoleComponentNameGetDriverName,
|
||||||
GraphicsConsoleComponentNameGetControllerName,
|
GraphicsConsoleComponentNameGetControllerName,
|
||||||
"eng"
|
"eng"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
// EFI Component Name 2 Protocol
|
||||||
|
//
|
||||||
|
EFI_COMPONENT_NAME2_PROTOCOL gGraphicsConsoleComponentName2 = {
|
||||||
|
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME) GraphicsConsoleComponentNameGetDriverName,
|
||||||
|
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) GraphicsConsoleComponentNameGetControllerName,
|
||||||
|
"en"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
STATIC EFI_UNICODE_STRING_TABLE mGraphicsConsoleDriverNameTable[] = {
|
STATIC EFI_UNICODE_STRING_TABLE mGraphicsConsoleDriverNameTable[] = {
|
||||||
{
|
{
|
||||||
"eng",
|
"eng;en",
|
||||||
(CHAR16 *)L"UGA Console Driver"
|
(CHAR16 *)L"UGA Console Driver"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -39,6 +49,45 @@ STATIC EFI_UNICODE_STRING_TABLE mGraphicsConsoleDriverNameTable[] = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of a driver in the form of a
|
||||||
|
Unicode string. If the driver specified by This has a user readable name in
|
||||||
|
the language specified by Language, then a pointer to the driver name is
|
||||||
|
returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
|
||||||
|
by This does not support the language specified by Language,
|
||||||
|
then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified
|
||||||
|
in RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param DriverName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
driver specified by This in the language
|
||||||
|
specified by Language.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the Driver specified by
|
||||||
|
This and the language specified by Language was
|
||||||
|
returned in DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER DriverName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
GraphicsConsoleComponentNameGetDriverName (
|
GraphicsConsoleComponentNameGetDriverName (
|
||||||
|
@ -46,41 +95,84 @@ GraphicsConsoleComponentNameGetDriverName (
|
||||||
IN CHAR8 *Language,
|
IN CHAR8 *Language,
|
||||||
OUT CHAR16 **DriverName
|
OUT CHAR16 **DriverName
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Retrieves a Unicode string that is the user readable name of the EFI Driver.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
|
||||||
Language - A pointer to a three character ISO 639-2 language identifier.
|
|
||||||
This is the language of the driver name that that the caller
|
|
||||||
is requesting, and it must match one of the languages specified
|
|
||||||
in SupportedLanguages. The number of languages supported by a
|
|
||||||
driver is up to the driver writer.
|
|
||||||
DriverName - A pointer to the Unicode string to return. This Unicode string
|
|
||||||
is the name of the driver specified by This in the language
|
|
||||||
specified by Language.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The Unicode string for the Driver specified by This
|
|
||||||
and the language specified by Language was returned
|
|
||||||
in DriverName.
|
|
||||||
EFI_INVALID_PARAMETER - Language is NULL.
|
|
||||||
EFI_INVALID_PARAMETER - DriverName is NULL.
|
|
||||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
|
||||||
language specified by Language.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
return LookupUnicodeString (
|
return LookupUnicodeString2 (
|
||||||
Language,
|
Language,
|
||||||
gGraphicsConsoleComponentName.SupportedLanguages,
|
This->SupportedLanguages,
|
||||||
mGraphicsConsoleDriverNameTable,
|
mGraphicsConsoleDriverNameTable,
|
||||||
DriverName
|
DriverName,
|
||||||
);
|
(BOOLEAN)(This == &gGraphicsConsoleComponentName)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the controller
|
||||||
|
that is being managed by a driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of the controller specified by
|
||||||
|
ControllerHandle and ChildHandle in the form of a Unicode string. If the
|
||||||
|
driver specified by This has a user readable name in the language specified by
|
||||||
|
Language, then a pointer to the controller name is returned in ControllerName,
|
||||||
|
and EFI_SUCCESS is returned. If the driver specified by This is not currently
|
||||||
|
managing the controller specified by ControllerHandle and ChildHandle,
|
||||||
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
|
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param ControllerHandle[in] The handle of a controller that the driver
|
||||||
|
specified by This is managing. This handle
|
||||||
|
specifies the controller whose name is to be
|
||||||
|
returned.
|
||||||
|
|
||||||
|
@param ChildHandle[in] The handle of the child controller to retrieve
|
||||||
|
the name of. This is an optional parameter that
|
||||||
|
may be NULL. It will be NULL for device
|
||||||
|
drivers. It will also be NULL for a bus drivers
|
||||||
|
that wish to retrieve the name of the bus
|
||||||
|
controller. It will not be NULL for a bus
|
||||||
|
driver that wishes to retrieve the name of a
|
||||||
|
child controller.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified in
|
||||||
|
RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param ControllerName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
controller specified by ControllerHandle and
|
||||||
|
ChildHandle in the language specified by
|
||||||
|
Language from the point of view of the driver
|
||||||
|
specified by This.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the user readable name in
|
||||||
|
the language specified by Language for the
|
||||||
|
driver specified by This was returned in
|
||||||
|
DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
|
||||||
|
EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This is not currently
|
||||||
|
managing the controller specified by
|
||||||
|
ControllerHandle and ChildHandle.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
GraphicsConsoleComponentNameGetControllerName (
|
GraphicsConsoleComponentNameGetControllerName (
|
||||||
|
@ -90,50 +182,6 @@ GraphicsConsoleComponentNameGetControllerName (
|
||||||
IN CHAR8 *Language,
|
IN CHAR8 *Language,
|
||||||
OUT CHAR16 **ControllerName
|
OUT CHAR16 **ControllerName
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Retrieves a Unicode string that is the user readable name of the controller
|
|
||||||
that is being managed by an EFI Driver.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
|
||||||
ControllerHandle - The handle of a controller that the driver specified by
|
|
||||||
This is managing. This handle specifies the controller
|
|
||||||
whose name is to be returned.
|
|
||||||
ChildHandle - The handle of the child controller to retrieve the name
|
|
||||||
of. This is an optional parameter that may be NULL. It
|
|
||||||
will be NULL for device drivers. It will also be NULL
|
|
||||||
for a bus drivers that wish to retrieve the name of the
|
|
||||||
bus controller. It will not be NULL for a bus driver
|
|
||||||
that wishes to retrieve the name of a child controller.
|
|
||||||
Language - A pointer to a three character ISO 639-2 language
|
|
||||||
identifier. This is the language of the controller name
|
|
||||||
that that the caller is requesting, and it must match one
|
|
||||||
of the languages specified in SupportedLanguages. The
|
|
||||||
number of languages supported by a driver is up to the
|
|
||||||
driver writer.
|
|
||||||
ControllerName - A pointer to the Unicode string to return. This Unicode
|
|
||||||
string is the name of the controller specified by
|
|
||||||
ControllerHandle and ChildHandle in the language specified
|
|
||||||
by Language from the point of view of the driver specified
|
|
||||||
by This.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The Unicode string for the user readable name in the
|
|
||||||
language specified by Language for the driver
|
|
||||||
specified by This was returned in DriverName.
|
|
||||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
|
|
||||||
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
|
||||||
EFI_INVALID_PARAMETER - Language is NULL.
|
|
||||||
EFI_INVALID_PARAMETER - ControllerName is NULL.
|
|
||||||
EFI_UNSUPPORTED - The driver specified by This is not currently managing
|
|
||||||
the controller specified by ControllerHandle and
|
|
||||||
ChildHandle.
|
|
||||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
|
||||||
language specified by Language.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1842,14 +1842,13 @@ InitializeGraphicsConsole (
|
||||||
//
|
//
|
||||||
// Install driver model protocol(s).
|
// Install driver model protocol(s).
|
||||||
//
|
//
|
||||||
Status = EfiLibInstallAllDriverProtocols (
|
Status = EfiLibInstallDriverBindingComponentName2 (
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
SystemTable,
|
SystemTable,
|
||||||
&gGraphicsConsoleDriverBinding,
|
&gGraphicsConsoleDriverBinding,
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
&gGraphicsConsoleComponentName,
|
&gGraphicsConsoleComponentName,
|
||||||
NULL,
|
&gGraphicsConsoleComponentName2
|
||||||
NULL
|
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
|
|
@ -38,11 +38,51 @@ Revision History
|
||||||
#include <Library/UefiBootServicesTableLib.h>
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
|
|
||||||
|
|
||||||
extern EFI_COMPONENT_NAME_PROTOCOL gGraphicsConsoleComponentName;
|
extern EFI_COMPONENT_NAME_PROTOCOL gGraphicsConsoleComponentName;
|
||||||
|
extern EFI_COMPONENT_NAME2_PROTOCOL gGraphicsConsoleComponentName2;
|
||||||
|
|
||||||
//
|
//
|
||||||
// EFI Component Name Functions
|
// EFI Component Name Functions
|
||||||
//
|
//
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of a driver in the form of a
|
||||||
|
Unicode string. If the driver specified by This has a user readable name in
|
||||||
|
the language specified by Language, then a pointer to the driver name is
|
||||||
|
returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
|
||||||
|
by This does not support the language specified by Language,
|
||||||
|
then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified
|
||||||
|
in RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param DriverName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
driver specified by This in the language
|
||||||
|
specified by Language.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the Driver specified by
|
||||||
|
This and the language specified by Language was
|
||||||
|
returned in DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER DriverName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
GraphicsConsoleComponentNameGetDriverName (
|
GraphicsConsoleComponentNameGetDriverName (
|
||||||
|
@ -51,6 +91,75 @@ GraphicsConsoleComponentNameGetDriverName (
|
||||||
OUT CHAR16 **DriverName
|
OUT CHAR16 **DriverName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the controller
|
||||||
|
that is being managed by a driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of the controller specified by
|
||||||
|
ControllerHandle and ChildHandle in the form of a Unicode string. If the
|
||||||
|
driver specified by This has a user readable name in the language specified by
|
||||||
|
Language, then a pointer to the controller name is returned in ControllerName,
|
||||||
|
and EFI_SUCCESS is returned. If the driver specified by This is not currently
|
||||||
|
managing the controller specified by ControllerHandle and ChildHandle,
|
||||||
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
|
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param ControllerHandle[in] The handle of a controller that the driver
|
||||||
|
specified by This is managing. This handle
|
||||||
|
specifies the controller whose name is to be
|
||||||
|
returned.
|
||||||
|
|
||||||
|
@param ChildHandle[in] The handle of the child controller to retrieve
|
||||||
|
the name of. This is an optional parameter that
|
||||||
|
may be NULL. It will be NULL for device
|
||||||
|
drivers. It will also be NULL for a bus drivers
|
||||||
|
that wish to retrieve the name of the bus
|
||||||
|
controller. It will not be NULL for a bus
|
||||||
|
driver that wishes to retrieve the name of a
|
||||||
|
child controller.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified in
|
||||||
|
RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param ControllerName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
controller specified by ControllerHandle and
|
||||||
|
ChildHandle in the language specified by
|
||||||
|
Language from the point of view of the driver
|
||||||
|
specified by This.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the user readable name in
|
||||||
|
the language specified by Language for the
|
||||||
|
driver specified by This was returned in
|
||||||
|
DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
|
||||||
|
EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This is not currently
|
||||||
|
managing the controller specified by
|
||||||
|
ControllerHandle and ChildHandle.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
GraphicsConsoleComponentNameGetControllerName (
|
GraphicsConsoleComponentNameGetControllerName (
|
||||||
|
@ -61,6 +170,7 @@ GraphicsConsoleComponentNameGetControllerName (
|
||||||
OUT CHAR16 **ControllerName
|
OUT CHAR16 **ControllerName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Glyph database
|
// Glyph database
|
||||||
//
|
//
|
||||||
|
@ -72,8 +182,8 @@ typedef union {
|
||||||
EFI_WIDE_GLYPH WideGlyph;
|
EFI_WIDE_GLYPH WideGlyph;
|
||||||
} GLYPH_UNION;
|
} GLYPH_UNION;
|
||||||
|
|
||||||
extern EFI_NARROW_GLYPH UsStdNarrowGlyphData[];
|
extern EFI_NARROW_GLYPH UsStdNarrowGlyphData[];
|
||||||
extern EFI_WIDE_GLYPH UsStdWideGlyphData[];
|
extern EFI_WIDE_GLYPH UsStdWideGlyphData[];
|
||||||
|
|
||||||
//
|
//
|
||||||
// Device Structure
|
// Device Structure
|
||||||
|
@ -109,7 +219,7 @@ typedef struct {
|
||||||
//
|
//
|
||||||
// Global Variables
|
// Global Variables
|
||||||
//
|
//
|
||||||
extern EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBinding;
|
extern EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBinding;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Prototypes
|
// Prototypes
|
||||||
|
|
|
@ -22,15 +22,25 @@ Abstract:
|
||||||
//
|
//
|
||||||
// EFI Component Name Protocol
|
// EFI Component Name Protocol
|
||||||
//
|
//
|
||||||
EFI_COMPONENT_NAME_PROTOCOL gTerminalComponentName = {
|
EFI_COMPONENT_NAME_PROTOCOL gTerminalComponentName = {
|
||||||
TerminalComponentNameGetDriverName,
|
TerminalComponentNameGetDriverName,
|
||||||
TerminalComponentNameGetControllerName,
|
TerminalComponentNameGetControllerName,
|
||||||
"eng"
|
"eng"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
// EFI Component Name 2 Protocol
|
||||||
|
//
|
||||||
|
EFI_COMPONENT_NAME2_PROTOCOL gTerminalComponentName2 = {
|
||||||
|
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME) TerminalComponentNameGetDriverName,
|
||||||
|
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) TerminalComponentNameGetControllerName,
|
||||||
|
"en"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
static EFI_UNICODE_STRING_TABLE mTerminalDriverNameTable[] = {
|
static EFI_UNICODE_STRING_TABLE mTerminalDriverNameTable[] = {
|
||||||
{
|
{
|
||||||
"eng",
|
"eng;en",
|
||||||
(CHAR16 *) L"Serial Terminal Driver"
|
(CHAR16 *) L"Serial Terminal Driver"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -39,6 +49,45 @@ static EFI_UNICODE_STRING_TABLE mTerminalDriverNameTable[] = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of a driver in the form of a
|
||||||
|
Unicode string. If the driver specified by This has a user readable name in
|
||||||
|
the language specified by Language, then a pointer to the driver name is
|
||||||
|
returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
|
||||||
|
by This does not support the language specified by Language,
|
||||||
|
then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified
|
||||||
|
in RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param DriverName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
driver specified by This in the language
|
||||||
|
specified by Language.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the Driver specified by
|
||||||
|
This and the language specified by Language was
|
||||||
|
returned in DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER DriverName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
TerminalComponentNameGetDriverName (
|
TerminalComponentNameGetDriverName (
|
||||||
|
@ -46,41 +95,84 @@ TerminalComponentNameGetDriverName (
|
||||||
IN CHAR8 *Language,
|
IN CHAR8 *Language,
|
||||||
OUT CHAR16 **DriverName
|
OUT CHAR16 **DriverName
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Retrieves a Unicode string that is the user readable name of the EFI Driver.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
|
||||||
Language - A pointer to a three character ISO 639-2 language identifier.
|
|
||||||
This is the language of the driver name that that the caller
|
|
||||||
is requesting, and it must match one of the languages specified
|
|
||||||
in SupportedLanguages. The number of languages supported by a
|
|
||||||
driver is up to the driver writer.
|
|
||||||
DriverName - A pointer to the Unicode string to return. This Unicode string
|
|
||||||
is the name of the driver specified by This in the language
|
|
||||||
specified by Language.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The Unicode string for the Driver specified by This
|
|
||||||
and the language specified by Language was returned
|
|
||||||
in DriverName.
|
|
||||||
EFI_INVALID_PARAMETER - Language is NULL.
|
|
||||||
EFI_INVALID_PARAMETER - DriverName is NULL.
|
|
||||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
|
||||||
language specified by Language.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
return LookupUnicodeString (
|
return LookupUnicodeString2 (
|
||||||
Language,
|
Language,
|
||||||
gTerminalComponentName.SupportedLanguages,
|
This->SupportedLanguages,
|
||||||
mTerminalDriverNameTable,
|
mTerminalDriverNameTable,
|
||||||
DriverName
|
DriverName,
|
||||||
);
|
(BOOLEAN)(This == &gTerminalComponentName)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the controller
|
||||||
|
that is being managed by a driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of the controller specified by
|
||||||
|
ControllerHandle and ChildHandle in the form of a Unicode string. If the
|
||||||
|
driver specified by This has a user readable name in the language specified by
|
||||||
|
Language, then a pointer to the controller name is returned in ControllerName,
|
||||||
|
and EFI_SUCCESS is returned. If the driver specified by This is not currently
|
||||||
|
managing the controller specified by ControllerHandle and ChildHandle,
|
||||||
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
|
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param ControllerHandle[in] The handle of a controller that the driver
|
||||||
|
specified by This is managing. This handle
|
||||||
|
specifies the controller whose name is to be
|
||||||
|
returned.
|
||||||
|
|
||||||
|
@param ChildHandle[in] The handle of the child controller to retrieve
|
||||||
|
the name of. This is an optional parameter that
|
||||||
|
may be NULL. It will be NULL for device
|
||||||
|
drivers. It will also be NULL for a bus drivers
|
||||||
|
that wish to retrieve the name of the bus
|
||||||
|
controller. It will not be NULL for a bus
|
||||||
|
driver that wishes to retrieve the name of a
|
||||||
|
child controller.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified in
|
||||||
|
RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param ControllerName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
controller specified by ControllerHandle and
|
||||||
|
ChildHandle in the language specified by
|
||||||
|
Language from the point of view of the driver
|
||||||
|
specified by This.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the user readable name in
|
||||||
|
the language specified by Language for the
|
||||||
|
driver specified by This was returned in
|
||||||
|
DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
|
||||||
|
EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This is not currently
|
||||||
|
managing the controller specified by
|
||||||
|
ControllerHandle and ChildHandle.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
TerminalComponentNameGetControllerName (
|
TerminalComponentNameGetControllerName (
|
||||||
|
@ -90,51 +182,6 @@ TerminalComponentNameGetControllerName (
|
||||||
IN CHAR8 *Language,
|
IN CHAR8 *Language,
|
||||||
OUT CHAR16 **ControllerName
|
OUT CHAR16 **ControllerName
|
||||||
)
|
)
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
Retrieves a Unicode string that is the user readable name of the controller
|
|
||||||
that is being managed by an EFI Driver.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
|
||||||
ControllerHandle - The handle of a controller that the driver specified by
|
|
||||||
This is managing. This handle specifies the controller
|
|
||||||
whose name is to be returned.
|
|
||||||
ChildHandle - The handle of the child controller to retrieve the name
|
|
||||||
of. This is an optional parameter that may be NULL. It
|
|
||||||
will be NULL for device drivers. It will also be NULL
|
|
||||||
for a bus drivers that wish to retrieve the name of the
|
|
||||||
bus controller. It will not be NULL for a bus driver
|
|
||||||
that wishes to retrieve the name of a child controller.
|
|
||||||
Language - A pointer to a three character ISO 639-2 language
|
|
||||||
identifier. This is the language of the controller name
|
|
||||||
that that the caller is requesting, and it must match one
|
|
||||||
of the languages specified in SupportedLanguages. The
|
|
||||||
number of languages supported by a driver is up to the
|
|
||||||
driver writer.
|
|
||||||
ControllerName - A pointer to the Unicode string to return. This Unicode
|
|
||||||
string is the name of the controller specified by
|
|
||||||
ControllerHandle and ChildHandle in the language
|
|
||||||
specified by Language from the point of view of the
|
|
||||||
driver specified by This.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
EFI_SUCCESS - The Unicode string for the user readable name in the
|
|
||||||
language specified by Language for the driver
|
|
||||||
specified by This was returned in DriverName.
|
|
||||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
|
|
||||||
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
|
|
||||||
EFI_HANDLE.
|
|
||||||
EFI_INVALID_PARAMETER - Language is NULL.
|
|
||||||
EFI_INVALID_PARAMETER - ControllerName is NULL.
|
|
||||||
EFI_UNSUPPORTED - The driver specified by This is not currently
|
|
||||||
managing the controller specified by
|
|
||||||
ControllerHandle and ChildHandle.
|
|
||||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
|
||||||
language specified by Language.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *SimpleTextOutput;
|
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *SimpleTextOutput;
|
||||||
|
@ -185,10 +232,11 @@ TerminalComponentNameGetControllerName (
|
||||||
|
|
||||||
TerminalDevice = TERMINAL_CON_OUT_DEV_FROM_THIS (SimpleTextOutput);
|
TerminalDevice = TERMINAL_CON_OUT_DEV_FROM_THIS (SimpleTextOutput);
|
||||||
|
|
||||||
return LookupUnicodeString (
|
return LookupUnicodeString2 (
|
||||||
Language,
|
Language,
|
||||||
gTerminalComponentName.SupportedLanguages,
|
This->SupportedLanguages,
|
||||||
TerminalDevice->ControllerNameTable,
|
TerminalDevice->ControllerNameTable,
|
||||||
ControllerName
|
ControllerName,
|
||||||
);
|
(BOOLEAN)(This == &gTerminalComponentName)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -498,39 +498,75 @@ TerminalDriverBindingStart (
|
||||||
TerminalDevice->ControllerNameTable = NULL;
|
TerminalDevice->ControllerNameTable = NULL;
|
||||||
switch (TerminalDevice->TerminalType) {
|
switch (TerminalDevice->TerminalType) {
|
||||||
case PcAnsiType:
|
case PcAnsiType:
|
||||||
AddUnicodeString (
|
AddUnicodeString2 (
|
||||||
"eng",
|
"eng",
|
||||||
gTerminalComponentName.SupportedLanguages,
|
gTerminalComponentName.SupportedLanguages,
|
||||||
&TerminalDevice->ControllerNameTable,
|
&TerminalDevice->ControllerNameTable,
|
||||||
(CHAR16 *)L"PC-ANSI Serial Console"
|
(CHAR16 *)L"PC-ANSI Serial Console",
|
||||||
|
TRUE
|
||||||
);
|
);
|
||||||
|
AddUnicodeString2 (
|
||||||
|
"en",
|
||||||
|
gTerminalComponentName2.SupportedLanguages,
|
||||||
|
&TerminalDevice->ControllerNameTable,
|
||||||
|
(CHAR16 *)L"PC-ANSI Serial Console",
|
||||||
|
FALSE
|
||||||
|
);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VT100Type:
|
case VT100Type:
|
||||||
AddUnicodeString (
|
AddUnicodeString2 (
|
||||||
"eng",
|
"eng",
|
||||||
gTerminalComponentName.SupportedLanguages,
|
gTerminalComponentName.SupportedLanguages,
|
||||||
&TerminalDevice->ControllerNameTable,
|
&TerminalDevice->ControllerNameTable,
|
||||||
(CHAR16 *)L"VT-100 Serial Console"
|
(CHAR16 *)L"VT-100 Serial Console",
|
||||||
|
TRUE
|
||||||
);
|
);
|
||||||
|
AddUnicodeString2 (
|
||||||
|
"en",
|
||||||
|
gTerminalComponentName2.SupportedLanguages,
|
||||||
|
&TerminalDevice->ControllerNameTable,
|
||||||
|
(CHAR16 *)L"VT-100 Serial Console",
|
||||||
|
FALSE
|
||||||
|
);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VT100PlusType:
|
case VT100PlusType:
|
||||||
AddUnicodeString (
|
AddUnicodeString2 (
|
||||||
"eng",
|
"eng",
|
||||||
gTerminalComponentName.SupportedLanguages,
|
gTerminalComponentName.SupportedLanguages,
|
||||||
&TerminalDevice->ControllerNameTable,
|
&TerminalDevice->ControllerNameTable,
|
||||||
(CHAR16 *)L"VT-100+ Serial Console"
|
(CHAR16 *)L"VT-100+ Serial Console",
|
||||||
|
TRUE
|
||||||
);
|
);
|
||||||
|
AddUnicodeString2 (
|
||||||
|
"en",
|
||||||
|
gTerminalComponentName2.SupportedLanguages,
|
||||||
|
&TerminalDevice->ControllerNameTable,
|
||||||
|
(CHAR16 *)L"VT-100+ Serial Console",
|
||||||
|
FALSE
|
||||||
|
);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VTUTF8Type:
|
case VTUTF8Type:
|
||||||
AddUnicodeString (
|
AddUnicodeString2 (
|
||||||
"eng",
|
"eng",
|
||||||
gTerminalComponentName.SupportedLanguages,
|
gTerminalComponentName.SupportedLanguages,
|
||||||
&TerminalDevice->ControllerNameTable,
|
&TerminalDevice->ControllerNameTable,
|
||||||
(CHAR16 *)L"VT-UTF8 Serial Console"
|
(CHAR16 *)L"VT-UTF8 Serial Console",
|
||||||
|
TRUE
|
||||||
);
|
);
|
||||||
|
AddUnicodeString2 (
|
||||||
|
"en",
|
||||||
|
gTerminalComponentName2.SupportedLanguages,
|
||||||
|
&TerminalDevice->ControllerNameTable,
|
||||||
|
(CHAR16 *)L"VT-UTF8 Serial Console",
|
||||||
|
FALSE
|
||||||
|
);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -1221,14 +1257,13 @@ InitializeTerminal(
|
||||||
//
|
//
|
||||||
// Install driver model protocol(s).
|
// Install driver model protocol(s).
|
||||||
//
|
//
|
||||||
Status = EfiLibInstallAllDriverProtocols (
|
Status = EfiLibInstallDriverBindingComponentName2 (
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
SystemTable,
|
SystemTable,
|
||||||
&gTerminalDriverBinding,
|
&gTerminalDriverBinding,
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
&gTerminalComponentName,
|
&gTerminalComponentName,
|
||||||
NULL,
|
&gTerminalComponentName2
|
||||||
NULL
|
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
|
|
|
@ -149,8 +149,9 @@ typedef struct {
|
||||||
//
|
//
|
||||||
// Global Variables
|
// Global Variables
|
||||||
//
|
//
|
||||||
extern EFI_DRIVER_BINDING_PROTOCOL gTerminalDriverBinding;
|
extern EFI_DRIVER_BINDING_PROTOCOL gTerminalDriverBinding;
|
||||||
extern EFI_COMPONENT_NAME_PROTOCOL gTerminalComponentName;
|
extern EFI_COMPONENT_NAME_PROTOCOL gTerminalComponentName;
|
||||||
|
extern EFI_COMPONENT_NAME2_PROTOCOL gTerminalComponentName2;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Prototypes
|
// Prototypes
|
||||||
|
@ -286,6 +287,45 @@ TerminalDriverBindingStop (
|
||||||
IN EFI_HANDLE *ChildHandleBuffer
|
IN EFI_HANDLE *ChildHandleBuffer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of a driver in the form of a
|
||||||
|
Unicode string. If the driver specified by This has a user readable name in
|
||||||
|
the language specified by Language, then a pointer to the driver name is
|
||||||
|
returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
|
||||||
|
by This does not support the language specified by Language,
|
||||||
|
then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified
|
||||||
|
in RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param DriverName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
driver specified by This in the language
|
||||||
|
specified by Language.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the Driver specified by
|
||||||
|
This and the language specified by Language was
|
||||||
|
returned in DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER DriverName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
TerminalComponentNameGetDriverName (
|
TerminalComponentNameGetDriverName (
|
||||||
|
@ -294,6 +334,75 @@ TerminalComponentNameGetDriverName (
|
||||||
OUT CHAR16 **DriverName
|
OUT CHAR16 **DriverName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Retrieves a Unicode string that is the user readable name of the controller
|
||||||
|
that is being managed by a driver.
|
||||||
|
|
||||||
|
This function retrieves the user readable name of the controller specified by
|
||||||
|
ControllerHandle and ChildHandle in the form of a Unicode string. If the
|
||||||
|
driver specified by This has a user readable name in the language specified by
|
||||||
|
Language, then a pointer to the controller name is returned in ControllerName,
|
||||||
|
and EFI_SUCCESS is returned. If the driver specified by This is not currently
|
||||||
|
managing the controller specified by ControllerHandle and ChildHandle,
|
||||||
|
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||||
|
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
||||||
|
|
||||||
|
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||||
|
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||||
|
|
||||||
|
@param ControllerHandle[in] The handle of a controller that the driver
|
||||||
|
specified by This is managing. This handle
|
||||||
|
specifies the controller whose name is to be
|
||||||
|
returned.
|
||||||
|
|
||||||
|
@param ChildHandle[in] The handle of the child controller to retrieve
|
||||||
|
the name of. This is an optional parameter that
|
||||||
|
may be NULL. It will be NULL for device
|
||||||
|
drivers. It will also be NULL for a bus drivers
|
||||||
|
that wish to retrieve the name of the bus
|
||||||
|
controller. It will not be NULL for a bus
|
||||||
|
driver that wishes to retrieve the name of a
|
||||||
|
child controller.
|
||||||
|
|
||||||
|
@param Language[in] A pointer to a Null-terminated ASCII string
|
||||||
|
array indicating the language. This is the
|
||||||
|
language of the driver name that the caller is
|
||||||
|
requesting, and it must match one of the
|
||||||
|
languages specified in SupportedLanguages. The
|
||||||
|
number of languages supported by a driver is up
|
||||||
|
to the driver writer. Language is specified in
|
||||||
|
RFC 3066 or ISO 639-2 language code format.
|
||||||
|
|
||||||
|
@param ControllerName[out] A pointer to the Unicode string to return.
|
||||||
|
This Unicode string is the name of the
|
||||||
|
controller specified by ControllerHandle and
|
||||||
|
ChildHandle in the language specified by
|
||||||
|
Language from the point of view of the driver
|
||||||
|
specified by This.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The Unicode string for the user readable name in
|
||||||
|
the language specified by Language for the
|
||||||
|
driver specified by This was returned in
|
||||||
|
DriverName.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
|
||||||
|
EFI_HANDLE.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerName is NULL.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This is not currently
|
||||||
|
managing the controller specified by
|
||||||
|
ControllerHandle and ChildHandle.
|
||||||
|
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
||||||
|
the language specified by Language.
|
||||||
|
|
||||||
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
TerminalComponentNameGetControllerName (
|
TerminalComponentNameGetControllerName (
|
||||||
|
@ -304,6 +413,7 @@ TerminalComponentNameGetControllerName (
|
||||||
OUT CHAR16 **ControllerName
|
OUT CHAR16 **ControllerName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// internal functions
|
// internal functions
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue