From 8c716296fac241627e9e5ad5ed64f73b18447978 Mon Sep 17 00:00:00 2001 From: erictian Date: Wed, 5 Jan 2011 02:33:47 +0000 Subject: 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 --- IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'IntelFrameworkModulePkg') diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c index 1e88922630..cc86908530 100644 --- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c +++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c @@ -1116,16 +1116,26 @@ BdsSetMemoryTypeInformationVariable ( EFI_HOB_GUID_TYPE *GuidHob; BOOLEAN MemoryTypeInformationModified; BOOLEAN MemoryTypeInformationVariableExists; + EFI_BOOT_MODE BootMode; MemoryTypeInformationModified = 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 // other than BOOT_WITH_DEFAULT_SETTINGS because the Memory Type // Information is not valid in this boot mode. // - if (GetBootModeHob () != BOOT_WITH_DEFAULT_SETTINGS) { + if (BootMode != BOOT_WITH_DEFAULT_SETTINGS) { VariableSize = 0; Status = gRT->GetVariable ( EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME, -- cgit v1.2.3