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

Re: [Xen-users] Running Xen on ARM Juno r0


  • To: xen-users@xxxxxxxxxxxxx
  • From: N Jain <jain61@xxxxxxxxx>
  • Date: Mon, 21 Sep 2015 10:56:28 -0400
  • Delivery-date: Mon, 21 Sep 2015 14:57:11 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>

Hi Ian,

Thanks for the detailed steps but I am still having some issues booting up xen on Juno.
I have tried to add the xen.cfg and xen.efi to Juno Images.txt as follows but some how on reboot there is not enough space to flash these images.
I did look into flash AREA and it looks there is enough space.

Base    Area Size Blocks Block Size
---- Â Â Â --------- ------ ----------
0x08000000 Â Â65280K Â Â255 Â Â Â 256K
0x0BFC0000 Â Â Â256K Â Â Â4 Â Â Â Â64K

My Images.txt is as follows. I have highlighted the xen.cfg and xen.efi image sections which I am configuring to "0x0BFC0000" and "0x0BFD0000" respectively.
Please let me know if I am missing something ?

[IMAGES]
TOTALIMAGES: 10 Â Â Â Â Â Â Â Â Â ;Number of Images (Max: 32)

NOR0UPDATE: AUTO Â Â Â Â Â Â Â Â ;Image Update:NONE/AUTO/FORCE
NOR0ADDRESS: 0x00000000 Â Â Â Â Â;Image Flash Address 0x08000000
NOR0FILE: \SOFTWARE\fip.bin   Â;Image File Name
NOR0LOAD: 00000000 Â Â Â Â Â Â Â ;Image Load Address
NOR0ENTRY: 00000000 Â Â Â Â Â Â Â;Image Entry Point

NOR1UPDATE: AUTO Â Â Â Â Â Â Â Â ;Image Update:NONE/AUTO/FORCE
NOR1ADDRESS: 0x03EC0000 Â Â Â Â Â;Image Flash Address 0x0BEC0000
NOR1FILE: \SOFTWARE\bl1.bin   Â;Image File Name
NOR1LOAD: 00000000 Â Â Â Â Â Â Â ;Image Load Address
NOR1ENTRY: 00000000 Â Â Â Â Â Â Â;Image Entry Point

NOR2UPDATE: AUTO Â Â Â Â Â Â Â Â ;Image Update:NONE/AUTO/FORCE
NOR2ADDRESS: 0x00500000 Â Â Â Â Â;Image Flash Address 0x08500000
NOR2FILE: \SOFTWARE\Image    Â;Image File Name
NOR2NAME: norkern        Â;Rename kernel to norkern
NOR2LOAD: 00000000 Â Â Â Â Â Â Â ;Image Load Address
NOR2ENTRY: 00000000 Â Â Â Â Â Â Â;Image Entry Point

NOR3UPDATE: AUTO Â Â Â Â Â Â Â Â ;Image Update:NONE/AUTO/FORCE
NOR3ADDRESS: 0x02000000 Â Â Â Â Â;Image Flash Address 0x0A000000
NOR3FILE: \SOFTWARE\juno.dtb   ;Image File Name
NOR3NAME: board.dtb       Â;Specify target filename to preserve file extension
NOR3LOAD: 00000000 Â Â Â Â Â Â Â ;Image Load Address
NOR3ENTRY: 00000000 Â Â Â Â Â Â Â;Image Entry Point

NOR4UPDATE: AUTO Â Â Â Â Â Â Â Â ;Image Update:NONE/AUTO/FORCE
NOR4ADDRESS: 0x01800000 Â Â Â Â Â;Image Flash Address 0x09800000
NOR4FILE: \SOFTWARE\ramdisk.img Â;Image File Name
NOR4NAME: ramdisk.img
NOR4LOAD: 00000000 Â Â Â Â Â Â Â ;Image Load Address
NOR4ENTRY: 00000000 Â Â Â Â Â Â Â;Image Entry Point

NOR5UPDATE: AUTO Â Â Â Â Â Â Â Â ;Image Update:NONE/AUTO/FORCE
NOR5ADDRESS: 0x025C0000 Â Â Â Â Â;Image Flash Address 0x0A5C0000
NOR5FILE: \SOFTWARE\hdlcdclk.dat ;Image File Name
NOR5LOAD: 00000000 Â Â Â Â Â Â Â ;Image Load Address
NOR5ENTRY: 00000000 Â Â Â Â Â Â Â;Image Entry Point

NOR6UPDATE: AUTO Â Â Â Â Â Â Â Â ;Image Update:NONE/AUTO/FORCE
NOR6ADDRESS: 0x03E40000 Â Â Â Â Â;Image Flash Address 0xBE40000
NOR6FILE: \SOFTWARE\bl0.bin   Â;Image File Name
NOR6LOAD: 00000000 Â Â Â Â Â Â Â ;Image Load Address
NOR6ENTRY: 00000000 Â Â Â Â Â Â Â;Image Entry Point

NOR7UPDATE: AUTO Â Â Â Â Â Â Â Â ;Image Update:NONE/AUTO/FORCE
NOR7ADDRESS: 0x0BFC0000 Â Â Â Â Â;Image Flash Address 0x0BFC0000
NOR7FILE: \SOFTWARE\xen.efi   Â;Image File Name
NOR7NAME: xen.efi
NOR7LOAD: 00000000 Â Â Â Â Â Â Â ;Image Load Address
NOR7ENTRY: 00000000 Â Â Â Â Â Â Â;Image Entry Point

NOR8UPDATE: AUTO Â Â Â Â Â Â Â Â ;Image Update:NONE/AUTO/FORCE
NOR8ADDRESS: 0x0BFD0000 Â Â Â Â Â;Image Flash Address 0x0BFD0000
NOR8FILE: \SOFTWARE\xen.cfg   Â;Image File Name
NOR8NAME: xen.cfg
NOR8LOAD: 00000000 Â Â Â Â Â Â Â ;Image Load Address
NOR8ENTRY: 00000000 Â Â Â Â Â Â Â;Image Entry Point

NOR9UPDATE: AUTO Â Â Â Â Â Â Â Â ;Image Update:NONE/AUTO/FORCE
NOR9ADDRESS: 0x0BFE0000 Â Â Â Â Â;Image Flash AddressÂ
NOR9FILE: \SOFTWARE\blank.img  Â;Image File Name
NOR9LOAD: 00000000 Â Â Â Â Â Â Â ;Image Load Address
NOR9ENTRY: 00000000 Â Â Â Â Â Â Â;Image Entry Point

On Fri, Sep 18, 2015 at 9:40 AM, Ian Campbell <ian.campbell@xxxxxxxxxx> wrote:
On Fri, 2015-09-18 at 10:22 +0100, Ian Campbell wrote:
> > Can you please send me the compilation steps and booting instructions
> > which you use to boot up Xen ?
>
> I build it with a simple make and launch the resulting binary from the EFI
> shell. There is nothing magic to it I'm afraid.

I dusted of my Juno and tried to boot it, using 4.6.0-rc3.

I built the hypervisor with:

  make -C xen XEN_TARGET_ARCH=arm64 debug=y CROSS_COMPILE=aarch64-linux-gnu- CONFIG_EARLY_PRINTK=juno

I've then added it to my Juno IMAGES.TXT as xen.efi along with a xen.cfg containing:

  [global]
  default=default

  [default]
  options=console=dtuart dtuart=serial0 conswitch=x dom0_mem=1536M
  kernel=norkern console=hvc0 earlycon=pl011,0x7ff80000 rootwait root=/dev/sda2 clk_ignore_unused
  dtb=board.dtb

Where board.dtb and norkern are the one supplied by the default firmware
image. FYI I'm using the 15.06 Linaro firmware release.

You need to take care in IMAGES.TXT to use the NOR??NAME option to make
sure the files end as xen.efi and xen.cfg. By default the lower level
firmware strips the extension.

Then I launch it from the UEFI prompt with

  fs2:
  xen.efi

