From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2 1/2] xen/arm: Rework the way to compute dom0 DTB base address Date: Fri, 31 May 2013 14:45:25 +0100 Message-ID: <51A8A975.2000800@citrix.com> References: <1369922720-10015-1-git-send-email-julien.grall@linaro.org> <1369922720-10015-2-git-send-email-julien.grall@linaro.org> <1370000724.5199.112.camel@zakaz.uk.xensource.com> <51A8A58E.9090501@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <51A8A58E.9090501@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: patches@linaro.org, xen-devel@lists.xen.org, Ian Campbell , Stefano.Stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On 05/31/2013 02:28 PM, Julien Grall wrote: >>> + if ( !(MAX(zimage_start, dtb_end) < MIN(zimage_end, dtb_start)) ) >>> + return 0; >> >> I had to draw quite a few pictures to convince myself this was right, >> and I'm still not entirely sure ;-) > > > In fact it's totally wrong :/. What about this check? > Another mistake on the first check: if ( (dtb_start > zimage_end) || (dtb_end < zimage_start) ) -- Julien