diff options
author | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-03-04 02:43:10 +0000 |
---|---|---|
committer | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-03-04 02:43:10 +0000 |
commit | 08c4ca5bca647d1848cb803f03153ff6de4f8209 (patch) | |
tree | 8a27d074c38cac5d3e93df9ecc3e407135b0a9ff /IntelFrameworkModulePkg | |
parent | ea2d90867ac938e89c4bae0d1c7308940af00784 (diff) | |
download | edk2-platforms-08c4ca5bca647d1848cb803f03153ff6de4f8209.tar.xz |
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
Diffstat (limited to 'IntelFrameworkModulePkg')
4 files changed, 11 insertions, 24 deletions
diff --git a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec index d84ba3875d..76bebcd100 100644 --- a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec +++ b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec @@ -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
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h b/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h index 077718a041..2471c12be7 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h @@ -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>
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf index d009977952..19294ae9d3 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf @@ -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
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/MemoryTest.c b/IntelFrameworkModulePkg/Universal/BdsDxe/MemoryTest.c index fabdf24310..854f8952c4 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/MemoryTest.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/MemoryTest.c @@ -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;
|