On 17 October 2016 at 09:33, Leif Lindholm <leif.lindh...@linaro.org> wrote:
> 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?
>

That seems like a useful thing in general, but given that we don't do
that anywhere else, I'd rather we just remove them.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to