]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg: Upon BootOption failure, Destroy RamDisk memory before RSC.
authorKrishnadasX Veliyathuparambil Prakashan <krishnadasx.veliyathuparambil.prakashan@intel.com>
Fri, 19 Jun 2020 02:40:26 +0000 (10:40 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 20 Jul 2020 15:00:18 +0000 (15:00 +0000)
commitcb38ace647231076acfc0c5bdd21d3aff43e4f83
tree04699bde13eec3c75c6546fbd1d2e8a6297903d7
parent3d9d66ad760b67bfdfb5b4b8e9b34f6af6c45935
MdeModulePkg: Upon BootOption failure, Destroy RamDisk memory before RSC.

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2818

For better memory management, re-ordered the DestroyRamDisk and
ReportStatusCode calls inside the EfiBootManagerBoot() function.

This will help to clean the unused memory before reporting the
failure status, so that OEMs can use RSC Listener to launch
custom boot option or application for recovering the failed
hard drive.

This change will help to ensure that the allocated pool of memory
for the failed boot option is freed before executing OEM's RSC
listener callback to handle every boot option failure.

Signed-off-by: KrishnadasX Veliyathuparambil Prakashan <krishnadasx.veliyathuparambil.prakashan@intel.com>
Cc: "Gao, Zhichao" <zhichao.gao@intel.com>
Cc: "Ni, Ray" <ray.ni@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c