mirror of https://github.com/acidanthera/audk.git
dc5f2905eb
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]:
|
||
---|---|---|
.. | ||
Ia32 | ||
X64 | ||
AcpiTable.c | ||
LoadDxeCore.c | ||
MemoryAllocation.c | ||
PrintHob.c | ||
UefiPayloadEntry.c | ||
UefiPayloadEntry.h | ||
UefiPayloadEntry.inf | ||
UniversalPayloadEntry.c | ||
UniversalPayloadEntry.inf |