And then it boots with:
  Xen 4.6.0-rc (c/s Fri Sep 18 14:11:18 2015 +0100 git:9bc900a) EFI loader
  Using configuration file 'xen.cfg'
  board.dtb: 0x00000009faab3000-0x00000009faab5c1d
  norkern: 0x00000009f9fbd000-0x00000009faaaea00
  - UART enabled -
  - CPU 00000100 booting -
  - Current EL 00000008 -
  - Xen starting at EL2 -
  - Zero BSS -
  - Setting up control registers -
  - Turning on paging -
  - Ready -
  (XEN) Checking for initrd in /chosen
  (XEN) RAM: 0000000080000000 - 00000000dfffffff
  (XEN) RAM: 00000000e00f0000 - 00000000fe6dffff
  (XEN) RAM: 00000000fe750000 - 00000000fe754fff
  (XEN) RAM: 00000000fe755000 - 00000000feffffff
  (XEN) RAM: 0000000880000000 - 00000009f9fbcfff
  (XEN) RAM: 00000009faab3000 - 00000009faab6fff
  (XEN) RAM: 00000009faca9000 - 00000009faecffff
  (XEN) RAM: 00000009faf81000 - 00000009faf8bfff
  (XEN) RAM: 00000009faf8c000 - 00000009fedabfff
  (XEN) RAM: 00000009fedac000 - 00000009feeb5fff
  (XEN) RAM: 00000009feeb6000 - 00000009feeb8fff
  (XEN) RAM: 00000009feeb9000 - 00000009feee2fff
  (XEN) RAM: 00000009feee3000 - 00000009feee5fff
  (XEN) RAM: 00000009feee6000 - 00000009ffdbffff
  (XEN) RAM: 00000009ffdc0000 - 00000009fff4ffff
  (XEN) RAM: 00000009fff90000 - 00000009fff9ffff
  (XEN) RAM: 00000009ffff0000 - 00000009ffffefff
  (XEN) RAM: 00000009fffff000 - 00000009ffffffff
  (XEN)
  (XEN) MODULE[0]: 00000009faaaf000 - 00000009faab3000 Device Tree
  (XEN) MODULE[1]: 00000009f9fbd000 - 00000009faaaea00 Kernel   Âconsole=hvc0 earlycon=pl011,0x7ff80000 rootwait root=/dev/sda2 clk_ignore_unused
  (XEN)
  (XEN) Command line: xen.efi console=dtuart dtuart=serial0 conswitch=x dom0_mem=1536M
  (XEN) Placing Xen at 0x00000000dfe00000-0x00000000e0000000
  (XEN) Update BOOTMOD_XEN from 00000009faab7000-00000009fabc1d81 => 00000000dfe00000-00000000dff0ad81
  (XEN) PFN compression on bits 21...22
  (XEN) Domain heap initialised
  (XEN) Platform: VERSATILE EXPRESS
  (XEN) Looking for dtuart at "serial0", options ""
  Â__ __      _ _  __  ___
  Â\ \/ /___ _ __ Â| || | / /_ / _ \  _ __ ___
   \ // _ \ '_ \ | || |_| '_ \| | | |__| '__/ __|
   / \ __/ | | | |__ Â_| (_) | |_| |__| | | (__
  Â/_/\_\___|_| |_|  |_|(_)___(_)___/ Â|_| \___|

  (XEN) Xen version 4.6.0-rc (  ianc@xxxxxxxxxxxxxxxx  ) (aarch64-linux-gnu-gcc (crosstool-NG linaro-1.13.1-4.8-2014.04 - Linaro GCC 4.8-2014.04) 4.8.3 20140401 (prerelease)) debug=y Fri Sep 18 14:11:21 BST 2015
  (XEN) Latest ChangeSet: Fri Sep 18 14:11:18 2015 +0100 git:9bc900a
  (XEN) Processor: 410fd030: "ARM Limited", variant: 0x0, part 0xd03, rev 0x0
  (XEN) 64-bit Execution:
  (XEN) ÂProcessor Features: 0000000000002222 0000000000000000
  (XEN)  ÂException Levels: EL3:64+32 EL2:64+32 EL1:64+32 EL0:64+32
  (XEN)  ÂExtensions: FloatingPoint AdvancedSIMD
  (XEN) ÂDebug Features: 0000000010305106 0000000000000000
  (XEN) ÂAuxiliary Features: 0000000000000000 0000000000000000
  (XEN) ÂMemory Model Features: 0000000000001122 0000000000000000
  (XEN) ÂISA Features: 0000000000011120 0000000000000000
  (XEN) 32-bit Execution:
  (XEN) ÂProcessor Features: 00000131:00011011
  (XEN)  ÂInstruction Sets: AArch32 A32 Thumb Thumb-2 Jazelle
  (XEN)  ÂExtensions: GenericTimer Security
  (XEN) ÂDebug Features: 03010066
  (XEN) ÂAuxiliary Features: 00000000
  (XEN) ÂMemory Model Features: 10101105 40000000 01260000 02102211
  (XEN) ISA Features: 02101110 13112111 21232042 01112131 00011142 00011121
  (XEN) Error: PSCI version 0x10000 is not supported.
  (XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 50000 KHz
  (XEN) GICv2 initialization:
  (XEN)    Âgic_dist_addr=000000002c010000
  (XEN)    Âgic_cpu_addr=000000002c02f000
  (XEN)    Âgic_hyp_addr=000000002c04f000
  (XEN)    Âgic_vcpu_addr=000000002c06f000
  (XEN)    Âgic_maintenance_irq=25
  (XEN) GICv2: 352 lines, 6 cpus, secure (IID 0200143b).
  (XEN) Using scheduler: SMP Credit Scheduler (credit)

This is with the unmodified 4.6.0-rc3, the git commit above is the result
of "git diff 4.6.0-rc3 | patch -p1" to remove all my local changes for the
time being, so it is identical to a7b39c8bd6cba3fe1c8012987b9e28bdbac7e92d.

With this kernel it doesn't appear to find its root filesystem after it
boots dom0, but as you can see it boots way past head.S. In any case I
don't think this kernel has Xen support compiled in.

Even without xen.cfg, norkern and board.dtb or a working dom0 kernel Xen
will still get well past head.S and with CONFIG_EARLY_PRINTK=juno will
print a fairly large proportion of the above. TCL_EL2 is setup between "-
Setting up control registers -" and "- Turning on paging -".

Ian.


_______________________________________________
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®.