audk/UefiPayloadPkg/UefiPayloadEntry
Benjamin Doron dc5f2905eb UefiPayloadPkg: Always build MemoryTypeInformation HOB for DXE GCD
MemoryType information assists GCD with defragmenting the memory map.
When the DXE core starts, GCD adds memory descriptors for the resource
descriptors HOBs. This allocates heap space which can be reused later
as the bins by memory type. It seems memory allocation prefers low
ranges.

It seems "below 4G" is an artifact of this heap reuse. However, the
memory type information determines the DXE core's
`MinimalMemorySizeNeeded`, determining which system memory descriptor
HOB may be used by DXE. Furthermore, it's important that the memory
type information be correct, for an S4 memory map.

Therefore, follow other bootloaders, such as [MinPlatform][1], and do
this unconditionally. As of [edk2-stable202011][2], it was.

[1]: b6f9674389/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c (L164-L201)
[2]: https://github.com/tianocore/edk2/blob/edk2-stable202011/UefiPayloadPkg/BlSupportPei/BlSupportPei.c#L462-L466

Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Cc: James Lu <james.lu@intel.com>
Cc: Gua Guo <gua.guo@intel.com>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com>
2023-04-12 11:50:30 +00:00
..
Ia32 UefiPayloadPkg: Update code to be more C11 compliant by using __func__ 2023-04-10 14:19:57 +00:00
X64 UefiPayloadPkg: Fix Coverity report defect 2022-08-23 04:03:01 +00:00
AcpiTable.c UefiPayloadPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
LoadDxeCore.c UefiPayloadPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
MemoryAllocation.c UefiPayloadPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PrintHob.c UefiPayloadPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiPayloadEntry.c UefiPayloadPkg: Always build MemoryTypeInformation HOB for DXE GCD 2023-04-12 11:50:30 +00:00
UefiPayloadEntry.h UefiPayloadPkg: Remove UefiCpuLib from module INFs. 2023-03-10 08:23:56 +00:00
UefiPayloadEntry.inf UefiPayloadPkg: Always build MemoryTypeInformation HOB for DXE GCD 2023-04-12 11:50:30 +00:00
UniversalPayloadEntry.c UefiPayloadPkg: Add gUefiAcpiBoardInfoGuid support 2023-03-27 04:21:28 +00:00
UniversalPayloadEntry.inf UefiPayloadPkg: Remove UefiCpuLib from module INFs. 2023-03-10 08:23:56 +00:00