diff options
Diffstat (limited to 'MdeModulePkg/Core/Dxe')
-rw-r--r-- | MdeModulePkg/Core/Dxe/Mem/Page.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/Page.c index e415a896cd..04844e3305 100644 --- a/MdeModulePkg/Core/Dxe/Mem/Page.c +++ b/MdeModulePkg/Core/Dxe/Mem/Page.c @@ -1464,8 +1464,10 @@ CoreGetMemoryMap ( }
}
MemoryMap->Attribute = Entry->Attribute;
- if (mMemoryTypeStatistics[MemoryMap->Type].Runtime) {
- MemoryMap->Attribute |= EFI_MEMORY_RUNTIME;
+ if (MemoryMap->Type < EfiMaxMemoryType) {
+ if (mMemoryTypeStatistics[MemoryMap->Type].Runtime) {
+ MemoryMap->Attribute |= EFI_MEMORY_RUNTIME;
+ }
}
//
|