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

Re: [Xen-devel] Xen on ARM DT based boot protocol



On Fri, 2013-05-24 at 00:27 +0200, Andre Przywara wrote:
> On 05/23/2013 11:04 PM, Stefano Stabellini wrote:
> 
> Hi,
> 
> > On Thu, 23 May 2013, David Vrabel wrote:
> >> On 23/05/13 13:39, Stefano Stabellini wrote:
> >>> Hi Ian,
> >>> Andre was pointing out to me today that the current boot protocol has a
> >>> problem:
> >>>
> >>>
> >>> chosen {
> >>>                bootargs = "dom0_mem=128M console=com1,vga";
> >>>                xen,dom0-bootargs = "earlyprintk=xenboot console=ttyAMA1 
> >>> root=/dev/mmcblk0 debug rw init=/bin/bash";
> >>> };
> >>>
> >>>
> >>> because we are using bootargs for Xen arguments, the bootloader cannot
> >>> just pass the same two lines to Xen on ARM and to Linux on ARM.
> >>
> >> I think it is unlikely the command line arguments for Linux are the same
> >> for bare metal and dom0.  Even in this example here you have a
> >> Xen-specific option (earlyprintk=xenboot).
> >
> > Actually that is not true, in fact in the example above the only
> > difference is earlyprintk=xenboot that is just a debug option.
> 
> Interestingly Linux/ARM does not seem to expect a parameter to 
> earlyprintk, the actual device to use is hardcoded in 
> arch/arm/include/debug/<mach>.S and earlyprintk is just a switch. So 
> earlyprintk=xen is broken anyway ;-)
> 
> But using bootargs for Dom0 could just be a fallback, so what about:
> 
> if xen,xen-bootargs is provided: use it for Xen, else use "";
> if xen,dom0-bootargs is provided: use it for Dom0, else
>       if bootargs is provided: use that for Dom0
> write Dom0 cmdline into chosen/bootargs in Dom0's dtb
> 
> And is there a need for the "xen," prefix? I thought that this syntax is 
> only needed for the compatible property, no?
> 
> So eventually there could be one dtb to rule them all:
> chosen {
>       xen,xen-bootargs = "...";
>       xen,dom0-bootargs = "...";
>       bootargs = "...";
> }

This makes sense, I think, assuming we want to continue with this scheme
at all.

> My concern is not so much about the bootloader's understanding of the 
> dtb, but more about the vendor provided one, which one would expect to 
> be in flash ROM, for instance. We can provide only one here.

The chosen nodes, even if they were provided in the vendor DTB, are
generally overwritten by the bootloader I think.

> Will send a patch tomorrow.
> 
> Regards,
> Andre.
> 



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