Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18952C43464 for ; Fri, 18 Sep 2020 18:26:52 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 77E3C21D7F for ; Fri, 18 Sep 2020 18:26:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=xen.org header.i=@xen.org header.b="nMPEM2CY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 77E3C21D7F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kJL5f-0007Px-3b; Fri, 18 Sep 2020 18:26:35 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kJL5d-0007Pr-Mb for xen-devel@lists.xenproject.org; Fri, 18 Sep 2020 18:26:33 +0000 X-Inumbo-ID: 4051c328-8b1c-49a2-af6e-dee0de6e72e2 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 4051c328-8b1c-49a2-af6e-dee0de6e72e2; Fri, 18 Sep 2020 18:26:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject; bh=JXutYG4Qk5Rpokg6GWjssZzElKhTrWab064hNNtj0uw=; b=nMPEM2CY87LtmQRiNmSwmWZNw2 Khr6PbZWTfZxMliAzgZEKp0pBIXdGCup2aMBuEpLUOPpbZIVPyaJqHhC3bgPl2EP3wJSxXDm6B3O+ kmuaN9jkPL7FxtU4ILnNG4VTlz6bhoxBtQe0tRawZyZMDT67oQ/+AfaV9Dm2tImqplos=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kJL5c-0005S2-Ac; Fri, 18 Sep 2020 18:26:32 +0000 Received: from [54.239.6.185] (helo=a483e7b01a66.ant.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kJL5c-00085j-3q; Fri, 18 Sep 2020 18:26:32 +0000 Subject: Re: AW: DT with memory bank of size 0 (WAS: Re: AW: AW: Colibri imx8qxp: Missing kernel boot module) To: Daniel Wagner2 , Stefano Stabellini , "xen-devel@lists.xenproject.org" References: <45400b8b-6379-e00e-50de-941bb2ff423c@xen.org> From: Julien Grall Message-ID: <6ea4f464-fe22-8a42-15e4-e19cc5832ffa@xen.org> Date: Fri, 18 Sep 2020 19:26:28 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Hi Daniel, On 17/09/2020 10:47, Daniel Wagner2 wrote: >>>> Btw 8_8000_0000 is the start address of this systems DDR Main >>>> memory, according to the Reference Manual of the i.MX8QXP. >>> I couldn't find this value in the DT. It is possible that U-boot is >>> modifying the memory node before jumping to Xen (or Linux). >>> >>> Looking at Linux, they seem to ignore any bank with size == 0. I am >>> starting to wonder whether your DT is (ab)using it. >>> >>> Do you have Linux running on baremetal on this board? If so would you >>> mind to dump the DT from the userspace (via /proc/device-tree) this > time? > > I do have linux running on baremetal on the plattform. > Created dtb and dts with devicetree-compiler: > dtc -I fs -O dtb -o ~/dtb-dump /proc/device-tree > dtc -I dtb -O dts -o ~/dts-dump ~/dtb-dump > > uploaded both to google drive: > https://drive.google.com/drive/folders/1jbpnz35sC0NbCyEjrkLqelBsKBztW1S6 > > You were right, after the boot, the memory node contains the second bank > with > size=0. > > memory@80000000 { > device_type = "memory"; > reg = < 0x00 0x80200000 0x00 0x7fe00000 0x08 0x80000000 0x00 0x00 >; > }; Thank you for the testing. I am glad we finally found the reason! >>> >>> In any case, we may want to relax the check in Xen. Any opinions? >> >> Yeah, ignoring a bank with size=0 is fine. I checked the epapr and it > doesn't >> specify that size=0 is invalid, so I think it is actually better to ignore > it and >> continue even from a spec perspective. I have sent a patch to ignore empty bank ([1]). Would you mind to test it? The patch is based on unstable, but it should be easy to apply it on older release. Best regards, [1] https://lore.kernel.org/xen-devel/20200918171116.29005-1-julien@xen.org/ -- Julien Grall