From: Ian Campbell Subject: Re: [PATCH 36/38] libxc: add ARM support to xc_dom (PV domain building) Date: Mon, 23 Jul 2012 15:11:28 +0100 Message-ID: <1343052688.5797.38.camel@zakaz.uk.xensource.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1343051870.5797.36.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: Stefano Stabellini Cc: "Tim (Xen.org)" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org > > > 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. Ian