retire gEfiBootStateGuid and replace it with dynamic hii pcd. so the different boot times can know whether it needs to do full/minimal/no_changes configuration.

[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
This commit is contained in:
eric_tian 2009-03-04 02:43:10 +00:00
parent ea2d90867a
commit 08c4ca5bca
6 changed files with 11 additions and 56 deletions

View File

@ -85,6 +85,7 @@
[PcdsDynamic.common]
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1|UINT16|0x00010025
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeRuntimeMemorySize|128|UINT16|0x0001002e
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBootState|FALSE|BOOLEAN|0x0001002f
[PcdsFeatureFlag.common]
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE|BOOLEAN|0x00010022

View File

@ -20,7 +20,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Guid/MdeModuleHii.h>
#include <Guid/FileSystemVolumeLabelInfo.h>
#include <Protocol/DevicePath.h>
#include <Guid/BootState.h>
#include <Guid/DataHubRecords.h>
#include <Protocol/LoadFile.h>
#include <Protocol/CpuIo.h>

View File

@ -130,7 +130,6 @@
## SOMETIMES_CONSUMES ## Variable:L"ConIn" (The device path of console in device)
## SOMETIMES_CONSUMES ## Variable:L"ConOut" (The device path of console out device)
## SOMETIMES_CONSUMES ## Variable:L"ErrOut" (The device path of error out device)
gEfiBootStateGuid ## SOMETIMES_PRODUCES (Produce when status has not been set yet) ## Variable:L"BootState" (Indicate the state of last boot)
gEfiFileSystemVolumeLabelInfoIdGuid ## CONSUMES ## GUID (Indicate the information type is volume)
gEfiFileInfoGuid ## CONSUMES ## GUID (Indicate the information type is file)
gEfiMiscSubClassGuid ## CONSUMES ## GUID (Indicate the datahub for holding misc sub class record)
@ -171,7 +170,8 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBootState
[Depex]
TRUE

View File

@ -229,9 +229,7 @@ BdsMemoryTest (
EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground;
EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background;
EFI_GRAPHICS_OUTPUT_BLT_PIXEL Color;
UINT8 Value;
UINTN DataSize;
UINT32 Attributes;
BOOLEAN IsFirstBoot;
UINT32 TempData;
ReturnStatus = EFI_SUCCESS;
@ -401,24 +399,13 @@ Done:
FreePool (Pos);
DataSize = sizeof (Value);
Status = gRT->GetVariable (
L"BootState",
&gEfiBootStateGuid,
&Attributes,
&DataSize,
&Value
);
if (EFI_ERROR (Status)) {
Value = 1;
gRT->SetVariable (
L"BootState",
&gEfiBootStateGuid,
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
sizeof (Value),
&Value
);
//
// Use a DynamicHii type pcd to save the boot status, which is used to
// control configuration mode, such as FULL/MINIMAL/NO_CHANGES configuration.
//
IsFirstBoot = PcdGetBool(PcdBootState);
if (IsFirstBoot) {
PcdSetBool(PcdBootState, FALSE);
}
return ReturnStatus;

View File

@ -1,28 +0,0 @@
/** @file
This file defines variable name and variable GUID for boot state.
This variable is to mark if the machine has complete one boot cycle before.
After the complete boot, the variable BootState will be set to 1.
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __BOOT_STATE_H__
#define __BOOT_STATE_H__
typedef UINT32 EFI_BOOT_STATE;
#define BOOT_STATE_VARIABLE_NAME L"BootState"
#define EFI_BOOT_STATE_VARIABLE_GUID \
{0x60b5e939, 0xfcf, 0x4227, {0xba, 0x83, 0x6b, 0xbe, 0xd4, 0x5b, 0xc0, 0xe3} }
extern EFI_GUID gEfiBootStateGuid;
#endif

View File

@ -125,10 +125,6 @@
## Include/Guid/PrimaryStandardErrorDevice.h
gEfiPrimaryStandardErrorDeviceGuid = { 0x5A68191B, 0x9B97, 0x4752, { 0x99, 0x46, 0xE3, 0x6A, 0x5D, 0xA9, 0x42, 0xB1 }}
## Variale guid specify boot state.
## Include/Guid/BootState.h
gEfiBootStateGuid = { 0x60B5E939, 0x0FCF, 0x4227, { 0xBA, 0x83, 0x6B, 0xBE, 0xD4, 0x5B, 0xC0, 0xE3 }}
## Hob and Variable guid specify the platform memory type information.
## Include/Guid/MemoryTypeInformation.h
gEfiMemoryTypeInformationGuid = { 0x4C19049F, 0x4137, 0x4DD3, { 0x9C, 0x10, 0x8B, 0x97, 0xA8, 0x3F, 0xFD, 0xFA }}