diff options
| author | Oliver Smith-Denny <osde@microsoft.com> | 2025-10-11 01:28:26 +0300 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2025-10-17 10:31:03 +0300 |
| commit | f80a406aa9dd9fde80b3e33cd435a1641afde13e (patch) | |
| tree | 55a442c784b69b32d199e7817006504876f2c999 /MdeModulePkg/Core | |
| parent | 3731699a63e5bc774507d225e812ae0f97701d4f (diff) | |
| download | edk2-f80a406aa9dd9fde80b3e33cd435a1641afde13e.tar.xz | |
MdeModulePkg: CoreGetMemoryMap: Account for Unaccepted Entries
Commit 43e306806e3c1ed3ad7e9913492732e893cafa0f added
EFIGcdMemoryTypeUnaccepted (as it was later renamed) to be
returned in the EFI_MEMORY_MAP. However, it did not add it
to the number of entries calculation, so if any
EfiGcdMemoryTypeUnaccepted entries exist in the GCD they will
overflow the EFI_MEMORY_MAP buffer provided by the bootloader.
This resolves that by accounting for unaccepted entries in
the number of entries calculation.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
Diffstat (limited to 'MdeModulePkg/Core')
| -rw-r--r-- | MdeModulePkg/Core/Dxe/Mem/Page.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/Page.c index 27c27882fa..8e73811597 100644 --- a/MdeModulePkg/Core/Dxe/Mem/Page.c +++ b/MdeModulePkg/Core/Dxe/Mem/Page.c @@ -1953,6 +1953,7 @@ CoreGetMemoryMap ( GcdMapEntry = CR (Link, EFI_GCD_MAP_ENTRY, Link, EFI_GCD_MAP_SIGNATURE);
if ((GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypePersistent) ||
(GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypeReserved) ||
+ (GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypeUnaccepted) ||
((GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypeMemoryMappedIo) &&
((GcdMapEntry->Attributes & EFI_MEMORY_RUNTIME) == EFI_MEMORY_RUNTIME)))
{
|
