in Recovery path, doesn't warm reset even if MemoryTypeInfo data is changed.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11225 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
erictian 2011-01-05 02:33:47 +00:00
parent ee686203fd
commit 8c716296fa

View File

@ -1116,16 +1116,26 @@ BdsSetMemoryTypeInformationVariable (
EFI_HOB_GUID_TYPE *GuidHob; EFI_HOB_GUID_TYPE *GuidHob;
BOOLEAN MemoryTypeInformationModified; BOOLEAN MemoryTypeInformationModified;
BOOLEAN MemoryTypeInformationVariableExists; BOOLEAN MemoryTypeInformationVariableExists;
EFI_BOOT_MODE BootMode;
MemoryTypeInformationModified = FALSE; MemoryTypeInformationModified = FALSE;
MemoryTypeInformationVariableExists = FALSE; MemoryTypeInformationVariableExists = FALSE;
BootMode = GetBootModeHob ();
//
// In BOOT_IN_RECOVERY_MODE, Variable region is not reliable.
//
if (BootMode == BOOT_IN_RECOVERY_MODE) {
return;
}
// //
// Only get the the Memory Type Information variable in the boot mode // Only get the the Memory Type Information variable in the boot mode
// other than BOOT_WITH_DEFAULT_SETTINGS because the Memory Type // other than BOOT_WITH_DEFAULT_SETTINGS because the Memory Type
// Information is not valid in this boot mode. // Information is not valid in this boot mode.
// //
if (GetBootModeHob () != BOOT_WITH_DEFAULT_SETTINGS) { if (BootMode != BOOT_WITH_DEFAULT_SETTINGS) {
VariableSize = 0; VariableSize = 0;
Status = gRT->GetVariable ( Status = gRT->GetVariable (
EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME, EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME,