diff options
author | Benjamin Doron <benjamin.doron00@gmail.com> | 2023-03-31 16:41:25 -0400 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-04-12 11:50:30 +0000 |
commit | dc5f2905ebfdf68ae28ce1081d435af0f8641dd9 (patch) | |
tree | f73b0d31e77bf3f98a77a347c8476e78f4acdc05 /UefiPayloadPkg/UefiPayloadPkg.dsc | |
parent | b991aec0509f24ae7573d732ba337549ecee310c (diff) | |
download | edk2-dc5f2905ebfdf68ae28ce1081d435af0f8641dd9.tar.gz |
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]: https://github.com/tianocore/edk2-platforms/blob/b6f96743891be51541184bf61dd2970c008e2c43/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>
Diffstat (limited to 'UefiPayloadPkg/UefiPayloadPkg.dsc')
-rw-r--r-- | UefiPayloadPkg/UefiPayloadPkg.dsc | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc index bca5d3f335..9847f189ff 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dsc +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc @@ -34,7 +34,6 @@ DEFINE SECURITY_STUB_ENABLE = TRUE
DEFINE SMM_SUPPORT = FALSE
DEFINE PLATFORM_BOOT_TIMEOUT = 3
- DEFINE ABOVE_4G_MEMORY = TRUE
DEFINE BOOT_MANAGER_ESCAPE = FALSE
DEFINE ATA_ENABLE = TRUE
DEFINE SD_ENABLE = TRUE
@@ -442,7 +441,6 @@ !endif
gEfiMdeModulePkgTokenSpaceGuid.PcdSdMmcGenericTimeoutValue|$(SD_MMC_TIMEOUT)
- gUefiPayloadPkgTokenSpaceGuid.PcdDispatchModuleAbove4GMemory|$(ABOVE_4G_MEMORY)
gUefiPayloadPkgTokenSpaceGuid.PcdBootManagerEscape|$(BOOT_MANAGER_ESCAPE)
gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|1800000
|