Fix crash in GetMemoryMap() when memory type 0x80000000-0xFFFFFFFF was allocated by OS loader

Signed-off-by: niruiyu
Reviewed-by: lgao4
Reviewed-by: hhtian

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11774 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
niruiyu 2011-06-09 02:01:19 +00:00
parent 1b65880229
commit 10fe0d814a
1 changed files with 4 additions and 2 deletions

View File

@ -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;
}
}
//