xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/16] arm: support for initial modules (e.g. dom0) and DTB supplied in RAM
@ 2012-09-03 13:28 Ian Campbell
  2012-09-03 13:30 ` [PATCH 01/16] arm: Zero the BSS at start of day Ian Campbell
                   ` (17 more replies)
  0 siblings, 18 replies; 47+ messages in thread
From: Ian Campbell @ 2012-09-03 13:28 UTC (permalink / raw)
  To: xen-devel

The following series implements support for initial images and DTB in
RAM, as opposed to in flash (dom0 kernel) or compiled into the
hypervisor (DTB). It arranges to not clobber these with either the h/v
text on relocation or with the heaps and frees them as appropriate.

Most of this is independent of the specific bootloader protocol which is
used to tell Xen where these modules actually are, but I have included a
simple PoC bootloader protocol based around device tree which is similar
to the protocol used by Linux to find its initrd
(where /chosen/linux,initrd-{start,end} indicate the physical address).

In the PoC the modules are listed in the chosen node starting
with /chosen/nr-modules which contains the count and then /chosen/module
%d-{start,end} which gives the physical address of the module
and /chosen/module%d-args which give its command line.

I will post a patch against the boot-wrapper[0] which implements the
"bootloader" side of this protocol shortly. With that you can boot using
the semi-hosting feature of the model (paths are host paths) like so:
        $MODEL linux-system-semi.axf -C cluster.cpu0.semihosting-cmd_line=\
        	'--kernel xen-arm.bin \
        	 --module zImage earlyprintk=xenboot console=ttyAMA1 root=/dev/mmcblk0 ro \
        	 --dtb vexpress-v2p-aem-v7a-xen.dtb -- dom0_mem=256M'

Until we know what bootloaders are going to become common in the ARM
servers world it hard to know who we should be working with to define a
proper protocol going forward and which bootloaders to supply patches
for. (see the mail with the boot-wrapper patch for more on this).

I suspect that we will inevitably need a tool which takes Xen and the
modules and builds them into a single self exploding image since
bootloader support for any protocol we end up defining is likely to be
spotty at least for the time being.

One thing I'm wondering is whether or not we should duplicate the Linux
zImage header (magic numbers, length etc) at the start of our image too.
That is this:
        
        start:
                        .type   start,#function
                        .rept   7
                        mov     r0, r0
                        .endr
           ARM(         mov     r0, r0          )
           ARM(         b       1f              )
         THUMB(         adr     r12, BSYM(1f)   )
         THUMB(         bx      r12             )
        
                        .word   0x016f2818              @ Magic numbers to help the loader
                        .word   start                   @ absolute load/run zImage address
                        .word   _edata                  @ zImage end address
         THUMB(         .thumb                  )
        1:              mov     r7, r1                  @ save architecture ID
                        mov     r8, r2                  @ save atags pointer

It's pretty trivial but I'm not sure of how much use it is.

[0] git://git.linaro.org/arm/models/boot-wrapper.git

^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2012-11-30 14:58 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-03 13:28 [PATCH 0/16] arm: support for initial modules (e.g. dom0) and DTB supplied in RAM Ian Campbell
2012-09-03 13:30 ` [PATCH 01/16] arm: Zero the BSS at start of day Ian Campbell
2012-09-06  9:56   ` Tim Deegan
2012-09-03 13:30 ` [PATCH 02/16] Create a raw binary target Ian Campbell
2012-09-06 10:01   ` Tim Deegan
2012-09-06 10:29     ` Ian Campbell
2012-09-03 13:30 ` [PATCH 03/16] arm: make virtual address defines unsigned Ian Campbell
2012-09-06 10:02   ` Tim Deegan
2012-09-03 13:30 ` [PATCH 04/16] arm: handle xenheap which isn't at the start of RAM Ian Campbell
2012-09-06 11:36   ` Tim Deegan
2012-09-03 13:30 ` [PATCH 05/16] arm: move get_paddr_function to arch setup.c from device_tree.c Ian Campbell
2012-09-06 11:40   ` Tim Deegan
2012-09-03 13:30 ` [PATCH 06/16] arm: parse modules from DT during early boot Ian Campbell
2012-09-06 11:47   ` Tim Deegan
2012-09-06 11:53     ` Ian Campbell
2012-11-30 14:58   ` Stefano Stabellini
2012-09-03 13:30 ` [PATCH 07/16] arm: avoid placing Xen over any modules Ian Campbell
2012-09-06 12:01   ` Tim Deegan
2012-09-03 13:30 ` [PATCH 08/16] arm: really allocate boot frametable pages with 32M alignment Ian Campbell
2012-09-06 12:04   ` Tim Deegan
2012-09-03 13:30 ` [PATCH 09/16] arm: avoid allocating the heaps over modules or xen itself Ian Campbell
2012-09-06 12:08   ` Tim Deegan
2012-09-03 13:30 ` [PATCH 10/16] arm: print a message if multiple banks of memory are present Ian Campbell
2012-09-06 12:31   ` Tim Deegan
2012-09-03 13:30 ` [PATCH 11/16] arm: mark heap and frametable limits as read mostly Ian Campbell
2012-09-06 13:29   ` Tim Deegan
2012-09-03 13:30 ` [PATCH 12/16] arm: const-correctness in virt_to_maddr Ian Campbell
2012-09-06 13:33   ` Tim Deegan
2012-09-03 13:30 ` [PATCH 13/16] device-tree: get_val cannot cope with cells > 2, add a BUG Ian Campbell
2012-09-06 13:35   ` Tim Deegan
2012-09-03 13:30 ` [PATCH 14/16] arm: load dom0 kernel from first boot module Ian Campbell
2012-09-06 13:44   ` Tim Deegan
2012-09-03 13:30 ` [PATCH 15/16] arm: discard boot modules after building domain 0 Ian Campbell
2012-09-06 13:53   ` Tim Deegan
2012-09-06 13:57     ` Ian Campbell
2012-09-06 14:03       ` Tim Deegan
2012-09-03 13:30 ` [PATCH 16/16] arm: use /chosen/module1-args for domain 0 command line Ian Campbell
2012-09-06 13:50   ` Tim Deegan
2012-09-06 13:55     ` Ian Campbell
2012-09-06 13:58       ` Tim Deegan
2012-09-06 13:59         ` Ian Campbell
2012-09-06 14:19   ` David Vrabel
2012-09-06 14:28     ` Ian Campbell
2012-09-06 14:46 ` [PATCH 0/16] arm: support for initial modules (e.g. dom0) and DTB supplied in RAM David Vrabel
2012-09-10 16:12   ` Ian Campbell
2012-09-17 11:39     ` Stefano Stabellini
2012-10-11 14:57 ` Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).