* Xen on ARM DT based boot protocol
@ 2013-05-23 12:39 Stefano Stabellini
2013-05-23 12:47 ` George Dunlap
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Stefano Stabellini @ 2013-05-23 12:39 UTC (permalink / raw)
To: Ian Campbell; +Cc: george.dunlap, andre.przywara, xen-devel
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.
It would make their life easier if we had instead:
chosen {
xen,xen-bootarg = "dom0_mem=128M console=com1,vga";
bootargs = "earlyprintk=xenboot console=ttyAMA1 root=/dev/mmcblk0 debug rw init=/bin/bash";
};
Are we still on time to make this change on 4.3?
- Stefano
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Xen on ARM DT based boot protocol
2013-05-23 12:39 Xen on ARM DT based boot protocol Stefano Stabellini
@ 2013-05-23 12:47 ` George Dunlap
2013-05-23 13:22 ` Ian Campbell
2013-05-23 14:07 ` David Vrabel
2 siblings, 0 replies; 7+ messages in thread
From: George Dunlap @ 2013-05-23 12:47 UTC (permalink / raw)
To: Stefano Stabellini; +Cc: xen-devel, andre.przywara, Ian Campbell
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.
> It would make their life easier if we had instead:
>
>
> chosen {
> xen,xen-bootarg = "dom0_mem=128M console=com1,vga";
> bootargs = "earlyprintk=xenboot console=ttyAMA1 root=/dev/mmcblk0 debug rw init=/bin/bash";
> };
>
> Are we still on time to make this change on 4.3?
Is this just an ARM-specific thing, or would it affect x86 as well?
The state of the ARM port when we do the release is up to you guys, so
I'm fine with whatever. ARM is still tech-preview anyway, right? No
promises (yet) that the interface won't change? So whichever interface
you chose, if it turns out to be the wrong one, you can change it for
4.4 if necessary.
-George
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Xen on ARM DT based boot protocol
2013-05-23 12:39 Xen on ARM DT based boot protocol Stefano Stabellini
2013-05-23 12:47 ` George Dunlap
@ 2013-05-23 13:22 ` Ian Campbell
2013-05-23 14:07 ` David Vrabel
2 siblings, 0 replies; 7+ messages in thread
From: Ian Campbell @ 2013-05-23 13:22 UTC (permalink / raw)
To: Stefano Stabellini; +Cc: george.dunlap, andre.przywara, xen-devel
On Thu, 2013-05-23 at 13:39 +0100, 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.
> It would make their life easier if we had instead:
>
>
> chosen {
> xen,xen-bootarg = "dom0_mem=128M console=com1,vga";
> bootargs = "earlyprintk=xenboot console=ttyAMA1 root=/dev/mmcblk0 debug rw init=/bin/bash";
> };
You mean that instead of
if (xen /*or whatever*/) {
add("bootargs", xencmd);
add("xen,dom0-bootargs", lcmd);
} else
add("xen,xen-bootargs", xencmd);
add("bootargs", lcmd);
}
they can have:
add("bootargs", lcmd);
if (xen /*or whatever*/) {
add("xen,xen-bootargs", xencmd);
}
? Seems like the bootloader needs to know about Xen either way?
Regardless I suppose it's a harmless enough change, although it has
knock on affects on the dom0 dtb creation stuff etc so it might be
useful to see a proposed patch.
What about docs/misc/arm/device-tree/booting.txt though? Or more
generally the fact that the xen,dom0-bootargs "protocol" is really just
a quick hack and not the final thing we actually want bootloaders to
implement (we really want multiboot2 or something).
> Are we still on time to make this change on 4.3?
I think if we think it is definitely the right thing to do we can/should
just do it.
Ian.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Xen on ARM DT based boot protocol
2013-05-23 12:39 Xen on ARM DT based boot protocol Stefano Stabellini
2013-05-23 12:47 ` George Dunlap
2013-05-23 13:22 ` Ian Campbell
@ 2013-05-23 14:07 ` David Vrabel
2013-05-23 21:04 ` Stefano Stabellini
2 siblings, 1 reply; 7+ messages in thread
From: David Vrabel @ 2013-05-23 14:07 UTC (permalink / raw)
To: Stefano Stabellini; +Cc: george.dunlap, xen-devel, andre.przywara, Ian Campbell
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).
> It would make their life easier if we had instead:
>
>
> chosen {
> xen,xen-bootarg = "dom0_mem=128M console=com1,vga";
> bootargs = "earlyprintk=xenboot console=ttyAMA1 root=/dev/mmcblk0 debug rw init=/bin/bash";
> };
David
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Xen on ARM DT based boot protocol
2013-05-23 14:07 ` David Vrabel
@ 2013-05-23 21:04 ` Stefano Stabellini
2013-05-23 22:27 ` Andre Przywara
0 siblings, 1 reply; 7+ messages in thread
From: Stefano Stabellini @ 2013-05-23 21:04 UTC (permalink / raw)
To: David Vrabel
Cc: george.dunlap, xen-devel, andre.przywara, Ian Campbell,
Stefano Stabellini
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Xen on ARM DT based boot protocol
2013-05-23 21:04 ` Stefano Stabellini
@ 2013-05-23 22:27 ` Andre Przywara
2013-05-24 8:31 ` Ian Campbell
0 siblings, 1 reply; 7+ messages in thread
From: Andre Przywara @ 2013-05-23 22:27 UTC (permalink / raw)
To: Stefano Stabellini
Cc: george.dunlap@eu.citrix.com, xen-devel@lists.xensource.com,
David Vrabel, Ian Campbell
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 = "...";
}
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.
Will send a patch tomorrow.
Regards,
Andre.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Xen on ARM DT based boot protocol
2013-05-23 22:27 ` Andre Przywara
@ 2013-05-24 8:31 ` Ian Campbell
0 siblings, 0 replies; 7+ messages in thread
From: Ian Campbell @ 2013-05-24 8:31 UTC (permalink / raw)
To: Andre Przywara
Cc: george.dunlap@eu.citrix.com, xen-devel@lists.xensource.com,
David Vrabel, Stefano Stabellini
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.
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-05-24 8:31 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-23 12:39 Xen on ARM DT based boot protocol Stefano Stabellini
2013-05-23 12:47 ` George Dunlap
2013-05-23 13:22 ` Ian Campbell
2013-05-23 14:07 ` David Vrabel
2013-05-23 21:04 ` Stefano Stabellini
2013-05-23 22:27 ` Andre Przywara
2013-05-24 8:31 ` Ian Campbell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.