From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x230.google.com (mail-it0-x230.google.com [IPv6:2607:f8b0:4001:c0b::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DE5DE1A1E10 for ; Mon, 17 Oct 2016 02:20:31 -0700 (PDT) Received: by mail-it0-x230.google.com with SMTP id 66so2575092itl.1 for ; Mon, 17 Oct 2016 02:20:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=h2uPfqGFX6t6mPwRNXFzdvWSphjIVoTyZ01Z7bw2fTA=; b=SozBysG6EfKzPNE/smV+YDYQDzZZxDgoFPeyLLg2sFRU7spSm6ZmGX4d8otm1REtNX v4dlrV0DT/R4vZ4IIZ1tbIOtbr7Lb0hSVQByN+NZ9F8533kLFV+aoYj+LNkyCSrZwgM2 2P/xyx2rU69aitAtAvtSuSBGiIISJy+CyDhAo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=h2uPfqGFX6t6mPwRNXFzdvWSphjIVoTyZ01Z7bw2fTA=; b=IElt6Y2MLlpShFfFSUGmZ5luvO/fHQx+ABkiruWPBPhrTf+ZBJZJMA+LPw29w2o4E+ /YegoAYic7vyhZCG0sdOOG152fUuM1Q/Ss4YvfMWdTN+6xaINerokIcrDFuWaVOvWIU5 ZkUiUAYONugEy7tjUOjFRuyRA/qUp6KyYd1n70XnD/RUmxiT3k7zCmOZbp1+7ZDLXUtQ o2MFzEhQZal537sS+onEhit8Y6ykQXPYHh01S5w9b+xuTjnv+p4SS0urU7OtDNO3wSIe UIFSlh1fFVa64KxVoEBeXppC213qOGv1O+ZsrUibT1qTqu2PqQwO0CWWAX926FK8oJ08 YFhg== X-Gm-Message-State: AA6/9RlHOx4SlrK7K+EANkj4DCG0JN3OQ2Bs7zLHVBtWSIAeKJET4FSBT5Aj69yx0XA0DRYvXiVSsVIkyFRhw9G8 X-Received: by 10.36.94.75 with SMTP id h72mr7560132itb.37.1476696031118; Mon, 17 Oct 2016 02:20:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.5.139 with HTTP; Mon, 17 Oct 2016 02:20:30 -0700 (PDT) In-Reply-To: <20161017083333.GU3471@bivouac.eciton.net> References: <1476680593-4961-1-git-send-email-dennis.chen@arm.com> <20161017083333.GU3471@bivouac.eciton.net> From: Ard Biesheuvel Date: Mon, 17 Oct 2016 10:20:30 +0100 Message-ID: To: Leif Lindholm Cc: Dennis Chen , edk2-devel-01 Subject: Re: [PATCH] ArmPkg ArmVirtPkg: fix the GIC base address variables as 64-bit X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2016 09:20:32 -0000 Content-Type: text/plain; charset=UTF-8 On 17 October 2016 at 09:33, Leif Lindholm 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.