]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
Remove PCD usage for console driver, PcdConOutRow and PcdConOutColumn are current...
[mirror_edk2.git] / MdeModulePkg / Universal / Console / GraphicsConsoleDxe / GraphicsConsole.c
index 44282b1f9f78517d44fbedcb2f6c1b548096b86c..2419b7c4a8dcc777e1e2d189a974aa01fccfd2a4 100644 (file)
@@ -49,9 +49,8 @@ GRAPHICS_CONSOLE_MODE_DATA mGraphicsConsoleModeData[] = {
   {100, 31},\r
   //\r
   // New modes can be added here.\r
-  // The last 2 entries are specific for PcdConOutRow x PcdConOutColumn and full screen mode.\r
+  // The last entry is specific for full screen mode.\r
   //\r
-  {0, 0},\r
   {0, 0}\r
 };\r
 \r
@@ -252,12 +251,7 @@ InitializeGraphicsConsoleTextMode (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  //\r
-  // Add PcdConOutColumn and PcdConOutRow to the last second entry.\r
-  //\r
   Count = sizeof (mGraphicsConsoleModeData) / sizeof (GRAPHICS_CONSOLE_MODE_DATA);\r
-  mGraphicsConsoleModeData[Count - 2].Columns = (UINTN) PcdGet32 (PcdConOutColumn);\r
-  mGraphicsConsoleModeData[Count - 2].Rows    = (UINTN) PcdGet32 (PcdConOutRow);\r
 \r
   //\r
   // Compute the maximum number of text Rows and Columns that this current graphics mode can support.\r
@@ -266,6 +260,11 @@ InitializeGraphicsConsoleTextMode (
   MaxColumns = HorizontalResolution / EFI_GLYPH_WIDTH;\r
   MaxRows    = VerticalResolution / EFI_GLYPH_HEIGHT;\r
 \r
+  //\r
+  // According to UEFI spec, all output devices support at least 80x25 text mode.\r
+  //\r
+  ASSERT ((MaxColumns >= 80) && (MaxRows >= 25));\r
+\r
   //\r
   // Add full screen mode to the last entry.\r
   //\r
@@ -290,19 +289,8 @@ InitializeGraphicsConsoleTextMode (
   //\r
   ValidCount = 0;  \r
 \r
-  if ((MaxColumns >= 80) && (MaxRows >= 25)) {\r
-    //\r
-    // 80x25 can be supported.\r
-    //\r
-    NewModeBuffer[ValidCount].Columns = 80;\r
-    NewModeBuffer[ValidCount].Rows    = 25;\r
-  } else {\r
-    //\r
-    // 80x25 cannot be supported, set PCD defined mode.\r
-    //\r
-    NewModeBuffer[ValidCount].Columns = (UINTN) PcdGet32 (PcdConOutColumn);\r
-    NewModeBuffer[ValidCount].Rows    = (UINTN) PcdGet32 (PcdConOutRow);\r
-  }  \r
+  NewModeBuffer[ValidCount].Columns       = 80;\r
+  NewModeBuffer[ValidCount].Rows          = 25;\r
   NewModeBuffer[ValidCount].GopWidth      = HorizontalResolution;\r
   NewModeBuffer[ValidCount].GopHeight     = VerticalResolution;\r
   NewModeBuffer[ValidCount].GopModeNumber = GopModeNumber;\r