Remove override to ConSplitter

Remove override to ConSplitter; Set console background to be black and front ground to be gray light. 

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: David Wei <david.wei@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16846 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
David Wei 2015-02-13 02:13:03 +00:00 committed by zwei4
parent 1c54ceb705
commit c7d161de9a
13 changed files with 7 additions and 8308 deletions

View File

@ -1813,6 +1813,8 @@ ShowProgressHotKey (
return EFI_TIMEOUT; return EFI_TIMEOUT;
} }
gST->ConOut->SetAttribute(gST->ConOut, EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK));
if (DebugAssertEnabled()) if (DebugAssertEnabled())
{ {
DEBUG ((EFI_D_INFO, "\n\nStart showing progress bar... Press any key to stop it, or press <F2> or <DEL> to enter setup page! ...Zzz....\n")); DEBUG ((EFI_D_INFO, "\n\nStart showing progress bar... Press any key to stop it, or press <F2> or <DEL> to enter setup page! ...Zzz....\n"));

View File

@ -1,776 +0,0 @@
/** @file
UEFI Component Name(2) protocol implementation for ConSplitter driver.
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "ConSplitter.h"
//
// EFI Component Name Protocol
//
GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName = {
ConSplitterComponentNameGetDriverName,
ConSplitterConInComponentNameGetControllerName,
"eng"
};
//
// EFI Component Name 2 Protocol
//
GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConInComponentName2 = {
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME) ConSplitterComponentNameGetDriverName,
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) ConSplitterConInComponentNameGetControllerName,
"en"
};
//
// EFI Component Name Protocol
//
GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName = {
ConSplitterComponentNameGetDriverName,
ConSplitterSimplePointerComponentNameGetControllerName,
"eng"
};
//
// EFI Component Name 2 Protocol
//
GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gConSplitterSimplePointerComponentName2 = {
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME) ConSplitterComponentNameGetDriverName,
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) ConSplitterSimplePointerComponentNameGetControllerName,
"en"
};
//
// EFI Component Name Protocol
//
GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gConSplitterAbsolutePointerComponentName = {
ConSplitterComponentNameGetDriverName,
ConSplitterAbsolutePointerComponentNameGetControllerName,
"eng"
};
//
// EFI Component Name 2 Protocol
//
GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gConSplitterAbsolutePointerComponentName2 = {
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME) ConSplitterComponentNameGetDriverName,
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) ConSplitterAbsolutePointerComponentNameGetControllerName,
"en"
};
//
// EFI Component Name Protocol
//
GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName = {
ConSplitterComponentNameGetDriverName,
ConSplitterConOutComponentNameGetControllerName,
"eng"
};
//
// EFI Component Name 2 Protocol
//
GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConOutComponentName2 = {
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME) ConSplitterComponentNameGetDriverName,
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) ConSplitterConOutComponentNameGetControllerName,
"en"
};
//
// EFI Component Name Protocol
//
GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName = {
ConSplitterComponentNameGetDriverName,
ConSplitterStdErrComponentNameGetControllerName,
"eng"
};
//
// EFI Component Name 2 Protocol
//
GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gConSplitterStdErrComponentName2 = {
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME) ConSplitterComponentNameGetDriverName,
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) ConSplitterStdErrComponentNameGetControllerName,
"en"
};
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mConSplitterDriverNameTable[] = {
{
"eng;en",
(CHAR16 *) L"Console Splitter Driver"
},
{
NULL,
NULL
}
};
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mConSplitterConInControllerNameTable[] = {
{
"eng;en",
(CHAR16 *) L"Primary Console Input Device"
},
{
NULL,
NULL
}
};
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mConSplitterSimplePointerControllerNameTable[] = {
{
"eng;en",
(CHAR16 *) L"Primary Simple Pointer Device"
},
{
NULL,
NULL
}
};
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mConSplitterAbsolutePointerControllerNameTable[] = {
{
"eng;en",
(CHAR16 *)L"Primary Absolute Pointer Device"
},
{
NULL,
NULL
}
};
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mConSplitterConOutControllerNameTable[] = {
{
"eng;en",
(CHAR16 *) L"Primary Console Output Device"
},
{
NULL,
NULL
}
};
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mConSplitterStdErrControllerNameTable[] = {
{
"eng;en",
(CHAR16 *) L"Primary Standard Error Device"
},
{
NULL,
NULL
}
};
/**
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 4646 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
EFIAPI
ConSplitterComponentNameGetDriverName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN CHAR8 *Language,
OUT CHAR16 **DriverName
)
{
return LookupUnicodeString2 (
Language,
This->SupportedLanguages,
mConSplitterDriverNameTable,
DriverName,
(BOOLEAN)((This == &gConSplitterConInComponentName) ||
(This == &gConSplitterSimplePointerComponentName) ||
(This == &gConSplitterAbsolutePointerComponentName) ||
(This == &gConSplitterConOutComponentName) ||
(This == &gConSplitterStdErrComponentName))
);
}
/**
Tests whether a controller handle is being managed by a specific driver and
the child handle is a child device of the controller.
@param ControllerHandle A handle for a controller to test.
@param DriverBindingHandle Specifies the driver binding handle for the
driver.
@param ProtocolGuid Specifies the protocol that the driver specified
by DriverBindingHandle opens in its Start()
function.
@param ChildHandle A child handle to test.
@param ConsumsedGuid Supplies the protocol that the child controller
opens on its parent controller.
@retval EFI_SUCCESS ControllerHandle is managed by the driver
specifed by DriverBindingHandle and ChildHandle
is a child of the ControllerHandle.
@retval EFI_UNSUPPORTED ControllerHandle is not managed by the driver
specifed by DriverBindingHandle.
@retval EFI_UNSUPPORTED ChildHandle is not a child of the
ControllerHandle.
**/
EFI_STATUS
ConSplitterTestControllerHandles (
IN CONST EFI_HANDLE ControllerHandle,
IN CONST EFI_HANDLE DriverBindingHandle,
IN CONST EFI_GUID *ProtocolGuid,
IN EFI_HANDLE ChildHandle,
IN CONST EFI_GUID *ConsumsedGuid
)
{
EFI_STATUS Status;
//
// here ChildHandle is not an Optional parameter.
//
if (ChildHandle == NULL) {
return EFI_UNSUPPORTED;
}
//
// Tests whether a controller handle is being managed by a specific driver.
//
Status = EfiTestManagedDevice (
ControllerHandle,
DriverBindingHandle,
ProtocolGuid
);
if (EFI_ERROR (Status)) {
return Status;
}
//
// Tests whether a child handle is a child device of the controller.
//
Status = EfiTestChildHandle (
ControllerHandle,
ChildHandle,
ConsumsedGuid
);
return Status;
}
/**
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 4646 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 NULL.
@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
EFIAPI
ConSplitterConInComponentNameGetControllerName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
)
{
EFI_STATUS Status;
Status = ConSplitterTestControllerHandles (
ControllerHandle,
gConSplitterConInDriverBinding.DriverBindingHandle,
&gEfiConsoleInDeviceGuid,
ChildHandle,
&gEfiConsoleInDeviceGuid
);
if (EFI_ERROR (Status)) {
return Status;
}
return LookupUnicodeString2 (
Language,
This->SupportedLanguages,
mConSplitterConInControllerNameTable,
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 4646 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 NULL.
@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
EFIAPI
ConSplitterSimplePointerComponentNameGetControllerName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
)
{
EFI_STATUS Status;
Status = ConSplitterTestControllerHandles (
ControllerHandle,
gConSplitterSimplePointerDriverBinding.DriverBindingHandle,
&gEfiSimplePointerProtocolGuid,
ChildHandle,
&gEfiSimplePointerProtocolGuid
);
if (EFI_ERROR (Status)) {
return Status;
}
return LookupUnicodeString2 (
Language,
This->SupportedLanguages,
mConSplitterSimplePointerControllerNameTable,
ControllerName,
(BOOLEAN)(This == &gConSplitterSimplePointerComponentName)
);
}
/**
Retrieves a Unicode string that is the user readable name of the controller
that is being managed by an EFI Driver.
@param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL
instance.
@param 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.
@param 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.
@param Language A pointer to RFC4646 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.
@param 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.
@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 NULL.
@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
EFIAPI
ConSplitterAbsolutePointerComponentNameGetControllerName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
)
{
EFI_STATUS Status;
Status = ConSplitterTestControllerHandles (
ControllerHandle,
gConSplitterAbsolutePointerDriverBinding.DriverBindingHandle,
&gEfiAbsolutePointerProtocolGuid,
ChildHandle,
&gEfiAbsolutePointerProtocolGuid
);
if (EFI_ERROR (Status)) {
return Status;
}
return LookupUnicodeString2 (
Language,
This->SupportedLanguages,
mConSplitterAbsolutePointerControllerNameTable,
ControllerName,
(BOOLEAN)(This == &gConSplitterAbsolutePointerComponentName)
);
}
/**
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 4646 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 NULL.
@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
EFIAPI
ConSplitterConOutComponentNameGetControllerName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
)
{
EFI_STATUS Status;
Status = ConSplitterTestControllerHandles (
ControllerHandle,
gConSplitterConOutDriverBinding.DriverBindingHandle,
&gEfiConsoleOutDeviceGuid,
ChildHandle,
&gEfiConsoleOutDeviceGuid
);
if (EFI_ERROR (Status)) {
return Status;
}
return LookupUnicodeString2 (
Language,
This->SupportedLanguages,
mConSplitterConOutControllerNameTable,
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 4646 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 NULL.
@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
EFIAPI
ConSplitterStdErrComponentNameGetControllerName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
)
{
EFI_STATUS Status;
Status = ConSplitterTestControllerHandles (
ControllerHandle,
gConSplitterStdErrDriverBinding.DriverBindingHandle,
&gEfiStandardErrorDeviceGuid,
ChildHandle,
&gEfiStandardErrorDeviceGuid
);
if (EFI_ERROR (Status)) {
return Status;
}
return LookupUnicodeString2 (
Language,
This->SupportedLanguages,
mConSplitterStdErrControllerNameTable,
ControllerName,
(BOOLEAN)(This == &gConSplitterStdErrComponentName)
);
}

View File

@ -1,119 +0,0 @@
## @file
# This driver provides multi console supports.
#
# This driver acts as a virtual console, takes over the console I/O control from selected
# standard console devices, and transmits console I/O to related console device drivers.
# Consplitter could install Graphics Output protocol and/or UGA Draw protocol in system
# table according PCD settings(PcdConOutGopSupport, and PcdConOutUgaSupport). It always
# consumes Graphics Output protocol which is produced by display device, and consumes UGA Draw
# protocol which is produced by display device according to PcdUgaConsumeSupport value.
# Note: If only UGA Draw protocol is installed in system, PcdUgaConsumeSupport should be
# set to TRUE.
#
# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = ConSplitterDxe
MODULE_UNI_FILE = ConSplitterDxe.uni
FILE_GUID = 408edcec-cf6d-477c-a5a8-b4844e3de281
MODULE_TYPE = UEFI_DRIVER
VERSION_STRING = 1.0
ENTRY_POINT = ConSplitterDriverEntry
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
#
# DRIVER_BINDING = gConSplitterConInDriverBinding
# COMPONENT_NAME = gConSplitterConInComponentName
# COMPONENT_NAME2 = gConSplitterConInComponentName2
# DRIVER_BINDING = gConSplitterSimplePointerDriverBinding
# COMPONENT_NAME = gConSplitterSimplePointerComponentName
# COMPONENT_NAME2 = gConSplitterSimplePointerComponentName2
# DRIVER_BINDING = gConSplitterConOutDriverBinding
# COMPONENT_NAME = gConSplitterConOutComponentName
# COMPONENT_NAME2 = gConSplitterConOutComponentName2
# DRIVER_BINDING = gConSplitterStdErrDriverBinding
# COMPONENT_NAME = gConSplitterStdErrComponentName
# COMPONENT_NAME2 = gConSplitterStdErrComponentName2
#
[Sources]
ConSplitterGraphics.c
ComponentName.c
ConSplitter.h
ConSplitter.c
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
[LibraryClasses]
UefiBootServicesTableLib
MemoryAllocationLib
BaseMemoryLib
BaseLib
UefiLib
UefiDriverEntryPoint
DebugLib
PcdLib
[Guids]
gEfiConsoleInDeviceGuid ## SOMETIMES_CONSUMES ## UNDEFINED # protocol GUID installed on device handle
gEfiStandardErrorDeviceGuid ## SOMETIMES_CONSUMES ## UNDEFINED # protocol GUID installed on device handle
gEfiConsoleOutDeviceGuid ## SOMETIMES_CONSUMES ## UNDEFINED # protocol GUID installed on device handle
## SOMETIMES_PRODUCES ## Event
## SOMETIMES_CONSUMES ## Event
gConnectConInEventGuid
[Protocols]
## PRODUCES
## TO_START
gEfiSimplePointerProtocolGuid
## PRODUCES
## TO_START
gEfiAbsolutePointerProtocolGuid
## PRODUCES
## TO_START
gEfiSimpleTextInProtocolGuid
## PRODUCES
## TO_START
gEfiSimpleTextInputExProtocolGuid
## PRODUCES
## TO_START
gEfiSimpleTextOutProtocolGuid
## SOMETIMES_PRODUCES
## SOMETIMES_CONSUMES
gEfiGraphicsOutputProtocolGuid
## SOMETIMES_PRODUCES
## SOMETIMES_CONSUMES
gEfiUgaDrawProtocolGuid
[FeaturePcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport ## CONSUMES
gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## CONSUMES
[Pcd]
## SOMETIMES_PRODUCES
## SOMETIMES_CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow
## SOMETIMES_PRODUCES
## SOMETIMES_CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn
gEfiMdeModulePkgTokenSpaceGuid.PcdConInConnectOnDemand ## SOMETIMES_CONSUMES
[UserExtensions.TianoCore."ExtraFiles"]
ConSplitterDxeExtra.uni

View File

@ -1,628 +0,0 @@
/** @file
Support for Graphics output spliter.
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "ConSplitter.h"
CHAR16 mCrLfString[3] = { CHAR_CARRIAGE_RETURN, CHAR_LINEFEED, CHAR_NULL };
/**
Returns information for an available graphics mode that the graphics device
and the set of active video output devices supports.
@param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
@param ModeNumber The mode number to return information on.
@param SizeOfInfo A pointer to the size, in bytes, of the Info buffer.
@param Info A pointer to callee allocated buffer that returns information about ModeNumber.
@retval EFI_SUCCESS Mode information returned.
@retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
@retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode.
@retval EFI_INVALID_PARAMETER One of the input args was NULL.
@retval EFI_OUT_OF_RESOURCES No resource available.
**/
EFI_STATUS
EFIAPI
ConSplitterGraphicsOutputQueryMode (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
IN UINT32 ModeNumber,
OUT UINTN *SizeOfInfo,
OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info
)
{
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
EFI_STATUS Status;
UINTN Index;
if (This == NULL || Info == NULL || SizeOfInfo == NULL || ModeNumber >= This->Mode->MaxMode) {
return EFI_INVALID_PARAMETER;
}
//
// retrieve private data
//
Private = GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
GraphicsOutput = NULL;
if (Private->CurrentNumberOfGraphicsOutput == 1) {
//
// Find the only one GraphicsOutput.
//
for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++) {
GraphicsOutput = Private->TextOutList[Index].GraphicsOutput;
if (GraphicsOutput != NULL) {
break;
}
}
}
if (GraphicsOutput != NULL) {
//
// If only one physical GOP device exist, return its information.
//
Status = GraphicsOutput->QueryMode (GraphicsOutput, (UINT32) ModeNumber, SizeOfInfo, Info);
return Status;
} else {
//
// If 2 more phyiscal GOP device exist or GOP protocol does not exist,
// return GOP information (PixelFormat is PixelBltOnly) created in ConSplitterAddGraphicsOutputMode ().
//
*Info = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
if (*Info == NULL) {
return EFI_OUT_OF_RESOURCES;
}
*SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
CopyMem (*Info, &Private->GraphicsOutputModeBuffer[ModeNumber], *SizeOfInfo);
}
return EFI_SUCCESS;
}
/**
Set the video device into the specified mode and clears the visible portions of
the output display to black.
@param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
@param ModeNumber Abstraction that defines the current video mode.
@retval EFI_SUCCESS The graphics mode specified by ModeNumber was selected.
@retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
@retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
@retval EFI_OUT_OF_RESOURCES No resource available.
**/
EFI_STATUS
EFIAPI
ConSplitterGraphicsOutputSetMode (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
IN UINT32 ModeNumber
)
{
EFI_STATUS Status;
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
UINTN Index;
EFI_STATUS ReturnStatus;
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Mode;
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
EFI_GRAPHICS_OUTPUT_PROTOCOL *PhysicalGraphicsOutput;
UINTN NumberIndex;
UINTN SizeOfInfo;
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
EFI_UGA_DRAW_PROTOCOL *UgaDraw;
if (ModeNumber >= This->Mode->MaxMode) {
return EFI_UNSUPPORTED;
}
Private = GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
Mode = &Private->GraphicsOutputModeBuffer[ModeNumber];
ReturnStatus = EFI_SUCCESS;
GraphicsOutput = NULL;
PhysicalGraphicsOutput = NULL;
//
// return the worst status met
//
for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++) {
GraphicsOutput = Private->TextOutList[Index].GraphicsOutput;
if (GraphicsOutput != NULL) {
PhysicalGraphicsOutput = GraphicsOutput;
//
// Find corresponding ModeNumber of this GraphicsOutput instance
//
for (NumberIndex = 0; NumberIndex < GraphicsOutput->Mode->MaxMode; NumberIndex ++) {
Status = GraphicsOutput->QueryMode (GraphicsOutput, (UINT32) NumberIndex, &SizeOfInfo, &Info);
if (EFI_ERROR (Status)) {
return Status;
}
if ((Info->HorizontalResolution == Mode->HorizontalResolution) && (Info->VerticalResolution == Mode->VerticalResolution)) {
FreePool (Info);
break;
}
FreePool (Info);
}
Status = GraphicsOutput->SetMode (GraphicsOutput, (UINT32) NumberIndex);
if (EFI_ERROR (Status)) {
ReturnStatus = Status;
}
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
UgaDraw = Private->TextOutList[Index].UgaDraw;
if (UgaDraw != NULL) {
Status = UgaDraw->SetMode (
UgaDraw,
Mode->HorizontalResolution,
Mode->VerticalResolution,
32,
60
);
if (EFI_ERROR (Status)) {
ReturnStatus = Status;
}
}
}
}
This->Mode->Mode = ModeNumber;
if ((Private->CurrentNumberOfGraphicsOutput == 1) && (PhysicalGraphicsOutput != NULL)) {
//
// If only one physical GOP device exist, copy physical information to consplitter.
//
CopyMem (This->Mode->Info, PhysicalGraphicsOutput->Mode->Info, PhysicalGraphicsOutput->Mode->SizeOfInfo);
This->Mode->SizeOfInfo = PhysicalGraphicsOutput->Mode->SizeOfInfo;
This->Mode->FrameBufferBase = PhysicalGraphicsOutput->Mode->FrameBufferBase;
This->Mode->FrameBufferSize = PhysicalGraphicsOutput->Mode->FrameBufferSize;
} else {
//
// If 2 more phyiscal GOP device exist or GOP protocol does not exist,
// return GOP information (PixelFormat is PixelBltOnly) created in ConSplitterAddGraphicsOutputMode ().
//
CopyMem (This->Mode->Info, &Private->GraphicsOutputModeBuffer[ModeNumber], This->Mode->SizeOfInfo);
}
return ReturnStatus;
}
/**
The following table defines actions for BltOperations.
EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
directly to every pixel of the video display rectangle
(DestinationX, DestinationY)
(DestinationX + Width, DestinationY + Height).
Only one pixel will be used from the BltBuffer. Delta is NOT used.
EfiBltVideoToBltBuffer - Read data from the video display rectangle
(SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
the BltBuffer rectangle (DestinationX, DestinationY )
(DestinationX + Width, DestinationY + Height). If DestinationX or
DestinationY is not zero then Delta must be set to the length in bytes
of a row in the BltBuffer.
EfiBltBufferToVideo - Write data from the BltBuffer rectangle
(SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
video display rectangle (DestinationX, DestinationY)
(DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
not zero then Delta must be set to the length in bytes of a row in the
BltBuffer.
EfiBltVideoToVideo - Copy from the video display rectangle
(SourceX, SourceY) (SourceX + Width, SourceY + Height) .
to the video display rectangle (DestinationX, DestinationY)
(DestinationX + Width, DestinationY + Height).
The BltBuffer and Delta are not used in this mode.
@param This Protocol instance pointer.
@param BltBuffer Buffer containing data to blit into video buffer.
This buffer has a size of
Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
@param BltOperation Operation to perform on BlitBuffer and video
memory
@param SourceX X coordinate of source for the BltBuffer.
@param SourceY Y coordinate of source for the BltBuffer.
@param DestinationX X coordinate of destination for the BltBuffer.
@param DestinationY Y coordinate of destination for the BltBuffer.
@param Width Width of rectangle in BltBuffer in pixels.
@param Height Hight of rectangle in BltBuffer in pixels.
@param Delta OPTIONAL.
@retval EFI_SUCCESS The Blt operation completed.
@retval EFI_INVALID_PARAMETER BltOperation is not valid.
@retval EFI_DEVICE_ERROR A hardware error occured writting to the video
buffer.
**/
EFI_STATUS
EFIAPI
ConSplitterGraphicsOutputBlt (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
IN UINTN SourceX,
IN UINTN SourceY,
IN UINTN DestinationX,
IN UINTN DestinationY,
IN UINTN Width,
IN UINTN Height,
IN UINTN Delta OPTIONAL
)
{
EFI_STATUS Status;
EFI_STATUS ReturnStatus;
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
UINTN Index;
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
EFI_UGA_DRAW_PROTOCOL *UgaDraw;
if (This == NULL || ((UINTN) BltOperation) >= EfiGraphicsOutputBltOperationMax) {
return EFI_INVALID_PARAMETER;
}
Private = GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
ReturnStatus = EFI_SUCCESS;
//
// return the worst status met
//
for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++) {
GraphicsOutput = Private->TextOutList[Index].GraphicsOutput;
if (GraphicsOutput != NULL) {
Status = GraphicsOutput->Blt (
GraphicsOutput,
BltBuffer,
BltOperation,
SourceX,
SourceY,
DestinationX,
DestinationY,
Width,
Height,
Delta
);
if (EFI_ERROR (Status)) {
ReturnStatus = Status;
} else if (BltOperation == EfiBltVideoToBltBuffer) {
//
// Only need to read the data into buffer one time
//
return EFI_SUCCESS;
}
}
UgaDraw = Private->TextOutList[Index].UgaDraw;
if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
Status = UgaDraw->Blt (
UgaDraw,
(EFI_UGA_PIXEL *) BltBuffer,
(EFI_UGA_BLT_OPERATION) BltOperation,
SourceX,
SourceY,
DestinationX,
DestinationY,
Width,
Height,
Delta
);
if (EFI_ERROR (Status)) {
ReturnStatus = Status;
} else if (BltOperation == EfiBltVideoToBltBuffer) {
//
// Only need to read the data into buffer one time
//
return EFI_SUCCESS;
}
}
}
return ReturnStatus;
}
/**
Return the current video mode information.
@param This The EFI_UGA_DRAW_PROTOCOL instance.
@param HorizontalResolution The size of video screen in pixels in the X dimension.
@param VerticalResolution The size of video screen in pixels in the Y dimension.
@param ColorDepth Number of bits per pixel, currently defined to be 32.
@param RefreshRate The refresh rate of the monitor in Hertz.
@retval EFI_SUCCESS Mode information returned.
@retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
@retval EFI_INVALID_PARAMETER One of the input args was NULL.
**/
EFI_STATUS
EFIAPI
ConSplitterUgaDrawGetMode (
IN EFI_UGA_DRAW_PROTOCOL *This,
OUT UINT32 *HorizontalResolution,
OUT UINT32 *VerticalResolution,
OUT UINT32 *ColorDepth,
OUT UINT32 *RefreshRate
)
{
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
if ((HorizontalResolution == NULL) ||
(VerticalResolution == NULL) ||
(RefreshRate == NULL) ||
(ColorDepth == NULL)) {
return EFI_INVALID_PARAMETER;
}
//
// retrieve private data
//
Private = UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
*HorizontalResolution = Private->UgaHorizontalResolution;
*VerticalResolution = Private->UgaVerticalResolution;
*ColorDepth = Private->UgaColorDepth;
*RefreshRate = Private->UgaRefreshRate;
return EFI_SUCCESS;
}
/**
Set the current video mode information.
@param This The EFI_UGA_DRAW_PROTOCOL instance.
@param HorizontalResolution The size of video screen in pixels in the X dimension.
@param VerticalResolution The size of video screen in pixels in the Y dimension.
@param ColorDepth Number of bits per pixel, currently defined to be 32.
@param RefreshRate The refresh rate of the monitor in Hertz.
@retval EFI_SUCCESS Mode information returned.
@retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
@retval EFI_OUT_OF_RESOURCES Out of resources.
**/
EFI_STATUS
EFIAPI
ConSplitterUgaDrawSetMode (
IN EFI_UGA_DRAW_PROTOCOL *This,
IN UINT32 HorizontalResolution,
IN UINT32 VerticalResolution,
IN UINT32 ColorDepth,
IN UINT32 RefreshRate
)
{
EFI_STATUS Status;
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
UINTN Index;
EFI_STATUS ReturnStatus;
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
UINTN NumberIndex;
UINTN SizeOfInfo;
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
EFI_UGA_DRAW_PROTOCOL *UgaDraw;
Private = UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
ReturnStatus = EFI_SUCCESS;
//
// Update the Mode data
//
Private->UgaHorizontalResolution = HorizontalResolution;
Private->UgaVerticalResolution = VerticalResolution;
Private->UgaColorDepth = ColorDepth;
Private->UgaRefreshRate = RefreshRate;
//
// return the worst status met
//
for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++) {
GraphicsOutput = Private->TextOutList[Index].GraphicsOutput;
if (GraphicsOutput != NULL) {
//
// Find corresponding ModeNumber of this GraphicsOutput instance
//
for (NumberIndex = 0; NumberIndex < GraphicsOutput->Mode->MaxMode; NumberIndex ++) {
Status = GraphicsOutput->QueryMode (GraphicsOutput, (UINT32) NumberIndex, &SizeOfInfo, &Info);
if (EFI_ERROR (Status)) {
return Status;
}
if ((Info->HorizontalResolution == HorizontalResolution) && (Info->VerticalResolution == VerticalResolution)) {
FreePool (Info);
break;
}
FreePool (Info);
}
Status = GraphicsOutput->SetMode (GraphicsOutput, (UINT32) NumberIndex);
if (EFI_ERROR (Status)) {
ReturnStatus = Status;
}
} else if (FeaturePcdGet (PcdUgaConsumeSupport)){
UgaDraw = Private->TextOutList[Index].UgaDraw;
if (UgaDraw != NULL) {
Status = UgaDraw->SetMode (
UgaDraw,
HorizontalResolution,
VerticalResolution,
ColorDepth,
RefreshRate
);
if (EFI_ERROR (Status)) {
ReturnStatus = Status;
}
}
}
}
return ReturnStatus;
}
/**
Blt a rectangle of pixels on the graphics screen.
The following table defines actions for BltOperations.
EfiUgaVideoFill:
Write data from the BltBuffer pixel (SourceX, SourceY)
directly to every pixel of the video display rectangle
(DestinationX, DestinationY)
(DestinationX + Width, DestinationY + Height).
Only one pixel will be used from the BltBuffer. Delta is NOT used.
EfiUgaVideoToBltBuffer:
Read data from the video display rectangle
(SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
the BltBuffer rectangle (DestinationX, DestinationY )
(DestinationX + Width, DestinationY + Height). If DestinationX or
DestinationY is not zero then Delta must be set to the length in bytes
of a row in the BltBuffer.
EfiUgaBltBufferToVideo:
Write data from the BltBuffer rectangle
(SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
video display rectangle (DestinationX, DestinationY)
(DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
not zero then Delta must be set to the length in bytes of a row in the
BltBuffer.
EfiUgaVideoToVideo:
Copy from the video display rectangle
(SourceX, SourceY) (SourceX + Width, SourceY + Height) .
to the video display rectangle (DestinationX, DestinationY)
(DestinationX + Width, DestinationY + Height).
The BltBuffer and Delta are not used in this mode.
@param This Protocol instance pointer.
@param BltBuffer Buffer containing data to blit into video buffer. This
buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
@param BltOperation Operation to perform on BlitBuffer and video memory
@param SourceX X coordinate of source for the BltBuffer.
@param SourceY Y coordinate of source for the BltBuffer.
@param DestinationX X coordinate of destination for the BltBuffer.
@param DestinationY Y coordinate of destination for the BltBuffer.
@param Width Width of rectangle in BltBuffer in pixels.
@param Height Hight of rectangle in BltBuffer in pixels.
@param Delta OPTIONAL
@retval EFI_SUCCESS The Blt operation completed.
@retval EFI_INVALID_PARAMETER BltOperation is not valid.
@retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.
**/
EFI_STATUS
EFIAPI
ConSplitterUgaDrawBlt (
IN EFI_UGA_DRAW_PROTOCOL *This,
IN EFI_UGA_PIXEL *BltBuffer, OPTIONAL
IN EFI_UGA_BLT_OPERATION BltOperation,
IN UINTN SourceX,
IN UINTN SourceY,
IN UINTN DestinationX,
IN UINTN DestinationY,
IN UINTN Width,
IN UINTN Height,
IN UINTN Delta OPTIONAL
)
{
EFI_STATUS Status;
TEXT_OUT_SPLITTER_PRIVATE_DATA *Private;
UINTN Index;
EFI_STATUS ReturnStatus;
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
Private = UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
ReturnStatus = EFI_SUCCESS;
//
// return the worst status met
//
for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++) {
GraphicsOutput = Private->TextOutList[Index].GraphicsOutput;
if (GraphicsOutput != NULL) {
Status = GraphicsOutput->Blt (
GraphicsOutput,
(EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) BltBuffer,
(EFI_GRAPHICS_OUTPUT_BLT_OPERATION) BltOperation,
SourceX,
SourceY,
DestinationX,
DestinationY,
Width,
Height,
Delta
);
if (EFI_ERROR (Status)) {
ReturnStatus = Status;
} else if (BltOperation == EfiUgaVideoToBltBuffer) {
//
// Only need to read the data into buffer one time
//
return EFI_SUCCESS;
}
}
if (Private->TextOutList[Index].UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {
Status = Private->TextOutList[Index].UgaDraw->Blt (
Private->TextOutList[Index].UgaDraw,
BltBuffer,
BltOperation,
SourceX,
SourceY,
DestinationX,
DestinationY,
Width,
Height,
Delta
);
if (EFI_ERROR (Status)) {
ReturnStatus = Status;
} else if (BltOperation == EfiUgaVideoToBltBuffer) {
//
// Only need to read the data into buffer one time
//
return EFI_SUCCESS;
}
}
}
return ReturnStatus;
}
/**
Sets the output device(s) to a specified mode.
@param Private Text Out Splitter pointer.
@param ModeNumber The mode number to set.
**/
VOID
TextOutSetMode (
IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,
IN UINTN ModeNumber
)
{
//
// No need to do extra check here as whether (Column, Row) is valid has
// been checked in ConSplitterTextOutSetCursorPosition. And (0, 0) should
// always be supported.
//
Private->TextOutMode.Mode = (INT32) ModeNumber;
Private->TextOutMode.CursorColumn = 0;
Private->TextOutMode.CursorRow = 0;
Private->TextOutMode.CursorVisible = TRUE;
return;
}

View File

@ -625,7 +625,7 @@ INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
# Console # Console
# #
INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
INF Vlv2TbltDevicePkg/Override/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
INF IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf INF IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf
INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf

View File

@ -556,7 +556,7 @@ INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
# Console # Console
# #
INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
INF Vlv2TbltDevicePkg/Override/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
INF IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf INF IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf
INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf

View File

@ -1213,7 +1213,7 @@
# Console # Console
# #
MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
Vlv2TbltDevicePkg/Override/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf
MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf

View File

@ -1201,7 +1201,7 @@
# Console # Console
# #
MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
Vlv2TbltDevicePkg/Override/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf
MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf

View File

@ -1201,7 +1201,7 @@
# Console # Console
# #
MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
Vlv2TbltDevicePkg/Override/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf
MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf