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: Tue, 19 Aug 2014 12:06:31 -0500 Message-ID: <53F38417.6080400@linaro.org> References: <1408444630-16995-1-git-send-email-oleksandr.dmytryshyn@globallogic.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1408444630-16995-1-git-send-email-oleksandr.dmytryshyn@globallogic.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Oleksandr Dmytryshyn , Ian Campbell , Stefano Stabellini , Tim Deegan , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Hi Oleksandr, Thanks you for your patch, On 19/08/14 05:37, Oleksandr Dmytryshyn wrote: > Patch adds a possibility to boot dom0 kernel from uImage. > This is needed to improve bootime. Comparing to zImage, boot-time > uImage is not packed, therefore we can save time needed > to unpack. > > Change-Id: If92bc895721f0b2fa0a844bb92eddc8f1fdc5498 > Signed-off-by: Oleksandr Dmytryshyn > --- > xen/arch/arm/kernel.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 67 insertions(+) > > diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c > index d635a7e..45d92c9 100644 > --- a/xen/arch/arm/kernel.c > +++ b/xen/arch/arm/kernel.c > @@ -16,6 +16,12 @@ > > #include "kernel.h" > > +#define UIMAGE32_MAGIC_OFFSET 0x8 > +#define UIMAGE32_START_OFFSET 0x4 > +#define UIMAGE32_END_OFFSET 0x3 Can you define a structure as it's done for zImage64. It's easier to understand. Also, do you have any link to the uImage protocol? A quick search doesn't allow me to find anything that match your format here. [..] > + /* > + * 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. -- Julien Grall