From: Leif Lindholm <leif.lindholm@linaro.org>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Dennis Chen <dennis.chen@arm.com>,
edk2-devel-01 <edk2-devel@lists.01.org>
Subject: Re: [PATCH] ArmPkg ArmVirtPkg: fix the GIC base address variables as 64-bit
Date: Mon, 17 Oct 2016 10:27:35 +0100 [thread overview]
Message-ID: <20161017092735.GV3471@bivouac.eciton.net> (raw)
In-Reply-To: <CAKv+Gu_fidwjfU4ksfsF_9j4dV62skuLtmFvEkcM3WX2xzKyOQ@mail.gmail.com>
On Mon, Oct 17, 2016 at 10:20:30AM +0100, Ard Biesheuvel wrote:
> On 17 October 2016 at 09:33, Leif Lindholm <leif.lindholm@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.
I won't argue with that.
/
Leif
prev parent reply other threads:[~2016-10-17 9:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-17 5:03 [PATCH] ArmPkg ArmVirtPkg: fix the GIC base address variables as 64-bit Dennis Chen
2016-10-17 7:28 ` Ard Biesheuvel
2016-10-17 7:44 ` Dennis Chen
2016-10-17 8:33 ` Leif Lindholm
2016-10-17 9:20 ` Ard Biesheuvel
2016-10-17 9:27 ` Leif Lindholm [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161017092735.GV3471@bivouac.eciton.net \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox