]> git.proxmox.com Git - mirror_edk2.git/commitdiff
retire gEfiBootStateGuid and replace it with dynamic hii pcd. so the different boot...
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 4 Mar 2009 02:43:10 +0000 (02:43 +0000)
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 4 Mar 2009 02:43:10 +0000 (02:43 +0000)
[Impact]
EDK still keep this guid. and if we ports such platforms to EDKII, it will do full configuration

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

IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h
IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
IntelFrameworkModulePkg/Universal/BdsDxe/MemoryTest.c
MdeModulePkg/Include/Guid/BootState.h [deleted file]
MdeModulePkg/MdeModulePkg.dec

index d84ba3875d918b516eb1ea6c036475155ebe89f1..76bebcd100cb08ca368581cdec51ced1788296de 100644 (file)
@@ -85,6 +85,7 @@
 [PcdsDynamic.common]\r
   gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1|UINT16|0x00010025\r
   gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeRuntimeMemorySize|128|UINT16|0x0001002e\r
+  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBootState|FALSE|BOOLEAN|0x0001002f\r
 \r
 [PcdsFeatureFlag.common]\r
   gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE|BOOLEAN|0x00010022\r
index 077718a041d4389b2fe7848e0bc1fe697961242e..2471c12be7439d1d87574b7dbe03cf822020f7d6 100644 (file)
@@ -20,7 +20,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Guid/MdeModuleHii.h>\r
 #include <Guid/FileSystemVolumeLabelInfo.h>\r
 #include <Protocol/DevicePath.h>\r
-#include <Guid/BootState.h>\r
 #include <Guid/DataHubRecords.h>\r
 #include <Protocol/LoadFile.h>\r
 #include <Protocol/CpuIo.h>\r
index d00997795209c85128d0fc1e5ed5e1f7e022666d..19294ae9d3d30031602934d9b8848613df446487 100644 (file)
                                                 ## SOMETIMES_CONSUMES ## Variable:L"ConIn" (The device path of console in device)\r
                                                 ## SOMETIMES_CONSUMES ## Variable:L"ConOut" (The device path of console out device)\r
                                                 ## SOMETIMES_CONSUMES ## Variable:L"ErrOut" (The device path of error out device)\r
-  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
   gEfiMiscSubClassGuid                          ## CONSUMES ## GUID (Indicate the datahub for holding misc sub class record)\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn\r
   gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut\r
-  \r
+  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBootState\r
+\r
 [Depex]\r
   TRUE\r
 \r
index fabdf243108b760f676b9e5502fe7b3957e6a6b3..854f8952c44bf340a2088e94c3561913e38b425f 100644 (file)
@@ -229,9 +229,7 @@ BdsMemoryTest (
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL     Foreground;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL     Background;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL     Color;\r
-  UINT8                             Value;\r
-  UINTN                             DataSize;\r
-  UINT32                            Attributes;\r
+  BOOLEAN                           IsFirstBoot;\r
   UINT32                            TempData;\r
 \r
   ReturnStatus = EFI_SUCCESS;\r
@@ -401,24 +399,13 @@ Done:
 \r
   FreePool (Pos);\r
 \r
-  DataSize = sizeof (Value);\r
-  Status = gRT->GetVariable (\r
-                  L"BootState",\r
-                  &gEfiBootStateGuid,\r
-                  &Attributes,\r
-                  &DataSize,\r
-                  &Value\r
-                  );\r
-\r
-  if (EFI_ERROR (Status)) {\r
-    Value = 1;\r
-    gRT->SetVariable (\r
-          L"BootState",\r
-          &gEfiBootStateGuid,\r
-          EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,\r
-          sizeof (Value),\r
-          &Value\r
-          );\r
+  //\r
+  // Use a DynamicHii type pcd to save the boot status, which is used to\r
+  // control configuration mode, such as FULL/MINIMAL/NO_CHANGES configuration.\r
+  //\r
+  IsFirstBoot = PcdGetBool(PcdBootState);\r
+  if (IsFirstBoot) {\r
+    PcdSetBool(PcdBootState, FALSE);\r
   }\r
 \r
   return ReturnStatus;\r
diff --git a/MdeModulePkg/Include/Guid/BootState.h b/MdeModulePkg/Include/Guid/BootState.h
deleted file mode 100644 (file)
index 1fa7bf5..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/** @file\r
-  This file defines variable name and variable GUID for boot state.\r
-  This variable is to mark if the machine has complete one boot cycle before.\r
-  After the complete boot, the variable BootState will be set to 1.\r
-\r
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>\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
-**/\r
-\r
-#ifndef __BOOT_STATE_H__\r
-#define __BOOT_STATE_H__\r
-\r
-typedef UINT32 EFI_BOOT_STATE;\r
-\r
-#define BOOT_STATE_VARIABLE_NAME  L"BootState"\r
-\r
-#define  EFI_BOOT_STATE_VARIABLE_GUID  \\r
-  {0x60b5e939, 0xfcf, 0x4227, {0xba, 0x83, 0x6b, 0xbe, 0xd4, 0x5b, 0xc0, 0xe3} }\r
-\r
-extern EFI_GUID gEfiBootStateGuid;\r
-#endif\r
index deda06eedec9b7c3fb6a06b793c9390516944965..5f649b5ddee48fd476df8d5ce611fcba01fc1f4e 100644 (file)
   ## Include/Guid/PrimaryStandardErrorDevice.h\r
   gEfiPrimaryStandardErrorDeviceGuid = { 0x5A68191B, 0x9B97, 0x4752, { 0x99, 0x46, 0xE3, 0x6A, 0x5D, 0xA9, 0x42, 0xB1 }}\r
   \r
-  ## Variale guid specify boot state.\r
-  ## Include/Guid/BootState.h\r
-  gEfiBootStateGuid              = { 0x60B5E939, 0x0FCF, 0x4227, { 0xBA, 0x83, 0x6B, 0xBE, 0xD4, 0x5B, 0xC0, 0xE3 }}\r
-  \r
   ## Hob and Variable guid specify the platform memory type information.\r
   ## Include/Guid/MemoryTypeInformation.h\r
   gEfiMemoryTypeInformationGuid  = { 0x4C19049F, 0x4137, 0x4DD3, { 0x9C, 0x10, 0x8B, 0x97, 0xA8, 0x3F, 0xFD, 0xFA }}\r