From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-x22c.google.com (mail-qk0-x22c.google.com [IPv6:2607:f8b0:400d:c09::22c]) (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 CCB661A1E10 for ; Mon, 17 Oct 2016 02:27:38 -0700 (PDT) Received: by mail-qk0-x22c.google.com with SMTP id z190so222509909qkc.2 for ; Mon, 17 Oct 2016 02:27:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TvhiOrdbaIWd0hHduS3fzaQ3XNmeoQNUNCTFoG1UN4I=; b=BBtAgU8Mg1kATWjzk4aaptzTSM+ByvhTBX58Zzd21fKmgn4PYUMs2xWDInhW+uNjrB 9IUavGZaMLHS0pwnNJ4IVN2G5jRtPNV4QNFmnfBVY+b4JYYIR18QngqCblf753QzvI5g Gd6LKrAGWqPi1kGkYEMsmfETThHSDrNNcWviQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=TvhiOrdbaIWd0hHduS3fzaQ3XNmeoQNUNCTFoG1UN4I=; b=HVVRfJWtU3Ks+5rSmiTCpxTX55W1/q/kI2Q6LmbMQus4k/8U11ZIIACpnp7TnFyGZk 7x0fiIUWx1/ogz/0Y2lvcHFYZIDaTDFLKE74jJ+122SGZUT7uYQmdKKzQn96mPZ11zc8 4dPnR0eOvyQc6JjL1lrU/A7bwHcFet/79bpxk5J3praJRion5krPef8yJzGt0ZNagmo2 pOElx00X8J9d/zQTiFIByv1giKZscer/OivNfiYdrH8h8GmovCOBNpH3PeemdeNumGdq fUIN7xPAQqeTd7oJznCzySH5EnwjeaMexhXSQvTAWsSUemKHhqb4RizI7n/Qx9zmKbJy +61g== X-Gm-Message-State: AA6/9Rnejpx7Ou1EN/InB/byf0tmyzk3WWJ5HZuGiqeE0neSSzCpGjliYxkJKQVOhBm0lerW X-Received: by 10.194.22.34 with SMTP id a2mr10462561wjf.95.1476696457873; Mon, 17 Oct 2016 02:27:37 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id h3sm51550264wjp.45.2016.10.17.02.27.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Oct 2016 02:27:37 -0700 (PDT) Date: Mon, 17 Oct 2016 10:27:35 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: Dennis Chen , edk2-devel-01 Message-ID: <20161017092735.GV3471@bivouac.eciton.net> References: <1476680593-4961-1-git-send-email-dennis.chen@arm.com> <20161017083333.GU3471@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) 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:27:39 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Oct 17, 2016 at 10:20:30AM +0100, Ard Biesheuvel wrote: > 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. I won't argue with that. / Leif