]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
OvmfPkg/PlatformBootManagerLib: Do not launch Boot Manager Menu
[mirror_edk2.git] / OvmfPkg / Library / PlatformBootManagerLib / BdsPlatform.c
index ea0ae1ecd70ff02ed09bf65b6b599f331b30b581..3432e02715d6ab162e7f16bf7f559749103d2ea7 100644 (file)
@@ -164,6 +164,9 @@ Returns:
                   &gEfiDxeSmmReadyToLockProtocolGuid, EFI_NATIVE_INTERFACE,\r
                   NULL);\r
   ASSERT_EFI_ERROR (Status);\r
+\r
+  PlatformInitializeConsole (gPlatformConsole);\r
+  PcdSet16 (PcdPlatformBootTimeOut, GetFrontPageTimeoutFromQemu ());\r
 }\r
 \r
 \r
@@ -251,7 +254,7 @@ Returns:
   //\r
   // Print Device Path\r
   //\r
-  DevPathStr = DevicePathToStr(DevicePath);\r
+  DevPathStr = ConvertDevicePathToText (DevicePath, FALSE, FALSE);\r
   if (DevPathStr != NULL) {\r
     DEBUG((\r
       EFI_D_INFO,\r
@@ -280,7 +283,7 @@ Returns:
   //\r
   // Print Device Path\r
   //\r
-  DevPathStr = DevicePathToStr(DevicePath);\r
+  DevPathStr = ConvertDevicePathToText (DevicePath, FALSE, FALSE);\r
   if (DevPathStr != NULL) {\r
     DEBUG((\r
       EFI_D_INFO,\r
@@ -669,9 +672,9 @@ DetectAndPreparePlatformPciDevicePaths (
 }\r
 \r
 \r
-EFI_STATUS\r
-PlatformBdsConnectConsole (\r
-  IN BDS_CONSOLE_CONNECT_ENTRY   *PlatformConsole\r
+VOID\r
+PlatformInitializeConsole (\r
+  IN PLATFORM_CONSOLE_CONNECT_ENTRY   *PlatformConsole\r
   )\r
 /*++\r
 \r
@@ -683,37 +686,17 @@ Routine Description:
 Arguments:\r
 \r
   PlatformConsole         - Predfined platform default console device array.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS             - Success connect at least one ConIn and ConOut\r
-                            device, there must have one ConOut device is\r
-                            active vga device.\r
-\r
-  EFI_STATUS              - Return the status of\r
-                            BdsLibConnectAllDefaultConsoles ()\r
-\r
 --*/\r
 {\r
-  EFI_STATUS                         Status;\r
   UINTN                              Index;\r
   EFI_DEVICE_PATH_PROTOCOL           *VarConout;\r
   EFI_DEVICE_PATH_PROTOCOL           *VarConin;\r
-  UINTN                              DevicePathSize;\r
 \r
   //\r
   // Connect RootBridge\r
   //\r
-  VarConout = BdsLibGetVariableAndSize (\r
-                VarConsoleOut,\r
-                &gEfiGlobalVariableGuid,\r
-                &DevicePathSize\r
-                );\r
-  VarConin = BdsLibGetVariableAndSize (\r
-               VarConsoleInp,\r
-               &gEfiGlobalVariableGuid,\r
-               &DevicePathSize\r
-               );\r
+  GetEfiGlobalVariable2 (EFI_CON_OUT_VARIABLE_NAME, (VOID **) &VarConout, NULL);\r
+  GetEfiGlobalVariable2 (EFI_CON_IN_VARIABLE_NAME, (VOID **) &VarConin, NULL);\r
 \r
   if (VarConout == NULL || VarConin == NULL) {\r
     //\r
@@ -746,16 +729,6 @@ Returns:
     //\r
     DetectAndPreparePlatformPciDevicePaths (TRUE);\r
   }\r
-\r
-  //\r
-  // Connect the all the default console with current cosole variable\r
-  //\r
-  Status = BdsLibConnectAllDefaultConsoles ();\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  return EFI_SUCCESS;\r
 }\r
 \r
 \r
@@ -991,7 +964,7 @@ ConnectRecursivelyIfPciMassStorage (
     //\r
     // Print Device Path\r
     //\r
-    DevPathStr = DevicePathToStr (DevicePath);\r
+    DevPathStr = ConvertDevicePathToText (DevicePath, FALSE, FALSE);\r
     if (DevPathStr != NULL) {\r
       DEBUG((\r
         EFI_D_INFO,\r
@@ -1294,16 +1267,6 @@ Routine Description:
   // Notes: this part code can be change with the table policy\r
   //\r
   ASSERT (BootMode == BOOT_WITH_FULL_CONFIGURATION);\r
-  //\r
-  // Connect platform console\r
-  //\r
-  Status = PlatformBdsConnectConsole (gPlatformConsole);\r
-  if (EFI_ERROR (Status)) {\r
-    //\r
-    // Here OEM/IBV can customize with defined action\r
-    //\r
-    PlatformBdsNoConsoleAction ();\r
-  }\r
 \r
   //\r
   // Memory test and Logo show\r
@@ -1330,8 +1293,6 @@ Routine Description:
   // it.\r
   //\r
   BdsLibBuildOptionFromVar (BootOptionList, L"BootOrder");\r
-\r
-  PlatformBdsEnterFrontPage (GetFrontPageTimeoutFromQemu(), TRUE);\r
 }\r
 \r
 VOID\r
@@ -1417,31 +1378,6 @@ Returns:
   }\r
 }\r
 \r
-EFI_STATUS\r
-PlatformBdsNoConsoleAction (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This function is remained for IBV/OEM to do some platform action,\r
-  if there no console device can be connected.\r
-\r
-Arguments:\r
-\r
-  None.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS      - Direct return success now.\r
-\r
---*/\r
-{\r
-  DEBUG ((EFI_D_INFO, "PlatformBdsNoConsoleAction\n"));\r
-  return EFI_SUCCESS;\r
-}\r
-\r
 VOID\r
 EFIAPI\r
 PlatformBdsLockNonUpdatableFlash (\r
@@ -1566,23 +1502,3 @@ PlatformBootManagerWaitCallback (
 {\r
 }\r
 \r
-/**\r
-  Lock the ConsoleIn device in system table. All key\r
-  presses will be ignored until the Password is typed in. The only way to\r
-  disable the password is to type it in to a ConIn device.\r
-\r
-  @param  Password        Password used to lock ConIn device.\r
-\r
-  @retval EFI_SUCCESS     lock the Console In Spliter virtual handle successfully.\r
-  @retval EFI_UNSUPPORTED Password not found\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-LockKeyboards (\r
-  IN  CHAR16    *Password\r
-  )\r
-{\r
-    return EFI_UNSUPPORTED;\r
-}\r
-\r