From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: [PATCH] xen: arm: implement generic multiboot compatibility strings (Was: Re: [Linaro-uefi] The GRUB multiboot support patch for aarch64(V3.1)) Date: Thu, 5 Jun 2014 12:56:48 +0100 Message-ID: <1401969408.15729.52.camel@hastur.hellion.org.uk> References: <536A1FCF.50207@linaro.org> <1401899819.15729.44.camel@hastur.hellion.org.uk> <5390205B.5060803@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5390205B.5060803@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Fu Wei Cc: xen-devel , linaro-uefi List-Id: xen-devel@lists.xenproject.org On Thu, 2014-06-05 at 15:46 +0800, Fu Wei wrote: > > I can see why you did this (it's what Xen actually supports today) but I > > wonder if in the interests of reducing the special cases I should create > > a Xen patch which causes it to accept both names so that you can just > > implement the "multiboot,*" stuff in common code without the special > > cases? (Although that depends on the reason for the other non-compat > > string special cases too) > > I think the "multiboot,*" stuff will be better, once Xen supports > this, I will update this code. I've only compile tested this, but I *think* this does the right thing. Ian. 8<----------------- >>From d0acce53a086869420c2d8870d1a8a058013d6b5 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Wed, 4 Jun 2014 18:17:10 +0100 Subject: [PATCH] xen: arm: implement generic multiboot compatibility strings This causes Xen to accept the more generic names originally proposed by Andre in http://thread.gmane.org/gmane.linux.linaro.announce.boot/326 and incorporated into the proposal in http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Multiboot This will allow bootloaders to not special case Xen (or at least to reduce the amount which is required). Signed-off-by: Ian Campbell --- xen/common/device_tree.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c index f0b17a3..5040097 100644 --- a/xen/common/device_tree.c +++ b/xen/common/device_tree.c @@ -338,9 +338,11 @@ static void __init process_multiboot_node(const void *fdt, int node, struct dt_mb_module *mod; int len; - if ( fdt_node_check_compatible(fdt, node, "xen,linux-zimage") == 0 ) + if ( fdt_node_check_compatible(fdt, node, "xen,linux-zimage") == 0 || + fdt_node_check_compatible(fdt, node, "multiboot,linux-zimage") == 0 ) nr = MOD_KERNEL; - else if ( fdt_node_check_compatible(fdt, node, "xen,linux-initrd") == 0) + else if ( fdt_node_check_compatible(fdt, node, "xen,linux-initrd") == 0 || + fdt_node_check_compatible(fdt, node, "multiboot,linux-initrd") == 0 ) nr = MOD_INITRD; else if ( fdt_node_check_compatible(fdt, node, "xen,xsm-policy") == 0 ) nr = MOD_XSM; @@ -433,7 +435,8 @@ static int __init early_scan_node(const void *fdt, { if ( device_tree_node_matches(fdt, node, "memory") ) process_memory_node(fdt, node, name, address_cells, size_cells); - else if ( device_tree_node_compatible(fdt, node, "xen,multiboot-module" ) ) + else if ( device_tree_node_compatible(fdt, node, "xen,multiboot-module" ) || + device_tree_node_compatible(fdt, node, "boot,module" )) process_multiboot_node(fdt, node, name, address_cells, size_cells); else if ( depth == 1 && device_tree_node_matches(fdt, node, "chosen") ) process_chosen_node(fdt, node, name, address_cells, size_cells); -- 1.9.0