From patchwork Tue Nov 22 15:09:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 83418 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp2145571qge; Tue, 22 Nov 2016 07:10:55 -0800 (PST) X-Received: by 10.107.44.5 with SMTP id s5mr9642016ios.10.1479827455480; Tue, 22 Nov 2016 07:10:55 -0800 (PST) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id i12si19935880ioa.176.2016.11.22.07.10.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Nov 2016 07:10:55 -0800 (PST) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c9Cgg-0005Fo-Rg; Tue, 22 Nov 2016 15:08:46 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c9Cgf-0005FL-L7 for xen-devel@lists.xenproject.org; Tue, 22 Nov 2016 15:08:45 +0000 Received: from [85.158.137.68] by server-9.bemta-3.messagelabs.com id 9E/7B-08915-C7F54385; Tue, 22 Nov 2016 15:08:44 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBLMWRWlGSWpSXmKPExsVysyfVTbcm3iT C4MNWLovvWyYzOTB6HP5whSWAMYo1My8pvyKBNWPe2n1sBWtFKqbtnMTWwLhHoIuRi0NIYDOj xPJTH1ggnOWMEp1v3jN3MXJysAnoSuy4+RrMFhFQl+jZ9QWsiFlgHpPEqTvtLCAJYQETiUuvH oAVsQioSrQue80EYvMKWEvMPHYeLC4hICfRcP4+mM0pYCOxb9ITsF4hoJp1D76yTWDkXsDIsI pRozi1qCy1SNfIUC+pKDM9oyQ3MTNH19DAWC83tbg4MT01JzGpWC85P3cTI9DH9QwMjDsYe/b 6HWKU5GBSEuU9vNQoQogvKT+lMiOxOCO+qDQntfgQowwHh5IE77Q4kwghwaLU9NSKtMwcYLDB pCU4eJREINK8xQWJucWZ6RCpU4yKUuK8QSAJAZBERmkeXBsswC8xykoJ8zIyMDAI8RSkFuVml qDKv2IU52BUEuadCTKFJzOvBG76K6DFTECLJb8ZgywuSURISTUwtkp8z24UcK+2PfY96dGKL+ sfl03tOdG8Pu2gJP+MVJEq7dkZwYxMXE9kg2fIx34x6I42/+33aqanm0TF7pfWxYXmedN8HZn 5dy8Sb56q9pSx0Ou+RruFXHKMnv75bJf4e+HSag81Fpye9IOxf4NT+BP+e97Ht+svniha9i9G 9cpjhU96vseUWIozEg21mIuKEwFAFpgWawIAAA== X-Env-Sender: andre.przywara@arm.com X-Msg-Ref: server-13.tower-31.messagelabs.com!1479827323!71658898!1 X-Originating-IP: [217.140.101.70] X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50 X-StarScan-Received: X-StarScan-Version: 9.0.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 27694 invoked from network); 22 Nov 2016 15:08:44 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-13.tower-31.messagelabs.com with SMTP; 22 Nov 2016 15:08:44 -0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5C3A51575; Tue, 22 Nov 2016 07:08:43 -0800 (PST) Received: from e104803-lin.lan (unknown [10.1.207.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E94153F24D; Tue, 22 Nov 2016 07:08:41 -0800 (PST) From: Andre Przywara To: Mark Rutland Date: Tue, 22 Nov 2016 15:09:15 +0000 Message-Id: <20161122150917.16524-3-andre.przywara@arm.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20161122150917.16524-1-andre.przywara@arm.com> References: <20161122150917.16524-1-andre.przywara@arm.com> Cc: Stefano Stabellini , Catalin Marinas , Julien Grall , linux-arm-kernel@lists.infradead.org, Ian Campbell , xen-devel@lists.xenproject.org, Christoffer Dall Subject: [Xen-devel] [PATCH v2 2/4] Xen: Support adding DT nodes X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" From: Christoffer Dall Support adding xen,xen-bootargs node via --with-xen-bootargs to the configure script and automatically add the Dom0 node to the DT as well. Signed-off-by: Christoffer Dall Signed-off-by: Andre Przywara Tested-by: Konrad Rzeszutek Wilk Reviewed-by: Julien Grall --- Makefile.am | 23 +++++++++++++++-------- configure.ac | 9 +++++++++ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index f8b9ec9..db97f9c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -96,21 +96,28 @@ FDT_OFFSET := 0x08000000 if XEN XEN := -DXEN=$(XEN_IMAGE) XEN_OFFSET := 0x08200000 +KERNEL_SIZE := $(shell stat -Lc %s $(KERNEL_IMAGE) 2>/dev/null || echo 0) +DOM0_OFFSET := $(shell echo $$(($(PHYS_OFFSET) + $(KERNEL_OFFSET)))) +XEN_BOOTARGS := xen,xen-bootargs = \"$(XEN_CMDLINE)\"; \ + \#address-cells = <2>; \ + \#size-cells = <2>; \ + module@1 { \ + compatible = \"xen,linux-zimage\", \"xen,multiboot-module\"; \ + reg = <0x0 $(DOM0_OFFSET) 0x0 $(KERNEL_SIZE)>; \ + }; endif if INITRD INITRD_FLAGS := -DUSE_INITRD +INITRD_CHOSEN := linux,initrd-start = <$(FILESYSTEM_START)>; \ + linux,initrd-end = <$(FILESYSTEM_END)>; +endif + CHOSEN_NODE := chosen { \ bootargs = \"$(CMDLINE)\"; \ - linux,initrd-start = <$(FILESYSTEM_START)>; \ - linux,initrd-end = <$(FILESYSTEM_END)>; \ - }; -else -INITRD_FLAGS := -CHOSEN_NODE := chosen { \ - bootargs = \"$(CMDLINE)\"; \ + $(INITRD_CHOSEN) \ + $(XEN_BOOTARGS) \ }; -endif CPPFLAGS += $(INITRD_FLAGS) CFLAGS += -Iinclude/ -I$(ARCH_SRC)/include/ diff --git a/configure.ac b/configure.ac index f7e24c7..aff4aad 100644 --- a/configure.ac +++ b/configure.ac @@ -98,6 +98,12 @@ AC_ARG_WITH([cmdline], [C_CMDLINE=$withval]) AC_SUBST([CMDLINE], [$C_CMDLINE]) +X_CMDLINE="console=dtuart dtuart=serial0 no-bootscrub" +AC_ARG_WITH([xen-cmdline], + AS_HELP_STRING([--with-xen-cmdline], [set Xen command line]), + [X_CMDLINE=$withval]) +AC_SUBST([XEN_CMDLINE], [$X_CMDLINE]) + # Allow a user to pass --enable-gicv3 AC_ARG_ENABLE([gicv3], AS_HELP_STRING([--enable-gicv3], [enable GICv3 instead of GICv2]), @@ -136,4 +142,7 @@ echo " Use GICv3? ${USE_GICV3}" echo " Boot-wrapper execution state: AArch${BOOTWRAPPER_ES}" echo " Kernel execution state: AArch${KERNEL_ES}" echo " Xen image ${XEN_IMAGE:-NONE}" +if test "x${XEN_IMAGE}" != "x"; then +echo " Xen command line: ${XEN_CMDLINE}" +fi echo ""