audk/MdeModulePkg
Laszlo Ersek a56af23f06 MdeModulePkg/UefiBootManagerLib: log reserved mem allocation failure
The LoadFile protocol can report such a large buffer size that we cannot
allocate enough reserved pages for. This particularly affects HTTP(S)
Boot, if the remote file is very large (for example, an ISO image).

While the TianoCore wiki mentions this at
<https://github.com/tianocore/tianocore.github.io/wiki/HTTP-Boot#ram-disk-image-size>:

> The maximum RAM disk image size depends on how much continuous reserved
> memory block the platform could provide.

it's hard to remember; so log a DEBUG_ERROR message when the allocation
fails.

This patch produces error messages such as:

> UiApp:BmExpandLoadFile: failed to allocate reserved pages:
> BufferSize=4501536768
> LoadFile="PciRoot(0x0)/Pci(0x3,0x0)/MAC(5254001B103E,0x1)/
>      IPv4(0.0.0.0,TCP,DHCP,192.168.124.106,192.168.124.1,255.255.255.0)/
>      Dns(192.168.124.1)/
>      Uri(https://ipv4-server/RHEL-7.7-20190723.1-Server-x86_64-dvd1.iso)"
> FilePath=""

(Manually rewrapped here for keeping PatchCheck.py happy.)

Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Acked-by: Hao A Wu <hao.a.wu@intel.com>
2020-01-14 10:53:42 +00:00
..
Application MdeModulePkg VariableInfo: Always consider RT DXE and SMM stats 2019-11-05 21:55:54 -08:00
Bus MdeModulePkg/SdMmcPciHcDxe: Fix unknown doxygen tag error 2020-01-13 01:24:13 +00:00
Core MdeModulePkg PeiCore: Improve comment semantics 2019-12-11 07:00:10 +00:00
Include MdeModulePkg: remove EnterS3WithImmediateWake () from ResetSystemLib 2020-01-10 07:00:51 +00:00
Library MdeModulePkg/UefiBootManagerLib: log reserved mem allocation failure 2020-01-14 10:53:42 +00:00
Logo MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
Universal MdeModulePkg/Smbios: Add TCG PFP rev 105 support. 2020-01-06 06:23:19 +00:00
MdeModulePkg.ci.yaml MdeModulePkg: Add YAML file for CI builds 2019-11-11 13:02:17 -08:00
MdeModulePkg.dec MdeModulePkg: Add EDK2 Platform Boot Manager Protocol 2020-01-08 07:28:39 +00:00
MdeModulePkg.dsc MdeModulePkg: LzmaCustomDecompressLib.inf don't support EBC anymore 2019-12-05 00:21:35 +00:00
MdeModulePkg.uni MdeModulePkg/MdeModulePkg.uni: Add missing strings for PCD 2019-12-04 05:05:57 +00:00
MdeModulePkgExtra.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00