On Mon, Oct 17, 2016 at 08:28:50AM +0100, Ard Biesheuvel wrote: > > diff --git a/ArmVirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.c > > b/ArmVirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.c > > index 64afc4d..16683ef 100644 > > --- a/ArmVirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.c > > +++ b/ArmVirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.c > > @@ -79,11 +79,11 @@ ArmVirtGicArchLibConstructor ( > > > > // RegProp[0..1] == { GICD base, GICD size } > > DistBase = SwapBytes64 (Reg[0]); > > - ASSERT (DistBase < MAX_UINT32); > > + ASSERT (DistBase < MAX_UINT64); > > > > This becomes equivalent to 'DistBase != MAX_UINT64' given that a > UINT64 cannot exceed MAX_UINT64. That is a nonsensical thing to > assert, so it is better to simply drop it
Random thought: Could we keep the assert(s) and change the test to MAX_UINTN, to have a sanity test over whether a 32-bit plaform ends up with a duff address? / Leif > > // RegProp[2..3] == { GICR base, GICR size } > > RedistBase = SwapBytes64 (Reg[2]); > > - ASSERT (RedistBase < MAX_UINT32); > > + ASSERT (RedistBase < MAX_UINT64); > > > > Likewise > > > PcdSet64 (PcdGicDistributorBase, DistBase); > > PcdSet64 (PcdGicRedistributorsBase, RedistBase); > > @@ -117,8 +117,8 @@ ArmVirtGicArchLibConstructor ( > > > > DistBase = SwapBytes64 (Reg[0]); > > CpuBase = SwapBytes64 (Reg[2]); > > - ASSERT (DistBase < MAX_UINT32); > > - ASSERT (CpuBase < MAX_UINT32); > > + ASSERT (DistBase < MAX_UINT64); > > + ASSERT (CpuBase < MAX_UINT64); > > > > Likewise > > > PcdSet64 (PcdGicDistributorBase, DistBase); > > PcdSet64 (PcdGicInterruptInterfaceBase, CpuBase); > > -- > > 2.7.4 > > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel