From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH] xen: arm: introduce uImage probe function for Dom0 Date: Wed, 20 Aug 2014 10:24:02 -0500 Message-ID: <53F4BD92.8020104@linaro.org> References: <1408444630-16995-1-git-send-email-oleksandr.dmytryshyn@globallogic.com> <53F38417.6080400@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrii Tseglytskyi Cc: Tim Deegan , Oleksandr Dmytryshyn , Stefano Stabellini , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 20/08/14 00:17, Andrii Tseglytskyi wrote: > Hi Julien, Hello Andrii, >>> + /* >>> + * Check for an appended DTB. >>> + */ >>> + if ( addr + len + sizeof(dtb_hdr) <= size ) >>> + { >>> + copy_from_paddr(&dtb_hdr, addr + len, sizeof(dtb_hdr)); >>> + >>> + if ( be32_to_cpu(dtb_hdr.magic) == DTB_MAGIC ) >>> + len += be32_to_cpu(dtb_hdr.total_size); >>> + >>> + if ( len - start > addr + size ) >>> + return -EINVAL; >>> + } >> >> >> This is a legacy on zImage, I don't really want to see it on implementation >> of a new format. Xen is creating the device tree for DOM0, the developer >> should not append a device tree. >> > > Sorry this is not a topic of this patch, but what about appending > device tree to domU kernel? I found that similar functionality was > removed from tools by the following patch: > > http://permalink.gmane.org/gmane.comp.emulators.xen.cvs/31110 Only the check has been removed. The full binary is now loading in the memory. So appending device tree to kernel should still work. > > But in case if some HW is present in domU you may need this > functionality. Code which supports HW in domU is going to be merged > (iomem and your irq routing series), so maybe appended devtree is also > OK? IIRC, the plan is to allow the user to pass a snippet describing your device. The toolstack will add it in the generated device tree. I don't think someone is working on it. Regards, -- Julien Grall