diff mbox

[Xen-devel,v3,09/10] xen: arm: update multiboot device tree bindings.

Message ID 1405688900-11769-9-git-send-email-ian.campbell@citrix.com
State Accepted
Commit 99195c767be1ddafb805327db11ef63973b43093
Headers show

Commit Message

Ian Campbell July 18, 2014, 1:08 p.m. UTC
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: (Try to) Clarify some wording, add examples to help.
---
 docs/misc/arm/device-tree/booting.txt |   54 +++++++++++++++++++++++++++++----
 1 file changed, 48 insertions(+), 6 deletions(-)

Comments

Julien Grall July 18, 2014, 9:03 p.m. UTC | #1
Hi Ian,

On 18/07/14 14:08, Ian Campbell wrote:
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

Acked-by: Julien Grall <julien.grall@linaro.org>

Regards,

> ---
> v2: (Try to) Clarify some wording, add examples to help.
> ---
>   docs/misc/arm/device-tree/booting.txt |   54 +++++++++++++++++++++++++++++----
>   1 file changed, 48 insertions(+), 6 deletions(-)
>
> diff --git a/docs/misc/arm/device-tree/booting.txt b/docs/misc/arm/device-tree/booting.txt
> index bfb8d01..d967061 100644
> --- a/docs/misc/arm/device-tree/booting.txt
> +++ b/docs/misc/arm/device-tree/booting.txt
> @@ -8,15 +8,31 @@ Each node contains the following properties:
>
>   - compatible
>
> -	Must be:
> +	Must always include at least the generic compatiblity string:
>
> -		"xen,<type>", "xen,multiboot-module"
> +		"multiboot,module"
>
> -	where <type> must be one of:
> +	Optionally a more specific compatible string may be used in
> +	addition to the above. One of:
>
> -	- "linux-zimage" -- the dom0 kernel
> -	- "linux-initrd" -- the dom0 ramdisk
> -	- "xsm-policy"	 -- XSM policy blob
> +	- "multiboot,kernel"	-- the dom0 kernel
> +	- "multiboot,ramdisk"	-- the dom0 ramdisk
> +	- "xen,xsm-policy"	-- XSM policy blob
> +
> +	It is normally recommended to include a more specific
> +	compatible string (if one applies) in addition to the generic
> +	string (which must always be present).
> +
> +        Xen 4.4 supported a different set of legacy compatible strings
> +	which remain supported such that systems supporting both 4.4
> +	and later can use a single DTB.
> +
> +	- "xen,multiboot-module" equivalent to "multiboot,module"
> +	- "xen,linux-zimage"     equivalent to "multiboot,kernel"
> +	- "xen,linux-initrd"     equivalent to "multiboot,ramdisk"
> +
> +	For compatibility with Xen 4.4 the more specific "xen,linux-*"
> +	names are non-optional and must be included.
>
>   - reg
>
> @@ -29,6 +45,32 @@ Each node contains the following properties:
>   	priority of this field vs. other mechanisms of specifying the
>   	bootargs for the kernel.
>
> +Examples
> +========
> +
> +A boot module of unspecified type:
> +
> +	module@0xc0000000 {
> +		compatible = "multiboot,module";
> +		reg = <0xc0000000 0x1234>;
> +		bootargs = "...";
> +	};
> +
> +A boot module containing a ramdisk:
> +
> +	module@0xd0000000 {
> +		compatible = "multiboot,ramdisk", "multiboot,module";
> +		reg = <0xd0000000 0x5678>;
> +	};
> +
> +The previous examples are compatible with Xen 4.5+ only.
> +
> +To be compatible with Xen 4.4 as well use the legacy names:
> +
> +	module@0xd0000000 {
> +		compatible = "xen,linux-initrd", "xen,multiboot-module";
> +		reg = <0xd0000000 0x5678>;
> +	};
>
>   Command lines
>   =============
>
Ian Campbell July 21, 2014, 11:45 a.m. UTC | #2
On Fri, 2014-07-18 at 22:03 +0100, Julien Grall wrote:
> Hi Ian,
> 
> On 18/07/14 14:08, Ian Campbell wrote:
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> 
> Acked-by: Julien Grall <julien.grall@linaro.org>

