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

Re: [Xen-devel] Bare-metal Xen on ARM boot



On Thu, 2013-05-02 at 15:55 +0100, Sander Bogaert wrote:
> On 1 May 2013 11:27, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
> After finally understanding what needed to be done ( and some
> compilation struggles ) I made the suggested change. Basically I just
> added one line to set the rambase when loading an ELF ( see below ).
> This seems to work for my custom binary, as far as I can tell from the
> logs it boots but immediatly crashes ( see attached log ). For the
> Linux ELF binary, linuxvm this doesnt work ( see log ). I think it's
> because it has some address hardcoded in it? So my questions:
> 
> Can I get a small confirmation my custom binary boots and crashes
> after a succesful boot? :-)

(XEN) Guest data abort: Translation fault at level 2
(XEN)     gva=8ffffff8

What does the binary do? Looks like it has executed way outside its
memory. What is the custom guest's memory layout like?

> Any tips on the linux kernel case? I don't really need this but maybe
> I can whip up a real patch and submit it ( it would be a very small
> one but it's a start )?

I don't think the Linux kernel ELF file is ever expected to be bootable
as an independent thing, at least not for ARM, it relies on stuff in the
zImage which wraps the raw binary.

Ian.

> My changes:
> 
> diff --git a/tools/libxc/xc_dom_elfloader.c b/tools/libxc/xc_dom_elfloader.c
> index 911f316..9b6a847 100644
> --- a/tools/libxc/xc_dom_elfloader.c
> +++ b/tools/libxc/xc_dom_elfloader.c
> @@ -31,6 +31,8 @@
> 
>  #define XEN_VER "xen-3.0"
> 
> +#define ARM_GUEST_RAM_BASE 0x80000000
> +
>  /* ------------------------------------------------------------------------ 
> */
> 
>  static void log_callback(struct elf_binary *elf, void *caller_data,
> @@ -297,6 +299,9 @@ static int xc_dom_parse_elf_kernel(struct xc_dom_image 
> *dom)
>      dom->kernel_seg.vstart = dom->parms.virt_kstart;
>      dom->kernel_seg.vend   = dom->parms.virt_kend;
> 
> +       /* this should only be done for arm */
> +    dom->rambase_pfn = ARM_GUEST_RAM_BASE >> XC_PAGE_SHIFT;
> +
>      if ( dom->parms.bsd_symtab )
>          xc_dom_load_elf_symtab(dom, elf, 0);



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


 


Rackspace

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