From patchwork Thu Dec 15 12:27:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 88142 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp763881qgi; Thu, 15 Dec 2016 04:28:34 -0800 (PST) X-Received: by 10.36.14.84 with SMTP id 81mr988935ite.54.1481804914108; Thu, 15 Dec 2016 04:28:34 -0800 (PST) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id w71si8824159ith.96.2016.12.15.04.28.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Dec 2016 04:28:34 -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 1cHV7Q-0005oS-NJ; Thu, 15 Dec 2016 12:26:40 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cHV7P-0005nu-L5 for xen-devel@lists.xenproject.org; Thu, 15 Dec 2016 12:26:39 +0000 Received: from [193.109.254.147] by server-4.bemta-6.messagelabs.com id 9C/5E-25093-FFB82585; Thu, 15 Dec 2016 12:26:39 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrGLMWRWlGSWpSXmKPExsVysyfVTfdfd1C EwbGjchbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8aZY29YCmaKViy8fYitgXG+YBcjJ4eQwGZG iaOTirsYuYDs5YwS7TN7mUASbAK6EjtuvmYGsUUE1CV6dn1hASliFjjPJLF2xxFWkISwgInEj IUXGEFsFgFViU+rusBsXgFricY/L1hAbAkBOYmG8/eBBnFwcArYSByfFAix2Fqi7esN1gmM3A sYGVYxahSnFpWlFukaGuolFWWmZ5TkJmbm6BoamOnlphYXJ6an5iQmFesl5+duYgT6lwEIdjB +WhZwiFGSg0lJlPdiY1CEEF9SfkplRmJxRnxRaU5q8SFGGQ4OJQleHmC4CAkWpaanVqRl5gAD DSYtwcGjJMKrApLmLS5IzC3OTIdInWJUlBLnVQdJCIAkMkrz4NpgwX2JUVZKmJcR6BAhnoLUo tzMElT5V4ziHIxKwrwCIFN4MvNK4Ka/AlrMBLRYdIk/yOKSRISUVAOj4PKMP7c/aZWHBx+5P/ +WjevnWxyxy1X/z3rFsnU9f1jBNhXzBe6rl502rw5fkX/qq9TWjX+uaYZknNZsjxI0XbAj3+Y tz6O3Zx1XpqR/SrC3yXtq9C1/dtipM9PVMnTruPgz56qs1Zk4O2PL/QndNnl2Ob5ivrOVTnbM Omy7xnTKzoSXF+QOK7EUZyQaajEXFScCAIJb1MZpAgAA X-Env-Sender: andre.przywara@arm.com X-Msg-Ref: server-12.tower-27.messagelabs.com!1481804798!76066806!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.1.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 14933 invoked from network); 15 Dec 2016 12:26:38 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-12.tower-27.messagelabs.com with SMTP; 15 Dec 2016 12:26:38 -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 C57171570; Thu, 15 Dec 2016 04:26:37 -0800 (PST) Received: from e104803-lin.lan (unknown [10.1.207.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3B2973F3D6; Thu, 15 Dec 2016 04:26:36 -0800 (PST) From: Andre Przywara To: Mark Rutland Date: Thu, 15 Dec 2016 12:27:16 +0000 Message-Id: <20161215122718.21422-4-andre.przywara@arm.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20161215122718.21422-1-andre.przywara@arm.com> References: <20161215122718.21422-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 v3 3/5] 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-cmdline 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 1d7cf3d..ea02dca 100644 --- a/configure.ac +++ b/configure.ac @@ -111,6 +111,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]), @@ -149,4 +155,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 ""