mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/Bds: Fix a boot hang due to Ram Disk boot support
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
This commit is contained in:
parent
213ae07750
commit
b1bb6f5961
|
@ -1702,7 +1702,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
|
||||
//
|
||||
BmGetRamDiskMemoryInfo (RamDiskDevicePath, &RamDiskSizeInPages);
|
||||
if (RamDiskDevicePath == NULL) {
|
||||
RamDiskSizeInPages = 0;
|
||||
} else {
|
||||
BmGetRamDiskMemoryInfo (RamDiskDevicePath, &RamDiskSizeInPages);
|
||||
}
|
||||
BmSetMemoryTypeInformationVariable (
|
||||
(BOOLEAN) ((BootOption->Attributes & LOAD_OPTION_CATEGORY) == LOAD_OPTION_CATEGORY_BOOT),
|
||||
RamDiskSizeInPages
|
||||
|
|
Loading…
Reference in New Issue