]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Update Generic BDS part to use dynamic PCD to set console output mode instead...
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 23 Feb 2009 03:14:12 +0000 (03:14 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 23 Feb 2009 03:14:12 +0000 (03:14 +0000)
2. Drop the menu item of set Primary Video to PCI or AGP. If some platform wishes to set AGP video option, platform BDS code needs to add this item.
3. Minor update to use Raw String to performance logging

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7575 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h
IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c
IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c
IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c
IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManagerStrings.uni
IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManagerVfr.Vfr

index 56b709ecca94a10ec77fa1e7a40e08ffe0b5f258..f597ee2d03590b854e3499f2ab9b389ca13470ec 100644 (file)
@@ -31,7 +31,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/UgaDraw.h>\r
 #include <Protocol/BlockIo.h>\r
 #include <Guid/GlobalVariable.h>\r
-#include <Guid/GenericPlatformVariable.h>\r
 #include <Guid/CapsuleVendor.h>\r
 #include <Protocol/ConsoleControl.h>\r
 #include <Protocol/GenericMemoryTest.h>\r
@@ -44,7 +43,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/SerialIo.h>\r
 #include <Protocol/LegacyBios.h>\r
 #include <Protocol/SimpleTextInEx.h>\r
-#include <Protocol/Performance.h>\r
 \r
 #include <Library/UefiDriverEntryPoint.h>\r
 #include <Library/PrintLib.h>\r
index 5f925409af2e1942d33819c358ea83bfaa8d26b0..0cd838401b10b90485a1839e88de7f9a1e8bef52 100644 (file)
   gEfiBootStateGuid                             ## SOMETIMES_PRODUCES (Produce when status has not been set yet) ## Variable:L"BootState" (Indicate the state of last boot)\r
   gEfiFileSystemVolumeLabelInfoIdGuid           ## CONSUMES ## GUID (Indicate the information type is volume)\r
   gEfiFileInfoGuid                              ## CONSUMES ## GUID (Indicate the information type is file)\r
-  gEfiGenericPlatformVariableGuid               ## PRODUCES ## Variable:L"ConOutMode" (The mode of console out device)\r
-                                                ## PRODUCES ## Variable:L"VBIOS" (The option of video BIOS)\r
   gEfiMiscSubClassGuid                          ## CONSUMES ## GUID (Indicate the datahub for holding misc sub class record)\r
   gEfiMemorySubClassGuid                        ## CONSUMES ## GUID (Indicate the datahub for holding memory record)\r
   gEfiProcessorSubClassGuid                     ## CONSUMES ## GUID (Indicate the datahub for holding processor record)\r
   gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLangCodes\r
   gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdHardwareErrorRecordLevel\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn\r
 \r
 [Depex]\r
   gEfiHiiDatabaseProtocolGuid\r
index d8bf26a7bb339f4c4b67aea794a39608b576fe9a..55ea3728926cd0a746e0bbcb56acbd4d371c7917 100644 (file)
@@ -288,8 +288,8 @@ BdsEntry (
   //\r
   // Insert the performance probe\r
   //\r
-  PERF_END (0, DXE_TOK, NULL, 0);\r
-  PERF_START (0, BDS_TOK, NULL, 0);\r
+  PERF_END (0, "DXE", NULL, 0);\r
+  PERF_START (0, "BDS", NULL, 0);\r
 \r
   //\r
   // Initialize the global system boot option and driver option\r
index da0a8389fa43ebbd9596d5d819fc738272f33d70..5ab898959e96c7bb067fcc0d2513a93c34188c13 100644 (file)
@@ -918,25 +918,20 @@ GetConsoleOutMode (
   UINTN                         Mode;\r
   UINTN                         MaxMode;\r
   EFI_STATUS                    Status;\r
-  CONSOLE_OUT_MODE              *ModeInfo;\r
   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *ConOut;\r
 \r
   ConOut   = gST->ConOut;\r
   MaxMode  = (UINTN) (ConOut->Mode->MaxMode);\r
-  ModeInfo = EfiLibGetVariable (VAR_CON_OUT_MODE, &gEfiGenericPlatformVariableGuid);\r
-\r
-  if (ModeInfo != NULL) {\r
-    CurrentCol = ModeInfo->Column;\r
-    CurrentRow = ModeInfo->Row;\r
-    for (Mode = 0; Mode < MaxMode; Mode++) {\r
-      Status = ConOut->QueryMode (ConOut, Mode, &Col, &Row);\r
-      if (!EFI_ERROR(Status)) {\r
-        if (CurrentCol == Col && CurrentRow == Row) {\r
-          CallbackData->BmmFakeNvData.ConsoleOutMode = (UINT16) Mode;\r
-          break;\r
-        }\r
+\r
+  CurrentCol = PcdGet32 (PcdConOutColumn);\r
+  CurrentRow = PcdGet32 (PcdConOutRow);\r
+  for (Mode = 0; Mode < MaxMode; Mode++) {\r
+    Status = ConOut->QueryMode (ConOut, Mode, &Col, &Row);\r
+    if (!EFI_ERROR(Status)) {\r
+      if (CurrentCol == Col && CurrentRow == Row) {\r
+        CallbackData->BmmFakeNvData.ConsoleOutMode = (UINT16) Mode;\r
+        break;\r
       }\r
     }\r
-    FreePool (ModeInfo);\r
   }\r
 }\r
index d513da2ef31eb57f72ab23d54a862e63c2ac192f..489827f9de92ecb85a0837db9442e33e44284af6 100644 (file)
@@ -1399,18 +1399,10 @@ Var_UpdateConMode (
   Mode = CallbackData->BmmFakeNvData.ConsoleOutMode;\r
 \r
   Status = gST->ConOut->QueryMode (gST->ConOut, Mode, &(ModeInfo.Column), &(ModeInfo.Row));\r
-  if (EFI_ERROR(Status)) {\r
-    ModeInfo.Column = 80;\r
-    ModeInfo.Row = 25;\r
+  if (!EFI_ERROR(Status)) {\r
+    PcdSet32 (PcdConOutColumn, (UINT32) ModeInfo.Column);\r
+    PcdSet32 (PcdConOutRow, (UINT32) ModeInfo.Row);\r
   }\r
 \r
-  Status = gRT->SetVariable (\r
-                  VAR_CON_OUT_MODE,\r
-                  &gEfiGenericPlatformVariableGuid,\r
-                  EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r
-                  sizeof (CONSOLE_OUT_MODE),\r
-                  &ModeInfo\r
-                  );\r
-\r
-  return Status;\r
+  return EFI_SUCCESS;\r
 }\r
index 715e1013e7cfea7211aacad0fb1b23b2e189ff29..2dc33392315e2b5d7d6ef7a985f3b300b36819b9 100644 (file)
@@ -67,44 +67,18 @@ DeviceManagerCallback (
   OUT EFI_BROWSER_ACTION_REQUEST             *ActionRequest\r
   )\r
 {\r
-  DEVICE_MANAGER_CALLBACK_DATA *PrivateData;\r
-\r
   if ((Value == NULL) || (ActionRequest == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  PrivateData = DEVICE_MANAGER_CALLBACK_DATA_FROM_THIS (This);\r
 \r
-  switch (QuestionId) {\r
-  case DEVICE_MANAGER_KEY_VBIOS:\r
-    PrivateData->VideoBios = Value->u8;\r
-    gRT->SetVariable (\r
-           L"VBIOS",\r
-           &gEfiGenericPlatformVariableGuid,\r
-           EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r
-           sizeof (UINT8),\r
-           &PrivateData->VideoBios\r
-           );\r
+  gCallbackKey = QuestionId;\r
 \r
-    //\r
-    // Tell browser not to ask for confirmation of changes,\r
-    // since we have already applied.\r
-    //\r
-    *ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT;\r
-    break;\r
+  //\r
+  // Request to exit SendForm(), so as to switch to selected form\r
+  //\r
+  *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;\r
 \r
-  default:\r
-    //\r
-    // The key corresponds the Handle Index which was requested to be displayed\r
-    //\r
-    gCallbackKey = QuestionId;\r
-\r
-    //\r
-    // Request to exit SendForm(), so as to switch to selected form\r
-    //\r
-    *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;\r
-    break;\r
-  }\r
 \r
   return EFI_SUCCESS;\r
 }\r
@@ -186,9 +160,6 @@ CallDeviceManager (
   EFI_HII_UPDATE_DATA         UpdateData[MENU_ITEM_NUM];\r
   EFI_STRING_ID               Token;\r
   EFI_STRING_ID               TokenHelp;\r
-  IFR_OPTION                  *IfrOptionList;\r
-  UINT8                       *VideoOption;\r
-  UINTN                       VideoOptionSize;\r
   EFI_HII_HANDLE              *HiiHandles;\r
   UINTN                       HandleBufferLength;\r
   UINTN                       NumberOfHiiHandles;\r
@@ -199,8 +170,6 @@ CallDeviceManager (
   EFI_BROWSER_ACTION_REQUEST  ActionRequest;\r
   EFI_HII_PACKAGE_LIST_HEADER *PackageList;\r
 \r
-  IfrOptionList       = NULL;\r
-  VideoOption         = NULL;\r
   HiiHandles          = NULL;\r
   HandleBufferLength  = 0;\r
 \r
@@ -296,47 +265,6 @@ CallDeviceManager (
       );\r
   }\r
 \r
-  //\r
-  // Add oneof for video BIOS selection\r
-  //\r
-  VideoOption = BdsLibGetVariableAndSize (\r
-                  L"VBIOS",\r
-                  &gEfiGenericPlatformVariableGuid,\r
-                  &VideoOptionSize\r
-                  );\r
-  if (VideoOption == NULL) {\r
-    gDeviceManagerPrivate.VideoBios = 0;\r
-  } else {\r
-    gDeviceManagerPrivate.VideoBios = VideoOption[0];\r
-    FreePool (VideoOption);\r
-  }\r
-\r
-  ASSERT (gDeviceManagerPrivate.VideoBios <= 1);\r
-\r
-  IfrOptionList = AllocatePool (2 * sizeof (IFR_OPTION));\r
-  ASSERT (IfrOptionList != NULL);\r
-  IfrOptionList[0].Flags        = 0;\r
-  IfrOptionList[0].StringToken  = STRING_TOKEN (STR_ONE_OF_PCI);\r
-  IfrOptionList[0].Value.u8     = 0;\r
-  IfrOptionList[1].Flags        = 0;\r
-  IfrOptionList[1].StringToken  = STRING_TOKEN (STR_ONE_OF_AGP);\r
-  IfrOptionList[1].Value.u8     = 1;\r
-  IfrOptionList[gDeviceManagerPrivate.VideoBios].Flags |= EFI_IFR_OPTION_DEFAULT;\r
-\r
-  UpdateData[0].Offset = 0;\r
-  CreateOneOfOpCode (\r
-    DEVICE_MANAGER_KEY_VBIOS,\r
-    0,\r
-    0,\r
-    STRING_TOKEN (STR_ONE_OF_VBIOS),\r
-    STRING_TOKEN (STR_ONE_OF_VBIOS_HELP),\r
-    EFI_IFR_FLAG_CALLBACK,\r
-    EFI_IFR_NUMERIC_SIZE_1,\r
-    IfrOptionList,\r
-    2,\r
-    &UpdateData[0]\r
-    );\r
-\r
   IfrLibUpdateForm (\r
     HiiHandle,\r
     &mDeviceManagerGuid,\r
index 8cc4db2d7f30972e47ec29a4bea7cc3f8da95ed9..cf614c5b008607b37efd6af6f45a2c1d531f3922 100644 (file)
Binary files a/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManagerStrings.uni and b/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManagerStrings.uni differ
index 14cafd4761f14651555473a7b1576a537f53acb4..d0b65b84befa4247dc26c36cd741a0f58a633a4d 100644 (file)
@@ -26,7 +26,7 @@
 #define LABEL_END                          0xffff\r
 \r
 #define DEVICE_MANAGER_CLASS               0x0000\r
-#define FRONT_PAGE_SUBCLASS                       0x0003\r
+#define FRONT_PAGE_SUBCLASS                0x0003\r
 \r
 #define DEVICE_MANAGER_FORM_ID             0x1000\r
 \r