]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/ArmLib: Fixed 'ArmConfigureMmu()' to avoid overflow when an entry is mapped...
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 28 Feb 2012 17:20:34 +0000 (17:20 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 28 Feb 2012 17:20:34 +0000 (17:20 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13056 6f19259b-4bc3-4df7-8a09-765794883524

ArmPkg/Library/ArmLib/ArmV7/ArmV7Mmu.c

index f57e48b3a5ad32c42de0a73e4caad65dbecff2c6..69f360c3a66dc0bd2682eebfa9614dfc66bd6d87 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 *  File managing the MMU for ARMv7 architecture\r
 *\r
-*  Copyright (c) 2011, ARM Limited. All rights reserved.\r
+*  Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
 *  \r
 *  This program and the accompanying materials                          \r
 *  are licensed and made available under the terms and conditions of the BSD License         \r
@@ -235,7 +235,7 @@ ArmConfigureMmu (
   TranslationTableAttribute = (ARM_MEMORY_REGION_ATTRIBUTES)0;\r
   while (MemoryTable->Length != 0) {\r
     // Find the memory attribute for the Translation Table\r
-    if ((TranslationTable >= MemoryTable->PhysicalBase) && (TranslationTable < MemoryTable->PhysicalBase + MemoryTable->Length)) {\r
+    if ((TranslationTable >= MemoryTable->PhysicalBase) && (TranslationTable <= MemoryTable->PhysicalBase - 1 + MemoryTable->Length)) {\r
       TranslationTableAttribute = MemoryTable->Attributes;\r
     }\r
 \r