From patchwork Mon Jun 20 15:09:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 70461 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp1558936qgy; Mon, 20 Jun 2016 08:10:40 -0700 (PDT) X-Received: by 10.157.54.186 with SMTP id h55mr11021679otc.34.1466435437469; Mon, 20 Jun 2016 08:10:37 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id k9si9625543otd.35.2016.06.20.08.10.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jun 2016 08:10:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bF0pW-0006Ks-6U; Mon, 20 Jun 2016 15:09:38 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bF0pB-00066m-L9 for linux-arm-kernel@lists.infradead.org; Mon, 20 Jun 2016 15:09:19 +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 2A981440; Mon, 20 Jun 2016 08:09:45 -0700 (PDT) Received: from e104803-lin.lan (unknown [10.1.203.153]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 67BF33F246; Mon, 20 Jun 2016 08:08:58 -0700 (PDT) From: Andre Przywara To: Mark Rutland Subject: [PATCH 2/4] Xen: Support adding DT nodes Date: Mon, 20 Jun 2016 16:09:32 +0100 Message-Id: <20160620150934.1729-3-andre.przywara@arm.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160620150934.1729-1-andre.przywara@arm.com> References: <20160620150934.1729-1-andre.przywara@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160620_080917_724808_5A144974 X-CRM114-Status: UNSURE ( 8.77 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -8.3 (--------) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-8.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [217.140.101.70 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jean-Philippe Brucker , Julien Grall , Christoffer Dall , Ian Campbell , xen-devel@lists.xenproject.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org 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 --- Makefile.am | 34 +++++++++++++++++++++------------- configure.ac | 9 +++++++++ 2 files changed, 30 insertions(+), 13 deletions(-) -- 2.9.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/Makefile.am b/Makefile.am index 1a801c0..d83b417 100644 --- a/Makefile.am +++ b/Makefile.am @@ -93,24 +93,32 @@ FILESYSTEM_END := $(shell echo $$(($(FILESYSTEM_START) + $(FILESYSTEM_SIZE)))) 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 = \"$(BOOTARGS)\"; \ + \#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 - -if XEN -XEN := -DXEN=$(XEN_IMAGE) -XEN_OFFSET := 0x08200000 -endif CPPFLAGS += $(INITRD_FLAGS) CFLAGS += -Iinclude/ -I$(ARCH_SRC)/include/ diff --git a/configure.ac b/configure.ac index 2441f8b..b001939 100644 --- a/configure.ac +++ b/configure.ac @@ -95,6 +95,12 @@ AC_ARG_WITH([cmdline], [C_CMDLINE=$withval]) AC_SUBST([CMDLINE], [$C_CMDLINE]) +X_BOOTARGS="console=dtuart dtuart=serial0 no-bootscrub" +AC_ARG_WITH([xen-bootargs], + AS_HELP_STRING([--with-xen-bootargs], [set Xen bootargs]), + [X_BOOTARGS=$withval]) +AC_SUBST([BOOTARGS], [$X_BOOTARGS]) + # Allow a user to pass --enable-gicv3 AC_ARG_ENABLE([gicv3], AS_HELP_STRING([--enable-gicv3], [enable GICv3 instead of GICv2]), @@ -133,4 +139,7 @@ echo " Use GICv3? ${USE_GICV3}" echo " Boot-wrapper execution state: AArch${BOOTWRAPPER_ES}" echo " Kernel execution state: AArch${KERNEL_ES}" echo " Xen image ${X_IMAGE:-NONE}" +if test "x${X_IMAGE}" != "x"; then +echo " Xen Bootargs: ${X_BOOTARGS}" +fi echo ""