[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] How to boot xen using U-Boot for ARM64



On Fri, 2015-09-25 at 14:07 +0800, Peng Fan wrote:
> Hi, Ian
> 
> 2015-09-24 15:08 GMT+08:00 Ian Campbell <ian.campbell@xxxxxxxxxx>:
> > On Thu, 2015-09-24 at 14:18 +0800, Peng Fan wrote:
> > > Hi,
> > >
> > > I am porting xen to an ARM64 platform, but I found that file `xen` is
> > > "MS-DOS executable, MZ for MS-DOS"  which means xen is an efi app?
> > > For now, I only have uboot run, have not ported uefi. Is efi is a
> > > must for xen ARM64?
> > 
> > The arm64 Xen binary is both a valid PE (UEFI) application _and_ a
> > normal kernel image which can be booted frmo uboot using
> > bootm/bootz/booti etc.
> Thanks. I can see the outputs from xen using booti. But I saw that the
> entry text_offset and image_size of the Image_header are 0. Is this
> correct?

Yes, per [0] (linked to from [1]), image_size == 0 means text_offset should
be treated as 0x80000 for backwards compatibility (those fields were only
added to Linux in v3.17).

> xen's start address is 0x80200000.

i.e. this is where you have loaded it?

> The physical dram address starts from 0x80000000 to 0xC0000000 - 1.
> 
> To uboot, since text_offset is 0 and ih->image_size is 0.
> "dst = gd->bd->bi_dram[0].start + le32_to_cpu(ih->text_offset);"
> booti code will copy xen from 0x80200000 to 0x80000000. Now I hacked this
> to not do this to let xen stays at physical address 0x80200000.

This sounds like a u-boot bug then, according to [0].

The arm64 platforms I use either use UEFI or have a u-boot which only does
bootm but not booti, so I wouldn't have tripped over this.

That said, I'm not sure why Xen would object to be loaded at 0x80000000,
since that is a validly aligned 2M address. What bad behaviour do you see
in this case?

Ian.

[0] 
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm64/booting.txt
[1] 
http://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions#Booting_Xen


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.