[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
#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
## 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
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
\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
+++ /dev/null
-/** @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
## 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