From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH 36/38] libxc: add ARM support to xc_dom (PV domain building) Date: Mon, 23 Jul 2012 15:37:51 +0100 Message-ID: <500D61BF.4080508@cantab.net> References: <1338565113.17466.141.camel@zakaz.uk.xensource.com> <1338565207-2888-1-git-send-email-ian.campbell@citrix.com> <1338565207-2888-36-git-send-email-ian.campbell@citrix.com> <1343051870.5797.36.camel@zakaz.uk.xensource.com> <1343052688.5797.38.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1343052688.5797.38.camel@zakaz.uk.xensource.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: Ian Campbell Cc: "xen-devel@lists.xen.org" , "Tim (Xen.org)" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 23/07/12 15:11, Ian Campbell wrote: > >>>> diff --git a/tools/libxc/xc_dom_armzimageloader.c b/tools/libxc/xc_dom_armzimageloader.c >>>> new file mode 100644 >>>> index 0000000..220176d >>>> --- /dev/null >>>> +++ b/tools/libxc/xc_dom_armzimageloader.c >> [...] >>>> +#include "xg_private.h" >>>> +#include "xc_dom.h" >>>> + >>>> +#include /* XXX ntohl is not the right function... */ >>> >>> Yes, you are right, we should write a be32_to_cpu (the ones in Xen, QEMU >>> and Linux are GPLv2 rather than LGLPv2). >> >> I wonder if we can/should just declare that we handle only native endian >> zImages. > > Except this is used with the DTB and that is what it is. :-( > > We have ./tools/blktap2/drivers/bswap.h already which maybe we can make > more generic? > > TBH, given this is internal to this one loader I'm very tempted to just > keep using ntohl and friends. You will likely need to link to libfdt in the future and you will need to provide cpu_to_fdt32() and fdt32_to_cpu() etc. implementations (like include/xen/libfdt/libfdt_env.h for Xen itself). David