Clean UGA from Nt32Pkg.
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 18 Oct 2007 06:01:39 +0000 (06:01 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 18 Oct 2007 06:01:39 +0000 (06:01 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4161 6f19259b-4bc3-4df7-8a09-765794883524

Nt32Pkg/PlatformBdsDxe/Generic/Bds.h
Nt32Pkg/PlatformBdsDxe/Generic/MemoryTest.c
Nt32Pkg/PlatformBdsDxe/PlatformBdsDxe.inf

index dfb63d5..15f9c5f 100644 (file)
@@ -1,13 +1,13 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \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
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006, Intel Corporation\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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 Module Name:\r
 \r
@@ -33,7 +33,6 @@ Revision History
 #include <Protocol/Bds.h>\r
 #include <Protocol/DataHub.h>\r
 #include <Protocol/FormBrowserFramework.h>\r
-#include <Protocol/UgaDraw.h>\r
 #include <Protocol/BlockIo.h>\r
 #include <Protocol/ConsoleControl.h>\r
 #include <Protocol/GenericMemoryTest.h>\r
index 0ed4207..e4cda86 100644 (file)
@@ -55,59 +55,33 @@ Returns:
 \r
 --*/\r
 {\r
-  EFI_STATUS            Status;\r
+  EFI_STATUS                     Status;\r
   EFI_GRAPHICS_OUTPUT_PROTOCOL   *GraphicsOutput;\r
-  EFI_UGA_DRAW_PROTOCOL *UgaDraw;\r
-  UINT32                SizeOfX;\r
-  UINT32                SizeOfY;\r
-  UINT32                ColorDepth;\r
-  UINT32                RefreshRate;\r
+  UINT32                         SizeOfX;\r
+  UINT32                         SizeOfY;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL  Color;\r
-  UINTN                 BlockHeight;\r
-  UINTN                 BlockWidth;\r
-  UINTN                 BlockNum;\r
-  UINTN                 PosX;\r
-  UINTN                 PosY;\r
-  UINTN                 Index;\r
+  UINTN                          BlockHeight;\r
+  UINTN                          BlockWidth;\r
+  UINTN                          BlockNum;\r
+  UINTN                          PosX;\r
+  UINTN                          PosY;\r
+  UINTN                          Index;\r
 \r
   if (Progress > 100) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  UgaDraw = NULL;\r
   Status = gBS->HandleProtocol (\r
                   gST->ConsoleOutHandle,\r
                   &gEfiGraphicsOutputProtocolGuid,\r
                   &GraphicsOutput\r
                   );\r
   if (EFI_ERROR (Status)) {\r
-    GraphicsOutput = NULL;\r
-\r
-    Status = gBS->HandleProtocol (\r
-                    gST->ConsoleOutHandle,\r
-                    &gEfiUgaDrawProtocolGuid,\r
-                    &UgaDraw\r
-                    );\r
-    if (EFI_ERROR (Status)) {\r
-      return EFI_UNSUPPORTED;\r
-    }\r
+    return EFI_UNSUPPORTED;\r
   }\r
 \r
-  if (GraphicsOutput != NULL) {\r
-    SizeOfX = GraphicsOutput->Mode->Info->HorizontalResolution;\r
-    SizeOfY = GraphicsOutput->Mode->Info->VerticalResolution;\r
-  } else {\r
-    Status = UgaDraw->GetMode (\r
-                        UgaDraw,\r
-                        &SizeOfX,\r
-                        &SizeOfY,\r
-                        &ColorDepth,\r
-                        &RefreshRate\r
-                        );\r
-    if (EFI_ERROR (Status)) {\r
-      return EFI_UNSUPPORTED;\r
-    }\r
-  }\r
+  SizeOfX = GraphicsOutput->Mode->Info->HorizontalResolution;\r
+  SizeOfY = GraphicsOutput->Mode->Info->VerticalResolution;\r
 \r
   BlockWidth  = SizeOfX / 100;\r
   BlockHeight = SizeOfY / 50;\r
@@ -123,8 +97,7 @@ Returns:
     //\r
     SetMem (&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);\r
 \r
-    if (GraphicsOutput != NULL) {\r
-      Status = GraphicsOutput->Blt (\r
+    Status = GraphicsOutput->Blt (\r
                           GraphicsOutput,\r
                           &Color,\r
                           EfiBltVideoFill,\r
@@ -136,28 +109,13 @@ Returns:
                           SizeOfY - (PosY - GLYPH_HEIGHT - 1),\r
                           SizeOfX * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)\r
                           );\r
-    } else {\r
-      Status = UgaDraw->Blt (\r
-                          UgaDraw,\r
-                          (EFI_UGA_PIXEL *) &Color,\r
-                          EfiUgaVideoFill,\r
-                          0,\r
-                          0,\r
-                          0,\r
-                          PosY - GLYPH_HEIGHT - 1,\r
-                          SizeOfX,\r
-                          SizeOfY - (PosY - GLYPH_HEIGHT - 1),\r
-                          SizeOfX * sizeof (EFI_UGA_PIXEL)\r
-                          );\r
-    }\r
   }\r
   //\r
   // Show progress by drawing blocks\r
   //\r
   for (Index = PreviousValue; Index < BlockNum; Index++) {\r
     PosX = Index * BlockWidth;\r
-    if (GraphicsOutput != NULL) {\r
-      Status = GraphicsOutput->Blt (\r
+    Status = GraphicsOutput->Blt (\r
                           GraphicsOutput,\r
                           &ProgressColor,\r
                           EfiBltVideoFill,\r
@@ -169,20 +127,6 @@ Returns:
                           BlockHeight,\r
                           (BlockWidth) * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)\r
                           );\r
-    } else {\r
-      Status = UgaDraw->Blt (\r
-                          UgaDraw,\r
-                          (EFI_UGA_PIXEL *) &ProgressColor,\r
-                          EfiUgaVideoFill,\r
-                          0,\r
-                          0,\r
-                          PosX,\r
-                          PosY,\r
-                          BlockWidth - 1,\r
-                          BlockHeight,\r
-                          (BlockWidth) * sizeof (EFI_UGA_PIXEL)\r
-                          );\r
-    }\r
   }\r
 \r
   PrintXY (\r
index 45282a6..70e0559 100644 (file)
   gEfiDevicePathProtocolGuid                    # PROTOCOL ALWAYS_CONSUMED\r
   gEfiSimpleFileSystemProtocolGuid              # PROTOCOL SOMETIMES_CONSUMED\r
   gEfiLoadFileProtocolGuid                      # PROTOCOL SOMETIMES_CONSUMED\r
-  gEfiUgaDrawProtocolGuid                       # PROTOCOL SOMETIMES_CONSUMED\r
   gEfiCpuIoProtocolGuid                         # PROTOCOL ALWAYS_CONSUMED\r
   gEfiConsoleControlProtocolGuid                # PROTOCOL ALWAYS_CONSUMED\r
   gEfiFormBrowserProtocolGuid                   # PROTOCOL ALWAYS_CONSUMED\r
 \r
 [depex]\r
   gEfiHiiProtocolGuid\r
-  \r
+\r