Memory type information is required for S4 and ram disk boot doesn't need to support S4.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu...@intel.com> Cc: Siyuan Fu <siyuan...@intel.com> --- MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c index eb65f14..57bb35e 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c @@ -1675,9 +1675,11 @@ EfiBootManagerBoot ( // 6. Adjust the different type memory page number just before booting // and save the updated info into the variable for next boot to use // - BmSetMemoryTypeInformationVariable ( - (BOOLEAN) ((BootOption->Attributes & LOAD_OPTION_CATEGORY) == LOAD_OPTION_CATEGORY_BOOT) - ); + if (RamDiskHandle == NULL) { + BmSetMemoryTypeInformationVariable ( + (BOOLEAN) ((BootOption->Attributes & LOAD_OPTION_CATEGORY) == LOAD_OPTION_CATEGORY_BOOT) + ); + } DEBUG_CODE_BEGIN(); if (BootOption->Description == NULL) { -- 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel