]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Vlv2TbltDevicePkg/PlatformPei/BootMode.c
Vlv2TbltDevicePkg: ECP Cleanup.
[mirror_edk2.git] / Vlv2TbltDevicePkg / PlatformPei / BootMode.c
index 95be1c0f2851a128dbb80f74c4ee9fe252a2f5ab..66a6680e9c7a8515dfefb2e35895c22963abcff3 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2004  - 2018, Intel Corporation. All rights reserved.<BR>\r
                                                                                    \r\r
   This program and the accompanying materials are licensed and made available under\r\r
   the terms and conditions of the BSD License that accompanies this distribution.  \r\r
@@ -29,8 +29,6 @@ Abstract:
 #include "PlatformBootMode.h"\r
 #include <Guid/SetupVariable.h>\r
 \r
-#include <Guid/BootState.h>\r
-\r
 //\r
 // Priority of our boot modes, highest priority first\r
 //\r
@@ -100,56 +98,6 @@ CapsulePpiNotifyCallback (
   return Status;\r
 }\r
 \r
-/**\r
-  Check CMOS register bit to determine if previous boot was successful\r
-\r
-  @param PeiServices    pointer to the PEI Service Table\r
-\r
-  @retval TRUE          - Previous Boot was success\r
-  @retval FALSE         - Previous Boot wasn't success\r
-\r
-**/\r
-BOOLEAN\r
-IsPreviousBootSuccessful(\r
-  IN CONST EFI_PEI_SERVICES   **PeiServices\r
-\r
-  )\r
-{\r
-  EFI_STATUS                      Status;\r
-  BOOLEAN                         BootState;\r
-  UINTN                           DataSize;\r
-  CHAR16                          VarName[] = BOOT_STATE_VARIABLE_NAME;\r
-  EFI_PEI_READ_ONLY_VARIABLE2_PPI *PeiVar;\r
-\r
-  Status = (**PeiServices).LocatePpi (\r
-                             PeiServices,\r
-                             &gEfiPeiReadOnlyVariable2PpiGuid,\r
-                             0,\r
-                             NULL,\r
-                                (void **)&PeiVar\r
-                             );\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  //\r
-  // Get last Boot State Variable to confirm that it is not a first boot .\r
-  //\r
-\r
-  DataSize = sizeof (BOOLEAN);\r
-  Status = PeiVar->GetVariable (\r
-                     PeiVar,\r
-                     VarName,\r
-                     &gEfiBootStateGuid,\r
-                     NULL,\r
-                     &DataSize,\r
-                     &BootState\r
-                     );\r
-  if (EFI_ERROR (Status) || (BootState == TRUE)) {\r
-    return FALSE;\r
-  }\r
-\r
-  DEBUG ((EFI_D_INFO, "Previous boot cycle successfully completed handover to OS\n"));\r
-  return TRUE;\r
-}\r
 #ifdef NOCS_S3_SUPPORT\r
 EFI_STATUS\r
 UpdateBootMode (\r
@@ -190,7 +138,7 @@ UpdateBootMode (
     } // switch (SleepType)\r
   }\r
 \r
-  if (IsFastBootEnabled (PeiServices) && IsPreviousBootSuccessful (PeiServices)) {\r
+  if (IsFastBootEnabled (PeiServices)) {\r
     DEBUG ((EFI_D_INFO, "Prioritizing Boot mode to BOOT_WITH_MINIMAL_CONFIGURATION\n"));\r
     PrioritizeBootMode (&BootMode, BOOT_WITH_MINIMAL_CONFIGURATION);\r
   }\r