From patchwork Mon Feb 10 17:34:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 24409 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f70.google.com (mail-qa0-f70.google.com [209.85.216.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1B83820143 for ; Mon, 10 Feb 2014 17:36:47 +0000 (UTC) Received: by mail-qa0-f70.google.com with SMTP id ii20sf13942439qab.1 for ; Mon, 10 Feb 2014 09:36:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:cc:subject :precedence:list-id:list-unsubscribe:list-post:list-help :list-subscribe:mime-version:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive :content-type:content-transfer-encoding; bh=xOGoFzeTPeu7/JB9KHP5krtNFXWUdM4WMWHckLHT5tU=; b=aKrJZrDWZoSj6BTZet/hrCD6p16zw1ugyMTEELa+h7irmsI8w2XoldrqV7gJlLoDkL gIyY4W8VxeNX4lygZpM9Qm0t/fdMbLB1Jqy3nedSmgg4Pq5YJpBJ36qaScIGxuRalVMQ kcjZWoxAROdArQMWT57PSaz7g6r2AhdJMHaH/oLt8wYqZqo97F2fAzBdUi2AJsddlvhh 2QosWxUI/FwTEfiD5braLFt3vnNYUiW5mtdXcAhJ/G5KeaYp71XddOL6r5fnznjYGJoP zv+HGFJ/xMYBdkLVoYwP3lkltLhyfdSIyqDvzFuHH5D1lAZVBTKYCsE+UZeKK4fjVrdM 4bfw== X-Gm-Message-State: ALoCoQm0USSMf2cMHqWoDVH0bqOxsIunMOonfS2K56RSH3NyIaa6u6AuDqNZBJPkbv3M+g8nZUpj X-Received: by 10.236.36.39 with SMTP id v27mr10379977yha.5.1392053806604; Mon, 10 Feb 2014 09:36:46 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.25.198 with SMTP id 64ls2141596qgt.31.gmail; Mon, 10 Feb 2014 09:36:46 -0800 (PST) X-Received: by 10.220.5.8 with SMTP id 8mr85123vct.65.1392053806469; Mon, 10 Feb 2014 09:36:46 -0800 (PST) Received: from mail-vb0-f41.google.com (mail-vb0-f41.google.com [209.85.212.41]) by mx.google.com with ESMTPS id dc20si4975448vec.80.2014.02.10.09.36.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Feb 2014 09:36:46 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.41 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.41; Received: by mail-vb0-f41.google.com with SMTP id g10so4997422vbg.14 for ; Mon, 10 Feb 2014 09:36:46 -0800 (PST) X-Received: by 10.220.178.73 with SMTP id bl9mr246907vcb.42.1392053806376; Mon, 10 Feb 2014 09:36:46 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp185313vcz; Mon, 10 Feb 2014 09:36:45 -0800 (PST) X-Received: by 10.224.3.10 with SMTP id 10mr50059322qal.58.1392053805822; Mon, 10 Feb 2014 09:36:45 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id c6si10519735qad.89.2014.02.10.09.36.45 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 10 Feb 2014 09:36:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WCukw-00046v-0I; Mon, 10 Feb 2014 17:34:54 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WCukv-00046m-4F for xen-devel@lists.xenproject.org; Mon, 10 Feb 2014 17:34:53 +0000 Received: from [85.158.143.35:32641] by server-3.bemta-4.messagelabs.com id A3/4D-11539-CBD09F25; Mon, 10 Feb 2014 17:34:52 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-15.tower-21.messagelabs.com!1392053691!4605094!1 X-Originating-IP: [209.85.215.177] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 5234 invoked from network); 10 Feb 2014 17:34:51 -0000 Received: from mail-ea0-f177.google.com (HELO mail-ea0-f177.google.com) (209.85.215.177) by server-15.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 10 Feb 2014 17:34:51 -0000 Received: by mail-ea0-f177.google.com with SMTP id m10so536397eaj.8 for ; Mon, 10 Feb 2014 09:34:51 -0800 (PST) X-Received: by 10.14.149.131 with SMTP id x3mr23181462eej.7.1392053691167; Mon, 10 Feb 2014 09:34:51 -0800 (PST) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id k41sm57201787een.19.2014.02.10.09.34.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Feb 2014 09:34:50 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 10 Feb 2014 17:34:46 +0000 Message-Id: <1392053686-16843-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com Subject: [Xen-devel] [PATCH for-4.4] xen/arm: Correctly boot with an initrd and no linux command line X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.41 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: When DOM0 device tree is building, the properties for initrd will only be added if there is a linux command line. This will result to a panic later: (XEN) *** LOADING DOMAIN 0 *** (XEN) Populate P2M 0x20000000->0x40000000 (1:1 mapping for dom0) (XEN) Loading kernel from boot module 2 (XEN) Loading zImage from 0000000001000000 to 0000000027c00000-0000000027eafb48 (XEN) Loading dom0 initrd from 0000000002000000 to 0x0000000028200000-0x0000000028c00000 (XEN) (XEN) **************************************** (XEN) Panic on CPU 0: (XEN) Cannot fix up "linux,initrd-start" property (XEN) **************************************** (XEN) Signed-off-by: Julien Grall --- This is a bug fix for Xen 4.4. Without this patch, Xen won't boot with initrd when the linux command is not set. --- xen/arch/arm/domain_build.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 47b781b..5ca2f15 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -209,12 +209,15 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo, return res; } - if ( dt_node_path_is_equal(node, "/chosen") && bootargs ) + if ( dt_node_path_is_equal(node, "/chosen") ) { - res = fdt_property(kinfo->fdt, "bootargs", bootargs, - strlen(bootargs) + 1); - if ( res ) - return res; + if ( bootargs ) + { + res = fdt_property(kinfo->fdt, "bootargs", bootargs, + strlen(bootargs) + 1); + if ( res ) + return res; + } /* * If the bootloader provides an initrd, we must create a placeholder