Thanks. I've applied patches 1..9 of this series. I'll resend 10 ASAP
with the change you've suggested.

On my potential backports list I've got:
xen: arm: implement generic multiboot compatibility strings
xen: arm: /chosen/module@N/bootargs bootprotcol node is not deprecated

I don't think anything else here is suitable for backport. Let me know
if you think something is (or isn't)

Thanks,
Ian.
Julien Grall July 21, 2014, 11:53 a.m. UTC | #3
On 07/21/2014 12:45 PM, Ian Campbell wrote:
> On Fri, 2014-07-18 at 22:03 +0100, Julien Grall wrote:
>> Hi Ian,
>>
>> On 18/07/14 14:08, Ian Campbell wrote:
>>> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
>>
>> Acked-by: Julien Grall <julien.grall@linaro.org>
> 
> Thanks. I've applied patches 1..9 of this series. I'll resend 10 ASAP
> with the change you've suggested.
> 
> On my potential backports list I've got:
> xen: arm: implement generic multiboot compatibility strings
> xen: arm: /chosen/module@N/bootargs bootprotcol node is not deprecated
> 
> I don't think anything else here is suitable for backport. Let me know
> if you think something is (or isn't)

I would also update the document bindings in
docs/misc/arm/device-tree/booting.txt.

The patch #9 looks the good one for this purpose. Minus the unspecified
type example.

BTW, I don't find anything in the documentation talking about bootmodule
type detection by ordering. Is this intended?

Regards,
diff mbox

Patch

diff --git a/docs/misc/arm/device-tree/booting.txt b/docs/misc/arm/device-tree/booting.txt
index bfb8d01..d967061 100644
--- a/docs/misc/arm/device-tree/booting.txt
+++ b/docs/misc/arm/device-tree/booting.txt
@@ -8,15 +8,31 @@  Each node contains the following properties:
 
 - compatible
 
-	Must be:
+	Must always include at least the generic compatiblity string:
 
-		"xen,<type>", "xen,multiboot-module"
+		"multiboot,module"
 
-	where <type> must be one of:
+	Optionally a more specific compatible string may be used in
+	addition to the above. One of:
 
-	- "linux-zimage" -- the dom0 kernel
-	- "linux-initrd" -- the dom0 ramdisk
-	- "xsm-policy"	 -- XSM policy blob
+	- "multiboot,kernel"	-- the dom0 kernel
+	- "multiboot,ramdisk"	-- the dom0 ramdisk
+	- "xen,xsm-policy"	-- XSM policy blob
+
+	It is normally recommended to include a more specific
+	compatible string (if one applies) in addition to the generic
+	string (which must always be present).
+
+        Xen 4.4 supported a different set of legacy compatible strings
+	which remain supported such that systems supporting both 4.4
+	and later can use a single DTB.
+
+	- "xen,multiboot-module" equivalent to "multiboot,module"
+	- "xen,linux-zimage"     equivalent to "multiboot,kernel"
+	- "xen,linux-initrd"     equivalent to "multiboot,ramdisk"
+
+	For compatibility with Xen 4.4 the more specific "xen,linux-*"
+	names are non-optional and must be included.
 
 - reg
 
@@ -29,6 +45,32 @@  Each node contains the following properties:
 	priority of this field vs. other mechanisms of specifying the
 	bootargs for the kernel.
 
+Examples
+========
+
+A boot module of unspecified type:
+
+	module@0xc0000000 {
+		compatible = "multiboot,module";
+		reg = <0xc0000000 0x1234>;
+		bootargs = "...";
+	};
+
+A boot module containing a ramdisk:
+
+	module@0xd0000000 {
+		compatible = "multiboot,ramdisk", "multiboot,module";
+		reg = <0xd0000000 0x5678>;
+	};
+
+The previous examples are compatible with Xen 4.5+ only.
+
+To be compatible with Xen 4.4 as well use the legacy names:
+
+	module@0xd0000000 {
+		compatible = "xen,linux-initrd", "xen,multiboot-module";
+		reg = <0xd0000000 0x5678>;
+	};
 
 Command lines
 =============