summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Console/ConSplitterDxe
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2010-04-09 06:04:30 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2010-04-09 06:04:30 +0000
commit76649bf4d80e1d2ed062846c2960292fb63de08d (patch)
tree67d129e3bdc7db5a34fd1969a2dfc52680520ad8 /MdeModulePkg/Universal/Console/ConSplitterDxe
parentf43b0774f2a094bed3b71664c39db6515a688289 (diff)
downloadedk2-76649bf4d80e1d2ed062846c2960292fb63de08d.zip
edk2-76649bf4d80e1d2ed062846c2960292fb63de08d.tar.gz
edk2-76649bf4d80e1d2ed062846c2960292fb63de08d.tar.bz2
1.Fixed the bug when retrieved component name by child handle. It should used gEfiConsoleInDeviceGuid, gEfiConsoleOutDeviceGuid instead of gEfiSimpleTextInProtocolGuid and gEfiSimpleTextOutProtocolGuid.
2.Fixed one bug when creating Console Standard error handle. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10350 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Console/ConSplitterDxe')
-rw-r--r--MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c8
-rw-r--r--MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c54
2 files changed, 31 insertions, 31 deletions
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c
index cc0c408..af3d5a2 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c
@@ -1,7 +1,7 @@
/** @file
UEFI Component Name(2) protocol implementation for ConSplitter driver.
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>
+Copyright (c) 2006 - 2010, Intel Corporation. <BR>
All rights reserved. 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
@@ -381,7 +381,7 @@ ConSplitterConInComponentNameGetControllerName (
Status = ConSplitterTestControllerHandles (
ControllerHandle,
gConSplitterConInDriverBinding.DriverBindingHandle,
- &gEfiSimpleTextInProtocolGuid,
+ &gEfiConsoleInDeviceGuid,
ChildHandle,
&gEfiConsoleInDeviceGuid
);
@@ -658,7 +658,7 @@ ConSplitterConOutComponentNameGetControllerName (
Status = ConSplitterTestControllerHandles (
ControllerHandle,
gConSplitterConOutDriverBinding.DriverBindingHandle,
- &gEfiSimpleTextOutProtocolGuid,
+ &gEfiConsoleOutDeviceGuid,
ChildHandle,
&gEfiConsoleOutDeviceGuid
);
@@ -758,7 +758,7 @@ ConSplitterStdErrComponentNameGetControllerName (
Status = ConSplitterTestControllerHandles (
ControllerHandle,
gConSplitterStdErrDriverBinding.DriverBindingHandle,
- &gEfiSimpleTextOutProtocolGuid,
+ &gEfiStandardErrorDeviceGuid,
ChildHandle,
&gEfiStandardErrorDeviceGuid
);
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
index 763dee2..f421c69 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
@@ -16,7 +16,7 @@
never removed. Such design ensures sytem function well during none console
device situation.
-Copyright (c) 2006 - 2009, Intel Corporation. <BR>
+Copyright (c) 2006 - 2010, Intel Corporation. <BR>
All rights reserved. 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
@@ -959,7 +959,7 @@ ConSplitterStart (
}
//
- // Create virtual handle and open DeviceGuid on the virtul handle.
+ // Open the Parent Handle for the child.
//
Status = gBS->OpenProtocol (
ControllerHandle,
@@ -1320,6 +1320,17 @@ ConSplitterStdErrDriverBindingStart (
// Construct console output devices' private data
//
Status = ConSplitterTextOutConstructor (&mStdErr);
+ if (!EFI_ERROR (Status)) {
+ //
+ // Create virtual device handle for StdErr Splitter
+ //
+ Status = gBS->InstallMultipleProtocolInterfaces (
+ &mStdErr.VirtualHandle,
+ &gEfiSimpleTextOutProtocolGuid,
+ &mStdErr.TextOut,
+ NULL
+ );
+ }
if (EFI_ERROR (Status)) {
return Status;
}
@@ -1358,19 +1369,6 @@ ConSplitterStdErrDriverBindingStart (
}
if (mStdErr.CurrentNumberOfConsoles == 1) {
- //
- // Create virtual device handle for StdErr Splitter
- //
- Status = gBS->InstallMultipleProtocolInterfaces (
- &mStdErr.VirtualHandle,
- &gEfiSimpleTextOutProtocolGuid,
- &mStdErr.TextOut,
- NULL
- );
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
gST->StandardErrorHandle = mStdErr.VirtualHandle;
gST->StdErr = &mStdErr.TextOut;
//
@@ -1726,6 +1724,8 @@ ConSplitterStdErrDriverBindingStop (
}
if (mStdErr.CurrentNumberOfConsoles == 0) {
+ mStdErr.VirtualHandle = NULL;
+
gST->StandardErrorHandle = NULL;
gST->StdErr = NULL;
//
@@ -2651,7 +2651,7 @@ ConSplitterAddGraphicsOutputMode (
CurrentGraphicsOutputMode->SizeOfInfo = GraphicsOutput->Mode->SizeOfInfo;
CurrentGraphicsOutputMode->FrameBufferBase = GraphicsOutput->Mode->FrameBufferBase;
CurrentGraphicsOutputMode->FrameBufferSize = GraphicsOutput->Mode->FrameBufferSize;
-
+
//
// Allocate resource for the private mode buffer
//
@@ -2912,7 +2912,7 @@ ConsplitterSetConsoleOutMode (
//
Status = TextOut->SetMode (TextOut, BaseMode);
ASSERT(!EFI_ERROR(Status));
-
+
PcdSet32 (PcdConOutColumn, 80);
PcdSet32 (PcdConOutRow, 25);
}
@@ -3045,10 +3045,10 @@ ConSplitterTextOutAddDevice (
// if GetMode is successfully and UGA device hasn't been set, set it
//
Status = ConSplitterUgaDrawSetMode (
- &Private->UgaDraw,
- UgaHorizontalResolution,
- UgaVerticalResolution,
- UgaColorDepth,
+ &Private->UgaDraw,
+ UgaHorizontalResolution,
+ UgaVerticalResolution,
+ UgaColorDepth,
UgaRefreshRate
);
}
@@ -3057,10 +3057,10 @@ ConSplitterTextOutAddDevice (
//
if(EFI_ERROR (Status)) {
Status = ConSplitterUgaDrawSetMode (
- &Private->UgaDraw,
- 800,
- 600,
- 32,
+ &Private->UgaDraw,
+ 800,
+ 600,
+ 32,
60
);
}
@@ -3688,8 +3688,8 @@ ConSplitterTextInUnregisterKeyNotify (
if (((TEXT_IN_EX_SPLITTER_NOTIFY *) NotificationHandle)->Signature != TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE) {
return EFI_INVALID_PARAMETER;
- }
-
+ }
+
Private = TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
//