]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/BdsDxe: Use a pcd to control PlatformRecovery
authorZhichao Gao <zhichao.gao@intel.com>
Wed, 22 May 2019 00:59:45 +0000 (08:59 +0800)
committerHao A Wu <hao.a.wu@intel.com>
Mon, 1 Jul 2019 06:59:20 +0000 (14:59 +0800)
commit0889500ce1fc7d8784c47354ef79d148e2a55ccd
tree15bc0d47bec9f8f6e84df728995f8343eb3f6fcd
parentf81b738653c39428a87836c3ba1aba2e4e74eea3
MdeModulePkg/BdsDxe: Use a pcd to control PlatformRecovery

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

Use the PcdPlatformRecoverySupport to control the function
of platform recovery in BDS.
First, set the variable's ("OsIndicationsSupported")
EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY bit base on the pcd.
It would affect the variable "OsIndications".
While the platform does not support the platform recovery,
it is inappropriate to set a PlatformRecovery#### variable. So
skip setting the variable. But it should remain the behavior of
booting from a default file path (such as \EFI\BOOT\BOOTX64.EFI)
to be compatible with the previous version UEFI spec.

Add memory check before build platform default boot option. If
fail to allocate memory for the defualt boot file path, put the
system into dead loop to indicate it is unable to boot.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
MdeModulePkg/Universal/BdsDxe/BdsEntry.c