From 5ed2368498307ee0f635012fefb58c51feb98bd5 Mon Sep 17 00:00:00 2001 From: oliviermartin Date: Tue, 28 Feb 2012 17:20:34 +0000 Subject: ArmPkg/ArmLib: Fixed 'ArmConfigureMmu()' to avoid overflow when an entry is mapped at 0xFFFFFFFF git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13056 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPkg/Library/ArmLib/ArmV7/ArmV7Mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ArmPkg/Library') diff --git a/ArmPkg/Library/ArmLib/ArmV7/ArmV7Mmu.c b/ArmPkg/Library/ArmLib/ArmV7/ArmV7Mmu.c index f57e48b3a5..69f360c3a6 100644 --- a/ArmPkg/Library/ArmLib/ArmV7/ArmV7Mmu.c +++ b/ArmPkg/Library/ArmLib/ArmV7/ArmV7Mmu.c @@ -1,7 +1,7 @@ /** @file * File managing the MMU for ARMv7 architecture * -* Copyright (c) 2011, ARM Limited. All rights reserved. +* Copyright (c) 2011-2012, ARM Limited. All rights reserved. * * This program and the accompanying materials * are licensed and made available under the terms and conditions of the BSD License @@ -235,7 +235,7 @@ ArmConfigureMmu ( TranslationTableAttribute = (ARM_MEMORY_REGION_ATTRIBUTES)0; while (MemoryTable->Length != 0) { // Find the memory attribute for the Translation Table - if ((TranslationTable >= MemoryTable->PhysicalBase) && (TranslationTable < MemoryTable->PhysicalBase + MemoryTable->Length)) { + if ((TranslationTable >= MemoryTable->PhysicalBase) && (TranslationTable <= MemoryTable->PhysicalBase - 1 + MemoryTable->Length)) { TranslationTableAttribute = MemoryTable->Attributes; } -- cgit v1.2.3