]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1.Fixed the bug when retrieved component name by child handle. It should used gEfiCo...
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 9 Apr 2010 06:04:30 +0000 (06:04 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 9 Apr 2010 06:04:30 +0000 (06:04 +0000)
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

MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c
MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c

index cc0c40808d32824d74423cd7d7d13d13934fc4b6..af3d5a218dba94b42825504aca9e6bc5ea7f5dad 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI Component Name(2) protocol implementation for ConSplitter driver.\r
 \r
 /** @file\r
   UEFI Component Name(2) protocol implementation for ConSplitter driver.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2010, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -381,7 +381,7 @@ ConSplitterConInComponentNameGetControllerName (
   Status = ConSplitterTestControllerHandles (\r
              ControllerHandle,\r
              gConSplitterConInDriverBinding.DriverBindingHandle,\r
   Status = ConSplitterTestControllerHandles (\r
              ControllerHandle,\r
              gConSplitterConInDriverBinding.DriverBindingHandle,\r
-             &gEfiSimpleTextInProtocolGuid,\r
+             &gEfiConsoleInDeviceGuid,\r
              ChildHandle,\r
              &gEfiConsoleInDeviceGuid\r
              );\r
              ChildHandle,\r
              &gEfiConsoleInDeviceGuid\r
              );\r
@@ -658,7 +658,7 @@ ConSplitterConOutComponentNameGetControllerName (
   Status = ConSplitterTestControllerHandles (\r
              ControllerHandle,\r
              gConSplitterConOutDriverBinding.DriverBindingHandle,\r
   Status = ConSplitterTestControllerHandles (\r
              ControllerHandle,\r
              gConSplitterConOutDriverBinding.DriverBindingHandle,\r
-             &gEfiSimpleTextOutProtocolGuid,\r
+             &gEfiConsoleOutDeviceGuid,\r
              ChildHandle,\r
              &gEfiConsoleOutDeviceGuid\r
              );\r
              ChildHandle,\r
              &gEfiConsoleOutDeviceGuid\r
              );\r
@@ -758,7 +758,7 @@ ConSplitterStdErrComponentNameGetControllerName (
   Status = ConSplitterTestControllerHandles (\r
              ControllerHandle,\r
              gConSplitterStdErrDriverBinding.DriverBindingHandle,\r
   Status = ConSplitterTestControllerHandles (\r
              ControllerHandle,\r
              gConSplitterStdErrDriverBinding.DriverBindingHandle,\r
-             &gEfiSimpleTextOutProtocolGuid,\r
+             &gEfiStandardErrorDeviceGuid,\r
              ChildHandle,\r
              &gEfiStandardErrorDeviceGuid\r
              );\r
              ChildHandle,\r
              &gEfiStandardErrorDeviceGuid\r
              );\r
index 763dee2c21e8ba66c23ca13adfb3b78392f47226..f421c69a1338cd0b6fd1d669a5335232fe548680 100644 (file)
@@ -16,7 +16,7 @@
   never removed. Such design ensures sytem function well during none console\r
   device situation.\r
 \r
   never removed. Such design ensures sytem function well during none console\r
   device situation.\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2010, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -959,7 +959,7 @@ ConSplitterStart (
   }\r
 \r
   //\r
   }\r
 \r
   //\r
-  // Create virtual handle and open DeviceGuid on the virtul handle.\r
+  // Open the Parent Handle for the child.\r
   //\r
   Status = gBS->OpenProtocol (\r
                   ControllerHandle,\r
   //\r
   Status = gBS->OpenProtocol (\r
                   ControllerHandle,\r
@@ -1320,6 +1320,17 @@ ConSplitterStdErrDriverBindingStart (
     // Construct console output devices' private data\r
     //\r
     Status = ConSplitterTextOutConstructor (&mStdErr);\r
     // Construct console output devices' private data\r
     //\r
     Status = ConSplitterTextOutConstructor (&mStdErr);\r
+    if (!EFI_ERROR (Status)) {\r
+      //\r
+      // Create virtual device handle for StdErr Splitter\r
+      //\r
+      Status = gBS->InstallMultipleProtocolInterfaces (\r
+                      &mStdErr.VirtualHandle,\r
+                      &gEfiSimpleTextOutProtocolGuid,\r
+                      &mStdErr.TextOut,\r
+                      NULL\r
+                      );\r
+    }\r
     if (EFI_ERROR (Status)) {\r
       return Status;\r
     }\r
     if (EFI_ERROR (Status)) {\r
       return Status;\r
     }\r
@@ -1358,19 +1369,6 @@ ConSplitterStdErrDriverBindingStart (
   }\r
 \r
   if (mStdErr.CurrentNumberOfConsoles == 1) {\r
   }\r
 \r
   if (mStdErr.CurrentNumberOfConsoles == 1) {\r
-    //\r
-    // Create virtual device handle for StdErr Splitter\r
-    //\r
-    Status = gBS->InstallMultipleProtocolInterfaces (\r
-                    &mStdErr.VirtualHandle,\r
-                    &gEfiSimpleTextOutProtocolGuid,\r
-                    &mStdErr.TextOut,\r
-                    NULL\r
-                    );\r
-    if (EFI_ERROR (Status)) {\r
-      return Status;\r
-    }\r
-\r
     gST->StandardErrorHandle  = mStdErr.VirtualHandle;\r
     gST->StdErr               = &mStdErr.TextOut;\r
     //\r
     gST->StandardErrorHandle  = mStdErr.VirtualHandle;\r
     gST->StdErr               = &mStdErr.TextOut;\r
     //\r
@@ -1726,6 +1724,8 @@ ConSplitterStdErrDriverBindingStop (
   }\r
 \r
   if (mStdErr.CurrentNumberOfConsoles == 0) {\r
   }\r
 \r
   if (mStdErr.CurrentNumberOfConsoles == 0) {\r
+    mStdErr.VirtualHandle     = NULL;\r
+\r
     gST->StandardErrorHandle  = NULL;\r
     gST->StdErr               = NULL;\r
     //\r
     gST->StandardErrorHandle  = NULL;\r
     gST->StdErr               = NULL;\r
     //\r
@@ -2651,7 +2651,7 @@ ConSplitterAddGraphicsOutputMode (
         CurrentGraphicsOutputMode->SizeOfInfo = GraphicsOutput->Mode->SizeOfInfo;\r
         CurrentGraphicsOutputMode->FrameBufferBase = GraphicsOutput->Mode->FrameBufferBase;\r
         CurrentGraphicsOutputMode->FrameBufferSize = GraphicsOutput->Mode->FrameBufferSize;\r
         CurrentGraphicsOutputMode->SizeOfInfo = GraphicsOutput->Mode->SizeOfInfo;\r
         CurrentGraphicsOutputMode->FrameBufferBase = GraphicsOutput->Mode->FrameBufferBase;\r
         CurrentGraphicsOutputMode->FrameBufferSize = GraphicsOutput->Mode->FrameBufferSize;\r
-  \r
+\r
         //\r
         // Allocate resource for the private mode buffer\r
         //\r
         //\r
         // Allocate resource for the private mode buffer\r
         //\r
@@ -2912,7 +2912,7 @@ ConsplitterSetConsoleOutMode (
     //\r
     Status = TextOut->SetMode (TextOut, BaseMode);\r
     ASSERT(!EFI_ERROR(Status));\r
     //\r
     Status = TextOut->SetMode (TextOut, BaseMode);\r
     ASSERT(!EFI_ERROR(Status));\r
-    \r
+\r
     PcdSet32 (PcdConOutColumn, 80);\r
     PcdSet32 (PcdConOutRow, 25);\r
   }\r
     PcdSet32 (PcdConOutColumn, 80);\r
     PcdSet32 (PcdConOutRow, 25);\r
   }\r
@@ -3045,10 +3045,10 @@ ConSplitterTextOutAddDevice (
         // if GetMode is successfully and UGA device hasn't been set, set it\r
         //\r
         Status = ConSplitterUgaDrawSetMode (\r
         // if GetMode is successfully and UGA device hasn't been set, set it\r
         //\r
         Status = ConSplitterUgaDrawSetMode (\r
-                    &Private->UgaDraw, \r
-                    UgaHorizontalResolution, \r
-                    UgaVerticalResolution, \r
-                    UgaColorDepth, \r
+                    &Private->UgaDraw,\r
+                    UgaHorizontalResolution,\r
+                    UgaVerticalResolution,\r
+                    UgaColorDepth,\r
                     UgaRefreshRate\r
                     );\r
       }\r
                     UgaRefreshRate\r
                     );\r
       }\r
@@ -3057,10 +3057,10 @@ ConSplitterTextOutAddDevice (
       //\r
       if(EFI_ERROR (Status)) {\r
         Status = ConSplitterUgaDrawSetMode (\r
       //\r
       if(EFI_ERROR (Status)) {\r
         Status = ConSplitterUgaDrawSetMode (\r
-                    &Private->UgaDraw, \r
-                    800, \r
-                    600, \r
-                    32, \r
+                    &Private->UgaDraw,\r
+                    800,\r
+                    600,\r
+                    32,\r
                     60\r
                     );\r
       }\r
                     60\r
                     );\r
       }\r
@@ -3688,8 +3688,8 @@ ConSplitterTextInUnregisterKeyNotify (
 \r
   if (((TEXT_IN_EX_SPLITTER_NOTIFY *) NotificationHandle)->Signature != TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE) {\r
     return EFI_INVALID_PARAMETER;\r
 \r
   if (((TEXT_IN_EX_SPLITTER_NOTIFY *) NotificationHandle)->Signature != TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE) {\r
     return EFI_INVALID_PARAMETER;\r
-  } \r
-  \r
+  }\r
+\r
   Private = TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS (This);\r
 \r
   //\r
   Private = TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS (This);\r
 \r
   //\r