On Mon, Nov 23, 2015 at 05:56:29PM +0100, Ard Biesheuvel wrote: > The way the v7 MMU code is invoked by the Xen port is somewhat of > a pathological case, since it describes its physical memory space > using a single cacheable region that covers the entire addressable > range. When clipping this region to the part that is 1:1 addressable, > we end up with a region of exactly 4 GB in size, which just exceeds > the range of the UINT32 variable we use in FillTranslationTable() to > track our progress while populating the page tables. So promote it > to UINT64 instead.
I'd argue this is a useful code clarification even without the Xen reason - RemainLength is derived from MemoryRegion->Length, which is UINT64. Reviewed-by: Leif Lindholm <leif.lindh...@linaro.org> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> > --- > ArmPkg/Library/ArmLib/ArmV7/ArmV7Mmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ArmPkg/Library/ArmLib/ArmV7/ArmV7Mmu.c > b/ArmPkg/Library/ArmLib/ArmV7/ArmV7Mmu.c > index 2e39ce00fea6..23d2e43beba0 100644 > --- a/ArmPkg/Library/ArmLib/ArmV7/ArmV7Mmu.c > +++ b/ArmPkg/Library/ArmLib/ArmV7/ArmV7Mmu.c > @@ -148,7 +148,7 @@ FillTranslationTable ( > UINT32 *SectionEntry; > UINT32 Attributes; > UINT32 PhysicalBase; > - UINT32 RemainLength; > + UINT64 RemainLength; > > ASSERT(MemoryRegion->Length > 0); > > -- > 1.9.1 > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel