summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2015-11-24 06:56:05 +0000
committerniruiyu <niruiyu@Edk2>2015-11-24 06:56:05 +0000
commit665b26ba331d961cead150fe5b2dde385b9c3988 (patch)
tree263172f13e52298ecbec2340ce8f7baf425f86ce /MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
parent63a9e0d6f98d65b93f2a4cfc1977b1c0c5052b5f (diff)
downloadedk2-platforms-665b26ba331d961cead150fe5b2dde385b9c3988.tar.xz
MdeModulePkg/UefiBootManagerLib: Always create MemoryTypeInfo variable
Align to old BDS behavior (IntelFrameworkModulePkg/BDS) to always create MemoryTypeInfo variable regardless of the PcdResetOnMemoryTypeInformationChange value. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18926 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c')
-rw-r--r--MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c b/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
index cc2032cd82..1768781bfc 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c
@@ -122,11 +122,16 @@ BmMatchDevicePaths (
/**
This routine adjust the memory information for different memory type and
- save them into the variables for next boot.
+ save them into the variables for next boot. It resets the system when
+ memory information is updated and the current boot option belongs to
+ boot category instead of application category.
+
+ @param Boot TRUE if current boot option belongs to boot category instead of
+ application category.
**/
VOID
BmSetMemoryTypeInformationVariable (
- VOID
+ IN BOOLEAN Boot
)
{
EFI_STATUS Status;
@@ -267,11 +272,11 @@ BmSetMemoryTypeInformationVariable (
if (!EFI_ERROR (Status)) {
//
- // If the Memory Type Information settings have been modified, then reset the platform
- // so the new Memory Type Information setting will be used to guarantee that an S4
+ // If the Memory Type Information settings have been modified and the boot option belongs to boot category,
+ // then reset the platform so the new Memory Type Information setting will be used to guarantee that an S4
// entry/resume cycle will not fail.
//
- if (MemoryTypeInformationModified) {
+ if (MemoryTypeInformationModified && Boot && PcdGetBool (PcdResetOnMemoryTypeInformationChange)) {
DEBUG ((EFI_D_INFO, "Memory Type Information settings change. Warm Reset!!!\n"));
gRT->ResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL);
}